Quantcast
Channel: Counter/Timer topics
Viewing all articles
Browse latest Browse all 1271

USB-6211 count edges during gate

$
0
0

pulses.png

 

I'm attempting to use a USB-6211 to count signal pulses within an external gate, as shown above. I'll refer to my blue pulses as my gate and orange pulses as my signal. I want to count how many orange rising edges there are during the positive excursion of each blue pulse. I've tried several approaches and need help understanding what I've seen.

 

I'm wondering if perhaps my goal isn't possible with the USB-6211---if somebody could just confirm that this IS possible with my hardware I would feel better about sinking more time into trying to figure out how to configure the task.

 

Any response would be appreciated!

 

I'm using PyDAQmx on Windows 10 with DAQmx version 20.1---scripts attached.

 

APPROACH ONE: edge counting

 

I can setup a count edges channel using my blue gate pulses as an external sample clock. This gives me the number of orange signal pulses between rising edges of my gate, but tells me nothing about how many orange signal pulses appeared during the positive excursion. I have tried two strategies to stop counting while my blue gate is low, but both have failed.

 

I have tried activating the hardware counting gate that's documented in the USB-6211 manual (CI.CountEdges.Gate.Enable), but DAQmx tells me "Specified property is not supported by the device or is not applicable to the task".

 

I have tried adding a pause trigger, but DAQmx tells me "Pause trigger is only valid for event counting if sample clock is not used"

 

APPROACH TWO: pulse width measurement

 

From reading other community posts, I have seen that it's possible to back-out the value that I want by doing a pulse width measurement using my signal as an external time-base. I have tried this, but DAQmx tells me "Device does not support this property"

 


Viewing all articles
Browse latest Browse all 1271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>