Namespace: IPS7Lnk.Advanced
Assemblies: IPS7LnkNet.Advanced.dll, IPS7LnkNet.Advanced.dll
The PlcNull type exposes the following members.
Initializes a new instance of the PlcNull class using the specified address
.
C#
public PlcNull(PlcAddress address)
Parameters
address
PlcAddress
The address there the logical null value is to be located.
Exceptions
The address
is a null reference (Nothing in Visual Basic).
Initializes a new instance of the PlcNull class using the specified address
and length
.
C#
public PlcNull(PlcAddress address, int length)
Parameters
address
PlcAddress
The address there the logical null value is to be located.
length
Int32
The reserved amount of address specific Bit's, Byte's, Word's or DWord's represented as null values.
Exceptions
The address
is a null reference (Nothing in Visual Basic).
The length
is lower than one.
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#
public bool IsValidValue(object value)
Parameters
value
Object
The value to check.
Returns
The value true, if the specified value
is acceptable and is of the correct type or a derived type; otherwise the value false.
Relocates the PlcNull using the specified offset. The original PlcNull remains unmodified.
C#
public IPlcValue Relocate(int operandNumber)
Parameters
operandNumber
Int32
The operand number offset used to adjust the address of the Type.
Returns
A new instance of the PlcNull 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 PlcNull using the specified offset. The original PlcNull remains unmodified.
C#
public IPlcValue 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 PlcNull 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 PlcNull using the specified offset. The original PlcNull remains unmodified.
C#
public IPlcValue 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 PlcNull 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 PlcNull using the specified address
. The original PlcNull remains unmodified.
C#
public IPlcValue Relocate(PlcAddress address)
Parameters
address
PlcAddress
The PlcAddress to that the type is to be relocated.
Returns
A new instance of the PlcNull 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).
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 value to its string representation.
C#
public override string ToString()
Returns
A string that contains the value.
Validates the specified value
whether it can be assigned to this PlcValue´1.
C#
public void ValidateValue(object value)
Parameters
value
Object
The value to validate.
Exceptions
The value
or its type is not valid.