beautypg.com

Rockwell Automation RECOMM-IBUS Interbus Communications Module User Manual

Page 79

background image

Using Explicit Messaging (PCP Communications)

7-19

Figure 7.12 – LAD5 - PCP Read Subroutine (Continued)

If the PCP Read Reply message indicates that the result was "not good" (N22:24 <> 0), then zero out the data area of the Reply
message (might contain leftover data from a previous successful PCP Read).

0010

M1:1.0

15

Status
Message
Present

B3:47

2

PCP Read
Reply Msg
1-Shot

NEQ

Not Equal
Source A

N22:24

0<
Source B

0

0<

PCP Read
Reply Msg
Result

MOV

Move
Source

0

0<
Dest

N22:26

325<

MOV

PCP Read
Reply Msg
Data Word #1

MOV

Move
Source

0

0<
Dest

N22:27

0<

MOV

PCP Read
Reply Msg
Data Word #2

The PCP Read Reply 1-shot is used so the subroutine processes the Reply message only once.

0011

M1:1.0

15

Status
Message
Present

L

B3:47

2

PCP Read
Reply Msg
1-Shot

When the Command / Status Message handshake is complete, reset the 1-shot bits and exit the PCP Read routine by turning the
"Execute PCP Read" bit off (B3:47/0)

0012

M0:1.0

15

Command
Message
Acknowledge

M1:1.0

15

Status
Message
Present

U

B3:47

0

Execute
PCP Read
Subroutine

U

B3:47

1

PCP Read
Routine
1-shot

U

B3:47

2

PCP Read
Reply Msg
1-Shot

U

M0:1.0

15

Command
Message
Acknowledge

0013

END