Ebook Instruction set reference

372 1K 0
Ebook Instruction set reference

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Ebook Instruction set reference has contents Process Control instruction PID; message instruction MSG; custom application routine instructions SDS, DFA; file instruction concepts, bit modify and move nstructions BTD, MOV, MVM,...and other contents.

Allen-Bradley PLC-5 Programmable Controllers Instruction Set Reference Important User Information 6ROLG VWDWH HTXLSPHQW KDV RSHUDWLRQDO FKDUDFWHULVWLFV GLIIHULQJ IURP WKRVH RI HOHFWURPHFKDQLFDO HTXLSPHQW ³6DIHW\ *XLGHOLQHV IRU WKH $SSOLFDWLRQ ,QVWDOODWLRQ DQG 0DLQWHQDQFH RI 6ROLG 6WDWH &RQWUROV´ 3XEOLFDWLRQ 6*, GHVFULEHV VRPH LPSRUWDQW GLIIHUHQFHV EHWZHHQ VROLG VWDWH HTXLSPHQW DQG KDUGZLUHG HOHFWURPHFKDQLFDO GHYLFHV %HFDXVH RI WKLV GLIIHUHQFH DQG DOVR EHFDXVH RI WKH ZLGH YDULHW\ RI XVHV IRU VROLG VWDWH HTXLSPHQW DOO SHUVRQV UHVSRQVLEOH IRU DSSO\LQJ WKLV HTXLSPHQW PXVW VDWLVI\ WKHPVHOYHV WKDW HDFK LQWHQGHG DSSOLFDWLRQ RI WKLV HTXLSPHQW LV DFFHSWDEOH ,Q QR HYHQW ZLOO WKH $OOHQ%UDGOH\ &RPSDQ\ EH UHVSRQVLEOH RU OLDEOH IRU LQGLUHFW RU FRQVHTXHQWLDO GDPDJHV UHVXOWLQJ IURP WKH XVH RU DSSOLFDWLRQ RI WKLV HTXLSPHQW 7KH H[DPSOHV DQG GLDJUDPV LQ WKLV PDQXDO DUH LQFOXGHG VROHO\ IRU LOOXVWUDWLYH SXUSRVHV %HFDXVH RI WKH PDQ\ YDULDEOHV DQG UHTXLUHPHQWV DVVRFLDWHG ZLWK DQ\ SDUWLFXODU LQVWDOODWLRQ WKH $OOHQ%UDGOH\ &RPSDQ\ FDQQRW DVVXPH UHVSRQVLELOLW\ RU OLDELOLW\ IRU DFWXDO XVH EDVHG RQ WKH H[DPSOHV DQG GLDJUDPV 1R SDWHQW OLDELOLW\ LV DVVXPHG E\ $OOHQ%UDGOH\ &RPSDQ\ ZLWK UHVSHFW WR XVH RI LQIRUPDWLRQ FLUFXLWV HTXLSPHQW RU VRIWZDUH GHVFULEHG LQ WKLV PDQXDO 5HSURGXFWLRQ RI WKH FRQWHQWV RI WKLV PDQXDO LQ ZKROH RU LQ SDUW ZLWKRXW ZULWWHQ SHUPLVVLRQ RI WKH $OOHQ%UDGOH\ &RPSDQ\ LV SURKLELWHG 7KURXJKRXW WKLV PDQXDO ZH XVH QRWHV WR PDNH \RX DZDUH RI VDIHW\ FRQVLGHUDWLRQV $77(17,21 ,GHQWLILHV LQIRUPDWLRQ DERXW SUDFWLFHV RU FLUFXPVWDQFHV WKDW FDQ OHDG WR SHUVRQDO LQMXU\ RU GHDWK SURSHUW\ GDPDJH RU HFRQRPLF ORVV $WWHQWLRQV KHOS \RX ‡ LGHQWLI\ D KD]DUG ‡ DYRLG WKH KD]DUG ‡ UHFRJQL]H WKH FRQVHTXHQFHV ,PSRUWDQW ,GHQWLILHV LQIRUPDWLRQ WKDW LV HVSHFLDOO\ LPSRUWDQW IRU VXFFHVVIXO DSSOLFDWLRQ DQG XQGHUVWDQGLQJ RI WKH SURGXFW @‡ur…r‡Ãv†ÃhÅrtv†‡r…rqDžhqr€h…xÂsÃD‡ryÃ8‚…ƒ‚…h‡v‚ÃYr…‚‘Ã8‚…ƒ‚…h‡v‚ÃhqÃ9 vtv‡hyà @„ˆvƒ€r‡Ã8‚…ƒ‚…h‡v‚ 9h‡hÃCvtuh’ÃQyˆ†Ã9CÃQG8ÃQG 8$ÃQG8$ Ã$!Ã$!%Ã$"Ã$#Ã$#%Ã$#GÃ$%Ã$%Gà $'Ã$'%Ã$!@Ã$#@ÃhqÃ$'@Ãh…rDžhqr€h…x†Ã‚sÃS‚pxryyÃ6ˆ‡‚€ h‡v‚ 6yyr7…hqyr’Ãv†ÃhDžhqr€h…xÂsÃS‚pxryyÃ6ˆ‡‚€ h‡v‚ÃhÃp‚…rÃiˆ†vr††Ã‚sÃS‚pxryyÃD‡r…h‡v‚hyà 8‚…ƒ‚…h‡v‚ PLC-5 Instruction Set Alphabetical Listing PLC-5 Instruction Set Alphabetical Listing For this Instruction: See Page: For this Instruction: See Page: For this Instruction: For this Instruction: See Page: See Page: ABL 17-51 CMP 3-3 JSR 13-12 RES 2-25 ACB 17-71 COP 9-20 LBL 13-5 RET 13-12 ACI 17-91 COS 4-211 LEQ 3-9 RTO 2-13 ACN 17-101 CPT 4-5 LES 3-10 SBR 13-12 ACS 4-131 CTD 2-20 LFL 11-51 SDS 18-2 ADD 4-14 CTU 2-18 LFU 11-51 SFR 13-231 AEX 17-111 DDT 10-2 LIM 3-11 SIN 4-271 AFI 13-19 DEG 6-51 LN 4-231 SQI 12-2 SQL 12-2 AHL 17-12 DFA 18-3 LOG 4-241 AIC 17-141 DIV 4-22 MCR 13-3 SQO 12-2 AND 5-2 DTR 10-8 MEQ 3-13 SQR 4-28 ARD 17-151 EOT 13-24 MOV 7-4 SRT 4-291 ARL 17-181 EQU 3-6 MSG 16-2 STD 4-311 ASC 17-211 FAL 9-2 MUL 4-25 SUB 4-34 ASN 4-151 FBC 10-2 MVM 7-5 TAN 4-351 ASR 17-221 FFL 11-5 NEG 4-26 TND 13-19 ATN 4-161 FFU 11-5 NEQ 3-15 TOD 6-3 AVE 4-171 FLL 9-21 NOT 5-4 TOF 2-9 AWA 17-231 FOR 13-8 NXT 13-8 TON 2-5 AWT 17-261 FRD 6-4 ONS 13-20 UID 13-251 BRK 13-8 FSC 9-15 OR 5-6 UIE 13-261 BSL 11-2 GEQ 3-7 OSF 13-221 XIC 1-3 BSR 11-2 GRT 3-8 OSR 13-211 XIO 1-4 BTD 7-2 IDI 1-102 OTE 1-5 XOR 5-8 XPY 4-361 BTR 15-4 IDO 1-11 OTL 1-6 BTW 15-4 IIN 1-8 OTU 1-7 CIO 15-252 IOT 1-9 PID NO TAG CLR 4-20 JMP 13-5 RAD 6-61 Enhanced PLC -5 processors only 6200 programming software with ControlNet PLC-5 processors only 1785-6.1 November 1998 PLC-5 Instruction Set Alphabetical Listing 6HH 7DEOH $ IRU JXLGHOLQHV RQ FKRRVLQJ WKH DSSURSULDWH LQVWUXFWLRQ IRU WKH RSHUDWLRQ \RX ZDQW WR SHUIRUP 7DEOH % OLVWV VRPH H[DPSOHV Table A Choosing an Instruction Category If You Want to Perform this Operation: Use this Instruction Category: examine, check or control 2-state device or condition multiple 2-state devices or conditions bit level multi-bit move, copy, change, compute, compare analog values, codes multiple sets of values element level file instructions convert conversion instructions time or delay timer count counter shift or track bit shift sequence sequencer PID PID message sending/receiving message transfer data to/from modules block transfer or ControlNet transfer diagnostics, fault handling diagnostics control the flow of your program program control Table B Example Operations If Your Application Calls for Operations such as: Use: detecting when a limit switch closes bit level changing the temperature preset element level transfer analog data block transfer turn on a motor 10 seconds after a pump is activated timing move of recipes into a work area multi-element keep track of parts as they move from station to station shifting keep track of total parts in a bin 1785-6.1 November 1998 counting Summary of Changes Summary of Changes New Information Added to this Manual 7KH OLVW EHORZ VXPPDUL]HV WKH FKDQJHV WKDW KDYH EHHQ PDGH WR WKLV PDQXDO VLQFH WKH ODVW SULQWLQJ For this Update Information: See Chapter: Converting non-decimal numbers with the FRD instruction How non-existing, indirect addresses affect the COP and FLL instructions How the POS value operates in sequencer instructions 12 Using a RET instruction 13 Using the PID bias term 14 Using the no zero crossing (.NOZC) and no back calculation (.NOBC) features in the PD control block 14 Clarification to error code 89 for MSG instruction 16 Ethernet PLC-5 processors now support SLC Typed Read and SLC Typed Write MSG instructions 16 Configuring a multihop MSG instruction over Ethernet or over ControlNet 16 Monitoring the status of the EN bit in a continuous MSG instruction 16 7R KHOS \RX ILQG QHZ LQIRUPDWLRQ DQG XSGDWHG LQIRUPDWLRQ LQ WKLV UHOHDVH RI WKH PDQXDO ZH KDYH LQFOXGHG FKDQJH EDUV DV VKRZQ WR WKH OHIW RI WKLV SDUDJUDSK 1785-6.1 November 1998 Summary of Changes 1RWHV 1785-6.1 November 1998 Preface Preface 7KLV PDQXDO XVHV WKH IROORZLQJ FRQYHQWLRQV Conventions ‡ 8QOHVV RWKHUZLVH VWDWHG References to: Include these Allen-Bradley Processors: Classic PLC-5 processors PLC-5/10™, -5/12™, -5/15™, -5/25™, and -5/VME™ processors Enhanced PLC-5 processors PLC-5/11™, -5/20™, -5/30™, -5/40™, -5/40L™, -5/60™, -5/60L™, and -5/80™ processors Note: Unless otherwise specified, Enhanced PLC-5 processors include Ethernet PLC-5, ControlNet PLC-5, Protected PLC-5 and VME PLC-5 processors Ethernet PLC-5 processors PLC-5/20E™, -5/40E™, and -5/80E™ processors ControlNet PLC-5 processors PLC-5/20C™, -5/40C™, -5/46C™, and -5/80C™ processors Protected PLC-5 processors PLC-5/26™, -5/46™, and -5/86™ processors VME PLC-5 processors PLC-5/V30™, -5/V40™, -5/V40L™, and -5/V80™ processors See the PLC-5/VME VMEbus Programmable Controllers User Manual for more information à Q…‚‡rp‡rqÃQG8$łpr††‚…†Ãhy‚rÃq‚Á‚‡Ãr†ˆ…rÃQG8$ƒ†‡r€Ã†rpˆ…v‡’ÃT’†‡r€Ã†rpˆ…v‡’Ãv†ÃhÃp‚€ivh‡v‚Ã‚sà ‡urÃQ…‚‡rp‡rqÃQG8$łpr††‚…ÇurƂs‡h…rÃhq҂ˆ…Ãhƒƒyvph‡v‚Ãr‘ƒr…‡v†rà ‡ :RUGV LQ VTXDUH EUDFNHWV UHSUHVHQW DFWXDO NH\V WKDW \RX SUHVV )RU H[DPSOH >Enter]; [F1] – Online Programming/Documentation ‡ :RUGV WKDW GHVFULEH LQIRUPDWLRQ WKDW \RX KDYH WR SURYLGH DUH VKRZQ LQ LWDOLFV )RU H[DPSOH LI \RX KDYH WR W\SH D ILOH QDPH WKLV LV VKRZQ DV filename ‡ 0HVVDJHV DQG SURPSWV WKDW WKH WHUPLQDO GLVSOD\V DUH VKRZQ DV Press a function key 1785-6.1 November 1998 Preface 1RWHV 1785-6.1 November 1998 Table of Contents Relay-Type Instructions XIC, XIO, OTE, OTL, OTU, IIN, IOT, IDI, IDO Timer Instructions TON, TOF, RTO Counter Instructions CTU, CTD Reset RES Chapter Using Relay-Type Instructions 1-1 I/O Image Files in Data Storage 1-2 Rung Logic 1-2 Examine On (XIC) 1-3 Examine Off (XIO) 1-3 Energize (OTE) 1-4 Latch (OTL) 1-4 Unlatch (OTU) 1-5 Immediate Input (IIN) 1-6 Immediate Output (IOT) 1-7 Immediate Data Input (IDI) 1-8 Immediate Data Output (IDO) 1-8 Using IDI and IDO Instructions 1-9 Chapter Using Timers and Counters 2-1 Using Timers 2-1 Entering Parameters 2-2 Timer Accuracy 2-3 Timer On Delay (TON) 2-4 Using Status Bits 2-4 Timer Off Delay (TOF) 2-7 Using Status Bits 2-7 Retentive Timer On (RTO) 2-10 Using Status Bits 2-10 Using Counters 2-13 Entering Parameters 2-13 Count Up (CTU) 2-15 Using Status Bits 2-15 Count Down (CTD) 2-17 Using Status Bits 2-17 Timer and Counter Reset (RES) 2-20 1785-6.1 November 1998 10-8 Diagnostic Instructions FBC, DDT, DTR 7KH '75 LQVWUXFWLRQ LV DQ LQSXW LQVWUXFWLRQ WKDW SDVVHV D VRXUFH YDOXH WKURXJK D PDVN DQG FRPSDUHV WKH UHVXOW WR D UHIHUHQFH YDOXH 8VH WKLV LQVWUXFWLRQ WR GHWHFW DQG LGHQWLI\ LQYDOLG LQSXWV DQG WR SUHYHQW LQYDOLG LQSXWV IURP VKXWWLQJ GRZQ D EDWFK SURFHVVRU RU PDFKLQH RSHUDWLRQ Data Transitional (DTR) Description: DTR DATA TRANSITION Source Mask Reference 7KH '75 LQVWUXFWLRQ FRPSDUHV D VRXUFH ZRUG WKURXJK D PDVN ZLWK D UHIHUHQFH ZRUG 7KH LQVWUXFWLRQ DOVR ZULWHV WKH VRXUFH ZRUG LQWR WKH UHIHUHQFH DGGUHVV IRU WKH QH[W FRPSDULVRQ 7KH VRXUFH ZRUG UHPDLQV XQFKDQJHG :KHQ WKH PDVNHG VRXUFH GLIIHUV IURP WKH UHIHUHQFH WKH LQVWUXFWLRQ JRHV WUXH IRU RQO\ RQH VFDQ 7KH SURFHVVRU ZULWHV WKH PDVNHG VRXUFH YDOXH LQWR WKH UHIHUHQFH DGGUHVV :KHQ WKH PDVNHG VRXUFH DQG WKH UHIHUHQFH DUH WKH VDPH WKH LQVWUXFWLRQ UHPDLQV IDOVH $77(17,21 2QOLQH SURJUDPPLQJ ZLWK WKLV LQVWUXFWLRQ FDQ EH GDQJHURXV ,I WKH GHVWLQDWLRQ YDOXH LV GLIIHUHQW IURP WKH VRXUFH YDOXH WKH LQVWUXFWLRQ JRHV WUXH 8VH FDXWLRQ LI \RX LQVHUW WKLV LQVWUXFWLRQ ZKHQ WKH SURFHVVRU LV LQ 5XQ RU 5HPRWH 5XQ PRGH Entering Parameters 7R SURJUDP WKH '75 LQVWUXFWLRQ \RX QHHG WR SURYLGH WKH SURFHVVRU ZLWK WKH IROORZLQJ LQIRUPDWLRQ Example: DTR DATA TRANSITION Source Mask Reference 1785-6.1 November 1998 I:002 0FFF N63:11 Parameter: Definition: Source the address of the input word, typically real inputs Mask the hexadecimal value or address that contains the mask value Reference the address of the reference word The reference contains the source data from the last DTR scan 7KH '75 LQVWUXFWLRQ DERYH SDVVHV WKH VRXUFH , WKURXJK D PDVN RI OFFF DQG FRPSDUHV WKH UHVXOW WR WKH UHIHUHQFH ZRUG 1  7KH VRXUFH ZRUG LV WKHQ ZULWWHQ LQWR WKH UHIHUHQFH DGGUHVV IRU WKH QH[W FRPSDULVRQ WKH VRXUFH UHPDLQV XQFKDQJHG  Diagnostic Instructions FBC, DDT, DTR 15 10-9 08 07 15 00 08 07 00 0 0 1 1 1 1 1 1 15 Source Word I:002 08 07 Previous Scan Rung remains false as long as input value does not change 08 07 15 Mask Value 0FFF Reference Word N63:11 00 08 07 00 0 0 1 1 1 1 1 1 15 00 Current Scan 15 08 07 00 Current Scan Previous Scan Rung goes true for one scan when change is detected 13385 1785-6.1 November 1998 10-10 1RWHV 1785-6.1 November 1998 Diagnostic Instructions FBC, DDT, DTR Chapter 11 Shift Register Instructions BSL, BSR, FFL, FFU, LFL, LFU Applying Shift Registers 8VH WKH VKLIW UHJLVWHU LQVWUXFWLRQ WR VLPXODWH WKH PRYHPHQW RU IORZ RI SDUWV DQG LQIRUPDWLRQ If You Use a Shift Register for: Data in the Shift Register Could Represent: Tracking parts through an assembly line Part types, quality, size, and status Controlling machine or process operations The order in which events occur Inventory control Identification numbers or locations System diagnostics A fault condition that caused a shutdown 7DEOH $ OLVWV WKH DYDLODEOH VKLIW LQVWUXFWLRQV Table 11.A Available Shift Instructions If You Want to: Use these Instructions: Found on Page: Load bits into, shift bits through, and unload bits from a bit array one bit at a time, such as for tracking bottles through a bottling line where each bit represents a bottle BSL, BSR 11-2 Load and unload values in the same order, such as for tracking parts through an assembly line where parts are represented by values that have a part number and assembly code FFL, FFU 11-5 Load and unload values in reverse order, such as tracking stacked inventory in a warehouse, where goods are represented by serial number and inventory codes LFL, LFU * 11-8 * These instructions are only supported by Enhanced PLC-5 processors )RU PRUH LQIRUPDWLRQ RQ WKH RSHUDQGV DQG YDOLG GDWD W\SHVYDOXHV RI HDFK RSHUDQG XVHG E\ WKH LQVWUXFWLRQV GLVFXVVHG LQ WKLV FKDSWHU VHH $SSHQGL[ & 1785-6.1 November 1998 11-2 Shift Register Instructions BSL, BSR, FFL, FFU, LFL, LFU Using Bit Shift Instructions EN %LW VKLIW LQVWUXFWLRQV VKLIW DOO ELWV ZLWKLQ WKH VSHFLILHG DGGUHVV RQH ELW SRVLWLRQ ZLWK HDFK IDOVHWRWUXH UXQJ WUDQVLWLRQ 7KHVH LQVWUXFWLRQV DUH DN ‡ %LW 6KLIW /HIW %6/ ‡ %LW 6KLIW 5LJKW %65 Description: BSL BIT SHIFT LEFT File Control Bit address Length Entering Parameters 7R SURJUDP D ELW VKLIW LQVWUXFWLRQ \RX QHHG WR SURYLGH WKH SURFHVVRU ZLWK WKH IROORZLQJ LQIRUPDWLRQ Parameter: Definition: File the address of the bit array you want to manipulate You must start the array at a 16-bit word boundary For example, use bit of word number 1, 2, 3, etc You can end the array at any bit number up to 15,999 However, you cannot use the remaining bits in that particular element because the instruction invalidates them Control The address of the control structure (48 bits – three 16-bit words) in the control area (R) of memory that stores the instruction’s status bits, the size of the array (number of bits), and the bit pointer Position the current position of the bit to which the instruction points Enter a value only if you want the instruction to start at an offset concurrent with a control file offset for one scan Use the control address with mnemonic when you address this parameter Bit Address the address of the source bit The instruction inserts the status of this bit in either the first (lowest) bit position (for the BSL instruction) or the last (highest) bit position (for the BSR instruction) in the array Length the decimal number of bits to be shifted Remember that bits in I/O files are numbered in octal 00-17, but that bits in all other files are numbered in decimal 0-15 Use the control address with mnemonic when you address this parameter $77(17,21 'R QRW XVH WKH VDPH FRQWURO DGGUHVV IRU PRUH WKDQ RQH LQVWUXFWLRQ 8QH[SHFWHG RSHUDWLRQ FRXOG UHVXOW LQ SRVVLEOH HTXLSPHQW GDPDJH DQGRU SHUVRQDO LQMXU\ 1785-6.1 November 1998 Shift Register Instructions BSL, BSR, FFL, FFU, LFL, LFU 11-3 Using Status Bits 7R XVH WKH %6/ RU %65 LQVWUXFWLRQ FRUUHFWO\ H[DPLQH VWDWXV ELWV LQ WKH FRQWURO HOHPHQW

Ngày đăng: 15/05/2017, 18:02

Từ khóa liên quan

Mục lục

  • 1785-6.1, PLC-5 Programmable Controllers Instruction Set Reference

    • Important User Information

    • PLC-5 Instruction Set Alphabetical Listing

    • Summary of Changes

      • New Information Added to thisManual

        • 6

        • 9

        • 12

        • 13

        • 14

        • 14

        • 16

        • 16

        • 16

        • 16

        • Preface

        • Table of Contents

        • 1 - Relay-Type Instructions XIC, XIO, OTE, OTL, OTU, IIN, IOT, IDI, IDO

          • Using Relay-Type Instructions

          • Examine On (XIC)

          • Examine Off (XIO)

          • Energize (OTE)

          • Latch (OTL)

          • Unlatch (OTU)

Tài liệu cùng người dùng

Tài liệu liên quan