Examples/applications
6.5 Programming a module failure
FC 45
Function manual, Release 03/2006 , J31069-D0167-U001-A2-7618
6-9
6.5
6.5
Programming a module failure
The failure of a PROFIBUS module can be detected primarily using the PROFIBUS system
diagnostics.
However, if a failed slave is addressed via FC 45, an I/O access error is generated in
SIMATIC.
As a result
•
OB 122 is called.
•
the PLC switches to STOP if no OB 122 is programmed.
A feature implemented in FC 45 allows a normal error to be signaled to the user
(error_FC=09) when a MOBY PROFIBUS slave fails. To do this, the user sets bit
"ASM_failure = 1" in OB 122 for the failed MOBY channel. The following example shows a
possible OB 122 implementation.
Block: OB122
Network: 1 Reset channel 1 on error
L #OB122_MEM_ADDR
L
"MOBY DB".SLG[1].ASM_address
-D
SRW 1
L 1
+D
// Temporary OB122
// Formula:
// (#OB122_MEM_ADDR –
SLG[x].ASM_address) / 2 + 1
L
"MOBY DB".SLG[1].ASM_channel
==I
SPBN x1
// Compare with config.
channel
SET
S
"MOBY DB".SLG[1].ASM_failure
// Power failure on ASM
x1:
NOP 0