Hi ,
I try to trigger OnSignalTrigger event to monitor vcBooleanSignalMap but somehow I cannot.
if somebody can share a snippetI would appreciate it .
Hi ,
I try to trigger OnSignalTrigger event to monitor vcBooleanSignalMap but somehow I cannot.
if somebody can share a snippetI would appreciate it .
Let us see how you assigned the event handler. I say that because there is a known issue when assigning an event handler of a signal in a for loop or in a chain of arguments.
from vcScript import *
def test(map,port,value):
print map,port,value
comp = getComponent()
rx = comp.getBehaviour(“Executor”)
inputs = rx.DigitalInputSignals
inputs.OnSignalTrigger = test
Look at the PythonScript #2 in the robot of the attached layout
Hi ,
Thanks for the script , I have noticed that the problem was the executorin my layout because system has no robot and boolean signal map is acting like an PLC input and output , after removing the executor OnSignalTrigger started to work .
However, I still cannot follow group of i/o ( ex: port 100 to 110 ) at the same time. When I tried to iterate inputs() or outputs() simulation crashed is there any event or function to be able to do it ? Or I need to implement my own and embed it into the OnSignalTrigger event