LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Daq assistant digital line trigger analog voltage aquisition

Hello
  I am using USB 6008. My task is to acquire the voltage data from a temperature sensor. Before acquiring voltage, it has digital line to trigger the acquisition of analog voltage. The digital line has width of 500ms. What my question is about the sampling rate and sample to acquire. As it has width of 500ms, will it be correct if the sample number(DAQ Assistant) is set to 500 and sampling rate is set to 1000 Hz?I used DAQ assistant to acquire digital line, then it is connected to the case structure in which consists of another DAQ assitant to acquire analog voltage.

I find that the digital line has lagged about 100 sample(0.1ms). As consequence, the analog voltage shows incorrect representation of data.

pls help . thanks.
0 Kudos
Message 1 of 4
(4,127 Views)

Hi heang,

I understand that you want to trigger the acquisition of the analog input with a digital line. If you are setting the acquisition sampling rate to 1000 Hz that means that you will be acquiring each sample every 1 ms. There is an example in LabVIEW “Cont Acq&Graph Voltage-Ext Clk-Dig Start.vi” that I understand accomplish what you are trying to do. Another good source to look at is the USB-6008 User Guide and Specification, p 20 explains how to configure the digital trigger for the AI task. I hope this is helpful, if not please give us more information about how you are developing your application; a screenshot will be helpful as well.



Message Edited by Ana P on 04-09-2008 06:22 PM
Ana P
National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(4,107 Views)
Hello

Thanks for the prompt reply. Here is the attachment of Vi i used.
These vi are within a while loop. while the analog voltage is using N sample acquisition.
I have tried to execute the vi i develop. Within a certain period of time( user key in time), the width of digital line depends on the width of time that user key in, the real task is to measure voltage within the ON state of digital line. I do not know whether the vi i used is correct.
I have faced some problems:
 If i set width of digital line 500ms, are the settings of sampling rate 2000 HZ and sample number 1000 sample correct? if this is correct, what should i set for sampling rate if the sample number constant 1000 sample if i set width of digital line 5000ms? besides, i find that the analog voltage acquisition is lagging. What is the real  cause of erratic acquisition? I set 4 digital line, for instance, it is shown in front panel with four digital line indicator, however it has only 3 time of voltage acquisition.

thanks


0 Kudos
Message 3 of 4
(4,097 Views)

Hi heang,

Right now you are performing the Analog Input based on the readings of the digital line. This action is performed in software, you read the digital line and then decide with the Case Structure if you will acquire or not. The time it will take between the digital line changes to ON to the acquisition to actually start will depend on your system (computer, memory, other applications that you might be running). If this time delay is inconvenient for your application I suggest using a hardware trigger. If you use a hardware trigger to start the acquisition the time between the digital line change and the acquisition start will be minimal, since the decision is not made in software.

I’m not too clear on your question about the number of samples and the sample rate. These parameters will depend on your application. The sampling rate is generally determined depending on the highest frequency of the signal you want to acquire. By Nyquist Law, you need to sample at least twice as fast than the highest frequency of the signal in order to properly recover the signal. Also I found this post that could be helpful as well for some of your questions.

Ana P
National Instruments
Applications Engineer
0 Kudos
Message 4 of 4
(4,064 Views)