The text of a manual · part 27 of 55
Hand-Held Terminal (Catalog Number 1747-PT1) User Manual: 16 - Bit Instructions
Pages 225 to 232 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 225
Chapter
A–B
16
Bit Instructions This chapter covers the bit instructions with fixed, SLC 5/01, and SLC 5/02 processors: • Examine if Closed (XIC) • Examine if Open (XIO) • Output Energize (OTE) • Output Latch (OTL) • Output Unlatch (OTU) • One–Shot Rising (OSR)
Bit Instructions Overview
Bit instructions operate on a single bit of data. During operation, the processor may set or reset the bit, based on logical continuity of ladder rungs. You can address a bit as many times as your program requires. The following data files use bit instructions: • output and input data files. The instructions represent external outputs and inputs. • the status data file • the bit data file. Use these instructions for the internal relay logic of your program. • timer, counter, and control data files. The instructions use various control bits. • the integer data file. The instructions are used (on the bit level) as your program requires.
16–1
Page 226
Chapter 16 Bit Instructions
Examine if Closed (XIC)
Examine if Closed
XIC
Input Instruction
HHT Ladder Display:
] [
HHT Zoom Display: (online monitor mode)
ZOOM on XIC –] [– 2.0.0.0.1 NAME: EXAMINE IF CLOSED BIT ADDR: I1:1.0/0 ***************0
EDT_DAT F1
Ladder Diagrams and APS Displays:
Logic States:
F2
F3
F4
F5
I:1.0 ] [ 0
Bit Address State
XIC Instruction
0
False
1
True
Specific operation of an XIC instruction having an input data file address: When an external input device completes its circuit, an on state is indicated at the input terminal wired to the device. This status of the terminal is reflected in the input data file at a particular addressed bit. With the terminal on, the processor finds this bit set (1) during an I/O scan, causing the XIC instruction to be true. When the input device no longer completes its circuit, the input terminal is Off; the processor then finds the bit reset (0) during an I/O scan, causing the XIC instruction to be false.
16–2
Page 227
Chapter 16 Bit Instructions
Examine if Open (XIO)
Examine if Open
XIO
Input Instruction
HHT Ladder Display:
]/[
HHT Zoom Display: (online monitor mode)
ZOOM on XIO –]/[– 2.3.0.0.1 NAME: EXAMINE IF OPEN BIT ADDR: I1:1.0/0 ***************0
EDT_DAT F1
F2
F4
F5
I:1.0 ]/[ 0
Ladder Diagrams and APS Displays:
Logic States:
F3
Bit Address State
XIO Instruction
0
True
1
False
Specific operation of an XIO instruction having an input data file address: When an external input device does not complete its circuit, an Off state is indicated at the input terminal wired to the device. This status of the terminal is reflected in the input data file at a particular addressed bit. With the terminal off, the processor finds this bit in the reset condition (0) during an I/O scan, causing the XIO instruction to be true. When the input device completes its circuit, the input terminal will be On; the processor then finds the bit set (1) during an I/O scan, causing the XIO instruction to be false.
16–3
Page 228
Chapter 16 Bit Instructions
Output Energize (OTE)
Output Energize HHT Ladder Display:
HHT Zoom Display: (online monitor mode)
OTE
Output Instruction
( )
ZOOM on OTE –( )– 2.3.0.0.2 NAME: OUTPUT ENERGIZE BIT ADDR: O0:2.0/7 ********0*******
EDT_DAT F1
Ladder Diagrams and APS Displays:
F2
F3
F4
F5
O:2.0 ( ) 7
Specific operation of an OTE instruction having an input data file address: The status of an output terminal is reflected in the output data file at a particular bit address. When the processor finds a true logic path in the rung containing the OTE instruction, it sets this bit (1); this turns the output terminal On and energizes the output device wired to the terminal during an I/O scan. When a true logic path no longer exists, the processor resets the bit (0), turning the terminal Off and de-energizing the output device during an I/O scan. The OTE instruction is non-retentive. OTE instructions are reset when: • You enter or return to the Run or Test mode or power is restored. • A CPU fault occurs. • The OTE is programmed within an inactive or false MCR zone. Important: A bit that is set within a subroutine using an OTE instruction remains set until the subroutine is scanned again. Avoid duplicate OTE addresses within the same program file: When you want two or more different conditions or sets of conditions to control an output, avoid programming two or more OTE instructions with the same address. This can cause unwanted results. Use input branching and a single OTE instruction instead, as shown in the example below. AVOID Duplicate OTE Addresses B3 ] [ 1
B3 ( ) 3
B3 B3 ( ) ] [ 3 2 If B3/1 is true and B3/2 is false, the OTE instruction will not be energized. This is because the processor controls the OTE based on the status of the last rung it solved that contains the OTE address.
16–4
Use Input Branching and a Single OTE Instead B3 B3 ( ) ] [ 3 1 B3 ] [ 2 Output B3/3 is energized when B3/1, or B3/2, or both are true.
Page 229
Chapter 16 Bit Instructions
Output Latch (OTL), Output Unlatch (OTU)
Output Latch, Output Unlatch
HHT Ladder Display:
HHT Zoom Display: (online monitor mode)
(L)
OTL, OTU
Output Instruction
(U)
ZOOM on OTL –(L)– NAME: OUTPUT LATCH BIT ADDR: B3/6
2.3.0.0.2 *********0******
EDT_DAT F1
F2
F3
F4
F5
ZOOM on OTU –(U)– 2.4.0.0.2 NAME: OUTPUT UNLATCH BIT ADDR: B3/6 *********0******
EDT_DAT F1
Ladder Diagrams and APS Displays:
Logic States:
F2
F3
B3 (L) 6
Rung Instruction Previous State Condition True 1 False OTL True 0 False True 1 False OTU True 0 False
F4
F5
B3 (U) 6 New State 1 1 1 0 0 1 0 0
These are retentive output instructions that can be used in a pair for the data table bit they control. Possible logic states are indicated in the table above. OTL and OTU instructions can also be used to initialize data values at the bit level. When you assign an address to the OTL instruction that corresponds to the address of an external output terminal, the output device wired to this terminal is energized when the bit in memory is set (1). An OTU instruction with the same address as the OTL instruction resets (0) the bit in memory.
16–5
Page 230
Chapter 16 Bit Instructions
When the processor changes from the Run to the Program mode or when power is lost (provided there is battery backup or the capacitor retains memory), the last true output latch or output unlatch instruction in the ladder program continues to control the bit in memory. The latched output device is energized even though the rung conditions controlling the output latch instruction may have gone false.
!
ATTENTION: Physical outputs are turned off under processor fault conditions. However, when error conditions are fixed, the controller will resume operation using the data table value stored at the instruction address.
Your program can examine a bit controlled by OTL and OTU instructions as often as necessary.
16–6
Page 231
Chapter 16 Bit Instructions
One-Shot Rising (OSR)
One–Shot Rising
HHT Ladder Display:
HHT Zoom Display: (online monitor mode)
OSR
Input Instruction
OSR
ZOOM on OSR –|OSR|– 2.3.0.0.2 NAME: ONE SHOT RISING BIT ADDR: B3/0 ***************0
EDT_DAT F1
Ladder Diagrams and APS Displays:
F2
F3
F4
F5
B3 [OSR] 0
The OSR instruction is a retentive input instruction that triggers an event to occur one time. Use the OSR instruction when an event must start based on the change of state of the rung from false–to–true, not on the resulting status. Applications include starting events triggered by a pushbutton switch. An example is freezing rapidly displayed LED values. This instruction makes a rung true for one program scan upon every false-to-true transition of the conditions preceding it in the rung. The output instructions on the rung are executed for only one program scan, even if the rung goes true and remains true. Instruction Parameters Use a bit address from either the bit or integer data file. The addressed bit is set (1) as long as rung conditions preceding the OSR instruction are true; the bit is reset (0) when rung conditions preceding the OSR instruction are false. The address assigned to the OSR instruction is not the one–shot address to be referenced by your program. The address allows the OSR instruction to “remember” its previous rung state. The output instruction(s) that follow the OSR instruction can be referenced by your program. The bit address you use for this instruction must be unique. Do not use it elsewhere in the program. We recommend that you do not use an input or output address to program the address parameter of the OSR instruction. The following rungs illustrate the use of the OSR instruction.
16–7
Page 232
Chapter 16 Bit Instructions
Fixed, SLC 5/01, SLC 5/02 Processors O:3.0 I:1.0 B3 ( ) ] [ [OSR] 0 0 0 When the input instruction goes from false–to–true, the OSR instruction conditions the rung so that the output goes true for one program scan. The output goes false and remains false for successive scans until the input makes another false–to–true transition.
I:1.0 ] [ 0
TOD
B3 [OSR] 0
TO BCD Source Dest
T4:0.ACC S:13
MOV MOVE Source
S:13
Dest
O:3
In this case, the accumulated value of a timer is converted to BCD and moved to an output word where an LED display is connected. When the timer is running, the accumulated value is changing rapidly. This value can be frozen and displayed for each false–to–true transition of the input condition of the rung.
SLC 5/02 Processors Only I:1.0 ] [ 0
TOD
B3 [OSR] 0
TO BCD Source Dest
T4:0.ACC O:3
This example is the same as the one above, except that a MOV instruction is not required. The accumulated value of a timer is converted to BCD and moved to an output word where an LED display is connected. When the timer is running, the accumulated value is changing rapidly. This value can be frozen and displayed for each false–to–true transition of the input condition of the rung.
I:1.0 ] [ 0
B3 ]/[ 1
B3 [OSR] 0
O:3.0 ( ) 0
O:3.0 B3 B3 ( ) ] [ [OSR] 3 1 2 Using the OSR instruction in output branching such as in this example is permitted when using the SLC 5/02 processor. In this case, when I:1/0 is on, output O:3/0 will be on for one scan only if B3/1 in not on, and output O:3/1 will be on for one scan only if B3/2 is on.
The SLC 5/02 processor allows you to use one OSR instruction per output in a rung. The SLC 5/01 processor allows you to use one OSR instruction per rung. Do not place input conditions after the OSR instruction in a rung. Unexpected operation may occur. 16–8