Namespace: IPS7Lnk.Advanced
Assemblies: IPS7LnkNet.Advanced.dll, IPS7LnkNet.Advanced.dll
The PlcTimeOfDay type exposes the following members.
Initializes a new instance of the PlcTimeOfDay class using the specified identity
C#
public PlcTimeOfDay(PlcIdentity identity)
Parameters
identity
PlcIdentity
The PlcIdentity of the new PlcTimeOfDay to which the PLC value belongs.
Exceptions
The identity
does not refer to the DWord.
The identity
is a null reference (Nothing in Visual Basic).
Initializes a new instance of the PlcTimeOfDay class using the specified identity
and name
.
C#
public PlcTimeOfDay(PlcIdentity identity, PlcName name)
Parameters
identity
PlcIdentity
The PlcIdentity of the new PlcTimeOfDay to which the PLC value belongs.
name
PlcName
The name of the value.
Exceptions
The identity
does not refer to the DWord.
The identity
or name
is a null reference (Nothing in Visual Basic).
Initializes a new instance of the PlcTimeOfDay class using the specified identity
, name
and value
.
C#
public PlcTimeOfDay(PlcIdentity identity, PlcName name, TimeSpan value)
Parameters
identity
PlcIdentity
The PlcIdentity of the new PlcTimeOfDay to which the PLC value belongs.
name
PlcName
The name of the value.
value
TimeSpan
The initial value of the new PlcTimeOfDay.
Exceptions
The identity
does not refer to the DWord.
The identity
or name
is a null reference (Nothing in Visual Basic).
The value
is out of the bounds defined by MinValue and MaxValue.
Initializes a new instance of the PlcTimeOfDay class using the specified identity
and value
.
C#
public PlcTimeOfDay(PlcIdentity identity, TimeSpan value)
Parameters
identity
PlcIdentity
The PlcIdentity of the new PlcTimeOfDay to which the PLC value belongs.
value
TimeSpan
The initial value of the new PlcTimeOfDay.
Exceptions
The identity
does not refer to the DWord.
The identity
is a null reference (Nothing in Visual Basic).
The value
is out of the bounds defined by MinValue and MaxValue.
Initializes a new instance of the PlcTimeOfDay class using the specified type
C#
public PlcTimeOfDay(PlcTimeOfDayType type)
Parameters
type
PlcTimeOfDayType
The PlcTimeOfDayType of the new PlcTimeOfDay to which the PLC value belongs.
Exceptions
The type
is a null reference (Nothing in Visual Basic).
Initializes a new instance of the PlcTimeOfDay class using the specified type
and name
.
C#
public PlcTimeOfDay(PlcTimeOfDayType type, PlcName name)
Parameters
type
PlcTimeOfDayType
The PlcTimeOfDayType of the new PlcTimeOfDay to which the PLC value belongs.
name
PlcName
The name of the value.
Exceptions
The type
or name
is a null reference (Nothing in Visual Basic).
Initializes a new instance of the PlcTimeOfDay class using the specified type
, name
and value
.
C#
public PlcTimeOfDay(PlcTimeOfDayType type, PlcName name, TimeSpan value)
Parameters
type
PlcTimeOfDayType
The PlcTimeOfDayType of the new PlcTimeOfDay to which the PLC value belongs.
name
PlcName
The name of the value.
value
TimeSpan
The initial value of the new PlcTimeOfDay.
Exceptions
The type
or name
is a null reference (Nothing in Visual Basic).
The value
is out of the bounds defined by MinValue and MaxValue.
Initializes a new instance of the PlcTimeOfDay class using the specified type
and value
.
C#
public PlcTimeOfDay(PlcTimeOfDayType type, TimeSpan value)
Parameters
type
PlcTimeOfDayType
The PlcTimeOfDayType of the new PlcTimeOfDay to which the PLC value belongs.
value
TimeSpan
The initial value of the new PlcTimeOfDay.
Exceptions
The type
is a null reference (Nothing in Visual Basic).
The value
is out of the bounds defined by MinValue and MaxValue.
Represents the largest possible value of a PlcTimeOfDay.
C#
public static readonly TimeSpan MaxValue
Field Value
TimeSpan
Remarks
The according PLC value would be: TOD#23:59:59.999.
Represents the smallest possible value of a PlcTimeOfDay.
C#
public static readonly TimeSpan MinValue
Field Value
TimeSpan
Remarks
The according PLC value would be: TOD#0:0:0.0.
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
The current value of the PLC value.
Exceptions
The connection
is in Faulted state and cannot longer be opened.
The connection
has been disposed of.
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
The value true, if the specified value
is acceptable and is of the correct type or a derived type; otherwise the value false.
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
A new instance of the same type as this PLC value instance relocated to the address
specified.
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
The connection
is in Faulted state and cannot longer be opened.
The connection
has been disposed of.