编程指令:指令是PLC被告知要做什么,以及怎样去做的代码或符号。从本质上讲,指令只是一些二进制代码,这点PLC与普通的计算机是完全相同的。同时PLC也有编译系统,它可以把一些文字符号或图形符号编译成机器码,所以用户看到的PLC指令一般不是机器码而是文字代码,或图形符号。常用的助记符语句用英文文字(可用多国文字)的缩写及数字代表各相应指令。常用的图形符号即梯形图,它类似于电气原理图是符号,易为电气工作人员所接受。
l指令系统:一个PLC所具有的指令的全体称为该PLC的指令系统。它包含着指令的多少,各指令都能干什么事,代表着PLC的功能和性能。一般讲,功能强、性能好的PLC,其指令系统必然丰富,所能干的事也就多。我们在编程之前必须弄清PLC的指令系统
l程序:PLC指令的有序集合,PLC运行它,可进行相应的工作,当然,这里的程序是指PLC的用户程序。用户程序一般由用户设计,PLC的厂家或代销商不提供。用语句表达的程序不大直观,可读性差,特别是较复杂的程序,更难读,所以多数程序用梯形图表达。
l梯形图:梯形图是通过连线把PLC指令的梯形图符号连接在一起的连通图,用以表达所使用的PLC指令及其前后顺序,它与电气原理图很相似。它的连线有两种:一为母线,另一为内部横竖线。内部横竖线把一个个梯形图符号指令连成一个指令组,这个指令组一般总是从装载(LD)指令开始,必要时再继以若干个输入指令(含LD指令),以建立逻辑条件。后为输出类指令,实现输出控制,或为数据控制、流程控制、通讯处理、监控工作等指令,以进行相应的工作。母线是用来连接指令组的。下图是三菱公司的FX2N系列产品的简单的梯形图例:
MODICON NW-RR85-000 REPEATER / MODBUS PLUS
MODICON NW-BP85-002 BRIDGE / MODBUS PLUS
YOKOGAWA 2353 AC AMPERES METER
BANNER RS-11 RELAY SOCKET MODULE, LOT 8
BK PRECISION 1601 REGULATED DC POWER SUPPLY
ALLEN BRADLEY 1771-OD16 A ISOLATED AC OUTPUT MODULE
SERVICE FIRST CNT01405 CONTROL TEMP. OPEN, CLOSE SPST
EFECTOR IG6051 INDUCTIVE PROXIMITY SWITCH NIB
CUTLER-HAMMER E57MAL18A2E PROXIMITY SWITCH
BUSS R25030-3PR FUSEHOLDER
BUSSMAN FRN-R-80 TIME-DELAY FUSES LOT OF 4 NIB
TEKELEK CDS-80 80A FUSETEK NEW LOT OF 2
CEFCO OT6/250 6 AMPS FUSES LOT OF 3
UNITED ELECTRIC J21KX 140 PRESSURE SWITCH NIB
ALLEN BRADLEY 2361-SPM02A GATE INTERFACE BOARD NIB
STI OS-1 BBS MODULE NEW LOT OF 8
ALLEN BRADLEY 42GRU-9203H PHOTOSWITCH
NYE TOOL 51 B 1″ TO 2″ ADJUSTABLE DIE
SIEMENS 1LA3073-4AB91 0,43KW MOTOR
SIEMENS 1LA5079-2AA93-Z .48KW MOTOR
ORIENTAL MOTOR 4IK25GN-AWT INDUCTION MOTOR, NNB
ALLEN BRADLEY 1778-OAC AC OUTPUT MODULE
TR ELECTRONICS STE-68 SERVO MOTOR
KEYENCE MS-H50 COMPACT SWITCHING POWER SUPPLY
ADVANCE RSM-175-S-TP SLIMLINE BALLAST NIB
ADVANCE VC-2S85-TP RAPID START BALLAST NIB
VALMONT ELECTRIC 8G1028WF RAPID START BALLAST NIB
SYLVANIA MB2X40/120 RS MAGNETIC BALLAST NEW
ADVANCE REL-2P60-S INSTANT-START ELECTRONIC BALLAST NIB
VALMONT ELECTRIC 8G1148W RAPID START BALLAST
SIEMENS 3RT1044-1BB40 SIRIUS CONTACTOR
GRACO 220 395 DISPLACEMENT PUMP REPAIR KIT, NEW
ERDCO 3464-08T5 WATER ARMOR-FLO WATER METER, NNB
NORDSON 239819E SPARE PART KIT, NIB
PAPST 4482 FM FAN
TURCK PKW 3M-6/S90 PICOFAST CABLE NEW
TURCK BI 2-CRS260-AP4X2-H1141/S34 PROXIMITY SWITCH NEW
TURCK PKG 3M-2/S90 PICOFAST CABLE NEW LOT OF 2
SQUARE D ARC-13 30 AMP DISC SWITCH NIB
ALLEN BRADLEY 700-RTA / 700-RTA00V000A1 RELAY
NEC NL6448AC33-59D 10.4″ FLAT PANEL DISPLAY
S. HIMMELSTEIN 6-201 TRANSDUCER AMPLIFIER
SCHAFFNER FS5113-50-53 EMC FILTER
ACE CONTROLS MA 6450 INDUSTRIAL SHOCK ABSORBER NIB
HONEYWELL V5011G 1194 1 2-WAY SINGLE SEATED STEAM VALVE
KINETROL 059-404EL0000M VANE ACTUATOR & FILTER 1/4″ NIB
GAST DAA-V141-GB VACUUM PUMP 115 VOLT 5.5 AMP
SANYO ELECTRIC C-Q40L6C HERMETIC COMPRESSOR NIB
TURCK WKM 36-10M MINIFAST 3-WIRE CORDSET 600V 9A NEW
IPC AUTOMATION 910-8070-001 MICROWATCH ALARM PROCESSOR
ALLEN BRADLEY 1771-A3B1 12 SLOT I/O CHASSIS
MASS-TRON II 2 MASS FLOW TRANSMITTER 24 VAC/DC
INVENSYS 043 SERVICE REGULATOR, NIB
ALLEN BRADLEY 1756-CNB/D F/W REV 5.22 ControlNet MODULE
ALLEN BRADLEY 1756-CNB/A REV B01 F/W 1.14 ControlNet
ALLEN BRADLEY 1756-CNB/B REV C01 F/W 2.24 ControlNet
ALLEN BRADLEY 1756-DNB/B F/W Rev 7.002 DeviceNet MODULE
ALLEN BRADLEY 1756-ENET/A REV H01 F/W 1.18 ETHERNET
ALLEN BRADLEY 1756-ENET/A REV K01 F/W 1.18 ETHERNET
ALLEN BRADLEY 1756-CNB/A REV C01 F/W 1.19 ControlNet
ALLEN BRADLEY 1756-DNB/A F/W 3.3 REV F01 DeviceNet
ALLEN BRADLEY 1756-DNB/B F/W Rev 6.002 DeviceNet MODULE
ALLEN BRADLEY 1756-ENET/A REV L01 F/W 1.18 ETHERNET
HONEYWELL BAF1-2RN8-LH MICROSWITCH NIB
LEUZE ELECTRONIC RK 85/7 PHOTOELECTRIC SENSOR
HTC 222310D PCB
RELIANCE CORP EA100 LEVALARM
ENIDINE NB9599 HYDRAULIC SHOCK ABSORBER
MOORE 341GE1S2B1NNN13 TRANSMITTER
OMRON 3Z4SP-C22 VISUAL POSITIONING SENSOR
HUBBELL LED1-MR-RBB PATHFINDER LED EXIT NIB
ALLEN BRADLEY 1771-AL I/O ADAPTER MODULE
CUTLER HAMMER AN16BN0 SIZE 0 STARTER W/ C320KGT1