beautypg.com

Programming – Rockwell Automation 1761 MicroLogix 1000 Programmable Controllers User Manual

Page 159

background image

Using Data Handling Instructions

9–11

Using COP

This instruction copies blocks of data from one location into another. It uses no
status bits. If you need an enable bit, program an output instruction (OTE) in
parallel using an internal bit as the output address. The following figure shows how
file instruction data is manipulated.

Source

Destination

File to File

Entering Parameters

Enter the following parameters when programming this instruction:

Source is the address of the first word in the file to be copied. You must use the
file indicator (#) in the address.

Destination is the address of the first word in the file where the data is to be
stored. You must use the file indicator (#) in the address.

Length is the number of words or elements in the file to be copied. See the
table on the next page.

f

e des na on f le ype s a n :

then you can specify a maximum length of:

If the destination file type is a(n):

Discrete

Analog

Output

1

5

Input

2

8

Status

33

33

Bit

32

32

Timer

40

40

Counter

32

32

Control

16

16

Integer

105

105

Note

The maximum lengths apply when the source is of the same file type.

All elements are copied from the source file into the destination file each time the
instruction is executed. Elements are copied in ascending order.

If your destination file type is a timer, counter, or control file, be sure the source
words corresponding to the status elements of your destination file contain zeros.

Programming