LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to properly read data from one DAQ-assistant and write simultaneously with another DAQ-assistant (which is inside a loop)

Hello.

 

I'm a newbie working on my Master's thesis conserning a project that is based on old G-code made by another newbie so bear with me.

 

I need to create a sequance of output controls. For this I'm using a for loop that eventually creates two triangular ramps during a period of 90 seconds. I've confirmed that this function works properly by measuring the actual output of the DAQ-decice (NI USB 6353).

 

The problem is the following: During this controll-cycle I need to simultanously collect data from the same DAQ-device. At this point there is only one DAQ-assistant output-block in the main loop of the program and all the signals are derived from it to where they are needed.There is a case-structure (the bottom case structure in the picture) that contains the functions needed to collect the data during the test cycle. However these two actions, outputting data and inputting data, are not synchronized in any way which may be the reason why I get the 200279 error or alternatively the 200284 error during the test cycle. I've tried changing the sample rate, buffer size and the timeout time as adviced but nothing seems to help.

 

What would be the simplest way to solve this problem?

 

Help is greatly appreciated!

 

 

 

0 Kudos
Message 1 of 3
(2,864 Views)

Your acquisition needs to be in a separate loop and continuously reading from the DAQ card.


GCentral
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
0 Kudos
Message 2 of 3
(2,855 Views)

Thanks for quick reply.

 

However, I did try it (see the picture) but I still have a problem: I only get 100 samples / channel during the test sequence (all from the first seconds of the sequence) in total even though I've set the data aqcuiring DAQ-assistant as "continous" and "samples to read = 95k" and rate is 1000Hz.

 

Edit.

 

And lastly, I have trouble adding this "extra" DAQ-assistant to the vi. because I get an error about a resource (The 6353) being reserved, even though I connected a false constant to the "STOP" -input of the main DAQ-assistant.

0 Kudos
Message 3 of 3
(2,843 Views)