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

The text of a manual · part 26 of 55

Hand-Held Terminal (Catalog Number 1747-PT1) User Manual: 15 - Instruction Set Overview

Pages 215 to 224 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 215

Chapter

A–B

15

Instruction Set Overview This chapter: • takes a brief look at the instruction set • lists the name, mnemonic, and function of each instruction • points out the instructions that can be used only with SLC 5/02 processors Important: To avoid misapplication, do not apply any of the instructions until you have read the detailed descriptions in chapters 16 through 26. On page 15–9 you will find an Instruction Locator. This is a list of the instruction mnemonics, in alphabetical order, with page references.

Instruction Classifications

The instruction set is divided into the classifications named in chapters 16 through 26. A brief description of the individual instructions in each classification follows.

Bit Instructions – Chapter 16 5/02 Only

Instruction Name and Mnemonic

•

Function – Conditional (Input) or Output Instructions as Noted

Examine if Closed

XIC

Conditional instruction. True when bit is on (1).

Examine if Open

XIO

Conditional instruction. True when bit is off (0).

One–Shot Rising

OSR

Conditional instruction. Makes rung true for one scan upon each false-to-true transition of conditions preceding it in the rung.

Output Energize

OTE

Output instruction. True (1) when conditions preceding it are true. Goes false when conditions preceding it go false.

Output Latch

OTL

Output instruction. Addressed bit goes true (1) when conditions preceding the OTL instruction are true. When conditions go false, OTL remains true until rung containing OTU instruction with same address goes true.

Output Unlatch

OTU

Output instruction. Addressed bit goes false (0) when conditions preceding the OTU instruction are true. Remains false until rung containing OTL instruction with same address goes true.

15–1

Page 216

Chapter 15 Instruction Set Overview

Timer and Counter Instructions – Chapter 17 5/02 Only

Instruction Name and Mnemonic

15–2

•

Function – Output Instructions

Timer On-Delay

TON

Counts time intervals when conditions preceding it in the rung are true. Produces an output when accumulated value (count) reaches preset value. Resets when rung is false (non–retentive).

Timer Off-Delay

TOF

Counts time intervals when conditions preceding it in the rung are false. Produces an output when accumulated value (count) reaches preset value. Resets when rung is true (non–retentive).

Retentive Timer

RTO

This is an On-Delay timer that retains its accumulated value when: – rung conditions go false; – the mode changes to program from run or test; – the processor loses power; – a fault occurs.

Count Up

CTU

Counts up for each false–to–true transition of conditions preceding it in the rung. Produces an output when accumulated value (count) reaches preset value.

Count Down

CTD

Counts down for each false–to–true transition of conditions preceding it in the rung. Produces an output when accumulated value (count) reaches preset value.

High–speed Counter

HSC

Applies to 24 VDC fixed I/O controllers only. Counts high–speed pulses from a high–speed input. Maximum pulse rate of 8kHz.

Reset

RES

Used with timers and counters. When conditions preceding it in the rung are true, the RES instruction resets the accumulated value and control bits of the timer or counter. It is also used to reset position value and control bits of a sequencer.

Page 217

Chapter 15 Instruction Set Overview

I/O Message and Communications Instructions – Chapter 18 5/02 Only

Instruction Name and Mnemonic

•

Function – Output Instructions

Immediate Input with Mask

IIM

When conditions preceding it in the rung are true, the IIM instruction is enabled and interrupts the program scan to read the status of a word of external inputs and transfer it through a mask to the input data file.

Immediate Output with Mask

IOM

When conditions preceding it in the rung are true, the IOM instruction is enabled and interrupts the program scan to read a word of data from the output data file and transfer the data through a mask to the corresponding external outputs.

Message Read/Write

MSG

•

This instruction transfers data from one node to another on the DH–485 network. When the instruction is enabled, message transfer is pending. Actual data transfer takes place at the end of the scan, during the communications portion of the operating cycle.

Service Communications

SVC

•

When conditions preceding it in the rung are true, the SVC instruction interrupts the program scan to execute the communications portion of the operating cycle. The program scan time then resumes from where it left off.

I/O Interrupt Enable I/O Interrupt Disable Reset Pending I/O Interrupt

IIE IID RPI

• • •

The IIE, IID, and RPI instructions are used with specialty I/O modules capable of generating an interrupt. See chapter 31 for functional details.

I/O Refresh

REF

•

When conditions preceding it in the rung are true, the REF instruction interrupts the program scan to execute the I/O scan (write outputs-service comms-read inputs). The program scan then resumes from where it left off.

15–3

Page 218

Chapter 15 Instruction Set Overview

Comparison Instructions – Chapter 19 5/02 Only

Instruction Name and Mnemonic

15–4

•

Function – Conditional Input Instructions

Equal

EQU

Instruction is true when source A = source B.

Not Equal

NEQ

Instruction is true when source A 0source B.

Less Than

LES

Instruction is true when source A < source B.

Less Than or Equal

LEQ

