beautypg.com

Baumer GK473 User Manual

Page 17

background image

Manual_GK473_S7_Profibus_EN.doc 17/32

Baumer IVO GmbH & Co. KG

04.05.11

Villingen-Schwenningen,

Germany

3.7 Organization block OB82

Contrary to the name „Diagnostic alarm” OB82 "I/O Point Fault" is not effected upon DP-Slave alarm
but upon „warnings“ (existing external diagnostic data, no static diagnosis).
Incoming and outgoing events can be evaluated separately.

Organization block OB82 not inserted in the project will make the PLC stop upon occurrence of such
event. To prevent a PLC stop it is sufficient inserting OB82 without program code.

The program in OB82 described in the following first is tracing the logic basic identifier of the DP slave
the warning comes from. After having stored the identifier in memory word 5 it is checked whether it is
an incoming or outgoing event with branching down into several subprograms. In the following
example however the same applies to both cases. The diagnostic data (10 byte) are consistently being
copied into data block DB20. There is a repetition loop since this procedure may take several cycles
and SFC13 is repeated until the procedure has been finalized (BUSY).

At the beginning of the program a characteristic bit pattern is written on the S7 module groups (outputs
ID 4 and 5) to visualize OB82 at the S7 LEDs. The LEDs are cleared by key (see OB1).

L

W#16#5555

// Visualize event at LEDs of

T

AW

4

// output module group ID 4

L

#OB82_MDL_ADDR

// Logic basic identifier of DP-Slaves

T MW

5

L

#OB82_EV_CLASS

// Event class and token

L

B#16#39

// Mark incoming event
// (B#16#38: outgoing event)

==

I //

Identical?

SPB KOMM


GEHT: NOP 0

CALL

"DPNRM_DG"

//

Symbols

SFC13

REQ :=TRUE
LADDR :=W#16#3FE

// Diagnostic address 1022=3FEh,
// see Hardware Config Slave

RET_VAL:=MW20

// any free memory word available

RECORD :=P#DB20.DBX 0.0 BYTE 11 // Target is data block DB20,

// Beginning byte 0, length 6+5=11 byte

BUSY :=M1.0

// any memory bit used as Busy token;
// Repeat as long as Busy

U

M

1.0

// Call memory bit M1.0; set VKE correspondingly

SPB

GEHT

//

Repeat

SFC13,

// as long as VKE=1 (linked result)