点击或拖拽改变大小

ModbusInfo.BuildWriteWordModbusCommand 方法 (String,Byte[], Byte, Boolean, Byte)

构建Modbus写入字数据的核心报文,需要指定地址,长度,站号,是否起始地址0,默认的功能码
To construct the core message of Modbus writing word data, you need to specify the address, length, station number, whether the starting address is 0, and the default function code

命名空间:  HslCommunication.ModBus
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:12.3.1.0 (12.3.1.0)
语法
public static OperateResult<byte[]> BuildWriteWordModbusCommand(
	string address,
	byte[] values,
	byte station,
	bool isStartWithZero,
	byte defaultFunction
)

参数

address
类型:System.String
Modbus的富文本地址
values
类型:System.Byte[]
bool数组的信息
station
类型:System.Byte
默认的站号信息
isStartWithZero
类型:System.Boolean
起始地址是否从0开始
defaultFunction
类型:System.Byte
默认的功能码

返回值

类型:OperateResult<Byte[]>
包含最终命令的结果对象
参见