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

The text of a manual · part 27 of 29

1772 Mini PLC-2/05 Processor (Cat. No. 1772-LS, LSP) Programming and Operations Manual, pages 261 to 270

Pages 261 to 270 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 261

Appendix C Quick Reference

Instruction Name

Symbol

Instruction True

Instruction False

Master control

-(MCR)-

16

16

Zone control last state 1

-(ZCL)-

22 (no skip)

20+ (13 per word skipped)

Branch start Branch end End, temporary end Subroutine Area

T.END SBR

16 18 27 27

16 18 27 27

Immediate input update

-[ I ]-

45 (with forcing on 55)

-

Immediate output update

-[IOT]-

70 (with forcing on 80)

17

Label Return Jump to subroutine Jump

LBL -(RET)-(JSR)-(JMP)-

34 30 100 55

15 15 15

Block transfer read

BLOCK X-FER 1

80

75

Block transfer write

BLOCK X-FER 0

80

75

Sequencer load

SEQ 2

390 (80/extra word)

105

Sequencer input

SEQ 1

420 (90/extra word)

55

Sequencer output

SEQ 0

470 (90/extra word)

110

File-to-word move Word-to-file move File-to-file move

FILE 12 FILE 11 FILE 10440 (+10/word transferred)

250 250 200

45 45

1

When a rung which contains a ZCL instruction is false, the execution time of each instruction between the start fence and end fence is 17 microseconds per word.

C-5

Page 262

Appendix C Quick Reference

Table C.E Relay Type Instructions NOTE: You can assign input and output addresses, XXXXX, to any location in the data table, excluding the processor work areas. The word address is displayed above the instruction and the bit number below it To enter a bit address larger than 5 digits, press [EXPAND ADDR] after the instruction key and then enter the bit address. Use a leading zero if necessary.

1

C-6

Key Symbol

Instruction Name

1770-T3 Display

Rung Conditions

-| |-

Examine On

XXX -| |XX

When the addressed memory bit is on, the instruction is true.

-| / |-

Examine Off

XXX -| / |XX

When the addressed memory bit is off, the instruction is true.

-( )-

Energize

XXX -( )XX

When the rung is true, the addressed memory bit is set. 1 If the bit controls an output device, that output device will be on.

-(L)-

Output Latch

XXX -(L)ON XX or OFF

When the rung is true, the addressed memory bit is latched on and remains on until it is unlatched. 1 The output latch instruction is initially off when entered, as indicated below the instruction. It can be preset on by pressing a after entering the bit address. An on will then be indicated below the instruction in program mode. An unlatch instruction will always override a latch instruction, even if the latch rung is true.

-(U)-

Output Unlatch

XXX -(U)ON XX or OFF

When the rung is true, the addressed bit is unlatched. 1 If the bit controls an output device, that device is de-energized. On or off will appear below the instruction indicating the status of the bit in Program mode only.

Branch Start

This instruction begins a parallel logic path and is entered at the beginning of each parallel path.

Branch End

This instruction ends two or more parallel logic paths and is used with branch start instructions.

These instructions should not be assigned input image table addresses because input image table words are reset each I/O scan.

Page 263

Appendix C Quick Reference

Table C.F Program Control Instructions NOTE: The MCR and ZCL boundary instructions have no word address. The word addresses, XXX, of the immediate input and output instructions are limited to the input and output image tables respectively. Displayed word addresses will be 3 or 4 digits long, depending on data table size. When entering the word address, use a leading zero if necessary. Key Symbol

Instruction Name

1770-T3 Display

Explanation and Rung Conditions

-(MCR)-

Master Control Reset

-(MCR)-

Two MCR instructions are required to control a group of outputs. The first MCR instruction is programmed with input conditions to begin the zone. The second MCR instruction is programmed unconditionally to end the zone. When the MCR rung is true, each rung condition controls their output instruction. When the first MCR rung is false, all non-retentive bits in the zone are reset. WARNING: Do not overlap MCR zones, or nest with ZCL zones. Do not jump to a label in MCR zones.

-(ZCL)-

Zone Control Last State

-(ZCL)-

