PlcDateTime Class

Namespace: IPS7Lnk.Advanced
Assemblies: IPS7LnkNet.Advanced.dll

Represents a DateTime value (in PLC a DATE_AND_TIME) its value defines an instant in time, typically expressed as a date and time of day.

C#

public class PlcDateTime : PlcValue<DateTime>, IPlcValue<DateTime>, IPlcValue, IPlcSymbol, IPlcEntity, IPlcStatusProvider, IPlcRelocatable<IPlcValue>, IPlcRelocatable, ISupportInitialize


Inheritance ObjectPlcValue<DateTime> › PlcDateTime


Implements IPlcValue<DateTime>, IPlcValue, IPlcSymbol, IPlcEntity, IPlcStatusProvider, IPlcRelocatable<IPlcValue>, IPlcRelocatable, ISupportInitialize

Remarks

While a PLC value of this type represents a DateTime value, all PLC operations performed using this class are done using the Byte. A PLC developer knows a value of this type as DATE_AND_TIME.

Name Description
PlcDateTime(PlcDateTimeType) Initializes a new instance of the PlcDateTime class using the specified type
PlcDateTime(PlcDateTimeType, DateTime) Initializes a new instance of the PlcDateTime class using the specified type and value.
PlcDateTime(PlcDateTimeType, PlcName) Initializes a new instance of the PlcDateTime class using the specified type and name.
PlcDateTime(PlcDateTimeType, PlcName, DateTime) Initializes a new instance of the PlcDateTime class using the specified type, name and value.
PlcDateTime(PlcIdentity) Initializes a new instance of the PlcDateTime class using the specified identity
PlcDateTime(PlcIdentity, DateTime) Initializes a new instance of the PlcDateTime class using the specified identity and value.
PlcDateTime(PlcIdentity, PlcName) Initializes a new instance of the PlcDateTime class using the specified identity and name.
PlcDateTime(PlcIdentity, PlcName, DateTime) Initializes a new instance of the PlcDateTime class using the specified identity, name and value.
Name Description
MaxValue Represents the largest possible value of a PlcDateTime.
MinValue Represents the smallest possible value of a PlcDateTime.
Name Description
Value Gets or sets the value assigned to the PLC value.
Name Description
GetBytes(DateTime) Returns the specified DateTime value as an array of BCD Byte values.
GetDateTime(Byte) Returns the specified BCD values (bcdValues) as a DateTime.
GetValueCore(PlcDeviceConnection) Retrieves the current value of the PLC value from a IPlcDevice using the connection specified.
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.
RelocateCore(PlcAddress) Relocates the value to the address specified.
SetValueCore(PlcDeviceConnection, DateTime) Stores the value in the IPlcDevice assigned to the connection specified.