03-25-2013 07:00 AM
Hi,
I want to create a counter with my PXI6608 that is triggered with an external input, then counts up. I then want to be able to read the count in LabVIEW and hence determine the time since the trigger. I have achieved this before with old-style code, but it is not clear how to do it the DAQmx way. In particular, I can't create a task because what I'm looking to do doesn't seem to fit in with any of the pre-envisaged DAQmx task templates.
Can anyone help? I'm assuming there's some way to create an 'empty' DAQmx task so I can fill in the details with property nodes?
Cheers
Lee
Solved! Go to Solution.
03-27-2013 11:33 AM - edited 03-27-2013 11:36 AM
You'll want to make an edge count task and set the source to be one of the internal timebases using a DAQmx property node (set it before starting the task):
The trigging functionality you're looking for is called an "arm start trigger" in DAQmx. It's configured through a property node (also before starting the task):
I'm not sure what you're getting at with regards to the "empty" DAQmx Task. Typically you'll use the standard API to set typical properties and the property nodes for more advanced functionality so you'll end up with a combination of the two. In many cases you could replace the DAQmx API with property nodes (for a fun example of this, open up the DAQmx Timing VI), but odds are you might be forgetting something important so I would always suggest using the VIs and then tacking on property nodes for additional functionality when necessary.
If you're using LV 2012, this example should get you started (or if not, the picture still shows you what the task would look like).
Best Regards,
03-27-2013 11:58 AM - edited 03-27-2013 12:03 PM
Thanks so much, John.
You've handed it all to me on a plate- bells and whistles included! Great explanation. As regards the 'empty task', yes I think I was barking up the wrong tree.
Cheers
Lee