Example of Displaying the Slave Diagnosis with FB 192 "IM308C"
Here you will find an example of how to use the FB 192 to display the slave
diagnosis for a DP slave in the STEP 5 user program.
Assumptions
The following assumptions apply to this STEP 5 user program:
S The IM 308-C is assigned pages 0 to 15 (number 0 of the IM 308-C) as the DP
master.
S The DP slave has the PROFIBUS address 3.
S The slave diagnosis is to be stored in DB 20. However, you can also use any
other data block for this.
S The slave diagnosis consists of 29 bytes.
STEP 5 User Program
STL
:A
DB 30
:JU
FB 192
Name
:IM308C
DPAD
:
KH F800
IMST
:
KY 0, 3
FCT
:
KC SD
GCGR
:
KM 0
TYPE
:
KY 0, 20
STAD
:
KF +1
LENG
:
KF –1
ERR
:
DW 0
Distributed I/O Device ET 200M
EWA-4NEB780600602-06
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Commissioning and Diagnostics
Description
Default address area of the IM 308-C
IM No. = 0, PROFIBUS address of DP slave = 3
Function: Read slave diagnosis
Not evaluated
S5 data area: DB 20
Diagnostic data from data word 1
Diagnosis length = joker length (all permissible
bytes)
Error code stored in DW 0 of DB 30
6-15