Namespace: IPS7Lnk.Advanced
Assemblies: IPS7LnkNet.Advanced.dll, IPS7LnkNet.Advanced.dll
The PlcOperand type exposes the following members.
Initializes a new instance of the PlcOperand class using the type
specified.
C#
protected PlcOperand(PlcOperandType type)
Parameters
type
PlcOperandType
The PlcOperandType of the operand to represent.
Exceptions
The DataBlock can not be used to create a PlcOperand, because it requires a number.
Initializes a new instance of the PlcOperand class using the type
and number
specified.
C#
protected PlcOperand(PlcOperandType type, int number)
Parameters
type
PlcOperandType
The PlcOperandType of the operand to represent.
number
Int32
The number of the block to represent.
Exceptions
The type
specified can not be used to create a PlcOperand, because it does not require a number.
The number
is out of the bounds defined by MinNumber or MaxNumber.
Initializes a new instance of the PlcOperand class with serialized data.
C#
protected PlcOperand(SerializationInfo info, StreamingContext context)
Parameters
info
Serialization.SerializationInfo
The Serialization.SerializationInfo that holds the serialized object data about the exception being thrown.
context
Serialization.StreamingContext
The Serialization.StreamingContext that contains contextual information about the source or destination.
Exceptions
The info parameter is null reference (Nothing in Visual Basic).
Serialization.SerializationException
The class name is null reference (Nothing in Visual Basic) or HResult is zero (0).
Gets the operand used to access the counter memory block of the controller.
C#
public static PlcCounterOperand Counter { get; }
Property Value
An instance of the PlcCounterOperand class.
Gets the operand used to access the flag memory block of the controller.
C#
public static PlcFlagOperand Flag { get; }
Property Value
An instance of the PlcFlagOperand class.
Gets the operand used to access the input memory block of the controller.
C#
public static PlcInputOperand Input { get; }
Property Value
An instance of the PlcInputOperand class.
Gets the operand used to access the output memory block of the controller.
C#
public static PlcOutputOperand Output { get; }
Property Value
An instance of the PlcOutputOperand class.
Gets the operand used to access the peripheryInput memory block of the controller.
C#
public static PlcPeripheryInputOperand PeripheryInput { get; }
Property Value
An instance of the PlcPeripheryInputOperand class.
Gets the operand used to access the peripheryOutput memory block of the controller.
C#
public static PlcPeripheryOutputOperand PeripheryOutput { get; }
Property Value
An instance of the PlcPeripheryOutputOperand class.
Gets a value indicating which PlcOperandStandard was used to create the operand.
C#
public PlcOperandStandard Standard { get; }
Property Value
One of the members defined by the PlcOperandStandard enumeration.
Gets the operand used to access the timer memory block of the controller.
C#
public static PlcTimerOperand Timer { get; }
Property Value
An instance of the PlcTimerOperand class.
Gets the type of operand represented.
C#
public PlcOperandType Type { get; }
Property Value
One of the members defined by the PlcOperandType enumeration.
Retrieves all PlcOperand instances which can be typically addressed within a PLC including the custom data block operands used so far.
C#
public static IEnumerable<PlcOperand> All()
Returns
An IEnumerable´1 of PlcOperand instances representing the possible PlcOperand instances including the custom data block operands.
Compares the current PlcOperand with the other
.
C#
public override int CompareTo(object other)
Parameters
other
Object
The PlcOperand to compare with this PlcOperand.
Returns
A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(Object)).
Compares the current PlcOperand with another PlcOperand.
C#
public int CompareTo(PlcOperand other)
Parameters
other
PlcOperand
The PlcOperand to compare with this PlcOperand.
Returns
A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(0)).
Retrieves the according PlcDataBlockOperand using the specified number
of the data block operand.
C#
public static PlcDataBlockOperand DataBlock(int number)
Parameters
number
Int32
The number of the data block to retrieve.
Returns
The PlcDataBlockOperand of a specific data block.
Exceptions
The number
is out of the bounds defined by MinNumber or MaxNumber.
Determines whether the specified other
is equal to this PlcOperand.
C#
public override bool Equals(object other)
Parameters
other
Object
The PlcOperand to compare to the current PlcOperand.
Returns
The value true if the specified PlcOperand is equal to the current PlcOperand; otherwise the value false.
Determines whether the specified other
is equal to this PlcOperand.
C#
public bool Equals(PlcOperand other)
Parameters
other
PlcOperand
The PlcOperand to compare to the current PlcOperand.
Returns
The value true if the specified PlcOperand is equal to the current PlcOperand; otherwise the value false.
Retrieves a hash code for this PlcOperand.
C#
public override int GetHashCode()
Returns
An Int32 that contains the hash code for the PlcOperand.
Sets the Serialization.SerializationInfo with information about the exception.
C#
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)] public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
info
Serialization.SerializationInfo
The Serialization.SerializationInfo that holds the serialized object data about the exception being thrown.
context
Serialization.StreamingContext
The Serialization.StreamingContext that contains contextual information about the source or destination.
Exceptions
The info
parameter is a null reference (Nothing in Visual Basic).
Retrieves the PlcRawType members supported by the PlcOperandType specified by type
.
C#
public static PlcRawType[] GetSupportedRawTypes(PlcOperandType type)
Parameters
type
PlcOperandType
The PlcOperandType its supported PlcRawType members are to be determined.
Returns
An array of PlcRawType members supported by the type
specified.
Remarks
Supported raw types means that these PlcRawType members can be used to address the PLC memory of such a PlcOperandType by using one of the supported PlcRawType members.
Determines whether the specified rawType
can be used to address the PLC memory identified by the PlcOperandType specified by type
.
C#
public static bool IsSupported(PlcOperandType type, PlcRawType rawType)
Parameters
type
PlcOperandType
The PlcOperandType its supported raw types are inspected to determine the accessibility of the PLC memory using the PlcRawType specified by rawType
.
rawType
PlcRawType
The PlcRawType its compatibility to address the PLC memory defined by type
is to be inspected.
Returns
The value true if the PLC memory of type
can be accessed using the PlcRawType specified by rawType
; otherwise the value false.
Retrieves the according PlcOperand which matches the PlcOperandType specified.
C#
public static PlcOperand Of(PlcOperandType type)
Parameters
type
PlcOperandType
The PlcOperandType of the PlcOperand to retrieve.
Returns
The PlcOperand which matches the type
.
Exceptions
The type
is either a DataBlock or is an unknown PlcOperandType.
Converts an operand string to a PlcOperand instance.
C#
public static PlcOperand Parse(string value)
Parameters
value
String
A string that contains an operand.
Returns
An instance of the PlcOperand class.
Exceptions
The value
is not a valid operand.
Converts the operand to its string representation.
C#
public override string ToString()
Returns
A string that contains the operand.
Converts the operand to its string representation using the specified standard
.
C#
public string ToString(PlcOperandStandard standard)
Parameters
standard
PlcOperandStandard
The PlcOperandStandard to use to identify the standard dependent characters in the string representation of the operand.
Returns
A string that contains the operand.
Determines whether a string is a valid operand.
C#
public static bool TryParse(string value, out PlcOperand operand)
Parameters
value
String
The string to validate.
operand
PlcOperand
The PlcOperand version of the string.
Returns
The value true, if value
is a valid operand; otherwise the value false.
Retrieves the according PlcUserDefinedTypeOperand using the specified number
of the user defined type operand.
C#
public static PlcUserDefinedTypeOperand UserDefinedType(int number)
Parameters
number
Int32
The number of the user defined type to retrieve.
Returns
The PlcUserDefinedTypeOperand of a specific user defined type.
Exceptions
The number
is out of the bounds defined by MinNumber or MaxNumber.
Returns a value indicating whether two instance of PlcOperand are equal.
C#
public static bool operator ==(PlcOperand left, PlcOperand right)
Determines whether the first specified PlcOperand object is greater than the second specified PlcOperand object.
C#
public static bool operator>(PlcOperand left, PlcOperand right)
Determines whether the first specified PlcOperand object is greater than or equal to the second specified PlcOperand object.
C#
public static bool operator >=(PlcOperand left, PlcOperand right)
Converts a string formatted as operand to an PlcOperand object.
C#
public static implicit operator PlcOperand(string value)
Exceptions
The value
is not a valid PLC operand.
Returns a value indicating whether two instances of PlcOperand are not equal.
C#
public static bool operator !=(PlcOperand left, PlcOperand right)
Determines whether the first specified PlcOperand object is less than the second specified PlcOperand object.
C#
public static bool operator <(PlcOperand left, PlcOperand right)
Exceptions
The left
is a null reference (Nothing in Visual Basic).
Determines whether the first specified PlcOperand object is less than or equal to the second PlcOperand object.
C#
public static bool operator <=(PlcOperand left, PlcOperand right)
Exceptions
The left
is a null reference (Nothing in Visual Basic).