3. Diagnostics
3-20
Festo P.BE-CPX-PNIO-E N en 1407c English
Basic approaches – Diagnostics with user programs
Call the function block SFB54 RALRM within the error OB that
was started by the controller, e.g. OB 82 or OB 86. A program
example can be found in Fig. 3/3.
1. Call up SFB 54 initiall y with the operating mo de MODE = 0
in order to determine the logical address of the I/O devi ce
triggering the diagnostics.
2. For determining the diagnostics details:
– Call up SFB 54 with the operating mo de MODE = 2.
– Enter the diagnostics address of the bus node in the
parameter F_ID (accept diagnostics address from
step 1.).
3. SFB 54 writes th e diagnosti cs informati o n to the AINFO
output parameter.
IL Explanation
CALL “RALRM” , DB54 Call SFB 54
MODE :=2 Operating mode c heck of the IO device with address in F_ ID
F_ID :=DW#16#7F3 Logica l address of the bus node (diagnostics address)
MLEN :=255 Max. Length in bytes
NEW :=M54.0 New alarm received
STATUS:=“DB_ALARM”.STATUS Error code of the SFB
ID :=“DB_ALARM”.ID Start ing a ddress of the module with alarm
LEN :=“DB_ALARM”.LEN Length of alarm information
TINFO:=“DB_ALARM”.TINFO Ta rget range OB start information (Task information)
AINFO:=“DB_ALARM”.AINFO Target range header/additional information
(alarm information)
Fig. 3/3: Program example in instruction list for reading diagnostics information