Hi to everybody, I hope anybody can help me with the next case:
I am working on a system in which I have to read signals of 5 different sensors which have different ways to communicate (4 - 20 mA, voltage, RS-232, ModBUS, etc.) with the DAQ Device (cDAQ in my case), at same time when I am reading the variables I must check for the state of several digital inputs to verify connections and if any is interrupt I must stop the Data Acquisition.
My question is if is recommendable to put all the tasks in a single loop with the logic shown in the attached image.
Or if I should divide the tasks in a multiple loop architecture.
If the answer is the second, my next question is: How many DAQ tasks per loop is OK?, my doubt is based on the number of variables that I am going to read
and the different ways to get the measures, specially which are by protocols (ModBUS, RS-232), all this by the response time.
Thanks in advance, all suggestions are welcome!