LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Missing data on measurement file

Hello, i have a pulse generator VI in which im interested into recording some voltage and current values. Im using LabView 7.1 and Daqmx 8.7.2.

The pulse part is working perfectly but the adquisition stops when i generate the pulse, thus the measurement file has gaps of data equal to the length of the pulses so i always get 0 voltage as a reading.

Someone had experienced something similar? 

 

If you need the VI and the sub VIs i attached them. 

0 Kudos
Message 1 of 5
(3,167 Views)

Hi Coolavr,

 

Thanks for your post and I hope your well today.

 

In the NI Example Finder (Help>>Find examples), could you take a look at the example titled Multi-Function-Synch AI-AO.vi (Hardware Input/Output>>DAQmx>>Synchonization>>Multi-Function). This example demonstrates how to continuously acquire and generate data at the same time, synchronized with one another.

 

Your problem is caused because you have the generation pulse.vi and the send pulse vi and then do your DAQ assistant read. I would place these the same loop (or two seperate loops).

 

Please let me know how the example finds you and let me know if I can help anymore,

Hope this helps,

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 2 of 5
(3,147 Views)

Thanks Hillman, it seems this is what i need. The problem is that i need to read data from multiple channels and the example only provides for one.

Also i had been changing my vi a lot to try to get data all the time but i always end up in a failure. I thought maybe using something similar to the example but using multiple channels just in the pulse loop so i can have two measurement files, one is the pulse data and the other is the data when the pulse isnt in progress.

Is this possible? I also was checking the DaqMx Assistant ( the blue box) and i found that the loops used to have multiple channels are very complicated.

How can i combine these loops with the multifunction example?

0 Kudos
Message 3 of 5
(3,105 Views)

Hi coolavr,


Thanks for the reply and I hope your well today.

 

Ok, so Im a little confused on what your doing...

 

So have you got lots of channels of data across several modules?  and then you also want to save the data?

 

the example image here, shows how to use two DAQ assistants for two different devices with multiple channels. Then using the produce/consumer design pattern the data can be acquired at a constant rate - and then sending all the samples in the buffer (continous DAQ) to the second loop which can process the data (save to file). The key aspect here is the saving to file won't affect the rate you can acquire data. This is acheived by using queues - which also stops data being lost. 

 

 

 

However, I wouldnt recommend using Express VIs. Using the lower level DAQmx API is more efficent and gives you more control of synchonrisation and timing. Here is a good link,

 

Getting Started with NI-DAQmx: Main Page

http://zone.ni.com/devzone/cda/tut/p/id/5434

 

Hope this helps,

Message Edited by Hillman on 12-19-2008 12:36 PM
Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 4 of 5
(3,089 Views)

Ok, well im gonna try to do something like that. What i want to do is to sent the pulse via the blue sub-vi and to collect data from the input channels during the experiment.

The thing is that i want to control when the pulse is going to be sent and i dont know if there is another way to do it besides the true/false loop i have in the code.

Also if i use the output sub-vi i have i get a measurement error so it gets me very confused because i had used simultaneous output/input before with the DaqMx assistant.

Hope this helps you to understand what i want to do.

0 Kudos
Message 5 of 5
(3,072 Views)