4.
Communications
Feedback message:
Field Name Example (Hex)
START No data input ≥ 10 ms
Slave Address 01
Function 81
Exception Code 02
CRC CHK Low C1
CRC CHK High 91
END No data input ≥ 10 ms
4.4 PLC Device Address
Effective Range
MODBUS
Device Range SA2/SE Address
ES2/EX2 SS2 Address
SX2
S 000~255 000001~000256 0000~00FF
S 256~511 000257~000512 0100~01FF
000~1023 000~1023
S 512~767 000513~000768 0200~02FF
S 768~1023 000769~001024 0300~03FF
X 000~377 (Octal) 000~377 000~377 101025~101280 0400~04FF
Y 000~377 (Octal) 000~377 000~377 001281~001536 0500~05FF
000~255 bit 000~255 000~255 001537~001792 0600~06FF
T
000~255 word 000~255 000~255 401537~401792 0600~06FF
M 000~255 0800~08FF
M 256~511 0900~09FF
M 512~767 0A00~0AFF
002049~003584
M 768~1023 0B00~0BFF
M 1024~1279 0C00~0CFF
M 1280~1535 0D00~0DFF
M 1536~1791 B000~B0FF
0000
M 1792~2047 ~ 0000~4095 B100~B1FF
M 2048~2303 4095 B200~B2FF
M 2304~2559 B300~B3FF
M 2560~2815 045057~047616 B400~B4FF
M 2816~3071 B500~B5FF
M 3072~3327 B600~B6FF
M 3328~3583 B700~B7FF
M 3584~3839 B800~B8FF
M 3840~4095 B900~B9FF
000~199 000~199 003585~003784 0E00~0EC7
C 000~199 (16-bit)
000~199 000~199 403585~403784 0E00~0EC7
4 - 11
D V P - E S 2 / E X 2 / S S 2 / S A2 / S X 2 / S E & T P O p e r a t i o n M a n u a l - P r o g r a m m i n g
Effective Range
MODBUS
Device Range SA2/SE Address
ES2/EX2 SS2 Address
SX2
200~255 200~255 003785~003840 0EC8~0EFF
401793~401903
C 200~255 (32-bit)
200~255 200~255 (Odd address 0700~076F
valid)
D 000~255 1000~10FF
D 256~511 1100~11FF
D 512~767 404097~405376 1200~12FF
D 768~1023 1300~13FF
D 1024~1279 1400~14FF
D 1280~1535 1500~15FF
D 1536~1791 1600~16FF
D 1792~2047 1700~17FF
D 2048~2303 1800~18FF
0000 1900~19FF
D 2304~2559
~
D 2560~2815 405377~408192 1A00~1AFF
4999
D 2816~3071 1B00~1BFF
D 3072~3327 1C00~1CFF
D 3328~3583 1D00~1DFF
D 3584~3839 1E00~1EFF
D 3840~4095 1F00~1FFF
D 4096~4351 9000~90FF
D 4352~4999 9100~91FF
D 4608~4863 9200~92FF
D 4864~5119 0000 0000 9300~93FF
~ ~
D 5120~5375 9400~94FF
9999 9999
D 5376~5631 9500~95FF
D 5632~5887 9600~96FF
D 5888~6143 9700~97FF
436865~440960
D 6144~6399 9800~98FF
D 6400~6655 9900~99FF
D 6656~6911 9A00~9AFF
D 6912~7167 9B00~9BFF
D 7168~7423 9C00~9CFF
D 7424~7679 9D00~9DFF
D N/A 9E00~9EFF
7680~7935
D 7936~8191 9F00~9FFF
D 8192~8447 A000~A0FF
D 8448~8703 A100~A1FF
D 8704~8959 A200~A2FF
D 8960~9215 A300~A3FF
D 440961~442768 A400~A4FF
9216~9471
D 9472~9727 A500~A5FF
D 9728~9983 A600~A6FF
D 9984~9999 A700~A70F
4-12
4. Communications
Effective Range
MODBUS
Device Range SA2/SE Address
ES2/EX2 SS2 Address
SX2
D 10000~11999 Applicable to DVP-SE 442767~444768 A710~AEDF
4.5 Command Code
4.5.1 Command Code: 01, Read Status of Contact (Input point X is not included)
Number of Points (max) = 255 (Dec) = FF (Hex)
Example:Read contacts T20~T56 from Slave ID#1
PC→PLC “:01 01 06 14 00 25 BF CR LF”
Sent message:
Field Name ASCII
STX :
Slave Address 01
Command code 01
Starting Address Hi 06
Starting Address Lo 14
Number of Points Hi 00
Number of Points Lo 25
Error Check (LRC) BF
ETX 1 0D (Hex)
ETX 0 0A (Hex)
Assume Number of Points in sent message is n (Dec), quotient of n/8 is M and the remainder is N.
When N = 0, Bytes Count in feedback message will be M; when N≠0, Bytes Count will be M+1.
PLC→PC “:01 01 05 CD 6B B2 0E 1B D6 CR LF”
Feedback message:
Field Name ASCII
STX :
Slave Address 01
Command code 01
Bytes Count 05
Data (Coils T27…T20) CD
Data (Coils T35…T38) 6B
Data (Coils T43…T36) B2
Data (Coils T51…T44) 0E
Data (Coils T56…T52) 1B
4-13
D V P - E S 2 / E X 2 / S S 2 / S A2 / S X 2 / S E & T P O p e r a t i o n M a n u a l - P r o g r a m m i n g
Field Name ASCII
Error Check (LRC) E6
END 1 0D (Hex)
END 0 0A (Hex)
4.5.2 Command Code: 02, Read Status of Contact (Input point X is included)
Example: Read status of contact Y024~Y070 from Slave ID#01
PC→PLC “: 01 02 05 14 00 25 BF CR LF”
Sent message:
Field Name ASCII
STX :
Slave Address 01
Command code 02
Starting Address Hi 05
Starting Address Lo 14
Number of Points Hi 00
Number of Points Lo 25
Error Check (LRC) BF
END 1 0D (Hex)
END 0 0A (Hex)
Assume Number of Points in sent message is n (Dec), quotient of n/8 is M and the remainder is N.
When N = 0, Bytes Count in feedback message will be M; when N≠0, Bytes Count will be M+1.
PLC→PC “: 01 01 05 CD 6B B2 0E 1B E5 CR LF”
Feedback message:
Field Name ASCII
STX :
Slave Address 01
Command code 02
Bytes Count 05
Data (Coils Y033…Y024) CD
Data (Coils Y043…Y034) 6B
Data (Coils Y053…Y044) B2
Data (Coils Y063…Y054) 0E
Data (Coils Y070…Y064) 1B
Error Check (LRC) E5
4-14
4. Communications
Field Name ASCII
END 1 0D (Hex)
END 0 0A (Hex)
4.5.3 Command Code: 03, Read Content of Register (T, C, D)
Example: Read coils T20~T27 from Slave ID#01
PC→PLC “: 01 03 06 14 00 08 DA CR LF”
Sent message:
Field Name ASCII
STX :
Slave Address 01
Command code 03
Starting Address Hi 06
Starting Address Lo 14
Number of Points Hi 00
Number of Points Lo 08
Error Check (LRC) DA
END 1 0D (Hex)
END 0 0A (Hex)
PLC→PC
“:01 03 10 00 01 00 02 00 03 00 04 00 05 00 06 00 07 00 08 B8 CR LF”
Feedback message:
Field Name ASCII
STX :
Slave Address 01
Command code 03
Bytes Count 10
Data Hi (T20) 00
Data Lo (T20) 01
Data Hi (T21) 00
Data Lo (T21) 02
Data Hi (T22) 00
Data Lo (T22) 03
Data Hi (T23) 00
Data Lo (T23) 04
4-15
D V P - E S 2 / E X 2 / S S 2 / S A2 / S X 2 / S E & T P O p e r a t i o n M a n u a l - P r o g r a m m i n g
Field Name ASCII
Data Hi (T24) 00
Data Lo (T24) 05
Data Hi (T25) 00
Data Lo (T25) 06
Data Hi (T26) 00
Data Lo (T26) 07
Data Hi (T27) 00
Data Lo (T27) 08
Error Check (LRC) C8
END 1 0D (Hex)
END 0 0A (Hex)
4.5.4 Command Code: 05, Force ON/OFF single contact
The Force data FF00 (Hex) indicates force ON the contact. The Force data 0000 (Hex) indicates force
OFF the contact. Also, When MMNN = 0xFF00, the coil will be ON, when MMNN = 0x0000, the coil will
be OFF. Other force data is invalid and will not take any effect.
Example: Force coil Y0 ON
PC→PLC “: 01 05 05 00 FF 00 F6 CR LF”
Sent message:
Field Name ASCII
STX :
Slave Address 01
Command code 05
Coil Address Hi 05
Coil Address Lo 00
Force Data Hi FF
Force Data Lo 00
Error Check (LRC) F6
END 1 0D (Hex)
END 0 0A (Hex)
PLC→PC “: 01 05 05 00 FF 00 F6 CR LF”
Feedback message:
Field Name ASCII
STX :
Slave Address 01
4-16
4. Communications
Field Name ASCII
Command code 05
Coil Address Hi 05
Coil Address Lo 00
Force Data Hi FF
Force Data Lo 00
Error Check (LRC) F6
END 1 0D (Hex)
END 0 0A (Hex)
4.5.5 Command Code: 06, Set content of single register
Example: Set content of register T0: 12 34 (Hex)
PC→PLC “: 01 06 06 00 12 34 AD CR LF”
Sent message:
Field Name ASCII
STX :
Slave Address 01
Command code 06
Register Address Hi 06
Register Address Lo 00
Preset Data Hi 12
Preset Data Lo 34
Error Check (LRC) AD
END 1 0D (Hex)
END 0 0A (Hex)
PLC→PC “: 01 06 06 00 12 34 AD CR LF”
Feedback message:
Field Name ASCII
STX :
Slave Address 01
Command code 06
Register T0 Address Hi 06
Register T0 Address Lo 00
Preset Data Hi 12
Preset Data Lo 34
4-17
D V P - E S 2 / E X 2 / S S 2 / S A2 / S X 2 / S E & T P O p e r a t i o n M a n u a l - P r o g r a m m i n g
Field Name ASCII
Error Check (LRC) AD
END 1 0D (Hex)
END 0 0A (Hex)
4.5.6 Command Code: 15, Force ON/OFF multiple contacts
Max contacts/coils available for Force ON/OFF: 255
Example: Set Coil Y007…Y000 = 1100 1101, Y011…Y010 = 01.
PC→PLC “: 01 0F 05 00 00 0A 02 CD 01 11 CR LF”
Sent message:
Field Name ASCII
STX :
Slave Address 01
Command code 0F
Coil Address Hi 05
Coil Address Lo 00
Quantity of Coils Hi 00
Quantity of Coils Lo 0A
Byte Count 02
Force Data Hi CD
Force Data Lo 01
Error Check (LRC) 11
END 1 0D (Hex)
END 0 0A (Hex)
PLC→PC “: 01 0F 05 00 00 0A E1 CR LF”
Feedback message:
Field Name ASCII
STX :
Slave Address 01
Command code 0F
Register T0 Address Hi 05
Register T0 Address Lo 00
Preset Data Hi 00
Preset Data Lo 0A
Error Check (LRC) E1
4-18
4. Communications
Field Name ASCII
END 1 0D (Hex)
END 0 0A (Hex)
4.5.7 Command Code: 16, Set content of multiple registers
Example: Set register T0 to 00 0A , T1 to 01 02 .
PC→PLC “: 01 10 06 00 00 02 04 00 0A 01 02 D6 CR LF”
Sent message:
Field Name ASCII
STX :
Slave Address 01
Command code 10
Starting Address Hi 06
Starting Address Lo 00
Number of Register Hi 00
Number of Register Lo 02
Byte Count 04
Data Hi 00
Data Lo 0A
Data Hi 01
Data Lo 02
Error Check (LRC) D6
END 1 0D(Hex)
END 0 0A(Hex)
PLC→PC “: 01 10 06 00 00 02 E7 CR LF”
Feedback message:
Field Name ASCII
STX 3A
Slave Address 01
Command code 10
Starting Address Hi 06
Starting Address Lo 00
Number of Registers Hi 00
Number of Registers Lo 02
Error Check (LRC) E7
END 1 0D (Hex)
4-19
D V P - E S 2 / E X 2 / S S 2 / S A2 / S X 2 / S E & T P O p e r a t i o n M a n u a l - P r o g r a m m i n g
Field Name ASCII
END 0 0A (Hex)
4-20