Gets / Sets the number items to read or write from the MODBUS device
Number of contiguous items to be read or written to the programmable logic controller.
If Length is greater than 1, the data being read will be returned as a System.Array
Maximum Array Lengths
| Exception Type | Condition |
|---|---|
| IndexOutOfRangeException | Thrown if Tag.Length exceeds the maximum array length. |
|
|
VB
Imports MBLink
Dim MBDevice As New Controller("192.168.1.45")
Dim MyTag As New Tag("40001")
MyTag.Length = 25
MBDevice.ReadTag(MyTag)
C#
Using MBLink;
Controller MBDevice = new Controller("192.168.1.45");
Tag MyTag = new Tag("40001");
MyTag.Length = 25;
MBDevice.ReadTag(MyTag);