I am trying to write the integer signal using python script which is used to control the work process.
I wrote the signal:
d = 0.8
if wf.Value or sensor.Value: print wf.Value, sensor.Value #initial state state = 0 if raySensor.ComponentSignal.Value: prodid = raySensor.ComponentSignal.Value.ProdID if sensor.Value and not trigger.Value and prodid == '000': state = 1 #state_sig.signal(state) print 'Load product at 1st station' elif sensor.Value and trigger.Value: state = 3 #state_sig.signal(state) print 'Pass product at 1st station' elif not sensor.Value and wf.Value: state = 2 #state_sig.signal(state) print 'Unload product at 1st station' print state_sig.Value if state_sig.Value != state and state != 0: state_sig.signal(state)
However, the work process did not get the new signal and trigger the switch case.
How can I update the signal to work process?
testWorkProcess_ATS_step0.vcmx (2.6 MB)
=======Below is the code in work process====