当前位置:首页 >> 信息与通信 >>

台达PLC通信协议


DELTA DVP Series PLC

COMMUNICATION PROTOCOL VER 1.0

DELTA ELECTRONICS, INC.

1

1. Communication Interface: RS-232C 2. Communication Protocol ASCII

mode, 9600(Baud rate), EVEN(Parity), 1(Start bit),1 (Stop bit) 3. Communication Data Frame STX ADR 1 ADR 0 CMD 1 CMD 0 DATA(0) DATA(1) ………. DATA(n-1) LRC CHK 1 LRC CHK 0 END 1 END 0 ? Start character ?:?(3AH) Communication address: 8-bit address consists of 2 ASCII codes Command code: 8-bit command consists of 2 ASCII codes Contents of data: n?8-bit data consist of 2n ASCII codes. n?37, maximum of 74 ASCII codes LRC check sum: 8-bit check sum consists of 2 ASCII codes End character: END 1 = CR(0DH) ,END 0 = LF(0AH)

ADR(Communication Address)

Valid communication addresses are in the range of 0…31. Communication address equals to 0 means broadcast to all PLC, the PLC will reply normal message to the master device. For example, communication to PLC with address 16 decimal: (ADR 1, ADR 0)=?1?,?0???1?=31H, ?0? = 30H ? CMD (Command code) and DATA (data characters)

The format of data characters depends on the command code. For example, reading continuous 8 words form starting device address 0614H of PLC with address 01H. Field Name Heading Slave Address Command code Starting Address Hi Starting Address Lo Number of Points Hi Number of Points Lo Error Check ( LRC ) Number of Points(max) = 18(for 16 bit register) = 9(for 32 bit register) Example (Hex) 3A 01 03 06 14 00 08 DA

2

Example:Reading Coils T20~T27 from slave device 01 PC→PLC “:01 03 06 14 00 08 DA CR LF” PLC→PC “:01 03 10 00 01 00 02 00 03 00 04 00 05 00 06 00 07 00 08 B8 CR LF” Field Name Slave Address Command code Bytes Count Data Hi(T20) Data Lo(T20) Data Hi(T21) Data Lo(T21) Data Hi(T22) Data Lo(T22) Data Hi(T23) Data Lo(T23) Data Hi(T24) Data Lo(T24) Data Hi(T25) Data Lo(T25) Data Hi(T26) Data Lo(T26) Data Hi(T27) Data Lo(T27) Error Check(LRC) ? LRC CHK(check sum) Example (Hex) 01 03 10 00 01 00 02 00 03 00 04 00 05 00 06 00 07 00 08 C8

LRC (Longitudinal Redundancy Check) is calculated by summing up, module 256, the values of the bytes from ADR1 to last data character then calculating the hexadecimal representation of the 2?s-complement negation of the sum.

3

For example, reading 1 word form address 0401H of the PLC with address 01H
STX ADR 1 ADR 0 CMD 1 CMD 0 Starting data address ?:? ‘0’ ‘1’ ‘0’ ‘3’ ‘0’ ‘4’ ‘0’ ‘1’ ‘0’ ‘0’ ‘0’ ‘1’ ?F? ?6? CR LF

Number of data LRC CHK 1 LRC CHK 0 END 1 END 0

01H+03H+04H+01H+00+01H = 0AH the 2?s-complement negation of 0AH is F6H Exception response: The PLC is been expected to return a normal response after receiving command messages from the master device. The following depicts the conditions that no normal response is replied to the master device. The PLC does not receive the messages due to a communication error; thus the PLC has no response. The master device will eventually process a timeout condition. The PLC receives the messages without a communication error, but cannot handle it, an exception response will return to the master device. In the exception response, the most significant bit of the original command code is set to 1, and an exception code explains the condition that caused the exception is returned.

4

An example of exception response of command code 01H and exception 02H: Command message: Field Name Heading Slave Address Function Starting Address Hi Starting Address Lo Number of Points Hi Number of Points Lo Error Check ( LRC ) Response message: Field Name Heading Slave Address Function Exception Code Error Check ( LRC ) Example (Hex) 3A 01 81 02 7C Example (Hex) 3A 01 01 04 00 00 10 EA

Exception code: 01

Meaning: Illegal command code: The command code received in the command message is not available for the PLC. Illegal device address: The device address received in the command message is not available for the PLC. Illegal device value: The device value received in the command message is not available for the PLC. Check Sum Error Check if the check Sum is correct Illegal command messages The command message is too short. Command message length is out of range.

02

03

07

5