Two ZCL instructions are required to control a group of outputs. The first ZCL instruction is programmed with input conditions to begin the zone. The second ZCL instruction is programmed unconditionally to end the zone. When the ZCL rung is true, all output instructions within the zone act according to the logic conditions preceding them. When the first ZCL rung is false, outputs in the zone will remain in their last state. WARNING: Do not overlap ZCL zones, or nest with MCR zones. Do not jump to a label in ZCL zones.

-[ I ]-

Immediate Input

XXX -[ I ]-

Processor interrupts program scan to update input image table with data from the corresponding module group. It is updated before the normal I/O scan and executed each program scan.

-(IOT)-

Immediate Output

XXX -(IOT)-

When rung is true, the processor interrupts program scan to update a module group with data from its corresponding output image table word address. It is updated before the normal I/O scan and executed each program scan when the rung is true. Can be programmed unconditionally.

C-7

Page 264

Appendix C Quick Reference

Table C.G Timer Instructions NOTE: The timer word address, XXX, is assigned to the timer accumulated areas of the data table. To determine which addresses are valid accumulated areas, the most significant digit in the word address must be an even number. The time base, TB, is user-selectable and can be 1.0, 0.1, or 0.01 second. Preset values, YYY, and accumulated values, ZZZ, can vary from 000 to 999. Bit 15 is the timed bit. Bit 17 is the enable bit. The word address displayed will be 3 or 4 digits long depending on the data table size. When entering the word address, use a leading zero if necessary. Key Symbol

Instruction Name

1770-T3 Display

-(TON)-

Timer On Delay

XXX -(TON)TB PR YYY AC ZZZ

When the rung is true, the timer begins to increment the accumulated value at a rate specified by the time base.

XXX -(TOF)TB PR YYY AC ZZZ

When the rung is true, the timer resets the accumulated value at 000.

-(RTO)TB PR YYY AC ZZZ

When the rung is true, the timer begins to increment the accumulated value. When false, the accumulated value is retained.

When the rung is true: bit 15-set when AC=PR bit 17-set

XXX -(RTR)PR YYY AC ZZZ

XXX - Word address of the retentive timer it is resetting.

When the rung is true: bit 15 and 17-reset

The preset and accumulated values are automatically entered by the industrial terminal.

When the rung is false: no action is taken

-(TOF)-

-(RTO)-

-(RTR)-

Timer Off Delay

Retentive Timer

Retentive Timer Reset

Rung Conditions

When the rung is false, the timer reset the accumulated value to 000.

When the rung is false, the timer begins to increment the accumulated value.

When the rung is true, the accumulated value and status bits are reset.

C-8

Status Bits When the rung is true: bit 15-set when AC=PR bit 17-set When the rung is false: bits 15 and 17-reset

When the rung is true: bit 15-set bit 17-set. When the rung is false: bit 15-resets when AC=PR bit 17-reset

When the rung is false: bit 15-no action is taken bit 17-reset

Page 265

Appendix C Quick Reference

Table C.H Counter Instructions NOTE: The counter word address, XXX, is assigned to the counter accumulated area of the data table. To determine which addresses are valid accumulated areas, the most significant digit in the word address must be an even number. Bit 14 is the overflow/underflow bit. Bit 15 is the count complete bit. Bit 16 is the enable bit for the CTD instruction. Bit 17 is the enable bit for the CTU instruction. The word address displayed will be 3 or 4 digits long depending on the data table size. When entering the word address, use a leading zero if necessary. Key Symbol

Instruction Name

1770-T3 Display

Rung Conditions

-(CTU)-

Up Counter

XXX -(CTU)PR YYY AC ZZZ

Each time the rung goes true, the accumulated value is incremented one count. The counter will continue counting after the preset value is reached.

-(CTR)-

Counter Reset

XXX -(CTR)PR YYY AC ZZZ

Status Bits When the rung is true: bit 14-set if AC>999 bit 15-set when AC>PR PR bit 17-set

The accumulated value can be reset by the CTR instruction.

When the rung is false: bits 14-15-retained if it was set bit 17-reset

XXX-Word address of the CTU is resetting.

When the rung is true: bits 14-17-reset

The preset and accumulated values are automatically entered by the industrial terminal.

When the rung is false: No action is taken

When the rung is true, the CTU or CTD accumulated value and status bits are reset to 000. -(CTD)-

