Namespace: IPS7Lnk.Advanced
Assemblies: IPS7LnkNet.Advanced.dll, IPS7LnkNet.Advanced.dll
The PlcArray<T, t> type exposes the following members.
Initializes a new instance of the PlcArray´2 class using the specified type
and name
.
C#
protected PlcArray(PlcArrayType type, PlcName name, params T[] values)
Parameters
type
PlcArrayType
The type of array represented.
name
PlcName
The name of the array represented.
values
T
The initial values of the new PlcArray´2.
Exceptions
The type
or name
is a null reference (Nothing in Visual Basic).
Initializes a new instance of the PlcArray´2 class using the specified type
.
C#
protected PlcArray(PlcArrayType type, params T[] values)
Parameters
type
PlcArrayType
The type of array represented.
values
T
The initial values of the new PlcArray´2.
Exceptions
The type
is a null reference (Nothing in Visual Basic).
Gets the element at the specified index.
C#
public T this[int index] { get; }
Property Value
The element at the specified index.
Exceptions
The index
is less than zero or index
is equal to or greater than Length.
Gets a 32-bit integer that represents the total number of elements within the array.
C#
public int Length { get; }
Property Value
A 32-bit integer that represents the total number of elements within the array.
Returns an enumerator that iterates through the array.
C#
public IEnumerator<T> GetEnumerator()
Returns
An IEnumerator´1 object that can be used to iterate through the array.
Retrieves the value assigned to the PLC value.
C#
protected override T[] GetInstanceValue()
Returns
The value assigned to the PLC value.
Retrieves the current value of the PLC value from a IPlcDevice using the connection
specified.
C#
protected override T[] 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.
Stores the value
in the IPlcDevice assigned to the connection
specified.
C#
protected override void SetValueCore(PlcDeviceConnection connection, T[] value)
Parameters
connection
PlcDeviceConnection
The PlcDeviceConnection to use to store the value
.
value
T
The value to be stored.
Exceptions
The connection
is in Faulted state and cannot longer be opened.
The connection
has been disposed of.
Converts the array to its string representation.
C#
public override string ToString()
Returns
A string that contains the array.