07-07-2014 01:09 PM
Hello,
I am new to LabView. I am using USB-6009 to recieve signal from two channels (ai0 and ai1) and want to show and read data once the external trigger pulse (PFI0) is on the rising edge. The trigger pulse is a periodic pulse. My old program works well in the old version of LabView (See attached figure). However, in my new program (See attached file), once triggered at the first pulse, the data acquisition process is on and data are scanned since then. I want the data to be scanned every time the external trigger pulse (PFI0) is on the rising edge. It seems to be an easy question, but I cannot figure it out. Any help is appreciated. Thank you.
07-07-2014 03:51 PM
You are configuring the DAQ to acquire data continuously when triggered -- and that is just what its doing. You need to tell it to collect a finite number of samples (100, 1000, 42 - whatever you want) when triggered.
Mike...
PS: Lose the express VI, it takes up more room than the LV code to do the same thing.
07-09-2014 11:50 AM
Hi, Mike,
I was trying to use that to acquire 1 sample when triggered. It said:
Possible reason(s):
Attempted to read a sample beyond the final sample acquired. The acquisition has stopped, therefore the sample specified by the combination of position and offset will never be available.
Specify a position and offset which selects a sample up to, but not beyond, the final sample acquired. The final sample acquired can be determined by querying the total samples acquired after an acquisition has stopped.
Attempted to Read Sample: 100
Property: RelativeTo
Corresponding Value: Current Read Position
Property: Offset
Corresponding Value: 0
Task Name: _unnamedTask<5>
07-09-2014 12:09 PM
07-09-2014 12:18 PM
Hi, thanks for your reply.
My old program is to acquire one data every time when triggered (the trigger pulse is a periodic one). Yeah, it would acqure 1000 data when the pulse goes on for 1000 times. I just don't know how to achieve that in this new version of LabView. My new code is still in a try. I just want to make a loop over the whole diagram to make it read one data when triggered (looping 1000 times maybe). Is that possible to do that in USB-6009?
07-09-2014 12:21 PM
07-09-2014 12:27 PM
Hi,
Do I have to make a loop over something? I mean, I need the software to read 1000 samples. But I want those 1000 samples to be read when the hardware gets the corresponding 1000 pulse (rising edge) from the PFI0. It is important and we can adjust the delay of the pulse (we have that box).
07-09-2014 12:36 PM
Hi,
Maybe it is clear to say that I want 1000 samples based on 1000 trigger pulses (one each pulse) instead of 1000 samples after the first trigger.