Instruction is true when source A < source B.

Greater Than

GRT

Instruction is true when source A > source B.

Greater Than or Equal

GEQ

Instruction is true when source A > source B.

Masked Comparison for Equal

MEQ

Compares 16-bit data of a source address to 16-bit data at a reference address through a mask. If the values match the instruction is true.

Limit Test

LIM

•

True/false status of the instruction depends on how a test value compares to specified low and high limits.

Page 219

Chapter 15 Instruction Set Overview

Math Instructions – Chapter 20 5/02 Only

Instruction Name and Mnemonic

•

Function – Output Instructions

Add

ADD

When rung conditions are true, the ADD instruction adds source A to source B and stores the result in the destination.

Subtract

SUB

When rung conditions are true, the SUB instruction subtracts source B from source A and stores the result in the destination.

Multiply

MUL

When rung conditions are true, the MUL instruction multiplies source A by source B and stores the result in the destination.

Divide

DIV

When rung conditions are true, the DIV instruction divides source A by source B and stores the result in the destination and the math register.

Double Divide

DDV

When rung conditions are true, the DDV instruction divides the contents of the math register by the source and stores the result in the destination and the math register.

Negate

NEG

When rung conditions are true, the NEG instruction subtracts the source from zero and stores the result in the destination.

Clear

CLR

When rung conditions are true, the CLR instruction clears the destination to zero.

Convert to BCD

TOD

When rung conditions are true, the TOD instruction converts the source value to BCD and stores it in the math register or the destination file of the SLC 5/02.

Convert from BCD

FRD

When rung conditions are true, the FRD instruction converts a BCD value in the math register or the source file of the SLC 5/02 to an integer, and stores it in the destination.

Decode

DCD

When rung conditions are true, the DCD instruction decodes 4-bit value (0 to 16), turning on the corresponding bit in 16-bit destination.

Square Root

SQR

•

When rung conditions are true, the SQR instruction calculates the square root of the source and places the rounded result in the destination.

Scale

SCL

•

When rung conditions are true, the SCL instruction multiplies the source by a specified rate. The result is added to an offset value and placed in the destination.

15–5

Page 220

Chapter 15 Instruction Set Overview

Move and Logical Instructions – Chapter 21 5/02 Only

Instruction Name and Mnemonic

•

Function – Output Instructions

Move

MOV

When rung conditions are true, the MOV instruction moves a copy of the source to the destination.

Masked Move

MVM

When rung conditions are true, the MVM instruction moves a copy of the source through a mask to the destination.

And

AND

When rung conditions are true, sources A and B of the AND instruction are ANDed bit by bit and stored in the destination.

Inclusive Or

OR

When rung conditions are true, sources A and B of the OR instruction are ORed bit by bit and stored in the destination.

Exclusive Or

XOR

When rung conditions are true, sources A and B of the XOR instruction are Exclusive ORed bit by bit and stored in the destination.

Not

NOT

When rung conditions are true, the source of the NOT instruction is inverted (0→1, 1→0) bit by bit and stored in the destination.

File Copy and File Fill Instructions – Chapter 22 5/02 Only

Instruction Name and Mnemonic

15–6

•

Function – Output Instructions

File Copy

COP

When rung conditions are true, the COP instruction copies a user-defined source file to the destination file.

File Fill

FLL

When rung conditions are true, the FLL instruction loads a source value into a specified number of elements in a user-defined file.

Page 221

Chapter 15 Instruction Set Overview

Bit Shift, FIFO, and LIFO Instructions – Chapter 23 5/02 Only

Instruction Name and Mnemonic

Function – Output Instructions

•

Bit Shift Left Bit Shift Right

BSL BSR

On each false–to–true transition, these instructions load a bit of data into a bit array, shift the pattern of data through the array, and unload the end bit of data. The BSL shifts data to the left and the BSR shifts data to the right.

First In First Out (FIFO) Load (FFL) Unload (FFU)

FFL FFU

• •

Last In First Out (LIFO) Load (LFL) Unload (LFU)

LFL LFU

• •

The FFL instruction loads a word into an FIFO stack on successive false–to–true transitions. The FFU unloads a word from the stack on successive false–to–true transitions. The first word loaded is the first to be unloaded. The LFL instruction loads a word into an LIFO stack on successive false–to–true transitions. The LFU unloads a word from the stack on successive false–to–true transitions. The last word loaded is the first to be unloaded.

Sequencer Instructions – Chapter 24 5/02 Only

Instruction Name and Mnemonic

•

Function – Output Instructions

Sequencer Output

SQO

On successive false–to–true transitions, the SQO transfers a word of data from a programmed sequencer file through a mask to a destination word.

Sequencer Compare

SQC

On successive false–to–true transitions, the SQC compares a source word or file through a mask to a word of data in a programmed sequencer file for equality.

Sequencer Load

SQL

•

On successive false–to–true transitions, the SQL loads a word of source data into the current element of a sequencer file.

15–7

Page 222