? The format of data characters depends on the command. The available command codes are described as followed, Code 01 02 03 05 06 15 16 17 Name Read Coil Status Read Input Status Read Holding Registers Force Single Coil Preset Single Register Force Multiple Coils Preset Multiple Register Report Slave ID Description S, Y, M, T, C S, X, Y, M,T, C T, C, D S, Y, M, T, C T, C, D S, Y, M, T, C T, C, D None

DELTA DVP-ES Series PLC DEVICE ADDRESS Device S S S S X Y T M M M M M C D D D D D Range 000~255 256~511 512~767 768~1023 000~377 (Octal) 000~377 (Octal) 000~255 000~255 256~511 512~767 768~1023 1024~1279 000~255 000~255 256~511 512~767 768~1023 1024~1279 Effective Range Address 0000~00FF 0100~01FF 0200~02FF 0300~03FF 0400~04FF 0500~05FF 0600~06FF 0800~08FF 0900~09FF 0A00~0AFF 0B00~0BFF 0C00~0CFF 0E00~0EFF 1000~10FF 1100~11FF 1200~12FF 1300~13FF 1400~14FF

000~127 000~177 (Octal) 000~177 (Octal) 000~127

0000~1279

000~127 232~255 000~599 1000~1143

6

Command Code:01, Read Coil Status Field Name Heading Slave Address Command code Starting Address Hi Starting Address Lo Number of Points Hi Number of Points Lo Error Check ( LRC ) Example (Hex) 3A 01 01 06 14 00 25 BF

Number of Points(max) = 255 = 0x00FF Example:Reading Coils T20~T56 from slave device 01 PC→PLC “:01 01 06 14 00 25 BF CR LF” PLC→PC “:01 01 05 CD 6B B2 0E 1B D6 CR LF” Field Name Slave Address Command code Bytes Count Data(Coils T27…T20) Data(Coils T35…T38) Data(Coils T43…T36) Data(Coils T51…T44) Data(Coils T56…T52) Error Check(LRC) ? Example (Hex) 01 01 05 CD 6B B2 0E 1B E6

Command Code:02, Read Input Status Field Name Heading Slave Address Command code Starting Address Hi Starting Address Lo Number of Points Hi Number of Points Lo Error Check ( LRC ) Example (Hex) 3A 01 02 05 14 00 25 BF

Example:Reading Contact Y024~Y070 from slave device 01 PC→PLC “:01 02 05 14 00 25 BF CR LF” PLC→PC “:01 02 05 CD 6B B2 0E 1B E5 CR LF”
7

Field Name Slave Address Command code Bytes Count Data(Coils Y033…Y024) Data(Coils Y043…Y034) Data(Coils Y053…Y044) Data(Coils Y063…Y054) Data(Coils Y070…Y064) Error Check(LRC)

Example (Hex) 01 02 05 CD 6B B2 0E 1B E5

? Command Code:03, Read Holding Register Holding Register:T, C, D Field Name Heading Slave Address Command code Starting Address Hi Starting Address Lo Number of Points Hi Number of Points Lo Error Check ( LRC ) Number of Points(max) = 18(for 16 bit register) = 9(for 32 bit register) Example:Reading Coils T20~T27 from slave device 01 PC→PLC “:01 03 06 14 00 08 DA CR LF” PLC→PC “:01 03 10 00 01 00 02 00 03 00 04 00 05 00 06 00 07 00 08 B8 CR LF” Field Name Slave Address Command code Bytes Count Data Hi(T20) Data Lo(T20) Data Hi(T21) Data Lo(T21) Example (Hex) 01 03 10 00 01 00 02
8

Example (Hex) 3A 01 03 06 14 00 08 DA

Data Hi(T22) Data Lo(T22) Data Hi(T23) Data Lo(T23) Data Hi(T24) Data Lo(T24) Data Hi(T25) Data Lo(T25) Data Hi(T26) Data Lo(T26) Data Hi(T27) Data Lo(T27) Error Check(LRC) ?

00 03 00 04 00 05 00 06 00 07 00 08 C8

Command Code:05, Force Single Coil Field Name Heading Slave Address Command code Coil Address Hi Coil Address Lo Force Data Hi Force Data Lo Error Check ( LRC ) Example (Hex) 3A 01 05 05 00 FF 00 F6

MMNN = 0xFF00….Coil ON MMNN = 0x0000….Coil OFF Example:Forcing Coil Y000 ON PC→PLC “:01 05 05 00 FF 00 F6 CR LF” PLC→PC “:01 05 05 00 FF 00 F6 CR LF” Field Name Heading Slave Address Command code Coil Address Hi Coil Address Lo Force Data Hi Force Data Lo Error Check ( LRC ) Example (Hex) 3A 01 05 05 00 FF 00 F6

