beautypg.com

Rockwell Automation 1747-PT1, D1747NP002 Hand-Held Terminal User Manual

Page 256

background image

Instructions

Chapter 18
I/O Message and Communication

18–10

To view a MSG instruction error code when troubleshooting, add a MVM
instruction to the program as shown in the example below. This example
assumes the control block is an integer file.

MVM

Source

N7:0

Dest

0OFF

Mask

B3:0

Application Examples

1. Application example 1 is shown below. It indicates how you can

implement continuous operation of a message instruction.

2. Application example 2 begins on page 18–11 through 18–12. It involves

a SLC 5/02 processor and a SLC 5/01 processor communicating on a
DH–485 link. Interlocking is provided to verify data transfer and to shut
down both processors if communications fails.

Operation: A temperature-sensing device, connected as an input to the
SLC 5/02 processor, controls the on-off operation of a cooling fan,
connected as an output to the SLC 5/01 processor. The SLC 5/02 and
SLC 5/01 ladder programs are explained in the figure on page 18–11.

3. Application example 3 appears on page 18–13. It shows how you can use

the timeout bit TO to disable an active message instruction. In this
example, an output is energized after five unsuccessful attempts (two
seconds duration) to transmit a message.

Example 1

Operation Notes

Bit B3/1 enables the MSG instruction. When the MSG instruction done bit
is set, it unlatches the MSG enable bit so that the MSG instruction will be
enabled in the next scan. This provides continuous operation.

The MSG error bit will also unlatch the enable bit. This provides
continuous operation regardless of errors.

] [

B3

1

(U)

N7:0

15*

(EN)

(DN)

(ER)

MSG

READ/WRITE MESSAGE
Read/write

WRITE

Target Device

500CPU

Control Block

N7:0

Control Block Length

7

END

] [

N7:0

13*

] [

N7:0

12*

0

1

2

* MSG instruction
status bits:
12 = ER
13 = DN
15 = EN