AdvancedHMI Software

General Category => Support Questions => Topic started by: lostcontrol on August 26, 2014, 04:28:02 AM

Title: Modbus/TCP, write multiple registers from code at once..?
Post by: lostcontrol on August 26, 2014, 04:28:02 AM
How to do so?
It looks like it can be done, but I cannot get the syntax correct.

MBTCP.Write("40201","55") works.

However, if I do this, then it works, but I have to declare each element after the 'New String'
  Dim d2w() As String
        d2w = New String() {Data2Write(0), Data2Write(1)}
        sts = MainForm.MBTCP_S71200.Write(TagName, d2w, Count)

There must be a more dynamic way?