The text of a manual · part 13 of 29
1772 Mini PLC-2/05 Processor (Cat. No. 1772-LS, LSP) Programming and Operations Manual, pages 121 to 130
Pages 121 to 130 of 289
The original document is the PDF (1.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-LSP
Page 121
Chapter 11 Data Transfer File Instructions
This example uses the hexadecimal data monitor display.
[DISPLAY]
The screen does not change
1 Counter Addr: 200 File A: 400- 406 POSITION 001 002 003 004 005 006 007
HEXADECIMAL DATA MONITOR FILE TO FILE MOVE POSITION: 001 FILE A DATA 0000 0000 0000 0000 0000 0000 0000 Data: 0000
File Length: 007 File R: 500- 506
FILE R DATA 0000 0000 0000 0000 0000 0000 0000
Important: :If you want to enter binary information, press [DISPLAY][0]. If you want to enter ASCII information, press [DISPLAY] 2. Now, enter data in position 001 to file A.
1257
Counter Addr: 200 File A: 400- 406 POSITION 001 002 003 004 005 006 007
HEXADECIMAL DATA MONITOR FILE TO FILE MOVE POSITION: 001 FILE A DATA 0000 0000 0000 0000 0000 0000 0000 Data: 1257
File Length: 007 File R: 500- 506
FILE R DATA 0000 0000 0000 0000 0000 0000 0000
Important: If you make a mistake, you can correct it by moving the cursor left or right to the incorrect number and then pressing the correct number key.
11-12
Page 122
Chapter 11 Data Transfer File Instructions
1257
Counter Addr: 200 File A: 400- 406 POSITION 001 002 003 004 005 006 007
HEXADECIMAL DATA MONITOR FILE TO FILE MOVE POSITION: 001 FILE A DATA 1257 0000 0000 0000 0000 0000 0000 Data: 1257
File Length: 007 File R: 500- 506
FILE R DATA 0000 0000 0000 0000 0000 0000 0000
This information (1257) now appears in position 001 of file A. The command buffer at the bottom of the screen now displays 1257. Cursor down one line and add data to position 002.
0721
Counter Addr: 200 File A: 400- 406 POSITION 001 002 003 004 005 006 007
[INSERT] Counter Addr: 200 File A: 400- 406 POSITION 001 002 003 004 005 006 007
HEXADECIMAL DATA MONITOR FILE TO FILE MOVE POSITION: 001 FILE A DATA 0000 0000 0000 0000 0000 0000 0000 Data: 0721
FILE R DATA 0000 0000 0000 0000 0000 0000 0000
HEXADECIMAL DATA MONITOR FILE TO FILE MOVE POSITION: 001 FILE A DATA 1257 0721 0000 0000 0000 0000 0000 Data: 0721
File Length: 007 File R: 500- 506
File Length: 007 File R: 500- 506
FILE R DATA 0000 0000 0000 0000 0000 0000 0000
11-13
Page 123
Chapter 11 Data Transfer File Instructions
Load each position of file A with the following data: POSITION 003 0879 POSITION 004 0162 POSITION 005 1982 POSITION 006 9715 POSITION 007 5761 Important: You do not have to enter data in each position. You can skip position numbers.
[CANCEL COMMAND] [SEARCH] 590 [DISPLAY]
The file to file move rung is displayed. The screen does not change. Puts the processor in the run/program mode. The screen does not change.
1 Counter Addr: 200 File A: 400- 406 POSITION 001 002 003 004 005 006 007
HEXADECIMAL DATA MONITOR FILE TO FILE MOVE POSITION: 007 FILE A DATA 1257 0721 0879 0162 1982 9715 5761
File Length: 007 File R: 500- 506
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. The next example edits this rung. Editing in a Completed Rung In this section, you will edit your file’s data in the hexadecimal data monitor display.
[SEARCH] 592
11-14
The screen does not change. Puts the processor in the remote program mode.
Page 124
Chapter 11 Data Transfer File Instructions
[DISPLAY] 1
The screen does not change. Counter Addr: 200 File A: 400- 406 POSITION 001 002 003 004 005 006 007
HEXADECIMAL DATA MONITOR FILE TO FILE MOVE POSITION: 007 FILE A DATA 1257 0721 0879 0162 1982 9715 5761 DATA:
File Length: 007 File R: 500- 506
FILE R DATA 1257 0721 0879 0162 1982 9715 5761
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. Change the data in the command buffer from 0162 to 0281.
0281
Counter Addr: 200 File A: 400- 406 POSITION 001 002 003 004 005 006 007
[INSERT] Counter Addr: 200 File A: 400- 406 POSITION 001 002 003 004 005 006 007
HEXADECIMAL DATA MONITOR FILE TO FILE MOVE POSITION: 007 FILE A DATA 1257 0721 0879 0162 1982 9715 5761 Data: 0281
FILE R DATA 1257 0721 0879 0162 1982 9715 5761
HEXADECIMAL DATA MONITOR FILE TO FILE MOVE POSITION: 007 FILE A DATA 1257 0721 0879 0281 1982 9715 5761 Data: 0281
File Length: 007 File R: 500- 506
File Length: 007 File R: 500- 506
FILE R DATA 1257 0721 0879 0162 1982 9715 5761
11-15
Page 125
Chapter 11 Data Transfer File Instructions
Notice that file R’s POSITION has not changed. Now practice by changing POSITION 006 of file A to 7777. Important: If you want to change the data in FILE R, you follow the same → ]. procedure. To move your cursor to file R press the [SHIFT}, [→
Word to File Move
Purpose: Duplicates and transfers the data of a word from the data table to a specified word within a file. Programmed as an output instruction; requires four words of the user program area. Your program must externally index the counter. When the rung goes: True - Data from a designated word address in the data table is transferred to the selected position in the source file. False - No action is taken. Keystrokes: You enter a word to file move by performing the following steps.
[FILE] 11
The screen does not change. Word-To-File Move 030 Counter Addr: Position: 001 File Length: 001 Word Addr: 010 File R: 110-110
030 DN 15
Parameters: The procedure for entering the parameters for a word to file move is the same as the procedure for a file to file move.
File to Word Move
Purpose: Duplicates and transfers the data of a word within your source file to a specified word elsewhere in the data table. Programmed as an output instruction; requires four words of the user program area. Your program must externally index the counter.
11-16
Page 126
Chapter 11 Data Transfer File Instructions
When the rung becomes: True - The data of a word is transferred from your file to your designated word address. False - No action is taken.
ATTENTION: The counter address for the word-to-file move and 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 unpredictable machine operation or a run time error. Damage to equipment and/or injury to personnel could occur.
Keystrokes: You enter a file to word move by performing the following steps.
[FILE] 12
The screen does not change. Start
File-To-Word Move 030 Counter Addr: Position: 001 File Length: 001 File A: 110-110 Word Addr: 010
030 DN 15
Parameters: The procedure for entering parameters for a file to word move is the same as the procedure for a file to file move.
Chapter Summary
In this chapter, we have showed you three data transfer file instructions. Also, we showed you how to use the data monitor display. The next chapter shows you three types of sequencer instructions.
11-17
Page 127
Chapter
12
Sequencers
Chapter Objectives
This describes the three types of sequence instructions: sequencer input sequencer output sequencer load These instructions either transfer information from the data table to output word addresses, compare I/O word information with information stored in tables, or transfer I/O word information into the data table.
Comparison with File Instructions
Sequencer instructions can transfer information from the data table to output word addresses for the control of sequential machine operation (sequencer output); compare I/O word information stored in tables so that machine operation conditions can be examined for control and diagnostic purposes (sequencer input); and transfer I/O word information into the sequencer file (sequencer load). File instructions operate on files that are one word or 16 bits wide. In contrast, sequencer instructions operate on files that are up to four words or 64 bits wide. A sequencer file can be represented graphically by a sequencer table. The length or number of steps (rows) in a sequencer table can be up to 999. The width of a sequencer table can be up to four words (columns) as shown in Figure 12.1. Figure 12.1 Sequencer Table
Step
Word 1
Word 2
Word 3
Word 4
001 002 003 " " " " " " 024
00110101 11000101 01110100 00011101 " " " " " " " 00010101 10100000
00011101 11001010 00010111 00110011 " " " " " " " 10100010 10101000
10111011 11001011 " " " " " " " " 01010000 01011111
01011101 01011111 01010101 01010101 " " " " " " " 10111100 00110011
12-1
Page 128
Chapter 12 Sequencers
Important: The data table is one word wide by many long. A sequencer table appears in the data table as one continuous file. The length of the file in the data table equals the product of the number of steps and the length as shown in Figure 12.2. As an example, a 24 step x 4 word wide sequencer table occupies 96 consecutive words in the data table. Figure 12.2 Sequencer Table Format in the Data Table
Data Table Step 001 002
00 11 01 01 01 11 01 00
11 00 01 01 00 01 11 01 Word #1
024
00 01 01 01
10 10 00 00
Step 001 002
00 01 11 01 00 01 01 11
11 00 10 10 00 11 00 11
024
10 10 00 10
10 10 10 00
Step 001 002
10 11 10 11
11 00 10 11
024
01 01 00 00
01 01 11 11
Step 001 002
01 01 11 01 01 01 01 01
01 01 11 11 01 01 01 01
024
10 11 11 00
00 11 00 11
Word #2
The 4 words per step (columns) of the sequencer table are located sequentially in the data table.
Word #3
Word #4
Data Table 10152-I
Internally indexed file instructions perform the operation and then increment to the next step. In contrast, internally indexed sequencer instructions increment to the next step and then the operation is performed.
Mask
12-2
A special programming technique called a “mask” is used with the sequencer instructions. A mask is a means of controlling what bits are controlled/compared by the sequencer instruction. By masking bits, you ensure that the sequencer instruction does not affect them. The masked bits may then be used for other program purposes.
Page 129
Chapter 12 Sequencers
A 0 in a mask bit location prevents the instruction from controlling or comparing the data in the corresponding bit location. A 1 in a mask bit location allows the corresponding bit to be controlled or compared. When all the output/input bits are controlled or compared by the instruction, use a mask of all 1’s. Other instructions can change a mask in the user program. If a changing mask is required for different steps in the sequencer operation use a get/put or a file move.
ATTENTION: When choosing a mask word address, be sure that the next 1, 2, or 3 consecutive word addresses are not already assigned. Other data written into a mask could cause unpredictable machine operation. This could cause damage to your equipment and/or injury to your personnel.
Programming Limitations
Sequencer instructions can be powerful tools when programming your operations. Two steps in the same instruction can not be operated simultaneously.
ATTENTION: When programming a sequencer input with a sequencer output instruction, the counter address for both instructions must be the same. Failure to use the same counter address for both sequencers, can result in input and output steps becoming unsynchronized which may result in unwanted machine motion and/or injury to personnel.
Sequencer Instructions
Use Figure 12.3 while you read about each sequencer instruction.
12-3
Page 130
Chapter 12 Sequencers
Figure 12.3 Sequencer Instructions 1770-T3 Display
Key Sequence SEQ 0
Sequencer Output Counter Addr: Current Step: Seq Length: Words Per Step: File: Mask:
030 001 001 1 110-110 010-010
Output Words 1: 010 2: 3: 4: SEQ 1
Sequencer Input Counter Addr: Current Step: Seq Length: Words Per Step: File: Mask:
Instruction Notes 030 EN 17
Output instruction.
030 DN 15
Same data transferred each scan that the rung is true. Counter is indexed by the instruction. Unused output bits can be masked. Requires 5-9 words of your program.
030 000 001 1 110-110 010-010
Input instruction. Compares input data with current steps for equality. Counter must be externally indexed by your program.
Input Words 1: 010 2: 3: 4:
SEQ 2
Increments, then transfers data.
Sequencer Load Counter Addr: Current Step: Seq Length: Words Per Step: File: Output Words 1: 010 2: 3: 4:
Requires 5-8 words of your program.
030 001 001 1 110-110
030 EN 17 030 DN 15
Outupt instruction Increments, then loads data. Counter is indexed by the instruction. Does not mask. Requires 4-7 words of your program.
NOTE: Numbers shown are default values. Numbers in shaded areas must be replaced by your entered values. The number of default address digits initially displayed (3 or 4) will depend on the size of the data table.
Here is an explanation of each value:
12-4
This Value:
Stores the:
Counter Address
Address of the instruction in the accumulated value area of the data table
Position
Position in the sequencer table (accumulated value of counter)
Seq Length
Number of steps (preset value of the counter)
Words per Step
Width of the sequencer table
File
Starting address of the source file
Mask
Starting address of the mask file
Word Address
Address of the source word or destination word outside of the file
Output Words
Words controlled by the instruction
Load Words
Words fetched by the instruction
Input Words
Words monitored by the instruction