3 Safety-Related Functions
11.03
3.10 Safe programable logic (SPL) (840D SW 4.4.18)
© Siemens AG 2003 All Rights Reserved
3-142
SINUMERIK 840D/SIMODRIVE 611 digital SINUMERIK Safety Integrated (FBSI) - Edition 11.03
Note
When starting the NCK-SPL (SAFE.SPF) it is important that the
PROG_EVENT mechanism was started via channel 1. This must be taken
into account when parameterizing the channel-specific machine data MD
20108
$MC_PROG_EVENT_MASK.
Using the system variable
$P_PROG_EVENT
, in PROG_EVENT.SPF it can be
interrogated as to which event activated the call:
•
Start of program
$P_PROG_EVENT == 1
•
End of program
$P_PROG_EVENT == 2
•
Operator panel reset
$P_PROG_EVENT == 3
•
Power-up $P_PROG_EVENT
==
4
The call using FB4/FC9 in the PLC program is replaced by calling SAFE.SPF in
PROG_EVENT.SPF. For the PROG_EVENT.SPF cycle, MD 11602
$MN_ASUP_START_MASK
(recommended setting = 7H) is taken into
account; this can be used to ignore reasons for initiating a stop for the
sequence. The setting in MD 11604 $MN_ASUP_START_PRIO_LEVEL is not
relevant for PROG_EVENT.SPF.
In conjunction with the call of SAFE.SPF via PROG_EVENT.SPF, there are
additional bits in the SPL status that can be used for synchroniziing the NCK-
SPL execution and the start of the PLC-SPL.
DB18.DBX137.0 (status bit 8)
This bit is set if the NCK-SPL was started using the PROG_EVENT
mechanism.
Only the start is displayed and not that SAFE.SPF was successfully executed.
DB18.DBX137.5 (status bit 13)
This bit is set if the end of the SAFE.SPF program is identified. In conjunction
with this, the end IDs
M02
,
M17
or
M30
are permissible for SAFE.SPF as end
of program.
If an error occurs while executing SAFE.SPF, and the end of the program is not
reached (e.g. M17), then bit 13 is not set in the SPL status.
This bit can be used in the PLC user program to start the PLC-SPL. This
means that the PLC-SPL only starts if the NCK-SPL was completely executed.
; --------------------------------------------------------
; Event-controlled program call
; PROG_EVENT.SPF under ..\DH\CMA.DIR
; --------------------------------------------------------
; In machine data MD 20108: PROG_EVENT_MASK, for each
specific channel it can be set as to which of the
following events will enable the user program:
; ( ) start of program --> bit0 == 1
; ( ) end of program --> bit1 == 1
; ( ) operator panel reset --> bit2 == 1
; (x) run-up --> bit3 == 1
SPL status signals
from SW 6.4.15
Example for
PROG_EVENT.SPF