版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
,/////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. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- GB/T 38003.4-2024軍民通用資源分類與編碼第4部分:器材類衛(wèi)生器材
- 信息技術教師勞動合同范本
- 房地產開發(fā)商合同 示范文本
- 室內設計裝修協(xié)議格式
- 個人商業(yè)店面出租合同協(xié)議
- 2024年化糞池清掏服務合同書
- 標準拆遷安置房買賣合同
- 公司借款合同的編寫要點與示范
- 旅游項目投資合作協(xié)議模板
- 個人車輛租賃合同
- 巖石的結構和構造
- 整體機房維護方案及報價通用
- 《項鏈》課本劇
- 電梯井操作平臺22548
- 轉筒干燥機設計畢業(yè)論文
- 崗位梳理與“三定”工作實施方案
- 石油化工英語詞匯
- 部門服務滿意度評分表
- 慢支慢性阻塞性肺疾病9版.ppt
- 細紗機設備維護維修說明書
- 地方課程六年級上冊
評論
0/150
提交評論