AllenBradleyHelperReadTimeAsync 方法 |
读取指定地址的时间数据,最小时间为 0,如果获取秒,可以访问 TotalSeconds,当PLC的变量类型为 "Time" 和 "TimeOfDate" 时,都可以用本方法读取。
Read the time data of the specified address. The minimum time is 0. If you get seconds, you can access TotalSeconds.
When the PLC variable type is "Time" and "TimeOfDate", you can use this Method to read.
命名空间:
HslCommunication.Profinet.AllenBradley
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public static Task<OperateResult<TimeSpan>> ReadTimeAsync(
IReadWriteCip plc,
string address
)
Public Shared Function ReadTimeAsync (
plc As IReadWriteCip,
address As String
) As Task(Of OperateResult(Of TimeSpan))
public:
static Task<OperateResult<TimeSpan>^>^ ReadTimeAsync(
IReadWriteCip^ plc,
String^ address
)
static member ReadTimeAsync :
plc : IReadWriteCip *
address : string -> Task<OperateResult<TimeSpan>>
参数
- plc
- 类型:HslCommunication.Profinet.AllenBradleyIReadWriteCip
当前的通信对象信息 - address
- 类型:SystemString
PLC里变量的地址
返回值
类型:
TaskOperateResultTimeSpan时间的结果对象
参见