Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Doing something the DAQmx way that doesn't fit? (Triggered counter on PXI 6608)

Solved!
Go to solution

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

0 Kudos
Message 1 of 3
(6,219 Views)
Solution
Accepted by topic author ToeCutter

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):

 

Untitled 1 Block Diagram _2013-03-27_11-30-07.png

 

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):

 

Untitled 1 Block Diagram _2013-03-27_11-22-30.png

 

 

 

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,

John Passiak
Message 2 of 3
(6,194 Views)

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

0 Kudos
Message 3 of 3
(6,187 Views)