LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

External DAQ Devices, NI DAQ Devices, CAN Devices....put all in 1 loop.. and Queue to Log loop?

I am struggling to figure out the best method for laying out DAQ device drivers and DAQ I/O on the block diagram...

 

Here's the scenario of DAQ devices that I have:

 

-1 Serial device that kicks out data 1 time/second

-2 Serial devices that kick out data 2 times/second

-1 USB CAN device that kicks out data 10 times / second

-1 USB CAN device that runs fairly fast (J1939 transport protocol)

-NI DAQ hardware I/0 devices....

 

Do I stuff all these in 1 loop (most likely 2 loops with the J1939 separate (kind of a given)...?)

 

What would I run into if I did put all these in 1 loop?

 

My main issue that I run into when they are in separate loops is that I have to either use multiple Local Variables/Globals/or Queues to transfer the data to the main logging loop...

 

I guess one solution is that I could put all the serial devices in 1 loop / the NI DAQ I/O & proprietary CAN in 1 loop / and the J1939 CAN in 1 loop...

 

Though, if I'm Queue'n data from 3 loops to 1 main log loop how would I come close to synchronizing the Data that occurred say at second 1, second 2....if other loops are running at faster speeds?  (leads to the question of the Queue output speed......is this dependent upon the loop speed?)

 

Thanks

0 Kudos
Message 1 of 4
(2,161 Views)

With you description I would have a seprate loop for each. They would all push their own queue with TIME STAMPED updates. Waveform data type charts make the sycronization straight forward since they will plot based on the "t0" of the WF.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 4
(2,158 Views)

Ben,

 

What would happen if I put them alll in one loop?  Just repetitive data for the slower serial devices?  Would that slow down the NI DAQ and CAN reads?

0 Kudos
Message 3 of 4
(2,143 Views)

jonathanupr wrote:

Ben,

 

What would happen if I put them alll in one loop?  Just repetitive data for the slower serial devices?  Would that slow down the NI DAQ and CAN reads?


Yes.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 4
(2,132 Views)