IPlcValue Members

Namespace: IPS7Lnk.Advanced
Assemblies: IPS7LnkNet.Advanced.dll, IPS7LnkNet.Advanced.dll
The IPlcValue interface defines the following members.

Changed

Occurs when the value of the Value property has changed.

C#

event ValueChangedEventHandler Changed

Tag

Gets or sets the object that contains additional user data about the value.

C#

object Tag { get; set; }


Property Value

Object

An Object that contains additional user data about the value. The default is null (Nothing in Visual Basic).

Value

Gets or sets the value assigned to the PLC value.

C#

object Value { get; set; }


Property Value

Object

The value assigned to the PLC value.

GetValue(IPlcDevice)

Retrieves the current value of the PLC value from the device specified.

C#

object GetValue(IPlcDevice device)


Parameters

device IPlcDevice

The IPlcDevice from that the data is to be retrieved.


Returns

Object

The current value of the PLC value.



Exceptions

ArgumentNullException

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

GetValue(PlcDeviceConnection)

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

C#

object GetValue(PlcDeviceConnection connection)


Parameters

connection PlcDeviceConnection

The PlcDeviceConnection from that the data is to be retrieved.


Returns

Object

The current value of the PLC value.



Exceptions

ArgumentNullException

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

InvalidOperationException

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

ObjectDisposedException

The connection has been disposed of.

IsValidType(Object)

Determines whether a specified value is acceptable for this IPlcValue.

C#

bool IsValidType(object value)


Parameters

value Object

The value to check.


Returns

Boolean

The value true, if the specified value is the Type or an acceptable derived type; otherwise the value false.

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#

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.

SetValue(IPlcDevice)

Stores the Value in the device specified.

C#

void SetValue(IPlcDevice device)


Parameters

device IPlcDevice

The IPlcDevice in that the data is to be stored.



Exceptions

ArgumentNullException

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

SetValue(IPlcDevice, Object)

Stores the value in the device specified.

C#

void SetValue(IPlcDevice device, object value)


Parameters

device IPlcDevice

The IPlcDevice in that the data is to be stored.

value Object

The value to be stored.



Exceptions

ArgumentException

The value is invalid. It either does not fall within an expected value range or its type is not supported by the IPlcValue.

ArgumentNullException

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

SetValue(PlcDeviceConnection)

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

C#

void SetValue(PlcDeviceConnection connection)


Parameters

connection PlcDeviceConnection

The PlcDeviceConnection to use to store the Value.



Exceptions

ArgumentNullException

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

InvalidOperationException

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

ObjectDisposedException

The connection has been disposed of.

SetValue(PlcDeviceConnection, Object)

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

C#

void SetValue(PlcDeviceConnection connection, object value)


Parameters

connection PlcDeviceConnection

The PlcDeviceConnection to use to store the value.

value Object

The value to be stored.



Exceptions

ArgumentException

The value is invalid. It either does not fall within an expected value range or its type is not supported by the IPlcValue.

ArgumentNullException

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

InvalidOperationException

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

ObjectDisposedException

The connection has been disposed of.

ValidateValue(Object)

Validates the specified value whether it can be assigned to this IPlcValue.

C#

void ValidateValue(object value)


Parameters

value Object

The value to validate.



Exceptions

ArgumentException

The value is invalid. It either does not fall within an expected value range or its type is not supported by the IPlcValue.