6-19
Communications Processor CP 541
EWA 4NEB 812 6188-02
6.3.4
Example of a Diagnostic Call with IM308-C and FB IM308C
Given here is a short example of the S5-115U with IM 308-C as the DP mas-
ter. It shows how you read the slave diagnosis for the CP 541 into your pro-
grammable controller with FB IM308C.
S5-95U
CP 541
S5-115U
IM 308-C
SINEC L2-DP
Figure 6-1 Example of Configuration
The following situation is assumed for this user program:
The IM 308-C reserves pages 0 to 15 as the SINEC L2-DP master.
The CP 541 has station number 3.
The slave diagnosis is to be stored in DB 20.
The slave diagnosis consists of 8 bytes.
The following user program shows how to request the slave diagnosis for the
CP 541 with FB IM308C.
STL
Explanation
:Q
DB 30
:JU
FB 192
Name
:IM308C
DPAD
:
KH F800
IMST
:
KY 0, 3
FCT
:
KS SD
GCGR
:
KM 0
TYP
:
KY 0, 20
STAD
:
KF +1
LENG
:
KF 8
ERR
:
DW 0
Default address area of the IM 308-C
IM no. = 0, CP 541 station no. = 3
Function: read slave diagnosis
Will not be evaluated
S5 data area: DB 20
Diagnostic data from data word 1
Diagnostic length = 8 bytes
Error code stored in DW 0 of DB 30
Example
Assumed Situation
Diagnostic Call
Diagnostics and Error Handling