ModbusInfoBuildWriteMaskModbusCommand 方法 (String, UInt16, UInt16, Byte, Boolean, Byte) |
构建Modbus写入掩码的核心报文,需要指定地址,长度,站号,是否起始地址0,默认的功能码
To construct the Modbus write mask core message, 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.1.2.0 (12.1.2.0)
语法 public static OperateResult<byte[]> BuildWriteMaskModbusCommand(
string address,
ushort andMask,
ushort orMask,
byte station,
bool isStartWithZero,
byte defaultFunction
)
Public Shared Function BuildWriteMaskModbusCommand (
address As String,
andMask As UShort,
orMask As UShort,
station As Byte,
isStartWithZero As Boolean,
defaultFunction As Byte
) As OperateResult(Of Byte())
public:
static OperateResult<array<unsigned char>^>^ BuildWriteMaskModbusCommand(
String^ address,
unsigned short andMask,
unsigned short orMask,
unsigned char station,
bool isStartWithZero,
unsigned char defaultFunction
)
static member BuildWriteMaskModbusCommand :
address : string *
andMask : uint16 *
orMask : uint16 *
station : byte *
isStartWithZero : bool *
defaultFunction : byte -> OperateResult<byte[]>
参数
- address
- 类型:SystemString
Modbus的富文本地址 - andMask
- 类型:SystemUInt16
进行与操作的掩码信息 - orMask
- 类型:SystemUInt16
进行或操作的掩码信息 - station
- 类型:SystemByte
默认的站号信息 - isStartWithZero
- 类型:SystemBoolean
起始地址是否从0开始 - defaultFunction
- 类型:SystemByte
默认的功能码
返回值
类型:
OperateResultByte包含最终命令的结果对象
参见