Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

contineous generation and voltage measurement DAQ assistant

i have made a program to generate and measure voltage using DAQ assistant to generate voltage n measure voltage and put it in a while loop. I switch the voltage on n off after every 2 seconds, everything is working fine but from the data i have a feeling that the the DA stops momentarily after every cycle, both for measurement n generation. How do i rectify this proble so that both generation n measurement DAQs do not stop n run continuously
0 Kudos
Message 1 of 4
(3,069 Views)
Hi Amber,

Check to make sure that in your DAQ assistant you have selected to acquire continuous samples and not N samples. Also, keep in mind that your Analog Output will remain at the last output level when ending a task. If you are doing N sample generation, you could be running into this and misinterpreting it for a bug. If you could be a little more specific about the symptoms you are seeing we can narrow down some possibilities. Are you generating and acquiring the same signal? A picture of your code an idea of your setup would be very helpful in understanding your problem. Thanks Amber.




Message Edited by Patrick_Ba on 03-18-2008 04:34 PM
PBear
NI RF
0 Kudos
Message 2 of 4
(3,051 Views)
Actually i cannot use contineous generation in the DAQ since i have to switch the amplitude every 2 seconds, i mean, the amplitude will have a certain value for 2 sec and switch to a lower value after 2 seconds and the cycle continues. I am attaching my code, please have a look. I have a feeling that after every cycle the generation and measurement DAQ stops momentarily. I am generating some voltage but i m not trying to measure the same voltage, i m generating different voltage and measuring different voltage. Please help.
0 Kudos
Message 3 of 4
(3,038 Views)
Hi Amber,

I took a quick look at your VI and I believe you can indeed use continuous generation/acquisition. Using continuous mode doesn't mean you will be outputing the same thing continuously, you can continuously write to the DAQ board. Also, a good rule of thumb is to read a number of samples that is 10% of the sampling rate. This will give a more real-time appearance as DAQmx won't be waiting for the buffer to fill up to the specified number of samples before it reads. For example, your write DAQ assistant is set up for a sampling rate of 10k but output 40k. This will take four seconds before you get any output. I hope that these things help and you should be able to get some better results this way. Take a look at this great tutorial about DAQmx programming also. There is a great deal of information in here that allows users of all skill levels to get fully functional DAQ applications quickly. For example, using out DAQ vis, other than the DAQ assistant, you can do things such as starting both the analog output and input at the exact same time and also sharing the same clock. I hope these things help.

Getting Started with NI-DAQmx: Basic Programming with NI-DAQmx
http://zone.ni.com/devzone/cda/tut/p/id/5438

Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications
http://zone.ni.com/devzone/cda/tut/p/id/2835

PBear
NI RF
0 Kudos
Message 4 of 4
(3,016 Views)