1

I am collecting data from two pieces of equipment using serial ports (scale and conductivity probe). I need to continuously collect data from the scale which I average between collection points of the conductivity probe (roughly a minuet).

Thus I need to run two processes at the same time. One that collects data from the scale, and other which waits for data from the conductivity probe, once it gets the data it would send a command to the other process in order to get the collected scale data, which is then time stamped and saved into .csv file.

I looked into subprocess but it I cant figure out how to reset a running script. Any suggestions on what to look into.

4

1 回答 1

0

除了使用线程,您还可以将数据源实现为生成器,然后循环它们以使用传入的数据并对其进行处理。也许使用两个不同的生成器并将它们压缩在一起,实际上将是一个很好的实验我不完全确定它可以完成......

于 2014-10-27T12:54:45.473 回答