Chapter 15 Instruction Set Overview

Control Instructions – Chapter 25 5/02 Only

Instruction Name and Mnemonic

15–8

•

Function – Conditional Input or Output Instructions as Noted

Jump to Label

JMP

Output instruction. When rung conditions are true, the JMP instruction causes the program scan to jump forward or backward to the corresponding LBL instruction.

Label

LBL

Conditional instruction. This is the target of the correspondingly numbered JMP instruction.

Jump to Subroutine

JSR

Output instruction. When rung conditions are true, the JSR instruction causes the processor to jump to the targeted subroutine file.

Subroutine

SBR

Conditional instruction. Placed as the first instruction in a subroutine file. Identifies the subroutine as a non–interrupt file.

Return from Subroutine

RET

Output instruction, placed in subroutine. When rung conditions are true, the RET instruction causes the processor to resume program execution in the main program file or the previous subroutine file.

Master Control Reset

MCR

Output instruction. Used in pairs to inhibit/enable a zone within a ladder program.

Temporary End

TND

Output instruction. When rung conditions are true, the TND instruction stops the program scan, updates I/O and communications, then resumes scanning at rung 0 of the main program file.

Suspend

SUS

Output instruction, used for troubleshooting. When rung conditions are true, the SUS instruction places the controller in the Suspend Idle mode. The suspend ID number is placed in word S:7 and the program file number is placed in S:8.

Selectable Timed Disable Selectable Timed Enable Selectable Timed Start

STD STE STS

• • •

Output instructions, associated with the Selectable Timed Interrupt (STI) function. STD and STE are used to prevent an STI from occurring during a portion of the program; STS initiates an STI.

Interrupt Subroutine

INT

•

Conditional instruction. Placed as the first instruction in a Selectable Timed Interrupt subroutine file or an I/O Event–Driven Interrupt subroutine file. Identifies the subroutine as an interrupt file.

Page 223

Chapter 15 Instruction Set Overview

Proportional Integral Derivative Instruction – Chapter 26 5/02 Only

Instruction Name and Mnemonic Proportional Integral Derivative

Instruction Locator

Function – Output Instruction

•

PID

•

This instruction is used to control physical properties such as temperature, pressure, liquid level, or flow rate of process loops.

The table below lists instructions by mnemonic, in alphabetical order. Page references are included.

Instruction Mnemonic and Name

5/02 Page Only

Instruction Mnemonic and Name

•

ADD AND

Add And

20–3 21–5

BSL BSR

Bit Shift Left Bit Shift Right

23–2 23–2

CLR COP CTD CTU

Clear File Copy Count Down Count Up

20–11 22–2 17–6 17–6

DCD DDV DIV

Decode 4 to 1 of 16 Double Divide Divide

20–19 20–9 20–8

EQU

Equal

19–2

FFL FFU FLL FRD

FIFO Load FIFO Unload File Fill Convert from BCD

• •

23–5 23–5 22–4 20–15

GEQ Greater Than or Equal GRT Greater Than

19–7 19–6

HSC

High–speed Counter

17–9

IID IIE IIM INT IOM

I/O Interrupt Disable I/O Interrupt Enable Immediate Input with Mask Interrupt Subroutine Immediate Output with Mask

JMP JSR

Jump to Label Jump to Subroutine

25–2 25–4

LBL LES LEQ LFL LFU LIM

Label Less Than Less Than or Equal LIFO Load LIFO Unload Limit Test

25–3 19–4 19–5 23–8 23–8 19–9

MCR Master Control Reset MEQ Masked Comparison for Equal

• • •

• • •

18–17 18–17 18–15 25–11 18–16

25–7 19–8

5/02 Page Only

•

MOV MSG MUL MVM

Move Message Multiply Masked Move

NEG NEQ NOT

Negate Not Equal Not

20–10 19–3 21–8

OR OSR OTE OTL OTU

Or One Shot Rising Output Energize Output Latch Output Unlatch

21–6 16–6 16–4 16–5 16–5

PID

Proportional Integral Derivative

REF RES RET RPI RTO

I/O Refresh Reset Return from Subroutine Reset Pending I/O Interrupt Retentive Timer On–Delay

SBR SCL SQC SQL SQO SQR STD STE STS SUB SUS SVC

Subroutine Scale Data Sequencer Compare Sequencer Load Sequencer Output Square Root STI Disable STI Enable STI Start Immediately Subtract Suspend Service Communications

TND TOD TOF TON

Temporary End Convert to BCD Timer Off–Delay Timer On–Delay

25–8 20–12 17–4 17–3

XIC XIO XOR

Examine if Closed Examine if Open Exclusive Or

16–2 16–3 21–7

•

• • • • • • • • • •

21–2 18–1 20–7 21–3

26–1 18–19 17–13 25–6 18–16 17–5 25–6 20–21 24–2 24–8 24–2 20–20 25–10 25–10 25–10 20–4 25–9 18–14

15–9

Page 224

This page is a scan with no text; see it in the PDF.