要想实现plc的通讯编程,首先所选的plc必须有强大的通讯能力,就是说plc的操作系统能够支持多种通讯格式,通常一种品牌的plc如果能够提供给用户更多的编程自由度,那么这种品牌的技术开发能力就越强大,大多数品牌只能提供固定格式的通讯格式或协议,这就大大局限了plc与其他智能设备的数据交换。
我们的plc产品具有RS232和光电隔离的RS485两个自由通讯口,两个通讯口可以同时收发数据,几乎可以适应所有通讯格式,可以提供CRC和BCC等多种校验方式。
以一台PLC通过485通讯控制多个某品牌的变频器为例:
如果该变频器的波特率是9600b/s,8个数据位,奇校验,1个停止位。那么首先必须在plc的嵌入C窗口的初始化代码区编程一个通讯口设置语句:Set485Port(9600,o,8,1);仅仅一个语句就完成了对485通讯口的编程。
由于485通讯必须设定主从关系,这里是plc控制多台变频器,所以plc必须设置为主,因此还需在初始化代码区增加一个地址和主从设定语句:SetAddress(1,MASTER);事实上,对于主控制器来说,地址已经失去意义。
通讯口已经设置完毕,下面就是如何根据要求将数据发送给变频器。
对FX2系列的PLC与上拉机的通信实现,提出了一种价格低、体积小的接口方案,讨论了其硬件和软件的设计思想,该接口装置与控制室和实验室环境下运行可靠。
关键词:上位机通信接口可编程控制器
CLINCH NUT PULL TEST KIT, RETENTION TESTER 0-9000 LBS
LH RESEARCH MM11-3/115 MIGHTY-MITE POWER SUPPLY 375W
ENDRESS & HAUSER PMP41-PC13S6J11GC PRESSURE TRANSMITTER
BANNER PVA100P6EQ PVA SER 100MM ARRAY EMITTER KIT NIB
ACTARIS MODEL 600 FLOWMETER REGISTER
JAMFLOW 1/4″ BALL VALVE & WIKA PROCESS GUAGE NNB
KEYSTONE 276-020-400 AR2 BUTTERFLY VALVE 175 PSI NEW
VICKERS 508173 HYDRAULIC VALVE 24 VOLT COIL FOR DG4V
NEWMAN 45-313321 6″ BUTTERFLY VALVE 200 PSI NEW
DWYER VA1243 SERIES VA VARIABLE AREA GLASS FLOWMETER
PRESSURE GUAGE 0-6000 BAR MAKE AN OFFER…
KEYSTONE 723-703-050-AR2 BUTTERFLY VALVE 175 PSI NEW
ASHCROFT B429S XFM6B TYPE B SERIES PRESSURE SWITCH
KEYSTONE 195-703-080-920 BUTTERFLY VALVE 150 PSI NEW
VISIOTEC 633901 VISIOSCAN PINHOLE INSPECTION LENS
VICKERS 507848 VALVE SOLENOID COIL
ALLEN BRADLEY 1401-N42 Series A FUSE CLIP KIT, NEW
ALLEN BRADLEY 1494V-FS60 TRAILER FUSE BLOCK KIT, NIB
BANNER SMBPVA5A PROTECTIVE BRACKET KIT NIB
ALLEN BRADLEY 1785-L11B PLC-5/11 SER E CPU MODULE
BANNER SMB3212F MOUNTING ACCESSORIES LOT OF 22 NEW
KELTECH INC 193X642ABG01 RELAY BOARD
EDWARDS 104SLEDG-G1 ADAPTABEACON
ITC VLC10 LR 106309 FUSE BLOCK HOLDERS, LOT OF 4
PILZ PNOZ XV2 24VDC SAFETY RELAY
SIEMENS 3RK1200-0CE02-0AA2 MODULE
ALLEN BRADLEY 800E-2DL3 FULL VOLTAGE MODULE W/ LATCH
ALLEN BRADLEY 800MR-Q24BS PILOT LIGHT NIB
ALLEN BRADLEY 1490-N9 3/4INCH CONDUIT HUB NIB
PARKER 932670Q 10Q WN FILTER ELEMENT, NIB
SIEMENS 6ES7 132-4BD31-0AA0 OUTPUT MODULE
SIBA 20 001 04 FUSE LOT OF 3
CRANE 1-1/2″ BRONZE GLOBE VALVE, NEW
MOELLER X POLE FAZ-S10/1 & OTHER BREAKER LOT OF 3
MAC 45A-FA1-DAAJ-2KA VALVE NEW
ABB BC25 CONTACTOR
EUCHNER NZ1HB-511-M SAFETY SWITCH, LOT OF 2, NIB
VELOSTAT C15493700A ANALOG PCB NIB
WESTINGHOUSE RHUN361 30 AMP HEAVY DUTY SAFETY SWITCH
NORDSON 502862-0001 ENCODER NIB
HOFFMAN 401494 792 HIGH PRESSURE WATER VENT VALVE, NIB
STATIC CONTROLS CORP CB-1308 CONTROL BOARD
IFM ELECTRONIC E20633 FIBER OPTICS, LOT OF 3, NIB
PEPPERL+FUCHS IVI-KHD2-4HRX SERIAL CONTROL I/F
RITTAL TS8611.310 DOOR INTERLOCK FOR ISOLATORS LOT OF 6
IFM ELECTRONIC E20161 FIBER OPTICS, LOT OF 2, NIB
FANUC A05B-2301-C303 TEACH PENDANT
ALLEN BRADLEY 1746-IO12 COMBINATION I/O MODULE, NIB
ALLEN BRADLEY 1203-GK5 SER A COMMUNICATION OPTION KIT
ALLEN BRADLEY 1490 CONDUIT HUB LOT OF 3 NIB
GENERAL ELECTRIC TJD432400 CIRCUIT BREAKER
CUTLER-HAMMER AF93AG0C002D AC DRIVE
SONY XV-M30 BATTERY AND CHARGERS W/ CASE
USON 403-X300G I/O MOUDLE
RAYTEK RAYRPM20L3U PM PLUS INFRARED THERMOMETER
YOKOGAWA 250400 STROKE / MINUTE PANEL METER, LOT OF 6
AMPROBE AA82 CHART RECORDER
MCQUAY 658160B-01-ADI-01 DIGITAL BOARD
TRANE SEN00299 SENSOR LOT OF 3
OBERG IND. OMM-G-1 OPTICAL MISFEED MONITOR
HANSEN COUPLING 16S51 2″ FEMALE COUPLER LOT OF 2
3COM 1671-010-000-2.03 OFFICE CONNECT 8 PORT HUB
SCOTT 09755 CAPACTIOR ROLL TOWEL DISPENSER, LOT OF 7
ALLEN BRADLEY 709-BOD103 SIZE 1 MOTOR STARTER
ASHCROFT B424B PRESSURE SWITCH W/ DIAPHRAGM
ITT K10CB119 2-WAY GENERAL PURPOSE VALVE, NIB
MORSE XB1074 L08K GEAR REDUCER
ALLEN BRADLEY 800T-1T1BB OILLIGHT PUSH BUTTON NNB
WATTS 0885011 3/4″ AK STRAINER NIB
WATTS 0885010 1/2″ AK STRAINER NIB
EUPEC TD 60 N 08 KDF IGT 2 11L0 POWERBLOCKS, LOT OF 3
APOLLO 7K-107-27 1-1/2″ BALL VALVE W/ BOTTOM TAP, NEW
TOHO M-8S TOLINE MODULE
SQUARE D GENERAL PURPOSE TRANSFORMER 35638 CLASS 1 S1F
GRACO 218510 SURGE TANK
FANUC A16B-2300-0021/02B PCB
BAY CN-AIM2 REV B 3 BOARD