The text of a manual · part 2 of 14
Mini-PLC-2 Programmable Controller Programming and Operations Manual, pages 11 to 20
Pages 11 to 20 of 132
The original document is the PDF (13 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-LN2 and Allen-Bradley 1772-LN3
Page 11
Page 1-1
Section 1 INTRODUCTION
1.0 OVERVIEW
The Bulletin 1772 Mini-PLC-2 Programmable Controller is a rugged, solid state program- mable controller that consists of the Mini- PLC-2 Processor (Cat. No. 1772-LN1, -LN2 or -LN3) and the 1771 I/O Family of racks and modules. Refer to Figure 1-1.
FIGURE 1-1, Mini-PLC-2 Programmable Controller
With a user-written program and appropriate 1/O modules, the Mini-PLC-2 Controller can be used to control many types of industrial applications such as:
e Process control e Material handling e Palletizing
¢ Measurement and gaging
¢ Pollution control and monitoring
The Mini-PLC-2 Processor has a Read/Write CMOS memory that stores User Program instructions, numeric values and 1/O device status.
The User Program is a set of instructions ina particular order that describes the operations to be performed and the operating conditions. It is entered into memory, instruction by instruction, in a ladder diagram format display from the keyboard of the Industrial Terminal (Cat. No. 1770-T1, -T2 or -T3). Some ladder diagram symbols closely resemble the relay symbols used in hardwired relay control systems.
During program operation, the Mini-PLC-2 Processor continuously monitors the status of input devices and, based on User Program instructions, either energizes or de-energizes output devices. Because the memory is pro- grammable, the User Program can be readily changed if required by the application.
In addition to ON/OFF control, the Mini-PLC-2
Controller can perform additional functions such as:
e Timing/Counting operations e Arithmetic (+, -) operations e Arithmetic (x, +) operations (1772-LN3 Processor)
e Data comparisons e Block Transfer (1772-LN3 Processor Module)
e 1/0 Forcing e Data Highway and RS-232-C interfacing
When the Industrial Terminal (Cat. No. 1770- T1, -T2 or -T3) and the Mini-PLC-2 Program- mable Controller are used together or with additional peripheral devices, application data can be recorded or displayed using a | variety of peripheral functions:
e Report generation
¢ Contact histogram (the ON/OFF history of a bit in memory)
¢ Hard-copy printout of the User Program or the complete memory
Page 12
Page 1-2
® Recording/loading/verifying the User Pro- gram using magnetic tape
1.1 LADDER DIAGRAM LOGIC
PC ladder diagram logic closely resembles hardwired relay logic. Hardwired relay control systems require electrical continuity to turn output devices ON and OFF. For example, the relay diagram in Figure 1-2 shows that limit switch LS1 and relay contact CR2 must be closed to energize relay coil CR4.
Similarly, in each rung of ladder diagram program, logic continuity is needed to ener- gize or de-energize the output instruction, and ultimately the output device. For example, the ladder diagram rung in Figure 1-3 shows the input devices and the output device with their respective Data Table bit addresses. The bit addresses correspond to the location of the I/O devices wired to the I/O modules. When the two input instructions are logically TRUE, or the bits in memory are ON, logic continuity is established. This causes the output instruction to be TRUE and the output device to be turned ON.
1.2 MEMORY STRUCTURE
The Data Table of the Mini-PLC-2 Processor memory is made up of an arrangement of storage points called bits (Blnary digiTs). A bit is the smallest unit of memory and can store information as a“1” ora “0” (Figure 1-4). When a“‘1” occupies a bit, that bit is ON; when a “0” occupies a bit, that bit is OFF.
A group of 8 bits forms a single byte. Two bytes, or 16 bits, make up one word. All Data Table words are identified by their word ad- dress which is a 3-digit octal number. The octal numbering system is explained in Section 13.
Similarly, each bit in a word is identified by a two-digit number using the octal numbering system. The memory bits are numbered 00 through 07 and 10 through 17, with the most significant bit 17 (MSB) at the left and the least significant bit 00 (LSB) at the right.
A specific bit in Data Table can be identified by combining the 3-digit word address and 2-digit bit number to form the bit address, such as 03012 or 030/12. The difference de- pends on the Industrial Terminal used. The 1770-T1 and -T2 display the 5-digit bit address centered above the instruction symbol. The 1770-T3 displays the bit address by placing the 3-digit word address above and the 2-digit bit number below the instruction symbol. Programming examples will be illustrated using the 1770-T3 display. However, both displays will be illustrated in the Instruction Summary Table at the end of each program- ming section in this manual.
CR2 1 Sto | (cra) || YL FIGURE 1-2, Relay Diagram LS1 CR2 CR4 113-113 012 LH | | 02 ~=««03 16
FIGURE 1-3, Ladder Diagram Rung
Page 13
Page 1-3
UPPER BYTE LOWER BYTE . /\ 7 M oN MSB 17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00 LSB T}O;T}OF; 1) O70) 1417071} 0707111114] 0 Fworp ADDRESS 030, O71; 4} 17 41} 071} 0}0}0}14 }1]0]14]0 41 | worRD ADDRESS 031,, - _], 17 16 15 14 13 12 11 10 07 06 05 04 03 02 01 00
1] O;O0;0/1)071/0]0}]1]71]0]1 0] 0] 0 |] WORD ADDRESS 170, O71) 1} 1])0]}/0;/0]0]111]0]0]0]1410] 0] worDADDRESS 1718
FIGURE 1-4, Memory Word Structure
1.3 MEMORY ORGANIZATION
The Mini-PLC-2 Processors have either a 512 word memory size (Cat. No. 1770-LN1) or a 1024 word memory size (Cat. No. 1772-LN2 or -LN3). These memory words are organized by their word addresses and are divided into the following major areas. The size of each area can be varied within limits to suit user needs, but the total cannot exceed the Processor memory size.
e Data Table e User Program e Message Storage (if used)
The Data Table stores the information needed in the execution of the User Program such as the status of input and output devices, timer/ counter Preset and Accumulated values, bit/word storage, etc. Any instruction in the User Program can address any word or bit in the Data Table except in the Processor Work Areas.
The Data Table is factory configured to 128 words. The words reserved for timers and counters can be decreased to any even- number value down to 48 words so that Storage capacity for User Program and/or messages can be increased. Figures 1-5 shows the organization of a factory con- figured Data Table.
The User Program follows the Data Table in memory. The User Program is the logic that controls the machine operation. The logic consists of instructions that are programmed in ladder diagram format. Each instruction requires 1 word of memory.
Message Storage area begins after the END statement of the User Program. This area stores the alphanumeric characters of the messages. Two characters can be stored in one word.
For a detailed description of memory, refer to Publication 1772-700, the Organization and Structure of the Mini-PLC-2 Memory.
1.4 HARDWARE/PROGRAM INTERFACE
The Processor monitors input conditions and controls output devices according to a user- entered program. The interface between hard- ware and program occurs in the Input/Output Image Table.
1.4.1 Image Table
The primary purpose of the Input Image Table is to duplicate the status (ON or OFF) of the input devices wired to input module terminals. If an input device is ON (closed), its cor- responding Input Image Table bit is ON (’’1”). If an input is OFF (open), its corresponding Input Image Table bit is OFF (”0”). Input Image Table bits are MONITORED by User Program instructions.
Page 14
Page 1-4
The primary purpose of the Output Image
Table is to control the status (ON or OFF) of the output devices wired to output module terminals. If an Output Image Table bit is ON (“1”), its corresponding output device is ON (energized). If a bit is OFF (’0”), its cor- responding output device is OFF (de-ener- gized). Output Image Table bits are CON- TROLLED by User Program instructions.
1.4.2 Instruction Address
Instruction addresses in the Input/Output Image Table have a dual role. The 5-digit bit address references both an I/O Image Table
1024
512
OPTIONAL SECOND MEMORY AREA (512 WORDS)
WORD BIT DECIMAL ADDRESS ADDRESS TOTAL WORDS DECIMAL PER WORDS AREA 17|16]15[14]13]12]11]10]07 [06]05[04] 03[02[ 0100 000 00 PROCESSOR WORK AREA NO. 1 88 007 17 Ofofofojs{sfifotsfofofi[sfofoJo} 010 60 \ \/ J 16 DATA BIT WORD OUTPUT IMAGE TABLE 16 8 017 «#17 020 00 BIT/WORD STORAGE | (026 17 __ 24 _____ 8 __ NOT AVAILABLE FOR WORD STORAGE @& 027 030 00 TIMER/COUNTER / ACCUMULATED VALUES (AC) Va | (OR BIT/WORD STORAGE) & 64 40 O77 417 DATA 100 00 TABLE PROCESSOR WORK AREA NO. 2 72 8 107 17 110 00 INPUT IMAGE TABLE 80 8 117. («17 ~ TTT 120 00 DI May not be used for Accumulated Values. B Not available for bit/word storage. Bits in this word are used by the processor for BIT/WORD STORAGE @ battery-low condition, message generation, and data highway. __ 88 __ 8 12717 & Unused timer/counter memory words can 130 00 reduce data table size and increase user TIMER/COUNTER program area. / PRESET VALUES (PR) / @ May not be used for Preset Values. (OR BIT/WORD STORAGE) 128 40 Ww7j7 ) 200 00 M USER PROGRAM 4 512 384 END OF MEMORY
FIGURE 1-5, Data Table Organization, Factory Configured
Page 15
Page 1-5 address and a hardware location. An |/O Image Table word corresponds to two I/O modules located in a Module Group in the I/O Rack. Both are represented by the upper 3 digits of the 5-digit bit address. The lower byte of the |/O Image Table word corresponds to an I/O module in the left slot of the Module Group. The upper byte corresponds to an I/O module in the right slot of the Module Group. See Figure 1-6. The remaining two digits represent the bit number in the I/O Image Table word and the terminal number in the Module Group. Each 5-digit bit address in the 1/O Image Table directly relates to an I/O module terminal as shown in Figure 1-7.
1.4.3 Fundamental Operation
The hardware-program interface is illustrated in Figure 1-8 by showing the operational relationship between the input and output devices, the Input/Output Image Table and the User Program.
When an input device connected to terminal 112/12 is closed, the input module circuitry senses a voltage. The ON condition is re- flected in the Input Image Table bit 112/12. During the Program scan, the Processor examines bit 112/12 for an ON (1) condition. If the bit is ON (1), the EXAMINE ON instruction is logically TRUE. A TRUE condition is dis- played as an intensified instruction. A path of logic continuity is established and causes the rung to be TRUE. The Processor then sets Output Image Table bit 013/06 to ON (1). The Processor turns ON terminal 013/06 during the next I/O scan and the output device wired to this terminal becomes energized. When the rung condition is TRUE, the output instruc- tion is intensified.
When the input device wired to terminal 112/12 opens, the input module senses no voltage. The OFF condition is reflected in the Input Image Table bit 112/12. During the program scan, the Processor examines bit 112/12 for an ON (1) condition. Since the bit is OFF (0), logic continuity is not established and the rung is FALSE. The Processor then sets Output Image Table bit 013/06 to OFF (0). In the next I/O scan, the Processor turns OFF terminal 013/06 and the output device wired to this terminal is turned OFF.
1.5 COMPATIBILITY
The Mini-PLC-2 Processors are compatible with the Industrial Terminal, the Data High- way and RS-232-C interfacing. The 1771-LN3 Processor is compatible with Bulletin 1771 Block Transfer I/O modules.
1.5.1 Industrial Terminal Compatibility
The Mini-PLC-2 Controller can be pro- grammed using the Industrial Terminal (Cat. No. 1770-T1, T2, or T3). It can also be pro- grammed with the PLC-2 Program Panel (Cat. No.1772-T1) or with the combination of the PLC Program Panel with PLC-2 Program Panel Adapter (Cat. No. 1774-TA and 1772-T4).
This manual will illustrate programming ex- amples using the Industrial Terminal. The first edition of this manual, dated January 1980, illustrates programming examples using the (obsolete) PLC-2 Program Panel.
1.5.2 Data Highway Compatibility
The Mini-PLC-2 Controller can be connected to the Allen-Bradley Data Highway using the Communication Adapter Module (Cat. No. 1771-KA). Data Highway messages and the Data Highway Communication zone of User Program must reference only the addresses within the user-configured Data Table.
1.5.3 Block Transfer Compatibility
The Mini-PLC-2 Processor module (Cat. No. 1772-LN3) can be programmed to communi- cate with intelligent Bulletin 1771 1/O modules having Block Transfer capability. These in- clude the Thermocouple, Analog Input, Analog Output, Encoder/Counter, PD, etc. modules. Section 11.2 of this manual covers Block Transfer Programming.
1.5.4 User Program Compatibility
User Programs written for the Mini-PLC-2/15, PLC-2/20 or PLC-2/30 should not be loaded into the Mini-PLC-2 Controller Gnless the User Program is compatible in the following areas:
e The Data Table is 128 words or less.
e The words of memory used do not exceed 512 forthe 1772-LN1 Processor; or 1024 for the 1772-LN2 or -LN3 Processor.
Page 16
Page 1-6
CONCEPT EXAMPLE HARDWARE TERMINOLOGY HARDWARE TERMINOLOGY INPUT (1) OR OUTPUT (0) OUTPUT: 0 RACK NO. (ALWAYS 1) RACK NO.: 1 (7) GROUP NO. MODULE GROUP NO.: 0 TERMINAL NO. INAL NO.: 12 { (00-07,10-17) i TERM ° vv vy XXX/XX 010/12 WH we WORD BIT WORD BIT ADDRESS ADDRESS ADDRESS ADDRESS DATA TABLE TERMINOLOGY DATA TABLE TERMINOLOGY
FIGURE 1-6, Instruction Address Terminology
BIT ’ - WORD 17}16 11511413112] 11] 10] 07] 06| 05| 04}03| 02] 01/00] ADDRESS 01 0/12 =, + 010 4 Ms J iN UPPER BYTE LOWER BYTE OUTPUT=0 TERMINAL INPUT*1 MODULE GROUPS MODULE GROUP n RACK NUMBER ry ; ; ; roo4 1 1 | ! 1 i] ! ! 1 1; Oy TY 27 3 7 41 5 ' Bt 7!
> U 7 ct ercnrT G000000 UC 6000060000)
128 1/0
FIGURE 1-7, Bit Address to Hardware Relationship
Page 17
Page 1-7
Nanlay YAMOd LNW 1d
LNdino QAZIOYANA
NY AY
N
90/€10 TWNIWYSL LNdLno o - - _ YAMOd LNV 1d
Ga798VN3 N3HM_ [90 ral aNYL N3HM GAIdISN3LNI } | G3IsISN3LNI NOILONYLSNI | gg Zit | NOILONYLSNI ONNY GAWWVYDOud-43SN A _-_-! toe H | | ! ley yy NYN13Y Y3MOd LNV1d H ddO=0 POT TTT --- | NO=t | ‘2th tfo{tfofofofi]+fofof[: Joos [io | zveiiiea 4A er 7-5 | 2°ON dNOYD Lot 31aV1 JOVI LNdNI 3inaowron XQ i 4 4 MOVE O/L ry rAUrAMS i 4 R NIZINGOW [8: AVNIWHAL aes LNdNi 8, LNdNI a (en Hi 1 90/EL0 118 OO y LNdNI 8 . eto Jofofo[+]rfofrfofofi fifo]: [i fofe a3so10 €'ON dNOuD 31NGOW |'ON 440 =0 MOVH O/| je, -| - - - - - - ~ - .- - _ NO =1 Nit JINGOW INdLNo J1EVL JOVI LNdLNO Y4AMOd LNW Id A SSAYNGGY IWNIWYSL O10 00|+0|20}e0}ro]so]90]z0] orf. fz fer] ]sr[oufzs}< - ONY Lia Llsic.z t
SASSSYCQV GHOM LIDIG-€
FIGURE 1-8, Hardware-Program Interface
Page 18
Page 1-8 e The instruction set contains compatible instructions: block instructions and sub- routine programming are absent; MULTIPLY or DIVIDE instructions can only be entered in the 1771-LN3 Processor; divide by 0 is compatible as stated in Section 6.4.
The Industrial Terminal will prevent the loading of memory from tape or data cartridge if the Data Table size or the number of memory words exceed the capacity of the Processor.
If a User Program has a compatible Data Table and memory capacity but contains in- compatible instructions, it could be loaded into a Mini-PLC-2 Controller. When using a 1772-LN3 Processor, the incompatible instructions would be displayed on a 1770-T3 Indus- trial Terminal when the Processor was in PROGRAM mode. Upon switching to TEST or RUN mode, the Processor would fault before outputs could be energized. The message “PROCESSOR FAULT” would appear at the top of a blank screen. Upon switching back to PROGRAM mode, the Industrial Terminal would be initialized to the Mode Selection display. Options then available include:
a) Remove the incompatible User Program using the Total Memory Clear function [CLEAR MEMORY][9][9] b) Salvage the User Program by replacing the incompatible instructions with equivalent programming that the Mini-PLC-2 can handle.
If a User Program with an incompatible in- struction set were to be loaded into a 1772- LN3 Processor having a1770-T1 or-T2 Indus- trial Terminal, ERR messages would appear randomly throughout the program when the
Processor was in PROGRAM mode. They would be located adjacent to any instruction that the Processor was not capable of hand- ling. Upon switching to TEST or RUN mode, the Processor would fault before outputs could be energized. The options available would be the same as those stated above. The 1770-T1 Industrial Terminal would display the message “COMMUNICATION FAULT-CHECK CABLES FIRST.” Two messages would be alternately displayed by the 1770-T2 Industrial Terminal: “PROCESSOR FAULT” and INVALID INSTRUCTION ENCOUNTERED.
Incompatible instructions would be ignored by a1772-LN1 or-LN2 Processor. The display would depend on the Industrial Terminal. A 1770-T1 or-T2 would display “ERR” messages in place of incompatible instructions. The 1770-T3 would display incompatible instruc- tions although they could not executed.
1.6 SUPPORT DOCUMENTATION
The following support documents contain additional information regarding Mini-PLC-2 Controller components.
e Mini-PLC-2 Programmable Controller Assem- bly and Installation Manual (Publication 1772-820): contains necessary information on installation, assembly, maintenance and troubleshooting e PLC-2 Family Support Documentation Man- ual (Publication 1772-803-1): contains use- ful information on memory organization, Data Table expansion, system features, wiring, module keying and various features of Mini-PLC-2 Controller components and 1771 1/0.
Page 19
Page 2-1
Section2 | HARDWARE CONSIDERATIONS
2.0 GENERAL
This section will only describe the hardware features of the Mini-PLC-2 Programmable Controller that are used when inputting or debugging the User Program. For information on installation, start-up, troubleshooting, etc, refer to Publication 1772-820, the Mini-PLC-2 Programmable Controller Assembly and Instal- lation Manual.
2.1 MODE SELECT SWITCH
The Mini-PLC-2 Processor has a three-posi- tion keylock Mode Select Switch (Figure 2-1) that places the Processor in one of three operating modes:
e PROGRAM © TEST e RUN
RUN TEST PROG.
(2
FIGURE 2-1, Mode Select Keyswitch
2.1.1 PROG Position
This switch position places the Processor in the PROGRAM mode. User Program instruc- tions are entered in this mode. They can be entered from the Industrial Terminal, or entered from the Digital Cassette Recorder (Cat. No. 1770-SA) or the Data Cartridge Recorder (Cat. No. 1770-SB) when connected to the Industrial Terminal. All outputs are deenergized in this switch position and the machine controlled by the Mini-PLC-2 will not operate.
2.1.2 TEST Position
This switch position places the Processor in the TEST mode. The User Program is tested under simulated operating conditions. Inputs are active and recognized by the Processor, but user output devices are not energized. All outputs are disabled in this switch position. Changes to the User Program are NOT per- mitted, but Data Table values can be changed using the On-Line Data Change function or the Bit Manipulation function.
2.1.3 RUN Position
This switch position places the Processor in the RUN mode. The User Program will be executed and outputs are controlled by the program. Changes to the User Program are not permitted, but Data Table values can be changed using the On-Line Data Change function or the Bit Manipulation function.
This is the only switch position that allows removal of the Mode Select Switch key.
2.2 PROCESSOR DIAGNOSTIC INDICATORS
Indicators on the front panel of the Processor Module aid in analyzing controller status. (Refer to Figure 2-2.) During operation in any mode, the Processor continuously monitors its own status through checks on timing and data parity. In addition, the Processor receives a signal from the power supply if user AC power goes low for longer than one-half cycle.
FIGURE 2-2, Diagnostic Indicators
Page 20
Page 2-2
2.2.1 PROCESSOR Indicator
This red indicator illuminates if the Processor is unable to scan the User Program and Data Table. It is normally OFF. When ON, the Processor has stopped communication with I/O modules. If this occurs, the Last State Switch determines the status of energized controller outputs. (Refer to paragraph 2.4.)
Reset may be attempted for this type of fault by changing the Mode Select Switch to the PROGRAM mode, then back to RUN. Reset may also be accomplished by cycling line power to the system power supply or by reloading the User Program.
2.2.2 MEMORY Indicator
This red indicator illuminates if the Processor detects loss of User Program, adiscrepancy in memory data, or a parity error. It is normally OFF.
The Processor stops communication with I/O modules if this type of fault is detected. The Last State Switch determines the status of controller outputs if this fault occurs. (Refer to paragraph 2.4.)
This error may be reset by turning the Mode
Select Switch to the PROG position then back to RUN, by cycling line power to the system power supply, or by reloading the User Program.
2.2.3 RUN Indicator
This green indicator illuminates when the Processor is operating with the Mode Select Switch in the RUN mode. When this indicator is ON, controller outputs are enabled. This also implies that no Processor-related fault has been detected.
This indicator turns OFF in the RUN mode if the system power supply detects that voltage on the user AC line has dropped below 98V or 196V for 120V or 220/240V operation, respec- tively. In this event, the Processor disables all output devices and stops receiving input module data. This prevents the Processor from storing input data which might be inac- curate due to a low voltage level. The indicator also goes OFF when a fault occurs.
In the event of user AC power failure, the restart of the Processor is automatic with recovery of the line to the normal voltage range.
2.3 POWER SUPPLY DIAGNOSTIC INDICATORS
The system Power Supply (Figure 2-3) has two diagnostic indicators on the front panel: The BATTERY LOW and DC ON indicators.
FIGURE 2-3, System Power Supply (Without Battery Pack)
2.3.1 BATTERY LOW Indicator
When the batteries for memory backup are low, this red indicator flashes ON and OFF. The Battery Low Bit, bit 027/00, will cycle ON and OFF when a battery-low condition is detected and the Mode Select Switch is in the RUN or TEST position. Programming Tech- niques can be used to examine this bit and to control some type of alerting device when a battery-low condition exists. The battery will continue to provide memory backup for about one week after the indicator begins to flash.
2.3.2 DC ON Indicator
The DC ON is ared indicator that monitors the 5.1V DC line to the logic circuitry in the