Application example program -24, Application example program – Rockwell Automation 1747-ASB Remote I/O Adapter User Manual

Page 128

Advertising
background image

Publication 1747-UM006B-EN-P - June 2003

8-24 Application Examples

Application Example Program

Shown below is an excerpt from the user program. When the switch is
closed, the bulb illuminates, decimal value 5555 is moved to the
1746-NO4V output 2 (connected to meter 2) and to the 1746-NIO4I
output 0 (connected to meter 1).

The following is another representation of what is discussed above.

] [

I:017

12

( )

O:021

MOV

MOVE
Source

5555

Dest

N10:2

15

Bulb

Switch

Meter 2

MOV

MOVE
Source

5555

Dest

O:034

Meter 1

BTW

BLOCK TRNSFR WRITE
Rack

2

Group

3

Module

1

Control Block

N7:0

Data File

N10:0

Length

4

Continuous

Y

Meter 2 Block

Transfer Instruction

The inputs to the 1746-IA16 module are in octal. The
switch is wired to input 12 (octal) and its value is
represented by bit 12 (octal) in the process image. Make
sure that the octal label kit 15 and 32-point modules are
used to convert their LED filters and wiring labels to octal,
for use with the PLC5.

The 1746-NO4V module is block transfer mapped. To write
a value to the module, the data must first be written to the
appropriate word in N10:0 to N10:3. This integer file was
chosen as the block transfer data file for the NO4V. N10:2
corresponds to output 2. The user program must be enable
the block transfer to the NO4V using a block transfer
instruction. The data is not transferred until the next RIO
block transfer for this module occurs.

The 1746-NIO4O module is discretely mapped. To write a
value to the NIO4I outputs, the value is written to the
processor output image (word O:34 corresponds to output 0
and word O:035 corresponds to output 1). The data is
automatically sent to the processor on the next RIO
discrete transfer.

The 1746-OV8 module output is in octal. It has been
adjusted because it resides in the high byte of the
processor image. The bulb is wired to output 5 that
corresponds to bit 40 (octal) of the processor image.

0

1

2

3

4

5

6

7

8

9 10

11 12 13

14 15 16

0

1

2

3

ASB 1

1746-NIO4V

1746-OW8

1746-OW16

1746-IA16

1746-OG16

1746-IG16

ASB 2

1746-NI4

1746-NO4I

1746-NIO4I

1746-OW8

1746-OV8

1746-OB16

1746-IB16

1746-OA8

1746-NO4V

1746-OW16

1746-IA16

1746-OV16

1746-IV16

0

1

2

3

PLC-5/40

The switch is connected
to input 12.

The bulb is connected
to output 5.

Meter 2 is connected
to output 2.

Meter 1 is connected
to output 0.

Advertising