Down Counter

XXX -(CTD)PR YYY AC ZZZ

Each time the rung goes true, the accumulated value is decreased by one count.

When the rung is true: bit 14-set when AC<000 bit 15-set when AC<PR bit 16-set When the rung is false: bits 14-15- retained if it was set bit 16-reset

C-9

Page 266

Appendix C Quick Reference

Table C.I Data Manipulation Instructions NOTE: Data manipulation instructions operate on BCD values and/or 16 bit data in the data table. The word address, XXX, is displayed above the instruction; the BCD value or data operated upon, YYY, is displayed beneath it. The data is stored in the lower 12 bits of the word address and can be any value from 000 to 999 BCD, except as noted. Word address displayed will be either 3 or 4 digits depending upon the data table size. When entering the word address, use a leading zero if necessary. Key Symbol

Instruction Name

1770-T3 Display

Rung Conditions

-[G]-

Get

XXX -[G]YYY

The get instruction is used with other data manipulation or arithmetic instructions. When the rung is true, all 16 bits of the get instruction are duplicated and the operation of the instruction following it is performed.

-(PUT)-

Put

XXX -(PUT)YYY

The put instruction should be preceded by the get instruction. When the rung is true, all 16 bits at the get instruction address are transferred to the put instruction address.

-[<]-

Less Than

XXX -[<]YYY

The less than instruction should be preceded by a get instruction.

XXX -[=]YYY

The equal to instruction should be preceded by a get instruction.

XXXD -[B]YYY

D-Designates the upper or lower byte of the word. 1=upper byte, 0=lower byte.

-[=]-

-[B]-

Equal To

Get Byte

3-digit BCD values at the get and less than word addresses are compared. If the logic is true, the rung is enabled.

3-digit BCD values at the get and equal to word addresses are compared. if equal, the rung is enabled.

YYY-Octal value from 000 to 377 stored in the upper or lower byte of the word address. The get byte instruction should be followed by a limit test instruction. A duplicate of the designated byte is made and compared with the upper and lower limits of the limit test instruction.

-[L]-

C-10

Limit Test

XXX AAA -[L]BBB

AAA-Upper limit of limit test, an octal value from 000 to 377. BBB-Lower limit of limit test, an octal value from 000 to 377. The limit test instruction should be preceded by a get byte instruction. Compares the value at the get byte instruction with the values at the limit test instruction. If found to be between or equal to the limits, the rung is enabled.

Page 267

Appendix C Quick Reference

Table C.J Arithmetic Instructions NOTE: Arithmetic instructions operate on BCD values in the data table. The word address XXX is displayed above the instruction; the BCD value YYY which is the result of the arithmetic operation, is displayed beneath it. The BCD value is stored in the lower 12 bits of the word address and can be any value from 000 to 999. Displayed word addresses will be 3 or 4 digits depending on the data table size. When entering the word address, use a leading zero if necessary. Key Symbol

Instruction Name

1770-T3 Display

Rung Conditions

-( + )-

Add

XXX -( + )YYY

The add instruction is an output instruction. It is always preceded by two get instructions which store the BCD values to be added. When the sum exceeds 999, bit 14 is set. A 1 is displayed in front of the result YYY.

-( - )-

Subtract

XXX -( - )YYY

The subtract instruction is an output instruction. It is always preceded by two get instructions. The value in the second get address is subtracted from the value in the first. When the difference is negative, bit 16 is set and a minus sign is displayed in front of the result YYY.

-( X )-

Multiply

XXX XXX -(X)-(X)YYY YYY

The multiply instruction is an output instruction. It is always preceded by two get instructions which store the values to be multiplied. Two word addresses are required to store the 6 digit product.

-( ÷ )-

Divide

XXX XXX -( ÷ )-( ÷ )YYY YYY

The divide instruction is an output instruction. It is always preceded by two get instructions. The value of the first is divided by the value of the second. Two word addresses are required to store the 6 digit quotient. its decimal point is placed automatically by the industrial terminal.

C-11

Page 268

Appendix C Quick Reference

Table C.K File Instructions Key Sequence FILE 10

1770-T3 Display File to File Move Counter Addr: Position:

030 001

File Length:

001

