When starting up a line simulation I often end up in a catch-22 situation.
Scenario: Robot 1 delivers a part to Robot 2.
In order for Robot 1 to get an enable signal (to avoid collisions etc.), Robot 2 must send an enable signal to Robot 1. But since Robot 2 hasn't completed its first cycle yet it has no enable signal to send.
I could split the operation of Robot 1 and use transition conditions instead, but in my opinion that seems like a bad solution since I would end up with a large number of smaller operations. That's why I would prefer to use OLP commands.
I wish the OLP command for the Robot 1 wait location could look something like this:
# WaitSignal IN_ROBOT1 1 OR NOT "SIGNAL_EVENT_WHEN_ROBOT2_STARTS"
Is it possible to set/wait for key signals using OLP commands or is there another solution?
Solved! Go to Solution.
You can manually write:
# WaitSignals <any robot signal expression>
Note the 's' in WaitSignals.
Only robot signals of the given robot can be tested, so you have to properly map your signal connections via logic blocks.
I'm not sure how to write the expression syntax with an "OR" statement. Is this even remotely correct?
# WaitSignals Robot1_EndSignal_IN_Robot2 1 OR Robot1_StartSignal_IN_Robot2 0
Robot1_EndSignal_IN_Robot2 = Robot2's enable signal at Robot2 cycle end
Robot1_StartSignal_IN_Robot2 = Robot2's signal at Robot2 cycle start
I have mapped the I/O:s in the Module Editor.
When running the simulation I receive this error: "Failed to extract signals from expression 'Robot1_EndSignal_IN_ROBOT2 1 OR Robot1_StartSignal_IN_Robot2 0'".
# WaitSignals (Robot1_EndSignal_IN_Robot2 == 1) OR (Robot1_StartSignal_IN_Robot2 == 0)
You can also use AND, XOR, >, <, etc...
Thanks for your help!
Now I receive a new error:
"Signal Robot1_EndSignal_IN_Robot2 not found, value 0 is assumed"
"Signal Robot1_StartSignal_IN_Robot2 not found, value 0 is assumed"
The signals are working in the Simulation Panel.
In the OLP Command you need to use the "Robot Signal name", not the "PLC Signal name" that you can see in the Simulation Panel.