Page 1 of 1

Modbus array of values input

Posted: Mon Mar 06, 2017 4:55 pm
by dannyvanneijenhoff
Hello

I have trouble to use the field CoilData in "Force mutilpe coils" in modbus master, type BYTE[]

Nothing (sofar) is working, maybe something easy :shock:
Knipsel.JPG
Knipsel.JPG (21.3 KiB) Viewed 3921 times

Re: Modbus array of values input

Posted: Mon Mar 06, 2017 6:39 pm
by Benj
Hello,

You need to create a byte array for the parameter.

So make a byte variable and name it something like array[5] where 5 is the number of bytes in the array.

You can then just use array as your parameter. i.e. without the square brackets.

5 * 8 allows you to control up to 40 coils.

Hope this helps.

Re: Modbus array of values input

Posted: Sat Apr 29, 2017 9:06 am
by dannyvanneijenhoff
Thanks for the reply,


i can fill in the VAR "array" now ( not array[2] ) in the component but the data output is not correct, i am missing the data from VAR "array"

wrong data : 2 15 0 0 0 8 0 .. 63 255 (from flowcode)
correct data: 2 15 0 0 0 8 0 7 127 84

the VAR array[2] var is working in another component