I am working on an application that will acquire 14 channels from the mA module, so it outputs an array of dbls. The user wants to be able to configure each channel to have its own acuire rate. We are talking 30 sec/sample, up to a couple of minutes, so it is not a fast acquisition.
The problem is that the fieldpoint only outputs one array of all the channels and the sameples could be 45 sec/sample, so it is hard to come up with a common point.
I am looking on some advice on the best way to accomplish this. Some ideas I came up with:
-Put the data into a shared variable at a much faster rate (1-5 sec/sample) and then a number of parallel while loops that have independent wait_ms clocks or timed loops and each iteration pull from the variable. But this would get tedious with 14 loops, and there is the possibilty of more channels in the future.
- Tell the user that he can set only one rate for all the sensors (the lazy way
)
- Multiple loops that read the data (using the cFP vis) at the selected interval (possible errors if 2 reads occur at the same time???)
Thanks for the input.
Kenny
Kenny