ModbusRtuOverTcp.Write 方法 |
名称 | 说明 | |
---|---|---|
Write<T>(T) |
写入支持Hsl特性的数据,返回是否写入成功,该特性为HslDeviceAddressAttribute,详细参考api文档说明 (继承自 DeviceCommunication。)Write data that supports the Hsl attribute, and return whether the write was successful. The attribute is HslDeviceAddressAttribute, please refer to the api documentation for details. | |
Write(String, Double) |
写入double数据,返回是否成功 (继承自 DeviceCommunication。)Write double data, return whether the write was successful | |
Write(String,Int16[]) |
写入short数组,返回是否成功 (继承自 DeviceCommunication。)Write short array, return whether the write was successful | |
Write(String, Int32) |
写入int数据,返回是否成功 (继承自 DeviceCommunication。)Write int data, return whether the write was successful | |
Write(String, Int64) |
写入long数据,返回是否成功 (继承自 DeviceCommunication。)Write long data, return whether the write was successful | |
Write(String, Single) |
写入float数据,返回是否成功 (继承自 DeviceCommunication。)Write float data, return whether the write was successful | |
Write(String, String) |
写入字符串信息,编码为ASCII (继承自 DeviceCommunication。)Write string information, encoded as ASCII | |
Write(String,UInt16[]) |
写入ushort数组,返回是否成功 (继承自 DeviceCommunication。)Write ushort array, return whether the write was successful | |
Write(String, UInt32) |
写入uint数据,返回是否成功 (继承自 DeviceCommunication。)Write uint data, return whether the write was successful | |
Write(String, UInt64) |
写入ulong数据,返回是否成功 (继承自 DeviceCommunication。)Write ulong data, return whether the write was successful | |
Write(String, Boolean) |
向线圈中写入bool数值,返回是否写入成功,如果富文本地址不指定,默认使用的功能码是 0x05,
如果你的地址为字地址,例如100.2,那么将使用0x16的功能码,通过掩码的方式来修改寄存器的某一位,需要Modbus服务器支持,否则自动切换为读取字数据,修改位,在写入字的方式。 (重写 DeviceCommunication.Write(String, Boolean).)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. | |
Write(String,Boolean[]) |
向线圈中写入bool数组,返回是否写入成功,如果富文本地址不指定,默认使用的功能码是 0x0F (重写 DeviceCommunication.Write(String,Boolean[]).)Write the bool array to the coil, and return whether the writing is successful. If the rich text address is not specified, the default function code is 0x0F. | |
Write(String,Byte[]) |
将数据写入到Modbus的寄存器上去,需要指定起始地址和数据内容,如果富文本地址不指定,默认使用的功能码是 0x10 (重写 DeviceCommunication.Write(String,Byte[]).)To write data to Modbus registers, you need to specify the start address and data content. If the rich text address is not specified, the default function code is 0x10 | |
Write(String,Double[]) |
写入double数组,返回是否成功 (重写 DeviceCommunication.Write(String,Double[]).)Write double array, return whether the write was successful | |
Write(String, Int16) |
将数据写入到Modbus的单个寄存器上去,需要指定起始地址和数据值,如果富文本地址不指定,默认使用的功能码是 0x06 (重写 DeviceCommunication.Write(String, Int16).)To write data to a single register of Modbus, you need to specify the start address and data value. If the rich text address is not specified, the default function code is 0x06. | |
Write(String,Int32[]) |
写入int[]数组,返回是否成功 (重写 DeviceCommunication.Write(String,Int32[]).)Write int array, return whether the write was successful | |
Write(String,Int64[]) |
写入long数组,返回是否成功 (重写 DeviceCommunication.Write(String,Int64[]).)Write long array, return whether the write was successful | |
Write(String,Single[]) |
写入float数组,返回是否成功 (重写 DeviceCommunication.Write(String,Single[]).)Write float array, return whether the write was successful | |
Write(String, UInt16) |
将数据写入到Modbus的单个寄存器上去,需要指定起始地址和数据值,如果富文本地址不指定,默认使用的功能码是 0x06 (重写 DeviceCommunication.Write(String, UInt16).)To write data to a single register of Modbus, you need to specify the start address and data value. If the rich text address is not specified, the default function code is 0x06. | |
Write(String,UInt32[]) |
写入uint[]数组,返回是否成功 (重写 DeviceCommunication.Write(String,UInt32[]).)Write uint array, return whether the write was successful | |
Write(String,UInt64[]) |
写入ulong数组,返回是否成功 (重写 DeviceCommunication.Write(String,UInt64[]).)Write ulong array, return whether the write was successful | |
Write(String, String, Int32) |
写入指定长度的字符串信息,如果超出,就截断字符串,如果长度不足,那就补0操作,编码为ASCII (继承自 DeviceCommunication。)Write string information of the specified length. If it exceeds the value, the string is truncated. If the length is not enough, it is filled with 0 and the encoding is ASCII. | |
Write(String, String, Encoding) |
写入字符串信息,需要指定的编码信息 (继承自 DeviceCommunication。)Write string information, need to specify the encoding information | |
Write(String, String, Int32, Encoding) |
写入指定长度的字符串信息,如果超出,就截断字符串,如果长度不足,那就补0操作,编码为指定的编码信息 (继承自 DeviceCommunication。)Write string information of the specified length. If it exceeds the value, the string is truncated. If the length is not enough, then the operation is complemented with 0 , you should specified the encoding information |