点击或拖拽改变大小

ModbusInfoAnalysisAddress 方法

分析Modbus协议的地址信息,该地址适应于tcp及rtu模式
Analysis of the address information of Modbus protocol, the address is adapted to tcp and rtu mode

命名空间:  HslCommunication.ModBus
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:12.0.0.0 (12.0.0.0)
语法
public static OperateResult<ModbusAddress> AnalysisAddress(
	string address,
	byte defaultStation,
	bool isStartWithZero,
	byte defaultFunction
)

参数

address
类型:SystemString
带格式的地址,比如"100","x=4;100","s=1;100","s=1;x=4;100"
defaultStation
类型:SystemByte
默认的站号信息
isStartWithZero
类型:SystemBoolean
起始地址是否从0开始
defaultFunction
类型:SystemByte
默认的功能码信息

返回值

类型:OperateResultModbusAddress
转换后的地址信息
参见