Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 36 of 55

Hand-Held Terminal (Catalog Number 1747-PT1) User Manual: 22 - File Copy and File Fill Instructions

Pages 309 to 312 of 486, from Hand-Held Terminal (Catalog Number 1747-PT1) User Manual

The original document is the PDF (1.5 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Allen-Bradley 1747-PT1

Page 309

Chapter

22

File Copy and File Fill Instructions This chapter covers the following instructions for use with the fixed, SLC 5/01, and SLC 5/02 processors:

• File Copy (COP) • File Fill (FLL)

File Copy and Fill Instructions Overview

These instructions move data from a source file or element to a destination file. They are similar to a Move (MOV) instruction, but they enable you to move more than one word at a time. This is facilitated by the use of the file indicator # in the parameter addresses. The # symbol indicates a file or group of words, not just one word. The following general information applies to file copy and file fill instructions.

Effect on Index Register in SLC 5/02 Processors After a COP or FLL instruction is executed, index register S:24 is cleared to zero.

22–1

Page 310

Chapter 22 File Copy and File Fill Instructions

File Copy (COP)

File Copy

COP

Output Instruction

HHT Ladder Display:

(COP)

HHT Zoom Display: (online monitor mode)

ZOOM on COP –(COP)– NAME: FILE COPY LENGTH: 10 SOURCE: #N7:5 DEST: #N10:0

2.3.0.0.2 10 0 0

EDT_DAT F1

F2

F3

COPY FILE Source Dest Length

#N7:5 #N10:0 10

F4

F5

Ladder Diagrams and APS Displays: COP

This instruction copies data from one location into another. It uses no status bits. If you need an enable bit, you can program a parallel (branched) output using a storage address. The COP instruction moves data from one file to another, as illustrated below. Source: File

Destination: File

Entering Parameters • Source – The address of the first word of the file you want to copy. You must use the file indicator # in the address. • Destination – The address of the first word of the file where the copy of the source file will be stored. You must use the file indicator # in the address. • Length – The number of elements in the file you want to copy. If the destination file type is 3 words per element (file types T, C, R), you can specify a maximum length of 42. If the destination file type is 1 word per element (file types I, O, S, B, N), you can specify a maximum length of 128.

22–2

Page 311

Chapter 22 File Copy and File Fill Instructions

All elements are copied from the specified source file into the specified destination file each scan the rung is true. Elements are copied in ascending order with no transformation of data. They are copied up to the specified number (length) or until the last element of the destination file is reached, whichever occurs first. The destination file type determines the number of words that the instruction transfers. For example, if the destination file type is counter and the source file type is integer, three integer words are transferred for each element in the counter-type file. If your destination is a timer, counter, or control file, be sure that the source words corresponding to the status words of your destination file contains zeros. Be sure that you accurately specify the starting address and length of the data block you are copying. The instruction will not read or write over a file boundary (such as between files N16 and N17) at the destination. Note that an error is declared if a write is attempted over a file boundary. You can perform file shifts by specifying a source element address one or more elements greater than the destination element address within the same file. This shifts data to lower element addresses. Shifts to higher element addresses will not work.

File Fill (FLL)

File Fill

HHT Ladder Display:

HHT Zoom Display: (online monitor mode)

FLL

Output Instruction

(FLL) ZOOM on FLL –(FLL)– NAME: FILE FILL LENGTH: 10 SOURCE: N7:10 DEST: #N10:20

2.3.0.0.2 10 0 0

EDT_DAT F1

F2

F3

FILL FILE Source Dest Length

N7:10 #N10:20 10

F4

F5

Ladder Diagrams and APS Displays: FLL

22–3

Page 312

Chapter 22 File Copy and File Fill Instructions

The FLL instruction loads either an element of data or a program constant from the source to a destination file, as illustrated below. Source: Element

Destination: File

Typically, the FLL instruction might be used to reset or clear several integer values all at once.

Entering Parameters • Source – The program constant (decimal) or element address. (The file indicator # is not required for an element address.) • Destination – The address of the first word of the file you want to fill. You must use the file indicator # in the address. • Length – The number of elements in the file you want filled. If the destination file type is 3 words per element, you can specify a maximum length of 42. If the destination file type is 1 word per element, you can specify a maximum length of 128. All elements are filled from the source value (typically a program constant) into the specified destination file each scan the rung is true. Elements are filled in ascending order until the number of elements (length that you entered) is reached. The instruction will not write over a file boundary (such as between files N16 and N17) at the destination. Note that an error is declared if a write is attempted over a file boundary.

22–4