codes to read

Controller Function Codes The MBTCP Communication Driver uses function codes to communicate with the various controllers supporting the Modbus protocol. The implementation for the MBTCP Communication Driver uses the document, " Open Modbus/TCP Specification," Release 1.1, dated December 6, 2002 as a reference. These function codes and their descriptions are listed in the following table. Note: In communicating with the Generic Modbus PLCs, the MBTCP Communication Driver acts as a master and sends out the function codes to the PLCs. Code Name Description 01 (0x01) Read Coils Reads the ON/OFF status of discrete outputs (0X references, coils) in the slave. 02 (0x02) Read Discrete Inputs Reads the ON/OFF status of discrete inputs (1XXXXX references) in the slave. 03 (0x03) Read Holding Registers Reads the binary contents of holding registers (4XXXXX references) in the slave. 04 (0x04) Read Input Registers Reads the binary contents of input registers (3XXXXX references) in the slave. 05 (0x05) Write Single Coil Forces a single coil (0X reference) to either ON or OFF. 06 (0x06) Write Single Register Presets a value into a single holding register (4XXXXX reference). 15 (0x0F) Write Multiple Coils Forces each coil (0XXXXX reference) in a sequence of coils to either ON or OFF. 16 (0x10) Write Multiple Registers Presets values into a sequence of holding registers (4XXXXX references). 20 (0x14) Read General Reference Returns the contents of registers in the Extended Memory file (6XXXXX) references. 21 (0x15) Write General Reference Writes the contents of registers in the Extended Memory file (6XXXXX) references. 22 (0x16) Mask Write Holding Register Modifies the contents of a specified (4XXXXX reference) holding register using a combination of an AND mask, an OR mask, and the register’s current contents. The function can be used to set or clear individual bits in the register. 解释上面英文的意思
05-17
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值