Namespace: IPS7Lnk.Advanced
Assemblies: IPS7LnkNet.Advanced.dll, IPS7LnkNet.Advanced.dll
The PlcObject type exposes the following members.
Initializes a new instance of the PlcObject class using the specified identity
C#
public PlcObject(PlcIdentity identity)
Parameters
identity
PlcIdentity
The PlcIdentity of the new PlcObject to which the PLC value belongs.
Exceptions
The identity
is a null reference (Nothing in Visual Basic).
Initializes a new instance of the PlcObject class using the specified identity
and name
.
C#
public PlcObject(PlcIdentity identity, PlcName name)
Parameters
identity
PlcIdentity
The PlcIdentity of the new PlcObject to which the PLC object belongs.
name
PlcName
The name of the object.
Exceptions
The identity
or name
is a null reference (Nothing in Visual Basic).
Initializes a new instance of the PlcObject class using the specified type
C#
public PlcObject(PlcObjectType type)
Parameters
type
PlcObjectType
The PlcObjectType of the new PlcObject to which the PLC object belongs.
Exceptions
The type
is a null reference (Nothing in Visual Basic).
Initializes a new instance of the PlcObject class using the specified type
and name
.
C#
public PlcObject(PlcObjectType type, PlcName name)
Parameters
type
PlcObjectType
The PlcObjectType of the new PlcObject 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).
Occurs when the value of a PlcMember changed.
C#
public event PlcMemberChangedEventHandler MemberChanged
Occurs when a property value changes.
C#
public event PropertyChangedEventHandler PropertyChanged
Gets or sets the value of the member with the names
specified which are associated with this PlcObject.
C#
public object this[params string[] names] { get; set; }
Property Value
The value of the member.
Exceptions
The member with one of the names
specified is not a valid/known member of the PlcObject.
The member does not grant read/write access.
Gets or sets the value of the member with the name
specified which is associated with this PlcObject.
C#
public object this[string name] { get; set; }
Property Value
The value of the member.
Exceptions
The member with the name
specified is not a valid/known member of the PlcObject.
The member does not grant read/write access.
Gets a collection of PlcMember associated with the PlcObject.
C#
public PlcMemberCollection Members { get; }
Property Value
An instance of the PlcMemberCollection containing all PlcMember objects associated with the PlcObject.
Raises the MemberChanged event.
C#
protected virtual void OnMemberChanged(PlcMemberChangedEventArgs e)
Parameters
The PlcMemberChangedEventArgs that contains the event data.
Raises the PropertyChanged event.
C#
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
Parameters
The PropertyChangedEventArgs that contains the event data.
Relocates the PlcObject using the specified offset. The original PlcObject remains unmodified.
C#
public PlcObject Relocate(int operandNumber)
Parameters
operandNumber
Int32
The operand number offset used to adjust the address of the Type.
Returns
A new instance of the PlcObject configured with the same metadata as this instance but relocated using the specified offset.
Exceptions
The offset specified by operandNumber
result into a new value that would be out of the bounds defined by MinOperandNumber or MaxOperandNumber.
It is not possible to relocate relative types.
Relocates the PlcObject using the specified offset. The original PlcObject remains unmodified.
C#
public PlcObject Relocate(int operandNumber, int byteNumber)
Parameters
operandNumber
Int32
The operand number offset used to adjust the address of the Type.
byteNumber
Int32
The byte number offset used to adjust the address of the Type.
Returns
A new instance of the PlcObject configured with the same metadata as this instance but relocated using the specified offset.
Exceptions
One of the offsets specified by operandNumber
or byteNumber
result into a new value that would be out of the bounds defined by MinOperandNumber, MaxOperandNumber, MinByteNumber and MaxByteNumber.
It is not possible to relocate relative types.
Relocates the PlcObject using the specified offset. The original PlcObject remains unmodified.
C#
public PlcObject Relocate(int operandNumber, int byteNumber, int bitNumber)
Parameters
operandNumber
Int32
The operand number offset used to adjust the address of the Type.
byteNumber
Int32
The byte number offset used to adjust the address of the Type.
bitNumber
Int32
The bit number offset used to adjust the address of the Type.
Returns
A new instance of the PlcObject configured with the same metadata as this instance but relocated using the specified offset.
Exceptions
One of the offsets specified by operandNumber
, byteNumber
or bitNumber
result into a new value that would be out of the bounds defined by MinOperandNumber, MaxOperandNumber, MinByteNumber, MaxByteNumber, MinBitNumber or MaxBitNumber.
It is not possible to relocate relative types.
Relocates the PlcObject using the specified address
. The original PlcObject remains unmodified.
C#
public PlcObject Relocate(PlcAddress address)
Parameters
address
PlcAddress
The PlcAddress to that the value is to be relocated.
Returns
A new instance of the PlcObject configured with the same metadata as this instance but relocated using the specified address
.
Exceptions
The address
is a null reference (Nothing in Visual Basic).
The address
does not refer to the same RawType as this PlcType.
It is not possible to relocate absolute object types without relative type information.
Remarks
The RawType of the address
specified needs to be the same as defined by the address of the Type of the PLC value.
Converts the object to its string representation.
C#
public override string ToString()
Returns
A string that contains the object.