2、PLC接收到讀寫命令,校驗(yàn)后正確,返回的數(shù)據(jù)格式為 E5H
3、確認(rèn)讀寫命令的數(shù)據(jù)格式為:
SD SA DA FC FCS ED * |& G' B! `0 V% \
其中SD為起始符,為10H3 P" N# N0 p, n3 c
SA為數(shù)據(jù)源地址
DA為目的地址, c. Q E% u4 k
FC為功能碼,取5CH
FCS為SA+DA+FC的和的末字節(jié)
ED為結(jié)束符,取16H8 v; d( A% `* h9 |# i; ? }( U
PPI協(xié)議的軟件編制% r% h: \* L9 \6 {
AMAT 0100-00003原裝在采用上位機(jī)與PLC通訊時(shí),上位機(jī)采用VB編程,計(jì)算機(jī)采用PPI電纜或普通的485串口卡與PLC的編程口連接,通訊系統(tǒng)采用主從結(jié)構(gòu),上位機(jī)遵循PPI協(xié)議格式,發(fā)出讀寫申請(qǐng),AMAT 0100-00003原裝 PLC返回相應(yīng)的數(shù)據(jù)。程序?qū)崿F(xiàn)如下:7 p5 H2 Q, l- ?* B+ {
1、串口初始化程序:, N' X/ W: W+ Q8 k( [. R+ X
MSComm1.CommPort = 1! a+ w4 i& ~8 l7 y, l
MSComm1.Settings = "9600,e,8,1"
MSComm1.InputLen = 0# s/ Y7 E6 m' [- P; C' j' Z! a& A6 \
MSComm1.RThreshold = 1
MSComm1.InputMode = comInputModeBinary
PPI協(xié)議定義串口為以二進(jìn)制形式收發(fā)數(shù)據(jù),這樣報(bào)文的通訊效率比ASCII碼高。
廈門興銳達(dá)公司網(wǎng)址:http://www.xmxrdauto.com
Excelan EXOS 202 VME Module MVME
Pentland Systems MPV914 VME Analog Output VME Board
North Atlantic Instruments Transmagnetics 5410C VME/VXI
FUJI FH1017A3 VME BOARD
ACTIS 6U VME CPU BOARD 450MHZ MPC8270 VSBC-6872 (S12-2-151D)
Advanced Photon Source CCD Memory VME computer module # MEM-100 # 95PC290
Perbance Tech PT-VME-141 Extensible-Single-Board-Controller, MPU W/MMU VME
VME Module Verticle Interconnect PF-B94V-0 Reset module
Omron 3G8B3-MD003 Single Board Computer VME SBC DeviceNet VMEbus Card
Micro Memory MM-6346 VME / VSB Compatible DRAM Memory
MicroLink 8085 Single Board Computer PN: 97145-908 VME
Alphi Technology AD42M VME Data Acquisition Module
630VME Lantern Vision 410-0198-1 REV D & 410-0227-0 REV D & 410-0215-2 REV A