To resume, I am working with a S7 PLC and I am aiming to retrieve periodic data and alarms from the S7, so I declared two S7 connectors :
-one for periodic reading
-one for alarm reading
msg.payload.nodeid = 'whatever'
Periodic will execute a respective python script (status.py for Status, alarm.py for Alarm, periodic.py for Periodic), but those scripts can't run at the same time.
A scenario example that can't happen :
Periodic sends data and status sends data at same time
So in order to implement a kind of Scheduler, I tried to use the
switch node to test the equality of
msg.payload.nodeid so that if the msg.payload.nodeid is equal to the alarm id then it must delay the execution of the status script and periodic script (and if the msg.payload.nodeid is equal to periodic id, delay the two others and so on).
The problem is that using the switch node, I am able to distinguish msg.payload.nodeid but can't schedule tasks.
Do you have any idea?