LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Assembling data from multiple queued state machines

I am setting up a project that will have multiple queued state machines (event handlers) running in parallel that control various hardware components (DAQs, digitizers, camera(s), etc.).  I want to assemble the data from these sources into a single data type / file, in a way that everything in synchronized.  My thought was to build another state machine dedicated to this task (I'm calling it "Data QSM.vi") - all the other processes will send their data products to Data QSM via it's queue, and Data QSM will assemble them and write to a file.  I was thinking of syncing this operation to, say, the frame rate of the camera, so every time the camera pulls a frame, a data packet is assembled and written to file.  

 

Does this seem like a sound approach?  I don't want to get too far into it if there are other more commonly used approaches.  My main worry is that the data components will get out of sync, so I was going to time stamp each piece, and maybe make the assembler check the time stamps as it pulls data from the queue as it assembles.  I'm worried about the latency this may cause.  And for a case where one of the data sources starts to lag, I'm not sure how to handle it.  

0 Kudos
Message 1 of 2
(2,911 Views)

I have done similar, only it was ethernet data coming from multiple sources.  I synchronized based on the one that was most deterministic.  Just hold the other data in shift registers and update them when you get their data.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 2
(2,894 Views)