04-21-2009 03:04 PM
I am trying to acquire analog voltage data produced by a pressure transducer
which is measuring the pressure across a shock wave. Our department has
purchased a USB-6251 DAQ which should run at a maximum of 1.25 MS/s. We have
determined the shock wave will should be approximately 50 microseconds in
length, and we would like 50 samples across the wave.
Since we are reading at such a high rate, we want a trigger for data
recording. A second transducer which measures the pressure ahead of the main
transducer will be used a trigger to start recording data on the main
transducer. My original .VI (in LabVIEW 8.0) keeps producing errors when I
attempt to run it at high sample rates like 1 MHz, reporting that some samples
are no longer available? I am using a DAQ express inside one while loop to
constantly read data from the two transducers and a trigger scheme in a
separate while loop to trigger recording once the secondary transducer breaks a
threshold value.
Do you have any suggestions as to how I can fix or re-program to
acquire this data?
04-22-2009 01:58 AM
The acquisition code would be helpful....
I don't know the USB-6251 capabilities, but if you get close to the specs of the hardware, it's wise not to use the express vis...
We use NI-Scope with PXI digitizers for similar jobs with lots of onboard memory, ring buffer and pretrigger (Nice ('racing')car here on the lab-desktop ..)
Sounds like you do the triggering in software ...
Look into the 6251 manual if (I'm quite sure) you can configure one channel as an analog trigger. You don't have to record this channel (and spend memory on it) , it's just for the trigger. Let the hardware do the job.
Set up your measuring task as a fixed number of samples, that fit into the onboard memory.
You didn't say anything about the repetition rate .... one shot?
And have a close look on your sensor. For good results you will need the systemresponses of your measuring chain.... BTDT
04-22-2009 12:09 PM
04-23-2009 01:55 PM
Hi emc8606,
Welcome to the NI forums! There is nothing inherently wrong with using the Express VIs, but doing so limits the features that you have access to and can sometimes make it difficult to visualize the "flow" of the program. I agree with Henrik that you should learn to use the lower-level DAQmx functions when possible.
Henrik is correct that you can use analog triggering on your 6251. One caveat is that the analog task itself is not re-triggerable. That is, you would have to stop and restart the task if you want to accept another trigger. The workaround is to use one of the on board counters (which is re-triggerable) as a sample clock for your analog task, and set up the analog task to be continuous.
The following example should be more or less what you need, if you have any questions about it feel free to post back:
NI-DAQmx: Retriggerable AI Using Counter and an Analog Trigger
-John
04-23-2009 02:47 PM
Thanks John for the clarification. I agree, I'm trying to learn the DAQmx functions through the voltage acquisition internal clock HW trigger example VI. We were only exposed to the express VI's in the experimental methods class I took and they do feel pretty limited. Considering this particular experiment, the shock tube is only a single fire mechanism, so I only need to trigger the main transducer once, take about 200-300 microseconds of data at 1.25 MS/s and shut down acquisition.
So would you suggest running the first transducer to an analog trigger port (pin 17 APFI 0, I believe), and the main transducer an analog input port?
04-23-2009 03:27 PM - edited 04-23-2009 03:27 PM
Hi emc8606,
It sounds like you have found a good example to start with for your application, I posted the above example because often customers need retriggerable analog input and it can be a little tricky figuring out how to do this.
If you are not interested in the data from the trigger line, then you could use one of the APFI lines for the trigger signal. The M Series User Manual has more information about the triggering, I would at least make sure to read the section about Analog Trigger Accuracy on page 11-7. In particular, the accuracy of the comparator is not as good as the digitizer, so I would take the time to "fine tune" the trigger as mentioned in the previous link.
You can also trigger from the channel you are acquiring on and can even take pre-trigger samples using an Analog Reference Trigger, which may give you the results you need without having to use a second trigger signal. More information about the Reference Triggering can be found in the M Series User Manual (page 4-36). In this case, you could set a number of pre-trigger and post-trigger samples.
-John