Programming Example - Siemens SIMATIC NET CP 142-2 Manual

Table of Contents

Advertisement

B8976111/02

3.3.2.7 Programming Example

The example below illustrates how you can react to a diagnostic interrupt from the CP 142-2 in OB82
by reading the data record (DS1).
.
.
.
L
#OB82_MDL_ADDR
T
MW
98
CALL „RD_REC"
REQ
:=TRUE
IOID
:=B#16#54
LADDR
:=MW98
RECNUM
:=B#16#1
RET VAL
:=MW96
BUSY
:=M90.0
RECORD
:=P#M 100.0 BYTE 11 //receive buffer
.
.
.
AM100.7
CCFC21
.
.
.
How the program functions
It is assumed that slaves 1 and 12 were configured using the buttons on the CP 142-2 and that the
CP 142-2 is in the protected mode.
If slave 7 fails, the CP 142-2 generates a diagnostic interrupt. The BM147 then enters the message
"module fault" in the system diagnostic buffer and starts OB82 (program above). On completion of
OB82, the delta list contains the following information:
MB 107
80
H
MB 108
00
H
MB 109
00
H
MB 110
00
H
//module address supplied by OB82
//store temporarily
//stored module address
//DS1
//status/error info
//irrelevant for ET200X
//error on AS-i slave 7
//error reaction
3-14
AS-i Master Module CP 142-2

Advertisement

Table of Contents
loading

Table of Contents