Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Can i use USB 6002 to achieve buffered event counting?

Hi,

 

I use the PFI0 as counter input(count edges). Do i need a sample clock as gate signal? Can i use internal signal as the source of sample clock? Because I only have the USB 6002 device. I refer to the usb6002 Specifications, it only have 1 counter.

 

Thank you.

0 Kudos
Message 1 of 6
(1,089 Views)

You can use a dummy AI task to generate the sample clock. See method 2 in Synchronizing Two Counter Tasks in NI-DAQmx

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 6
(1,069 Views)

Hi,

 

Thank you so much for your help. I tryed it like that. But there's an error as shown in the figure attached. Maybe is there something wrong with the code I wrote?

0 Kudos
Message 3 of 6
(742 Views)

Unfortunately, your device isn't capable of this kind of task.  The USB-6002 has only a single counter and it can only be used for "On Demand" edge counting.  No hardware sample timing is supported.

 

The only workaround I can offer is to feed the pulse train signal in as one of the channels in an AI task and sample fast enough to catch all edges of interest.  With a 50% duty cycle, I'd aim for at least 4x the pulse rate to give you 2 nominal samples per high time and low time of the pulse.  For any other duty cycle, I'd increase the sample rate to aim for 2 samples within the time of whichever digital state is shorter.  Then you'll need to post-process the AI data to find and count the edges.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
0 Kudos
Message 4 of 6
(735 Views)

Hi Kevin,

 

Thanks for your responding. Can I use pulse trigger to achieve edge counting periodically in USB-6002 without external signal as trigger source?

0 Kudos
Message 5 of 6
(700 Views)

Sorry, I don't understand exactly what you're asking.  My best guess is that no, you can't, and you're still looking for a way to get your device to do something it simply doesn't support.

 

Can you sketch up a timing diagram of your signals and describe the measurement you're looking to do in more detail?

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
0 Kudos
Message 6 of 6
(691 Views)