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

The text of a manual · part 37 of 59

Mini-PLC-2/02, 2/16, 2/17 Processor (cat. no. 1772-LZ, LZP, LX, LXP, LW, LWP) User Manual: 19 - Data Transfer Instructions, pages 302 to 310

Pages 302 to 310 of 490, from Mini-PLC-2/02, 2/16, 2/17 Processor (cat. no. 1772-LZ, LZP, LX, LXP, LW, LWP) User Manual

The original document is the PDF (2.4 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 1772-LW /LWD, Allen-Bradley 1772-LWP, Allen-Bradley 1772-LX / LXP and Allen-Bradley 1772-LZP

Page 302

Chapter 19 Data Transfer File Instruction

Proceed by loading each position of file A with following data: Position 003 Position 004 Position 005 Position 006 Position 007

0879 0162 1982 9715 5761

Important: You do not have to enter data in each position. You can skip position numbers. All the data for file A is entered.

CANCEL COMMAND

The File-to-File Move instruction rung is displayed.

SEARCH

The word SEARCH appears in the lower left corner of the industrial terminal screen.

590

Puts the processor in the run/program mode. The word DISPLAY appears in the lower left corner of the industrial terminal screen.

DISPLAY

COUNTER ADDR: 200 FILE A: 400-406

1

POSITION 001 002 003 004 005 006 007

HEXDECIMAL DATA MONITOR FILE TO FILE MOVE POSITION: 001 FILE LENGTH: 007 FILE R: 500- 506 FILE A DATA 1257 0721 0879 0162 1982 9715 5761

FILE R DATA 1257 0721 0879 0162 1982 9715 5761

Notice that the data in file A transferred to file R. Do not clear your processor memory. We will use this rung to edit the file.

19-10

Page 303

Chapter 19 Data Transfer File Instuction

Editing in a Completed Rung Edit a File-to-File Move instruction by performing the following steps in the hexadecimal data monitor display.

CANCEL COMMAND

The FILE TO FILE MOVE instruction rung is displayed.

SEARCH

The word SEARCH appears in the lower left corner of the industrial terminal screen.

592

Puts the processor in the run/program mode.

DISPLAY

The word DISPLAY appears in the lower left corner of the industrial terminal screen.

COUNTER ADDR: 200 FILE A: 400-406

1

POSITION 001 002 003 004 005 006 007

HEXDECIMAL DATA MONITOR FILE TO FILE MOVE POSITION: 001 FILE LENGTH: 007 FILE R: 500- 506 FILE A DATA FILE R DATA 1257 1257 0721 0721 0879 0879 0162 0162 1982 1982 9715 9715 5761 5761 DATA: 1257

Notice the command buffer at the bottom of the screen. It is labeled DATA: 1257. This is also the same number in FILE A at POSITION 001. Cursor down to POSITION 004.

19-11

Page 304

Chapter 19 Data Transfer File Instruction

We will change the data in the command buffer from 0162 to 0281.

COUNTER ADDR: 200 FILE A: 400-406

0281

POSITION 001 002 003 004 005 006 007

COUNTER ADDR: 200 FILE A: 400-406 INSERT

POSITION 001 002 003 004 005 006 007

HEXDECIMAL DATA MONITOR FILE TO FILE MOVE POSITION: 001 FILE LENGTH: 007 FILE R: 500- 506 FILE A DATA 1257 0721 0879 0162 1982 9715 5761 DATA: 0281

FILE R DATA 1257 0721 0879 0162 1982 9715 5761

HEXDECIMAL DATA MONITOR FILE TO FILE MOVE POSITION: 001 FILE LENGTH: 007 FILE R: 500- 506 FILE A DATA 1257 0721 0879 0162 1982 9715 5761 DATA: 0281

FILE R DATA 1257 0721 0879 0162 1982 9715 5761

Notice that file R’s DATA has not changed. Now practice by changing POSITION 006 of file A to 7777. Important: If you wanted to change the data in FILE R, follow the same procedure. To move your cursor over to file R, press [Insert] [→]. Then, follow the same procedure.

19-12

Page 305

Chapter 19 Data Transfer File Instuction

Word-to-File Move Instruction

This instruction duplicates and transfers the data of a word from the data table to a specified word within your destination file. Here are some characteristics of a Word-to-File Move: Programmed as an output instruction; requires four words of the user program area. Your program must externally index the counter. Externally Indexed Counter An externally indexed counter must be controlled by a CTU/CTD instruction to index through the file values. A false-to-true transition is needed to increment the counter. The counter address identifies the file instruction’s location in the timer/counter area of the data table and holds the accumulated value. The position value is the accumulated value of the counter. It points to the current position to be used/entered in the file. The counter’s preset value represents the maximum number of words (length) in the file. File A is the starting address of the source file for a File-to-Word Move instruction. The word address is the source (input) word of a Word-to-File Move instruction. It is the destination (output) word of a File-to-Word Move instruction. File R is the destination file of a Word-to-File Move instruction. The Counter Reset instruction (CTR) resets the file (or the file’s counter) once the file position is the same as the file length on the counter instruction (or the accumulated value is equal to the preset value). An externally indexed file instruction has a done bit. The done bit (15) is automatically entered as part of the instruction. The address of the done bit is automatically changed to match the counter address. It is set when the operation is complete and remains set as long as the rung condition is true. When a Word-to-File Move instruction rung goes: True False

Data from the word address is transferred to the destination file. No action is taken.

19-13

Page 306

Chapter 19 Data Transfer File Instruction

Keystrokes Enter a Word-File Move instruction by performing the following steps.

First, enter a conditioned rung with a CTU instruction for 030. FILE

030 CTU PR 001 AC 001

11

FILE TO FILE MOVE COUNTER ADDR: 030 POSITION: 001 FILE LENGTH: 001 WORD ADDR: 010 FILE R: 110- 110

030 EN 15

The word FILE appears in the lower left corner of the industrial terminal screen. Here is an explanation of each value:

File-to-Word Move Instruction

This Value:

Stores This:

Counter address

Address of the instruction's file position in the accumulated value area of the data table.

Position

Current word being operated upon (accumulated value of the counter).

File Length

Number of words in file (preset value of the counter).

File R

Starting address of the destination file.

Word Address

Address of source input word into the file.

This instruction duplicates and transfers the data of a word within your source file to a specified word elsewhere in the data table. Here are some characteristics of a File-to-Word Move instruction: Programmed as an output instruction; requires four words of the user program area. Your program must externally index the counter. The explanation of external indexing is the same for the File-to-Word Move instruction as the Word-to-File Move.

19-14

Page 307

Chapter 19 Data Transfer File Instuction

When the rung becomes: True False

The data of a word is transferred from File A to a designated (output) word address. No action is taken.

ATTENTION: The counter address for the Word-to-File Move and the File-to-Word Move instructions should be used only for the intended instruction and the corresponding instructions which manipulate the accumulated value. Do not inadvertently manipulate the preset or accumulated word. Changes to these values could result in unexpected machine operation with damage to equipment and/or injury to personnel.

Keystrokes Enter a File-to-Word Move instruction by performing the following steps.

First, enter a conditioned rung with a CTU instruction for 030. FILE

030 CTU PR 001 AC 001

12

FILE TO WORD MOVE COUNTER ADDR: 030 POSITION: 001 FILE LENGTH: 001 FILE A: 110- 110 WORD ADDR: 010

030 EN 15

The word FILE appears in the lower left corner of the industrial terminal screen.

19-15

Page 308

Chapter 19 Data Transfer File Instruction

Here is an explanation of each value:

Data Monitor Display

This Value:

Stores This:

Counter address

Address of the instruction's file position in the accumulated value area of the data table.

Position

Current word being operated upon (accumulated value of the counter).

File Length

Number of words in file (preset value of the counter).

File A

Starting address of the source file.

Word Address

Address of the destination (output) word outside of the file.

Once you establish your file data, you’ll want to edit, load, or monitor your file data. To perform these functions the processor has a data monitor mode (Figure 19.3). Use one of these displays: binary display (Display 0) lets you manipulate one bit at a time by displaying each word using binary digits. hexadecimal display (Display 1) lets you manipulate 4 digits which represents word values. ASCII display (Display 2) converts your four digits to the ASCII code.

19-16

Page 309

Chapter 19 Data Transfer File Instuction

Figure 19.3 Data Monitor Displays Header

Counter Addr: 200 File A: 400- 406

File Section

POSITION 001 002 003 004 005 006 007

Command Buffer

Header

Counter Addr: 200 File A: 400- 406

File Section

POSITION 001 002 003 004 005 006 007

Command Buffer

Header

Counter Addr: 200 File A: 400- 406

File Section

POSITION 001 002 003 004 005 006 007

Command Buffer

BINARY DATA MONITOR FILE TO FILE MOVE POSITION: 001 FILE A DATA 00010010 01010111 00000111 00100001 00001000 01111001 00000010 10000001 00011001 10000010 10010111 00010101 01010111 01100001 Data: 0010010

File Length: 007 File R: 500- 506

FILE R DATA 00010010 01010111 00000111 00100001 00001000 01111001 00000001 01100010 00011001 10000010 10010111 00010101 01010111 01100001 01010111

HEXADECIMAL DATA MONITOR FILE TO FILE MOVE POSITION: 001 FILE A DATA 1257 0721 0879 0281 1982 9715 5761 Data: 1257

FILE R DATA 1257 0721 0879 0162 1982 9715 5761

ASCII DATA MONITOR FILE TO FILE MOVE POSITION: 001 FILE A DATA DC2 W ! BEL <Y BS STX 81 82 EM NAK 97 <A W Data: 1257

File Length: 007 File R: 500- 506

File Length: 007 File R: 500- 506 FILE R DATA DC2 W ! BEL <Y BS SDH <B 82 EM NAK 97 <A W

To print or display these monitor modes, see Table 19.B.

19-17

Page 310

Chapter 19 Data Transfer File Instruction

Table 19.B Data Monitor Functions Display

[DISPLAY] [0]

Any

Displays the binary data monitor

Print

[DISPLAY] [0] [RECORD]

Any

Prints the first 20 lines of binary data monitor.

Display

[DISPLAY] [1]

Any

Displays the hexadecimal data monitor

Print

[DISPLAY] [1] [RECORD]

Any

Prints the first 20 lines of hexadecimal data monitor.

Display

[DISPLAY] [2]

Any

Displays the ASCII data monitor

Print

[DISPLAY] [2] [RECORD]

Any

Prints the first 20 lines of ASCII data monitor.

Data Monitor Functions Three sections divide the data monitor display. They are identified in (Figure 19.3): Header: located at the top of the screen and contains information pertaining to its corresponding file instruction. For example: counter, file, and word addresses, also file length. File Section: located in the center of the screen and displays the data stored in a file. The column labeled POSITION refers to each word’s position in the file. FILE A DATA represents the source file, and FILE R DATA represents the destination file. Command Buffer: located at the bottom center of the screen and is used to enter or change file data. It is always displayed in the program mode.

Adjusting the Data Table Size

19-18

You may have to expand your data table to provide additional space for files. To do this, follow the procedure in chapter 7.