A feature implemented in FB 45 allows a normal error to be signaled to the user
(error_FB=09) when an RFID PROFIBUS slave fails. To do this, the user sets bit
"ASM_failure = 1" in OB 122 for the failed RFID channel. The following example shows a
possible OB 122 implementation.
OB122: "Module Access Error"
Network 1: Reset channel 1 when error occurs
x1:
Network 2: Reset channel 2 when error occurs
x2:
OB 86 must also be available on the automation system in addition to OB 122 to prevent the
system from switching to STOP if a PROFIBUS slave fails. No code needs to be
programmed in OB 86 for the correct operation of FB 45.
After the error on the CM has been corrected and the CM is ready for operation again, the
user needs to start an init_run for FB 45. The CM is then ready for operation.
FB 45 for MOBY U, MOBY D, RF200, RF300
Function Manual, 07/2012, J31069-D0166-U001-A4-7618
L
#OB122_MEM_ADDR
L
"MOBY DB".SLG1.ASM_address
-D
SRW
1
L
1
+D
L
"MOBY DB".SLG1.ASM_channel
==I
JCN
x1
SET
S
"MOBY DB".SLG1.ASM_failure
NOP
0
L
#OB122_MEM_ADDR
L
"MOBY DB".SLG2.ASM_address
-D
SRW
1
L
1
+D
L
"MOBY DB".SLG2.ASM_channel
==I
JCN
x2
SET
S
"MOBY DB".SLG2.ASM_failure
NOP
0
Examples/applications
6.5 Programming a module failure
// Temporary OB 122 variable
// Formula:
// (#OB122_MEM_ADDR -
SLG[x].ASM_address) / 2 + 1
// Compare with conf. channel
// Power failure on ASM
// Temporary OB 122 variable
// Formula:
// (#OB122_MEM_ADDR -
SLG[x].ASM_address) / 2 + 1
// Compare with conf. channel
// Power failure on ASM
69