I am trying to achieve simulating when robots break down in my line. I am trying to use a python script
to wait for a certain amount of time (using a distribution property as the time variable)
after that time the robot should break. stop working. I got this functionality working with simple machines
but I can not get it to work with robots.
I have tried setting the vcHelpers.Robot2
#vcHelpers.Robot2.Executor.IsEnabled = False
but even after I set the IsEnabled property of the executor to false the robot keeps moving.
I don’t know maybe Im targeting the wrong property
After you set the robot executor IsEnabled property to False, the robot will execute the current statement and stop after that. After you set the IsEnabled property back to True, you also need to call a statement so that the robot starts moving again.
I tested stopping the robot and then re-enabling it with the following script:
will I be able to get this fucntionality even though I am using a Process robot controller? or is there any way to achieve this through process modeling UI or is the best option to just rebuild the whole line through python scripting and get rid of the process modeling components in order to get this script to work.
The robot transport controller overrides the robot controls, so my earlier example does not work in this case. There is probably a way to modify the transport controller, but I think that’s overkill.
Have you tried implementing this without code directly in the Process?
Here’s an example using the IF statement: