DeltaTcpNetWrite 方法 (String, Boolean) |
向线圈中写入bool数值,返回是否写入成功,如果富文本地址不指定,默认使用的功能码是 0x05,
如果你的地址为字地址,例如100.2,那么将使用0x16的功能码,通过掩码的方式来修改寄存器的某一位,需要Modbus服务器支持,否则自动切换为读取字数据,修改位,在写入字的方式。
Write bool value to the coil and return whether the writing is successful. If the rich text address is not specified, the default function code is 0x05.
If your address is a word address, such as 100.2, then you will use the function code of 0x16 to modify a bit of the register through a mask.
It needs Modbus server support, Otherwise, it automatically switches to read the word data, modifies the bits, and writes the word in the way.
命名空间:
HslCommunication.Profinet.Delta
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 备注
地址支持Y,M,SM,S,T,C,HC,其中Y地址使用DD.DD格式,Y0.0~Y63.15,不支持X地址的写入。
The address supports Y, M, SM, S, T, C, HC, where the Y address uses the DD.DD format, Y0.0~Y63.15, the writing of the X address is not supported.
参见