点击或拖拽改变大小

SerialDeviceBaseWaitAsync 方法 (String, UInt32, Int32, Int32)

等待指定地址的UInt32值为指定的值,可以指定刷新数据的频率,等待的超时时间,如果超时时间为-1的话,则是无期限等待。
Waiting for the UInt32 value of the specified address to be the specified value, you can specify the frequency of refreshing the data, and the timeout time to wait. If the timeout time is -1, it is an indefinite wait.

命名空间:  HslCommunication.Serial
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
public Task<OperateResult<TimeSpan>> WaitAsync(
	string address,
	uint waitValue,
	int readInterval = 100,
	int waitTimeout = -1
)

参数

address
类型:SystemString
其实地址
waitValue
类型:SystemUInt32
等待检测是值
readInterval (Optional)
类型:SystemInt32
读取的频率
waitTimeout (Optional)
类型:SystemInt32
等待的超时时间,如果超时时间为-1的话,则是无期限等待。

返回值

类型:TaskOperateResultTimeSpan
是否等待成功的结果对象,一旦通信失败,或是等待超时就返回失败。否则返回成功,并告知调用方等待了多久。

实现

IReadWriteNetWaitAsync(String, UInt32, Int32, Int32)
参见