Class WebApiLTime
Represents wrapper for a PLC LTIME variable.
Implements
Inherited Members
Namespace: AXSharp.Connector.S71500.WebApi
Assembly: AXSharp.Connector.S71500.WebAPI.dll
Syntax
public class WebApiLTime : OnlinerLTime, INotifyPropertyChanged, IValueBoundaries<TimeSpan>, IOnlineLTime, IOnline<TimeSpan>, IShadowLTime, IShadow<TimeSpan>, ITwinPrimitive, ITwinElement
Constructors
| Edit this page View SourceWebApiLTime()
Initializes a new instance of the OnlinerTime class.
Declaration
public WebApiLTime()
WebApiLTime(ITwinObject, string, string)
Initializes a new instance of the OnlinerLTime class.
Declaration
public WebApiLTime(ITwinObject parent, string readableTail, string symbolTail)
Parameters
Type | Name | Description |
---|---|---|
ITwinObject | parent | Parent object of this instance. |
string | readableTail | Human readable tail of this instance. |
string | symbolTail | Symbol tail of this instance. |
Methods
| Edit this page View SourceGetAsync()
Gets the value of this variable from the controller asynchronously.
Declaration
public override Task<TimeSpan> GetAsync()
Returns
Type | Description |
---|---|
Task<TimeSpan> |
Overrides
Remarks
This method accesses the item in a single request over communication layer; accessing multiple items may result in performance degradation over the communication interface with the target system. This method is to be used only when you need the item to be read from the PLC and the return the control of the program. Consider using ITwinObjects ReadAsync(ITwinObject) or WriteAsync(ITwinObject) methods for bulk access to entire structures.
Read(string)
Declaration
public void Read(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value |
SetAsync(TimeSpan)
Sets the value of this variable to the controller asynchronously.
Declaration
public override Task<TimeSpan> SetAsync(TimeSpan value)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | value |
Returns
Type | Description |
---|---|
Task<TimeSpan> |
Overrides
Remarks
This method accesses the item in a single request over communication layer; accessing multiple items may result in performance degradation over the communication interface with the target system. This method is to be used only when you need the item to be read from the PLC and the return the control of the program. Consider using ITwinObjects ReadAsync(ITwinObject) or WriteAsync(ITwinObject) methods for bulk access to entire structures.