The text of a manual · part 15 of 29
1772 Mini PLC-2/05 Processor (Cat. No. 1772-LS, LSP) Programming and Operations Manual, pages 141 to 150
Pages 141 to 150 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 141
Chapter 12 Sequencers
Figure 12.5 Completed Sequencer Output Worksheet ALLEN-BRADLEY Programmable Controller Data Table MAP (128-word) PROJECT NAME DESIGNER
FILE
200
WORD ADDR:
012
013
MASK ADDR:
075
076
TO
TO
613
10 07
SEQ LENGTH:
006
WORD #3 00 17
10 07
WORD #4 00 17
10 07
00
Timer
CM
CMT
00 17
FTM
FTR
SOL
FTF
FTS
D E N V A I M C E E
600
WORD #2
10 07
2
OUTPUT
COUNTER ADDR:
WORD #1
OF
2
Mini–PLC–2/05
DATA TABLE ADDR
Engineer SEQUENCER
17
PROCESSOR
Bottle Filling Applications
PAGE
MASK STEP
1 2 3 4 5 6
FROM ADDR TO ADDR
Note: A filled-in box means that each device is actuated
10148-I
12-15
Page 142
Chapter 12 Sequencers
Position the cursor on the words SEQUENCER OUTPUT. Use the arrow keys to move the cursor.
[DISPLAY] 0
The word display appears in the lower left hand corner of the screen. BINARY DATA MONITOR SEQUENCER INPUT COUNTER ADDR: 200 STEP: 001 SEQUENCER LENGTH: 006 FILE: 600- 613 OUTPUT ADDR: 012 013 DATA: 00000000 00000000 00000000 00000000 MASK ADDR: 075 076 DATA: 00000000 00000000 00000000 00000000 STEP 001 002 003 004 005 006
00000010 00000000
[INSERT]
12-16
WORD 1 WORD 2 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 DATA: 00000000 00000000
BINARY DATA MONITOR SEQUENCER INPUT STEP: 001 COUNTER ADDR: 200 SEQUENCER LENGTH: 006 FILE: 600- 613 OUTPUT ADDR: 012 013 DATA: 00000000 00000000 00000000 00000000 MASK ADDR: 075 076 DATA: 00000000 00000000 00000000 00000000 STEP WORD 1 WORD 2 001 00000000 00000000 00000000 00000000 002 00000000 00000000 00000000 00000000 003 00000000 00000000 00000000 00000000 004 00000000 00000000 00000000 00000000 005 00000000 00000000 00000000 00000000 006 00000000 00000000 00000000 00000000 DATA: 00000000 00001010 BINARY DATA MONITOR SEQUENCER INPUT COUNTER ADDR: 200 STEP: 001 SEQUENCER LENGTH: 006 FILE: 600- 613 OUTPUT ADDR: 012 013 DATA: 00000000 00000000 00000000 00000000 MASK ADDR: 075 076 DATA: 00000000 00000000 00000000 00000000 STEP WORD 1 WORD 2 001 00000000 00001010 00000000 00000000 002 00000000 00000000 00000000 00000000 003 00000000 00000000 00000000 00000000 004 00000000 00000000 00000000 00000000 005 00000000 00000000 00000000 00000000 006 00000000 00000000 00000000 00000000 DATA: 00000000 00001010
Page 143
Chapter 12 Sequencers
The cursor is on the first digit of DATA in the command buffer. The digits in step 1 for word 1 are intensified. Data is inserted into Step 1 of Word 1. Cursor down one line. The cursor is on the first digit of DATA in the command buffer. The digits in step 2 for word 1 are intensified. BINARY DATA MONITOR SEQUENCER INPUT COUNTER ADDR: 200 STEP: 001 SEQUENCER LENGTH: 006 FILE: 600- 613 OUTPUT ADDR: 012 013 DATA: 00000000 00000000 00000000 00000000 MASK ADDR: 075 076 DATA: 00000000 00000000 00000000 00000000 STEP 001 002 003 004 005 006
WORD 1 00000000 00001010 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
WORD 2 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
DATA: 00000000 000000
00000010 00001010
[INSERT]
BINARY DATA MONITOR SEQUENCER INPUT STEP: 001 COUNTER ADDR: 200 SEQUENCER LENGTH: 006 FILE: 600- 613 OUTPUT ADDR: 012 013 DATA: 00000000 00000000 00000000 00000000 MASK ADDR: 075 076 DATA: 00000000 00000000 00000000 00000000 STEP WORD 1 WORD 2 001 00000000 00001010 00000000 00000000 002 00000000 00000000 00000000 00000000 003 00000000 00000000 00000000 00000000 004 00000000 00000000 00000000 00000000 005 00000000 00000000 00000000 00000000 006 00000000 00000000 00000000 00000000 DATA: 00000000 00001010 BINARY DATA MONITOR SEQUENCER INPUT COUNTER ADDR: 200 STEP: 001 SEQUENCER LENGTH: 006 FILE: 600- 613 OUTPUT ADDR: 012 013 DATA: 00000000 00000000 00000000 00000000 MASK ADDR: 075 076 DATA: 00000000 00000000 00000000 00000000 STEP WORD 1 WORD 2 001 00000000 00001010 00000000 00000000 002 00000000 00001010 00000000 00000000 003 00000000 00000000 00000000 00000000 004 00000000 00000000 00000000 00000000 005 00000000 00000000 00000000 00000000 006 00000000 00000000 00000000 00000000 DATA: 00000000 00001010
12-17
Page 144
Chapter 12 Sequencers
Cursor down one line. The cursor is on the first digit of DATA in the command buffer. the digits in step 3 for word 1 are intensified. Continue adding data: 003: 004: 005: 006:
00000010 00010001 00000010 00010001 00000010 01000001 00000010 00000000
To add data to WORD 2 press [SHIFT][→] and cursor up [↑] or down [↓] as desired. Do not press [CANCEL COMMAND]. The next example uses this data to enter a mask.
[DISPLAY] 000
The screen does not change. BINARY DATA MONITOR SEQUENCER INPUT COUNTER ADDR: 200 STEP: 001 SEQUENCER LENGTH: 006 FILE: 600- 613 OUTPUT ADDR: 012 013 DATA: 00000000 00000000 00000000 00000000 MASK ADDR: 075 076 DATA: 00000000 00000000 00000000 00000000 STEP 001 002 003 004 005 006
WORD 1 WORD 2 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 DATA: 00000000 00000000
The cursor is on the first digit of DATA in the command buffer. OUTPUT ADDR 012, DATA is intensified. You can add additional data. Cursor down one line. MASK ADDR 075, DATA is intensified.
12-18
Page 145
Chapter 12 Sequencers
00101010 10101010 [INSERT]
The screen does not change. BINARY DATA MONITOR SEQUENCER INPUT COUNTER ADDR: 200 STEP: 001 SEQUENCER LENGTH: 006 FILE: 600- 613 OUTPUT ADDR: 012 013 DATA:00000000 00000000 00000000 00000000 MASK ADDR: 075 076 DATA: 00101010 10101010 00000000 00000000 STEP 001 002 003 004 005 006
[CANCEL COMMAND]
WORD 1 WORD 2 00000000 00001010 00000000 00000000 00000000 00001010 00000000 00000000 00000010 00010001 00000000 00000000 00000010 00010001 00000000 00000000 00000010 01000001 00000000 00000000 00000010 00000000 00000000 00000000 DATA: 00101010 10101010
To display your rung. Sequencer Load Purpose: Places data into sequencer file that your established in the data table for this instruction. Programmed as an output instruction. You can not mask any unused bits. The counter is internally controlled by the ladder diagram logic in your program. This instruction requires 4-7 words of the user program area. A false-to-true rung transition enables the instruction. When the rung becomes: True - The instruction increments to the next step and loads the data. False - No action is taken. Use this instruction for: Machine diagnostics - If the actual sequence of an operation becomes mismatched with the desired sequence of operation as contained in the sequencer input instruction, a fault signal can be enabled by the user program. Teach sequential operation - The I/O conditions representing the desired operation can be loaded into the sequencer input tables as the machine is manually stepped through the control cycle.
12-19
Page 146
Chapter 12 Sequencers
ATTENTION: The counter address of the sequencer load instruction should be reserved for that instruction. Do not manipulate the counter accumulated or preset 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 the sequencer output instruction by performing the following steps.
[SEQ]
The screen does not change. Sequencer Load Counter Addr: 030 Current Step: 000 Seq Length: 001 Words Per Step: 1 File: 110- 110
2
Output Words 1: 010 2. 3: 4:
030 EN 17 030 DN 15
Insert the following values. The cursor moves automatically through the The values are: COUNTER ADDRESS - 056 CURRENT STEP - 008 SEQUENCE LENGTH - 012 WORDS PER STEP - 4 FILE - 510 LOAD WORDS 1: 110 2: 113 3: 012 4: 314 For this example, enter data using the binary data monitor mode. Get your data from the worksheet (Figure 12.6). A filled block means a 1 will be entered in that position. Load the data from Figure 12.6 exactly as you did in for the sequencer input and output instructions.
12-20
Page 147
Chapter 12 Sequencers
Figure 12.6 Completed Sequencer Load Worksheet ALLEN-BRADLEY Programmable Controller Data Table MAP (128-word) PROJECT NAME
PROCESSOR
Mini–PLC-2/05
DATA TABLE ADDR
TO
Bottle Filling Applications
DESIGNER
Engineer
COUNTER ADDR:
030
WORD ADDR:
110
SEQUENCER
Load
FILE
600
PAGE
TO
SEQ LENGTH:
OF
012
MASK ADDR:
WORD #1 17
10 07
WORD #2 00 17
10 07
WORD #3 00 17
10 07
WORD #4 00 17
10 07
00
D E N V A I M C E E MASK STEP
1 2 3 4 5 6 7 8 9 10 11 12
FROM ADDR TO ADDR 10152-I
12-21
Page 148
Chapter 12 Sequencers
[CANCEL COMMAND]
To display your rung. The instruction should look like this.
COUNTER ADDR: 056 LOAD ADDR: 110 DATA: 00000000 00000000 STEP 001 002 003 004 005 006 007 008 009 010 011 012
Chapter Summary
12-22
WORD 1 00000010 10000000 00000000 10001000 00000000 00100100 10000010 00001000 01000000 00001000 00000000 00000001 10000000 00100000 00000000 10000000 00000000 10000001 00000001 00010000 00100000 00000000 00000000 00000000
BINARY DATA MONITOR SEQUENCER INPUT STEP: 008 FILE: 510- 567
SEQUENCER LENGTH: 012
113 00000000 00000000
012 00000000 00000000
314 00000000 00000000
WORD 2 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
WORD 3 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
WORD 4 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
We showed you three types of sequencer instructions and how to use the data monitor display to enter data. The next chapter shows you how to reduce scan time by selectively jumping over portions of the program.
Page 149
Chapter
13
Jump Instructions and Subroutines
Chapter Objectives
This chapter describes the instructions you can use to selectively jump over portions of a program. The instructions are: jump jump to subroutine label return This chapter describes how jump instructions and subroutine programming direct the path of the program scan through the main program and the subroutine area. Jump/Jump to Subroutine/Return Instructions Purpose: A Jump instruction is an output instruction. It has an identification number from 00-07. When its rung is true, it instructs the processor to jump forward in the main program to the Label instruction having the same identification number. The main program executes from that point. 010
01 JMP
00
Jump You can reduce scan time by selectively jumping over a portion of the program. Do not program in an area where the jump instruction crosses the boundary between the main program and subroutine area, or vice-versa.
ATTENTION: Allowances should be made for conditions which could be created by the use of the Jump instruction. Jumped program rungs are not scanned by the processor. Input conditions are not examined and outputs that are controlled by these rungs remain in their last state. Timers and counters cease to function. Critical rungs should be re-programmed outside the jumped section in the program zone.
13-1
Page 150
Chapter 13 Jump Instructions and Subroutines
Jump to Subroutine Purpose: The Jump to Subroutine instruction is an output instruction. It has an octal identification number from 00-07. When its rung is true, it instructs the processor to jump from the main program to the label instruction having the same number in the subroutine area. Subroutine execution begins at that point. This instruction always causes the processor to cross the boundary from the main program to the subroutine area. 010
02 JSR
00
Return Purpose: The Return instruction is an output instruction. It is used only in the subroutine area to terminate a subroutine or selectable timed interrupt and return the processor to the main program or, in the case of nested subroutines, return program execution to the preceding subroutine. It returns program execution to the instruction immediately following the Jump to Subroutine instruction that initiated the subroutine. Program execution continues from that point. It is programmed as an output instruction without an identification number in the subroutine area. It is usually programmed unconditional. Every subroutine must have a return instruction. Subroutine Area
RET
Keystrokes: You enter a Jump, Jump to Subroutine, or Return instruction by performing the following steps. 1.
Press -(JMP)-, -(SR)-, or [SHIFT] -(RET)-.
Important: Do not perform step 2 for a Return instruction. 2.
13-2
Enter <octal identification number>.