LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simultaneous DAQmx Tasks

This should work.  Set up 2 tasks each which take a digital trigger.  Have one trigger on PFI0 and one trigger on PFI1.  Each of the tasks should be finite and set the samples/sec and number of samples so that you get one second worth of data.  When the first trigger occurs take a timestamp.  When the second trigger occurs take another timestamp.  Try this without the state diagram tookit to make sure the DAQ works and then incorporate the toolkit.  I am not at my computer with DAQ right now but I think you could also get the timestamp from the waveform data that is being returned.  Unbundle the waveform data to get the t0.

 

StuartG

Message 11 of 18
(1,569 Views)
Thanks Stuart.  I'll give that a try tonight.  

I upgraded to the latest drivers last night as well.  I believe I was running 3.5 previously. 
---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 12 of 18
(1,563 Views)
There is one problem. 

NI-USB 6008 does not have a PFI1.   Smiley Sad



---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 13 of 18
(1,558 Views)
I have had some sucsess using analog triggers instead of digital.  The DAQmx start trigger function supports both analog and digital triggering.   In my case, I just set the threashold at ~.125V to prevent false triggers from my crude, hand-built trigger circuit.

Waveforms have a built in start stamp.  Just unbundle the t0 component.  I do not recall, off hand, which clock the t0 is based off of; but since you are only interested in the difference, it should not matter.
Message 14 of 18
(1,552 Views)
The analog trigger is a good idea too Jason.  But I'm a little concerned that when I'm looking at the trigging options in MAX Tasks, Analog triggering is grayed out.  So I'm wondering if this could be another limitation of the USB 6008.

I'm attaching some code.  Is this the idea?  

Thanks for the suggestion.  I'll give it a try this evening. 
---------------------
Patrick Allen: FunctionalityUnlimited.ca
Download All
0 Kudos
Message 15 of 18
(1,549 Views)
Sadly, I have no experience with the USB 6008.  I can't think why you would not be able to monitor the analog channels for a trigger, though.
0 Kudos
Message 16 of 18
(1,544 Views)
USB 6008 will not accept an analog trigger. 


I'm starting to get that, "You can't get there from here" feeling.
---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 17 of 18
(1,541 Views)

Hi Pallen,

The USB-6008 does not accept analog triggers and there is only 1 PFI line on this device. So you can use that trigger line to start a finite or continuous acquisition.  However, you will not be able to obtain a time between two triggers with the USB-6008. There is a great shipping example for using a hardware trigger to start an acquisition for the USB-6009 in the LabVIEW Example Finder. Go to Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Analog Measurements >> Voltage >> Acq & Graph Voltage-Int Clk-Dig Start.vi. I hope you find this information helpful.

Regards,
Hal L.

0 Kudos
Message 18 of 18
(1,526 Views)