9

10

?

Command Code:06, Preset Single Register Field Name Heading Slave Address Command code Register Address Hi Register Address Lo Preset Data Hi Preset Data Lo Error Check ( LRC ) Example (Hex) 3A 01 06 06 00 12 34 AD

Example:Setting Register T0 to 00 03 PC→PLC “:01 06 06 00 12 34 AD CR LF” PLC→PC “:01 06 06 00 12 34 AD CR LF” Field Name Heading Slave Address Command code Register T0 Address Hi Register T0 Address Lo Preset Data Hi Preset Data Lo Error Check ( LRC ) Switch ( c ) Case 0:T0 Q →:01 06 06 00 12 34 AD CR LF Case 1:C0 Q →:01 06 0E 00 12 34 AF CR LF Case 2:C232 Q →:01 06 0E E8 12 34 56 78 EF CR LF Case 3:D10 Q →:01 06 10 0A 12 34 99 CR LF Case 4:D1000 Q →:01 06 13 E8 12 34 BA CR LF Example (Hex) 3A 01 06 06 00 12 34 AD

11

?

Command Code:15, Force Multiple Coils Field Name Heading Slave Address Command code Coil Address Hi Coil Address Lo Quantity of Coils Hi Quantity of Coils Lo Byte Count Force Data Hi Force Data Lo Error Check (LRC) Example (Hex) 3A 01 0F 05 00 00 0A 02 CD 01 11

Quantity of Coils (max) = 255 Example:Setting Coil Y007…Y000 = 1100 1101, Y011…Y010 = 01. PC→PLC “:01 0F 05 00 00 0A 02 CD 01 11 CR LF” PLC→PC “:01 0F 05 00 00 0A E1 CR LF” Field Name Heading Slave Address Command code Register T0 Address Hi Register T0 Address Lo Preset Data Hi Preset Data Lo Error Check ( LRC ) Example (Hex) 3A 01 0F 05 00 00 0A E1

12

?

Command Code:16, Preset Multiple Register Field Name Heading Slave Address Command code Starting Address Hi Starting Address Lo Number of Register Hi Number of Register Lo Byte Count Data Hi Data Lo Data Hi Data Lo Error Check (LRC) Example (Hex) 3A 01 10 06 00 00 02 04 00 0A 01 02 C6

Number of Register(max) = 16(for 16 bit register) = 8(for 8 bit register) Example:Setting Register T0 to 00 0A, T1 to 01 02. PC→PLC “:01 10 06 00 02 00 04 00 0A 01 02 D6 CR LF” PLC→PC “:01 10 06 00 00 02 E7 CR LF” Field Name Heading Slave Address Command code Starting Address Hi Starting Address Lo Number of Registers Hi Number of Registers Lo Error Check ( LRC ) Example (Hex) 3A 01 10 06 00 00 02 E7

13

?

Command Code:17, Report Slave ID

Returns a description of controller present at the slave address, the current status of the slave Run indicator, and other information specific to the slave device. Command message: Field Name Heading Slave Address Command code Error Check (LRC) Response message: Field Name Heading Slave Address Command code Byte Count Slave ID Run Indicator Status 00 = OFF FF = ON Data 0(D1001 HI) Data 1(D1001 LOW) Error Check (LRC) Example (Hex) 3A 01 11 04 01 FF 40 10 9A Example (Hex) 3A 01 11 EE

14

?

DVP Series PLC Internal Device Communication Address
Effective range

Device

Range

Type

Address ES/EX/SS SA/SX/SH EH

S S S S X Y T M M M M M M M M M M M M M M M M C

000~255 246~511 512~767 768~1023 000~377 (Octal) 000~377 (Octal) 000~255 000~255 256~511 512~767 768~1023 1024~1279 1280~1535 1536~1791 1792~2047 2048~2303 2304~2559 2560~2815 2816~3071 3072~3327 3328~3583 3584~3839 3840~4095 0~199 16-bit 200~255 32-bit

bit bit bit bit bit bit bit/word bit bit bit bit bit bit bit bit bit bit bit bit bit bit bit bit bit/word bit/Dword

0000~00FF 0100~01FF 0200~02FF 0300~03FF 0400~04FF 0500~05FF 0600~06FF 0800~08FF 0900~09FF 0A00~0AFF 0B00~0BFF 0C00~0CFF 0D00~0DFF B000~B0FF B100~B1FF B200~B2FF B300~B3FF B400~B4FF B500~B5FF B600~B6FF B700~B7FF B800~B8FF B900~B9FF 0E00~0EC7 0EC8~0EFF

0~127

0~1024

0~1024

0~177 0~127

