LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sampling at a different frequency simultaneously in one program

Hi Kevin,

 

I managed to fix the formatting problem by changing the setting to "1D arrays to multiple channels" within the "Convert to Dynamic data" function. However I am still experiencing the problem where it only gives me one sample (one line of data). Unfortunately I can't use the method you suggested to test where the problem lies due to hardware issues. However I have switched the two buffered variables around in the while loops inside the computer.vi and whichever one is in the bottom while loop, the problems will occur with that measurement. So I am suspecting that the bottom while loop is not performing its iteration properly (rather than problems inside the data acquisition process in the timed loops in cRIO.vi). Please let me know about your thoughts.

 

Vincent

0 Kudos
Message 11 of 13
(449 Views)

Hey Vincent,

With what you described it sounds like your top loop is starving your bottom loop from ever executing.  I would add a short wait to both loops and see if that fixes the issue.  The wait VI forces the loop to give up control of the thread.  Please post back if you have any additional issues.

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 12 of 13
(427 Views)

Hi Kevin,

 

I managed to solve the problem by using a local variable to stop the lower while loop instead of a shared variable. However I got a new problem which is I am unable to start both timed loops in my cRIO.vi at the same time. I have posted this question in a seperate thread named "synchronizing the start of two timed loops". Can you please have a look at that thread? Thanks for your time once again!

0 Kudos
Message 13 of 13
(415 Views)