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

USB-6211: edge counting within externally defined window

$
0
0

pulses.png

 

I am attempting to use a USB-6211 to edge count pulses within an externally defined window, as diagrammed above. I'll call blue my gate and orange my signal---I wish to know how many signal pulses appear within each gate pulse (positive excursion). Importantly, I might get zero signal pulses during particular gates. Ideally I would ignore any signal pulses that appear outside of the gate window. I have tried two strategies and need help understanding what I've seen. I am wondering if what I want is possible with USB-6211. Any guidance would be appreciated.

 

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

 

strategy 1: edge count measurement

 

I can successfully read the number of signal pulses between gate rising edges by using a count edges channel with my gate defined as the external sample clock. However this also counts signal pulses in the period between gates. I tried two solutions to ignore the signal pulses that arrive while the gate is low.

 

I tried using the counter gate that I see documented in the USB-6211 pinout (CI.CountEdges.Gate.Enable), but daqmx tells me: "Specified property is not supported by the device or is not applicable to the task".

 

I tried using a pause trigger, but daqmx tells me: "Pause trigger is only valid for event counting if sample clock is not used".

 

strategy 2: pulse width measurement

 

From reading similar questions on NI community, I learned that it is possible to back out this information by doing a pulse width measurement using your pulsed signal source as an external time base. I have tried this, but daqmx tells me: "Device does not support this property". If I use an internal timer I get back the pulse width that I expect, but obviously that doesn't tell me anything about my signal.


Viewing all articles
Browse latest Browse all 1271

Trending Articles



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