I have about 20 analog input channels, I need do the
data acquization and dump it to the file. At the same
time, I need check the validity of the data, make sure
no data is out of range, if so, need shut down or open
some components or give alarm information. The thing is
how to sychronize them. I use two parallel while loops,one is for data acquization, one is for regularly
check the inputs. But sometimes, it does not act correctly. The data maybe are too complicated to use
the queue. I am not sure. Any suggestion?