File A: File R: Rate per Scan FILE 11

FILE 12

110- 110 110- 110 001

Word to File Move 030 Counter Addr: Position: 001 File Length:

001

Word Addr: File R:

010 110- 110

File to Word Move 030 Counter Addr: Position: 001 File Length:

001

File A: Word Addr:

110- 110 010

Instruction Notes 030 EN 17 030 DN 15

030 DN 15

Output Instruction. Modes: Complete, Distributed and Incremental. Counter is internally incremented by the instruction. Requires 5 words of user program.

Output instruction. Counter must be externally indexed by user program. Data is transferred every scan that rung is true. Requires 4 words of user program.

030 DN 15

Same as word-to-file.

NOTE: Numbers shown are default values. Numbers in shaded areas must be replaced by user-entered values. The number of default address digits initially displayed (3 or 4) will depend on the size of the data table. To access the Data Monitor Display, enter all instruction parameters. Press key sequence: [DISPLAY][0] for the binary monitor mode; [DISPLAY][1] for the hexadecimal monitor mode.

C-12

This Value:

Stores the:

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 the file (preset value of the counter)

File A

Starting address of the source file

File R

Starting address of the destination file

Word Address

Address of the source word or destination word outside of the file

Rate Per Scan

Number of data words moved per scan

Page 269

Appendix C Quick Reference

Table C.L Sequencer Instructions Key Sequence SEQ 0

SEQ 1

SEQ 2

1779-T3 Display Sequencer Output 030 Counter Addr: Current Step: 001 Seq Length: 001 Words per Step: 1 File: 110- 110 Mask: 010- 010 Output Words 1: 010 2: 3: 4:

Instruction Notes 030 EN 17

Output instruction.

030 DN 15

Counter is indexed by the instruction.

Same data transferred each scan that the rung is true. Unused output bits can be masked. Requires 5-8 words of your program.

Input instruction.

Sequencer Input 030 Counter Addr: 000 Current Step: 001 Seq Length: 1 Words per Step: 110- 110 File: Mask: 010- 010 Input Words 2: 1: 010 4: 3: Sequencer Load 030 Counter Addr: 000 Current Step: 001 Seq Length: 1 Words per Step: 110- 110 File: Output Words 1: 010 2: 3: 4:

Increments, then transfers data.

Compares input data with current step for equality. Counter must be externally indexed by your program. Unused input bits can be masked. Requires 5-8 words of your program.

030 EN 17 030 DN 15

Output 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. To access the Data Monitor Display, enter all instruction parameters. Press key sequence: [DISPLAY][0] for the binary monitor mode; [DISPLAY][1] for the hexadecimal monitor mode. This Value:

Stores the:

This Value:

Stores the:

Counter Address

Address of the instruction in the accumulated value area of the data table

Mask

Starting address of the mask file

Position

Position in the sequencer table (accumulated value of counter)

Word Address

Address of the source word or destination word outside of the file

Seq Length

Number of steps (preset value of the counter)

Output Words

Words controlled by the instruction

Words per Step

Width of the sequencer table

Load Words

Words fetched by the instruction

File

Starting address of the source file

Input Words

Words monitored by the instruction

C-13

Page 270

Appendix C Quick Reference

Table C.M Jump/Subroutine Instructions Key Symbol

Instruction Name

1770-T3 Display

Explanation and Rung Conditions

SBR T.END

Subroutine Area

SUBROUTINE AREA

Establishes the boundary between main program and subroutine area. Subroutine area is not scanned unless directed to do so by a JSR instruction.

-(LBL)-

Label

XX -(LBL)-

This condition instruction is the target destination for JUMP and JSR instructions. XX-two digit octal identification number, 00-07

-(JMP)-

Jump

XX -(JMP)-

When rung is true, processor jumps forward to the referenced label in main program. XX-two digit octal identification number. Same as LBL with which it is used.

-(JSR)-

Jump To Subroutine

XX -(JSR)-

When the rung is true, processor jumps to referenced label in subroutine area. XX-two digit octal identification number. Same as LBL with witch it is used.

-(RET)-

C-14

Return

-(RET)-

No identification number. Can be used unconditionally . Returns the processor to the instruction immediately following the JSR in the main program that initiated the jump to subroutine.