版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
,/////DEL^^^^^^^^^^z/^^^^_^^^^^p//^^^e^^^^/es,/plc4////////
MUNICATIONPROTOCOLVER1.0
DELTAELECTRONICS,INC.
municationInterface:RS-232C
municationProtocolASCIImode,9600(Baudrate),EVEN(Parity),1(Startbit),1(Stop
bit)
municationDataFrame
STX
Startcharacter':'(3AH)
ADR1
municationaddress:
ADR0
8-bitaddressconsistsof2ASCIIcodes
CMD1
mandcode:
CMD0
8-bitmandconsistsof2ASCIIcodes
DATA(0)
Contentsofdata:
DATA(1)
nx8-bitdataconsistof2nASCIIcodes.
DATA(n-1)
n<37,maximumof74ASCIIcodes
LRCCHK1
LRCchecksum:
LRCCHK0
8-bitchecksumconsistsof2ASCIIcodes
END1
Endcharacter:
END0
END1=CR(0DH),END0=LF(0AH)
ADR(municationAddress)
Validmunicationaddressesareintherangeof0...31.municationaddressequalsto0meansbroadcasttoallPLC,thePLCwillreplynormalmessagetothemasterdevice.
Forexample,municationtoPLCwithaddress16decimal:
(ADR1,ADR0)='1‘,’0’h'1'=31H,‘0'=30H
CMD(mandcode)andDATA(datacharacters)
Theformatofdatacharactersdependsonthemandcode.Forexample,readingcontinuous8wordsformstartingdeviceaddress0614HofPLCwithaddress01H.
FieldName
Example(Hex)
Heading
3A
SlaveAddress
01
mandcode
03
StartingAddressHi
06
StartingAddressLo
14
NumberofPointsHi
00
NumberofPointsLo
08
ErrorCheck(LRC)
DA
NumberofPoints(max)
=18(for16bitregister)
=9(for32bitregister)
Example:ReadingCoilsT20~T27fromslavedevice01
PC—PLC
“:010306140008DACRLF”
PLC—PC
“:01031000010002000300040005000600070008B8CRLF”
FieldName
Example(Hex)
SlaveAddress
01
mandcode
03
BytesCount
10
DataHi(T20)
00
DataLo(T20)
01
DataHi(T21)
00
DataLo(T21)
02
DataHi(T22)
00
DataLo(T22)
03
DataHi(T23)
00
DataLo(T23)
04
DataHi(T24)
00
DataLo(T24)
05
DataHi(T25)
00
DataLo(T25)
06
DataHi(T26)
00
DataLo(T26)
07
DataHi(T27)
00
DataLo(T27)
08
ErrorCheck(LRC)
C8
■LRCCHK(checksum)
LRC(LongitudinalRedundancyCheck)iscalculatedbysummingup,module256,thevaluesofthebytesfromADR1tolastdatacharacterthencalculatingthehexadecimalrepresentationofthe2’s-plementnegationofthesum.
Forexample,reading1wordformaddress0401HofthePLCwithaddress01H
STX
‘:’
ADR1
ADR0
‘0’
‘1’
CMD1
CMD0
‘0’
‘3’
Startingdataaddress
‘0’
‘4’
‘0’
‘1’
Numberofdata
‘0’
‘0’
‘0’
‘1’
LRCCHK1
LRCCHK0
‘F’
‘6’
END1
END0
CR
LF
01H+03H+04H+01H+00+01H=0AH
the2’s-plementnegationof0AHisF6H
Exceptionresponse:
ThePLCisbeenexpectedtoreturnanormalresponseafterreceivingmandmessagesfromthemasterdevice.Thefollowingdepictstheconditionsthatnonormalresponseisrepliedtothemasterdevice.
ThePLCdoesnotreceivethemessagesduetoamunicationerror;thusthePLChasnoresponse.Themasterdevicewilleventuallyprocessatimeoutcondition.
ThePLCreceivesthemessageswithoutamunicationerror,butcannothandleit,anexceptionresponsewillreturntothemasterdevice.Intheexceptionresponse,themostsignificantbitoftheoriginalmandcodeissetto1,andanexceptioncodeexplainstheconditionthatcausedtheexceptionisreturned.
Anexampleofexceptionresponseofmandcode01Handexception02H:
mandmessage:
FieldName
Example(Hex)
Heading
3A
SlaveAddress
01
Function
01
StartingAddressHi
04
StartingAddressLo
00
NumberofPointsHi
00
NumberofPointsLo
10
ErrorCheck(LRC)
EA
Responsemessage:
FieldName
Example(Hex)
Heading
3A
SlaveAddress
01
Function
81
ExceptionCode
02
ErrorCheck(LRC)
7c
Exceptioncode:
Meaning:
01
Illegalmandcode:
ThemandcodereceivedinthemandmessageisnotavailableforthePLC.
02
Illegaldeviceaddress:
ThedeviceaddressreceivedinthemandmessageisnotavailableforthePLC.
03
Illegaldevicevalue:
ThedevicevaluereceivedinthemandmessageisnotavailableforthePLC.
07
CheckSumError
CheckifthecheckSumiscorrect
Illegalmandmessages
Themandmessageistooshort.mandmessagelengthisoutofrange.
♦Theformatofdatacharactersdependsonthemand.Theavailablemandcodesaredescribedasfollowed,
Code
Name
Description
01
ReadCoilStatus
S,Y,M,T,C
02
ReadInputStatus
S,X,Y,M,T,C
03
ReadHoldingRegisters
T,C,D
05
ForceSingleCoil
S,Y,M,T,C
06
PresetSingleRegister
T,C,D
15
ForceMultipleCoils
S,Y,M,T,C
16
PresetMultipleRegister
T,C,D
17
ReportSlaveID
None
DELTADVP-ESSeriesPLCDEVICEADDRESS
Device
Range
EffectiveRange
Address
S
000~255
000~127
0000~00FF
S
256~511
0100~01FF
S
512~767
0200~02FF
S
768~1023
0300~03FF
X
000~377(Octal)
000~177(Octal)
0400~04FF
Y
000~377(Octal)
000~177(Octal)
0500~05FF
T
000~255
000~127
0600~06FF
M
000~255
0000~1279
0800~08FF
M
256~511
0900~09FF
M
512~767
0A00~0AFF
M
768~1023
0B00~0BFF
M
1024~1279
0C00~0CFF
C
000~255
000~127
232~255
0E00~0EFF
D
000~255
000~5991000~1143
1000~10FF
D
256~511
1100~11FF
D
512~767
1200~12FF
D
768~1023
1300~13FF
D
1024~1279
1400~14FF
mandCode:01,ReadCoilStatus
FieldName
Example(Hex)
Heading
3A
SlaveAddress
01
mandcode
01
StartingAddressHi
06
StartingAddressLo
14
NumberofPointsHi
00
NumberofPointsLo
25
ErrorCheck(LRC)
BF
NumberofPoints(max)=255=0x00FF
Example:ReadingCoilsT20~T56fromslavedevice01
PC—PLC“:010106140025BFCRLF”
PLC—PC“:010105CD6BB20E1BD6CRLF”
FieldName
Example(Hex)
SlaveAddress
01
mandcode
01
BytesCount
05
Data(CoilsT27...T20)
CD
Data(CoilsT35...T38)
6B
Data(CoilsT43...T36)
B2
Data(CoilsT51...T44)
0E
Data(CoilsT56...T52)
1B
ErrorCheck(LRC)
E6
■mandCode:02,ReadInputStatus
FieldName
Example(Hex)
Heading
3A
SlaveAddress
01
mandcode
02
StartingAddressHi
05
StartingAddressLo
14
NumberofPointsHi
00
NumberofPointsLo
25
ErrorCheck(LRC)
BF
Example:ReadingContactY024~Y070fromslavedevice01
PC—PLC“:010205140025BFCRLF”
PLC—PC“:010205CD6BB20E1BE5CRLF”
FieldName
Example(Hex)
SlaveAddress
01
mandcode
02
BytesCount
05
Data(CoilsY033...Y024)
CD
Data(CoilsY043...Y034)
6B
Data(CoilsY053...Y044)
B2
Data(CoilsY063...Y054)
0E
Data(CoilsY070...Y064)
1B
ErrorCheck(LRC)
E5
■mandCode:03,ReadHoldingRegister
HoldingRegister:T,C,D
FieldName
Example(Hex)
Heading
3A
SlaveAddress
01
mandcode
03
StartingAddressHi
06
StartingAddressLo
14
NumberofPointsHi
00
NumberofPointsLo
08
ErrorCheck(LRC)
DA
NumberofPoints(max)
=18(for16bitregister)
=9(for32bitregister)
Example:ReadingCoilsT20~T27fromslavedevice01
PC—PLC
“:010306140008DACRLF”
PLC—PC
“:01031000010002000300040005000600070008B8CRLF”
FieldName
Example(Hex)
SlaveAddress
01
mandcode
03
BytesCount
10
DataHi(T20)
00
DataLo(T20)
01
DataHi(T21)
00
DataLo(T21)
02
DataHi(T22)
00
DataLo(T22)
03
DataHi(T23)
00
DataLo(T23)
04
DataHi(T24)
00
DataLo(T24)
05
DataHi(T25)
00
DataLo(T25)
06
DataHi(T26)
00
DataLo(T26)
07
DataHi(T27)
00
DataLo(T27)
08
ErrorCheck(LRC)
C8
■mandCode:05,ForceSingleCoil
FieldName
Example(Hex)
Heading
3A
SlaveAddress
01
mandcode
05
CoilAddressHi
05
CoilAddressLo
00
ForceDataHi
FF
ForceDataLo
00
ErrorCheck(LRC)
F6
MMNN=0xFF00....CoilON
MMNN=0x0000….CoilOFF
Example:ForcingCoilY000ON
PC—PLC“:01050500FF00F6CRLF”
PLC—PC“:01050500FF00F6CRLF”
FieldName
Example(Hex)
Heading
3A
SlaveAddress
01
mandcode
05
CoilAddressHi
05
CoilAddressLo
00
ForceDataHi
FF
ForceDataLo
00
ErrorCheck(LRC)
F6
■mandCode:06,PresetSingleRegister
■mandCode:06,PresetSingleRegister
FieldName
Example(Hex)
Heading
3A
SlaveAddress
01
mandcode
06
RegisterAddressHi
06
RegisterAddressLo
00
PresetDataHi
12
PresetDataLo
34
ErrorCheck(LRC)
AD
Example:SettingRegisterT0to0003
PC—PLC“:010606001234ADCRLF”
PLC—PC“:010606001234ADCRLF”
FieldName
Example(Hex)
Heading
3A
SlaveAddress
01
mandcode
06
RegisterT0AddressHi
06
RegisterT0AddressLo
00
PresetDataHi
12
PresetDataLo
34
ErrorCheck(LRC)
AD
Switch(c)
Case0:T0
Q—:010606001234ADCRLF
Case1:C0
Q—:01060E001234AFCRLF
■mandCode:15,ForceMultipleCoils
Case2:C232
QT:01060EE812345678EFCRLF
Case3:D10
QT:0106100A123499CRLF
Case4:D1000
QT:010613E81234BACRLF
FieldName
Example(Hex)
Heading
3A
SlaveAddress
01
mandcode
0F
CoilAddressHi
05
CoilAddressLo
00
QuantityofCoilsHi
00
QuantityofCoilsLo
0A
ByteCount
02
ForceDataHi
CD
ForceDataLo
01
ErrorCheck(LRC)
11
QuantityofCoils(max)=255
Example:SettingCoilY007...Y000=11001101,Y011...Y010=01.
PC—PLC“:010F0500000A02CD0111CRLF”
PLC—PC“:010F0500000AE1CRLF”
FieldName
Example(Hex)
Heading
3A
SlaveAddress
01
mandcode
0F
RegisterT0AddressHi
05
RegisterT0AddressLo
00
PresetDataHi
00
PresetDataLo
0A
ErrorCheck(LRC)
E1
■mandCode:16,PresetMultipleRegister
FieldName
Example(Hex)
Heading
3A
SlaveAddress
01
mandcode
10
StartingAddressHi
06
StartingAddressLo
00
NumberofRegisterHi
00
NumberofRegisterLo
02
ByteCount
04
DataHi
00
DataLo
0A
DataHi
01
DataLo
02
ErrorCheck(LRC)
C6
NumberofRegister(max)
=16(for16bitregister)
=8(for8bitregister)
Example:SettingRegisterT0to000A,T1to0102.
PC—PLC“:01100600020004000A0102D6CRLF”
PLC—PC“:011006000002E7CRLF”
FieldName
Example(Hex)
Heading
3A
SlaveAddress
01
mandcode
10
StartingAddressHi
06
StartingAddressLo
00
NumberofRegistersHi
00
NumberofRegistersLo
02
ErrorCheck(LRC)
E7
■mandCode:17,ReportSlaveID
Returnsadescriptionofcontrollerpresentattheslaveaddress,thecurrentstatusoftheslaveRunindicator,andotherinformationspecifictotheslavedevice.
mandmessage:
FieldName
Example(Hex)
Heading
3A
SlaveAddress
01
mandcode
11
ErrorCheck(LRC)
EE
Responsemessage:
FieldName
Example(Hex)
Heading
3A
SlaveAddress
01
mandcode
11
ByteCount
04
SlaveID
01
RunIndicatorStatus00=OFFFF=ON
FF
Data0(D1001HI)
40
Data1(D1001LOW)
10
ErrorCheck(LRC)
9A
■DVPSeriesPLCInternalDevicemunicationAddress
Device
Range
Type
Address
Effectiverange
ES/EX/SS
SA/SX/SH
EH
S
000~255
bit
0000~00FF
0~127
0~1024
0~1024
S
246~511
bit
0100~01FF
S
512~767
bit
0200~02FF
S
768~1023
bit
0300~03FF
X
000~377(Octal)
bit
0400~04FF
0~177
0~177
000~377
Y
000~377(Octal)
bit
0500~05FF
T
000~255
bit/word
0600~06FF
0~127
000~255
000~255
M
000~255
bit
0800~08FF
0~1279
0~4095
0000~4095
M
256~511
bit
0900~09FF
M
512~767
bit
0A00~0AFF
M
768~1023
bit
0B00~0BFF
M
1024~1279
bit
0C00~0CFF
M
1280~1535
bit
0D00~0DFF
M
1536~1791
bit
B000~B0FF
M
1792~2047
bit
B100~B1FF
M
2048~2303
bit
B200~B2FF
M
2304~2559
bit
B300~B3FF
M
2560~2815
bit
B400~B4FF
M
2816~3071
bit
B500~B5FF
M
3072~3327
bit
B600~B6FF
M
3328~3583
bit
B700~B7FF
M
3584~3839
bit
B800~B8FF
M
3840~4095
bit
B900~B9FF
C
0~199
16-bit
bit/word
0E00~0EC7
0~127
0~199
0~199
200~255
32-bit
bit/Dword
0EC8~0EFF
232~255
200~255
200~255
Device
Range
Type
Address
Effe
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 【正版授权】 ISO 20948:2024 EN Vegetable fats and oils - Determination of aflatoxins B1,B2,G1 and G2 by immunoaffinity column clean-up and high-performance liquid chromatography
- 学校教育服务行业相关项目经营管理报告
- 粪便潜血检测用化学试纸项目营销计划书
- 布料除臭行业经营分析报告
- 去中心化网络服务行业市场调研分析报告
- 兽皮产业链招商引资的调研报告
- 裘皮披肩商业机会挖掘与战略布局策略研究报告
- 废旧汽车回收利用行业经营分析报告
- 自行车测速计项目营销计划书
- 自行车前叉市场分析及投资价值研究报告
- 肠梗阻的业务查房
- 2024-2029年中国医疗卫生十四五期间行业发展分析及竞争格局与发展战略研究报告
- 2024市政工程考试题(含答案)
- 24春国家开放大学《农业推广》调查报告参考答案
- 医院开诊仪式策划方案
- 造口回纳术护理
- 螃蟹水产养殖知识培训课件
- 过敏性休克的急救和处理专题医学知识宣讲培训课件
- 工业自动化中的生产柔性与响应性制造
- JC/T2055-2020 宠物垫圈用颗粒膨润土
- 《西游记》第三回读后感
评论
0/150
提交评论