12-08-2023 12:08 PM
The PnozMulti2 comment for the EmStopEventClass parameter contains a hint regarding missing software actions if the PnozMulti2 is used without the EmergencySwitch AddOn.
Is there a good example implementation available for PnozMulti2 usage without EmergencySwitch AddOn?
Solved! Go to Solution.
12-08-2023 02:33 PM - edited 12-08-2023 03:57 PM
Best way would be, if you have a signal "Control On" and use the falling edge for a cancel (this is what the ControlOn add-on does).
Alternatively this code should work (not tested):
IF( _cancelSet )
THEN
// Cancel must be reset in the same way like Execute
Station.Unit.Cancel := FALSE;
_cancelSet := FALSE;
END_IF
_emStopR(CLK := PnozMultiAddon.OutImm.EmStop);
IF( _emStopR.Q )
THEN
Station.Unit.Cancel := TRUE;
_cancelSet := TRUE;
END_IF
But the signal is flickering during emergency stop which causes many Cancels with the code above:
You could try to add a TOF to avoid the flickering.
12-11-2023 11:50 AM
Thank you for the suggestion Steffen! I decided to use the inverted K910 signal from the PnozMulti2 which seems to be more stable. To be able to feed the rEmergencyStop input of the StationLamp addon I introduced an own flag EmStopActive.
I am currently testing this solution and will feedback after I can confirm it works reliable.
12-14-2023 11:34 AM - edited 12-14-2023 11:36 AM
This is the code I am using now and it is working for me. BinIo._K910 is the signal from the pnozMulti (/// K910 emergency Stop i.O. and bus runs / monitoring compressed air i.O. [PLC input])
// {{{ ---- set global signal emstop active
OutImm.Safety.EmStopActive := NOT BinIo._K910;
// }}} ----
// {{{ ---- set cancel if emstop is activated
IF( _cancelSet )
THEN
// Cancel must be reset in the same way like Execute
Station.Unit.Cancel := FALSE;
_cancelSet := FALSE;
END_IF
_emStopR(CLK := OutImm.Safety.EmStopActive);
IF( _emStopR.Q )
THEN
Station.Unit.Cancel := TRUE;
_cancelSet := TRUE;
END_IF
// }}} ----