Namespace: IPS7Lnk.Advanced
Assemblies: IPS7LnkNet.Advanced.dll, IPS7LnkNet.Advanced.dll
The PlcString type exposes the following members.
Initializes a new instance of the PlcString class using the specified identity
and length
.
C#
public PlcString(PlcIdentity identity, int length)
Parameters
identity
PlcIdentity
The PlcIdentity of the new PlcString to which the PLC value belongs.
length
Int32
The maximum length used to store the PlcString value.
Exceptions
The identity
does not refer to the Byte.
The identity
is a null reference (Nothing in Visual Basic).
The length
is out of the bounds defined by MinLength and MaxLength.
Initializes a new instance of the PlcString class using the specified identity
, name
and length
.
C#
public PlcString(PlcIdentity identity, PlcName name, int length)
Parameters
identity
PlcIdentity
The PlcIdentity of the new PlcString to which the PLC value belongs.
name
PlcName
The name of the value.
length
Int32
The maximum length used to store the PlcString value.
Exceptions
The identity
does not refer to the Byte.
The identity
or name
is a null reference (Nothing in Visual Basic).
The length
is out of the bounds defined by MinLength and MaxLength.
Initializes a new instance of the PlcString class using the specified identity
, name
and value
.
C#
public PlcString(PlcIdentity identity, PlcName name, string value)
Parameters
identity
PlcIdentity
The PlcIdentity of the new PlcString to which the PLC value belongs.
name
PlcName
The name of the value.
value
String
The initial value of the new PlcString.
Exceptions
The identity
does not refer to the Byte.
The identity
or name
is a null reference (Nothing in Visual Basic).
Initializes a new instance of the PlcString class using the specified identity
, name
, value
and length
.
C#
public PlcString(PlcIdentity identity, PlcName name, string value, int length)
Parameters
identity
PlcIdentity
The PlcIdentity of the new PlcString to which the PLC value belongs.
name
PlcName
The name of the value.
value
String
The initial value of the new PlcString.
length
Int32
The maximum length used to store the PlcString value.
Exceptions
The identity
does not refer to the Byte.
The identity
or name
is a null reference (Nothing in Visual Basic).
The length
is out of the bounds defined by MinLength and MaxLength.
Initializes a new instance of the PlcString class using the specified identity
and value
.
C#
public PlcString(PlcIdentity identity, string value)
Parameters
identity
PlcIdentity
The PlcIdentity of the new PlcString to which the PLC value belongs.
value
String
The initial value of the new PlcString.
Exceptions
The identity
does not refer to the Byte.
The identity
is a null reference (Nothing in Visual Basic).
Initializes a new instance of the PlcString class using the specified identity
, value
and length
.
C#
public PlcString(PlcIdentity identity, string value, int length)
Parameters
identity
PlcIdentity
The PlcIdentity of the new PlcString to which the PLC value belongs.
value
String
The initial value of the new PlcString.
length
Int32
The maximum length used to store the PlcString value.
Exceptions
The identity
does not refer to the Byte.
The identity
is a null reference (Nothing in Visual Basic).
The length
is out of the bounds defined by MinLength and MaxLength.
Initializes a new instance of the PlcString class using the specified type
.
C#
public PlcString(PlcStringType type)
Parameters
type
PlcStringType
The PlcStringType of the new PlcString to which the PLC value belongs.
Exceptions
The type
is a null reference (Nothing in Visual Basic).
Initializes a new instance of the PlcString class using the specified type
and name
.
C#
public PlcString(PlcStringType type, PlcName name)
Parameters
type
PlcStringType
The PlcStringType of the new PlcString 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 PlcString class using the specified type
, name
and value
.
C#
public PlcString(PlcStringType type, PlcName name, string value)
Parameters
type
PlcStringType
The PlcStringType of the new PlcString to which the PLC value belongs.
name
PlcName
The name of the value.
value
String
The initial value of the new PlcString.
Exceptions
The type
or name
is a null reference (Nothing in Visual Basic).
Initializes a new instance of the PlcString class using the specified type
and value
.
C#
public PlcString(PlcStringType type, string value)
Parameters
type
PlcStringType
The PlcStringType of the new PlcString to which the PLC value belongs.
value
String
The initial value of the new PlcString.
Exceptions
The type
is a null reference (Nothing in Visual Basic).
Gets the element at the specified index.
C#
public char 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 maximum number of characters that can be stored.
C#
public int Length { get; }
Property Value
A 32-bit integer that represents the maximum number of characters that can be stored.
Returns an enumerator that iterates through the array.
C#
public IEnumerator<char> GetEnumerator()
Returns
An IEnumerator´1 object that can be used to iterate through the array.
Retrieves the current value of the PLC value from a IPlcDevice using the connection
specified.
C#
protected override string 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.
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, string value)
Parameters
connection
PlcDeviceConnection
The PlcDeviceConnection to use to store the value
.
value
String
The value to be stored.
Exceptions
The connection
is in Faulted state and cannot longer be opened.
The connection
has been disposed of.