So that is the thing, I like to set/reset DO[x] when certain tp program is selected
How to set digital output on when certain Tp program is selected
-
RookieWithRobots -
October 9, 2019 at 11:43 AM -
Thread is Unresolved
-
-
When the program is just selected in the TP select menu or when it is actually run?
-
When program is selected.....I just wanna be sure from PLC side that right program is selected before Cycle Start.
-
That kind of setup is pretty rudimentary. It would be better to have a main program which will select the right routine to run based on a group input from the PLC. Echo back program number from robot to make sure that it matches.
-
17: GO[2:Job echo]=(GI[2:Job requested]) ;
18: WAIT DI[66:Job echo ok]=ON TIMEOUT,LBL[2] ;
-
That is also one possibility. But that is not exactly what I like to have. I'm just thinking is there some combination of system variables, UOs which I can monitor in BG logic or something similar🤔
-
The intended way to do this is to have the PLC select the program, not the operator. Just as Lemster has stated.
If the PLC knows which program should be run, then just have the operator press start and let the PLC select the program, don't let them make a mistake by manually selecting from the TP screen. In the Prog Select menu you need to choose a start method and select method. If you have a PLC then I recommend UOP for start method. Then for select method I recommend "Other" with one main program defined in the detail menu, then branch out from that main program using a group input as suggested by Fabian. Another decent option is to use PNS.
If you insist on knowing which program the operator selected, then there are a couple of system variables you can look at. $SHELL_WRK.$rout_name or $TP_DEFPROG.
-
I will take this topic up again. Maybe somebody has better solution for this? I really like to make that as clean so possible and try to avoid Karel etc. Maybe somebody have idea how to do it in BG Logic?
-
HawkME has the best solution to this.
Instead of letting the operator choose the program and then double checking with the PLC, you should let the PLC choose which program to run. You can set up a remote program check that allows the PLC to select which program is going to be run.
Like HawkME said if you still want to monitor which program has been selected take a look at the $SHELL_WRK.$rout_name or $TP_DEFPROG system variables.
-
Yes I know those system variables, but what is the best way to use those to monitor active program? Because in my case I like to have that monitoring active all the time.
-
Just guessing here, but is it possible to run a program in BG that says something like;
IF $TP_DEFPROG = X, DO[x]=on
IF $TP_DEFPROG = Y, DO[y]=on
IF $TP_DEFPROG = Z, DO[z]=on
I don't have an idle robot to try this on, and it has potential to eat up a lot of outputs, but from what I've read above, this sounds more in line with what you want to accomplish...