|
How to read an integer array using Modbus? Marcio Corazzim from Brazil [1 posts] |
7 year
|
How to read an integer array element and send it to the Modbus server?
It works fine on an simple integer variable but fails when i use an array. I want to read the RGB colors.
Thanks.
|
|
|
Steven Gentner from United States [1446 posts] |
7 year
|
Marcio,
Arrays are not directly supported but can be emulated in a way to get the information out. For example, one can create a single integer variable for each value of the array that needs to be sent ... but this can become very tedious for long arrays.
The other possibility is to instead convert the array into a string (which is essentially an array of chars) but this also has length limitations.
Would you be able to describe a little more what you are trying to accomplish? The concern is that modbus isn't the best way to transfer large amounts of information like images. It is meant more as a control interface which typically uses single numbers. I'd like to check that there isn't another way you could instead process the image within RR and just send the results of that processing rather than sending the raw image ... but that will depend on what you are trying to do.
STeven.
|
|