From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-16-2024 03:48 PM
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.
02-16-2024 05:23 PM
You can use a dummy AI task to generate the sample clock. See method 2 in Synchronizing Two Counter Tasks in NI-DAQmx
02-19-2024 02:04 PM
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?
02-19-2024 02:44 PM
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
02-22-2024 10:50 AM
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?
02-22-2024 12:20 PM
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