0~177 000~255

000~377 000~255

0~1279

0~4095

0000~4095

0~127 232~255

0~199 200~255

0~199 200~255

15

Effective Device Range Type Address ES/EX/SS SA/SX/SH EH

D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D

000~256 256~511 512~767 768~1023 1024~1279 1280~1535 1536~1791 1792~2047 2048~2303 2304~2559 2560~2815 2816~3071 3072~3327 3328~3583 3584~3839 3840~4095 4096~4351 4352~4607 4608~4863 4864~5119 5120~5375 5376~5631 5632~5887 5888~6143 6144~6399 6400~6655 6656~6911 6912~7167 7168~7423 7424~7679 7680~7935 7936~8191 8192~8447 8448~8703 8704~8959 8960~9215 9216~9471 9472~9727 9728~9983 9984~9999

word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word

1000~10FF 1100~11FF 1200~12FF 1300~13FF 1400~14FF 1500~15FF 1600~16FF 1700~17FF 1800~18FF 1900~19FF 1A00~1AFF 1B00~1BFF 1C00~1CFF 1D00~1DFF 1E00~1EFF 1F00~1FFF 9000~90FF 9100~91FF 9200~92FF 9300~93FF 9400~94FF 9500~95FF 9600~96FF 9700~97FF 9800~98FF 9900~99FF 9A00~9AFF 9B00~9BFF 9C00~9CFF 9D00~9DFF 9E00~9EFF 9F00~9FFF A000~A0FF A100~A1FF A200~A2FF A300~A3FF A400~A4FF A500~A5FF A600~A6FF A700~A70F

0~1311

0~4999

0000~9999

16


相关文章:
台达PLC的通讯协议
台达PLC通讯协议_信息与通信_工程科技_专业资料。台達 PLC 的通讯协议是公开的,只要对该协议有清楚理解,所有台 达产品的通讯问题迎刃而解,下面是协议全文: 1....
PLC与台达plc的通信
文章基于 VB 讨论台达 DVP PLC 与监控计算机的通信问题。 关键词:VB 通信协议 可编程控制器 Abstract: The PLC is a composing part of Infranet, it links ...
台达PLC通讯协议
台达PLC 通讯协议原文 1、通讯协议 ASCII 模式,9600,7,e,1 2、通讯资料格式: STX ADR1 ADR0 CMD1 CMD0 DATA(0) DATA(1) ??? DATA(n-1) LRC CHK1 ...
基于VB实现台达PLC与PC 机串行通讯
基于VB实现台达PLC与PC 机串行通讯_工学_高等教育_教育专区。好东西无需介绍!自己总结的,绝对一手!希望对你有用!串行通讯 基于 VB 实现台达 PLC 与 PC 串行...
台达PLC与PC机串行通讯以及相应地址
台达PLC与PC机串行通讯以及相应地址_计算机硬件及网络_IT/计算机_专业资料。基于 VB 实现台达 PLC 与 PC 串行通讯随着工业自动化控制技术的不断发展,可编程逻辑控制...
多台台达PLC-RS485通信说明
多台台达PLC-RS485通信说明_计算机硬件及网络_IT/计算机_专业资料。多台台达PLC...等主从站模式,进行产线控制,内部集成了多种总线通信 协议,使用起来方便、快捷。...
台达PLC通讯调试方法
5 结束语 VB 语言易于编程使用,为与串行设备的通信提供了很大的方便。台达 PLC 采用标准的 目前广为流行的 MODBUS 协议,为实现 PLC 与监控计算机的通信提供了...
台达plc与vfd-m通信
台达plc与vfd-m通信_信息与通信_工程科技_专业资料。1 引言 plc 和变频器是自动...这种技术的进步为 plc 和变频器通讯的实现,提供了软件 上的协议和硬件上的物...
台达PLC寄存器地址与Modbus寄存器地址对照表_图文
台达PLC寄存器地址与Modbus寄存器地址对照表_信息与通信_工程科技_专业资料。台达...台达MODBUS地址 暂无评价 3页 免费 信捷PLC Modbus地址协议... 1434页 2下载...
台达触摸屏和多台PLC 485通讯教程
硬件组成:台达 PLC 2 台, 触摸屏 1 台 首先是确定通讯方式,采用 485 通讯,触摸屏同时读取两台 PLC 的数据. 1, PLC 设置通讯协议和通讯地址. PLC 站点 1 ...
更多相关标签:
台达plc通讯协议 | 台达plc | 台达plc通信 | 台达通信协议 | 台达plc串口通信范例 | 台达plc485通讯案例 | 台达plc通信协议2.0 | 台达plc modbus地址 |