PlcS5Time Members

Namespace: IPS7Lnk.Advanced
Assemblies: IPS7LnkNet.Advanced.dll, IPS7LnkNet.Advanced.dll
The PlcS5Time type exposes the following members.

PlcS5Time(PlcIdentity)

Initializes a new instance of the PlcS5Time class using the specified identity

C#

public PlcS5Time(PlcIdentity identity)


Parameters

identity PlcIdentity

The PlcIdentity of the new PlcS5Time to which the PLC value belongs.


Exceptions

ArgumentException

The identity does not refer to the Word.

ArgumentNullException

The identity is a null reference (Nothing in Visual Basic).

PlcS5Time(PlcIdentity, PlcName)

Initializes a new instance of the PlcS5Time class using the specified identity and name.

C#

public PlcS5Time(PlcIdentity identity, PlcName name)


Parameters

identity PlcIdentity

The PlcIdentity of the new PlcS5Time to which the PLC value belongs.

name PlcName

The name of the value.


Exceptions

ArgumentException

The identity does not refer to the Word.

ArgumentNullException

The identity or name is a null reference (Nothing in Visual Basic).

PlcS5Time(PlcIdentity, PlcName, TimeSpan)

Initializes a new instance of the PlcS5Time class using the specified identity, name and value.

C#

public PlcS5Time(PlcIdentity identity, PlcName name, TimeSpan value)


Parameters

identity PlcIdentity

The PlcIdentity of the new PlcS5Time to which the PLC value belongs.

name PlcName

The name of the value.

value TimeSpan

The initial value of the new PlcS5Time.


Exceptions

ArgumentException

The identity does not refer to the Word.

ArgumentNullException

The identity or name is a null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

The value is out of the bounds defined by MinValue and MaxValue.

PlcS5Time(PlcIdentity, TimeSpan)

Initializes a new instance of the PlcS5Time class using the specified identity and value.

C#

public PlcS5Time(PlcIdentity identity, TimeSpan value)


Parameters

identity PlcIdentity

The PlcIdentity of the new PlcS5Time to which the PLC value belongs.

value TimeSpan

The initial value of the new PlcS5Time.


Exceptions

ArgumentException

The identity does not refer to the Word.

ArgumentNullException

The identity is a null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

The value is out of the bounds defined by MinValue and MaxValue.

PlcS5Time(PlcS5TimeType)

Initializes a new instance of the PlcS5Time class using the specified type

C#

public PlcS5Time(PlcS5TimeType type)


Parameters

type PlcS5TimeType

The PlcS5TimeType of the new PlcS5Time to which the PLC value belongs.


Exceptions

ArgumentNullException

The type is a null reference (Nothing in Visual Basic).

PlcS5Time(PlcS5TimeType, PlcName)

Initializes a new instance of the PlcS5Time class using the specified type and name.

C#

public PlcS5Time(PlcS5TimeType type, PlcName name)


Parameters

type PlcS5TimeType

The PlcS5TimeType of the new PlcS5Time to which the PLC value belongs.

name PlcName

The name of the value.


Exceptions

ArgumentNullException

The type or name is a null reference (Nothing in Visual Basic).

PlcS5Time(PlcS5TimeType, PlcName, TimeSpan)

Initializes a new instance of the PlcS5Time class using the specified type, name and value.

C#

public PlcS5Time(PlcS5TimeType type, PlcName name, TimeSpan value)


Parameters

type PlcS5TimeType

The PlcS5TimeType of the new PlcS5Time to which the PLC value belongs.

name PlcName

The name of the value.

value TimeSpan

The initial value of the new PlcS5Time.


Exceptions

ArgumentNullException

The type or name is a null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

The value is out of the bounds defined by MinValue and MaxValue.

PlcS5Time(PlcS5TimeType, TimeSpan)

Initializes a new instance of the PlcS5Time class using the specified type and value.

C#

public PlcS5Time(PlcS5TimeType type, TimeSpan value)


Parameters

type PlcS5TimeType

The PlcS5TimeType of the new PlcS5Time to which the PLC value belongs.

value TimeSpan

The initial value of the new PlcS5Time.


Exceptions

ArgumentNullException

The type is a null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

The value is out of the bounds defined by MinValue and MaxValue.

MaxValue

Represents the largest possible value of a PlcS5Time.

C#

public static readonly TimeSpan MaxValue


Field Value
TimeSpan


Remarks

The according PLC value would be: S5T#2H_46M_30S_00MS.

MinValue

Represents the smallest possible value of a PlcS5Time.

C#

public static readonly TimeSpan MinValue


Field Value
TimeSpan


Remarks

The according PLC value would be: S5T#00H_00M_00S_00MS.

Origin

Gets a value of the PlcS5TimeOrigin enumeration which indicate which origin the PlcS5Time does use to represent the TimeSpan which is provided by the Value property.

C#

public PlcS5TimeOrigin Origin { get; }


Property Value

PlcS5TimeOrigin

One of the members defined by the PlcS5TimeOrigin enumeration.

Value

Gets or sets the value assigned to the PLC value.

C#

public override TimeSpan Value { get; set; }


Property Value

TimeSpan

The TimeSpan value assigned to the PLC value.



Exceptions

ArgumentNullException

The value is a null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

The value is out of the bounds defined by MinValue and MaxValue.

GetValueCore(PlcDeviceConnection)

Retrieves the current value of the PLC value from a IPlcDevice using the connection specified.

C#

protected override TimeSpan GetValueCore(PlcDeviceConnection connection)


Parameters

connection PlcDeviceConnection

The PlcDeviceConnection from that the data is to be retrieved.


Returns

TimeSpan

The current value of the PLC value.



Exceptions

InvalidOperationException

The connection is in Faulted state and cannot longer be opened.

ObjectDisposedException

The connection has been disposed of.

IsValidValue(Object)

Determines whether the provided value is accepted for the type of PLC value through basic type checking and also potentially if it is within the allowed range of value for that type.

C#

public override bool IsValidValue(object value)


Parameters

value Object

The value to check.


Returns

Boolean

The value true, if the specified value is acceptable and is of the correct type or a derived type; otherwise the value false.

RelocateCore(PlcAddress)

Relocates the value to the address specified.

C#

protected override IPlcValue RelocateCore(PlcAddress address)


Parameters

address PlcAddress

The PlcAddress to that the value is to be relocated.


Returns

IPlcValue

A new instance of the same type as this PLC value instance relocated to the address specified.

SetValueCore(PlcDeviceConnection, TimeSpan)

Stores the value in the IPlcDevice assigned to the connection specified.

C#

protected override void SetValueCore(PlcDeviceConnection connection, TimeSpan value)


Parameters

connection PlcDeviceConnection

The PlcDeviceConnection to use to store the value.

value TimeSpan

The value to be stored.



Exceptions

InvalidOperationException

The connection is in Faulted state and cannot longer be opened.

ObjectDisposedException

The connection has been disposed of.