03-22-2018 03:09 PM
Hello:
I'm using NI PCIe-6220 DAQ on Ubuntu 17.20 with comedi driver. I'm trying to set it up to read one line TTL signal from an RPM sensor (ROS). Thus I have two questions:
Thank you.
03-22-2018 09:20 PM
I know nothing about the comedi driver and what it does/doesn't support. But I know general capabilities of the board from programming with LabVIEW on Windows using the DAQmx driver.
1. I'm no help for C code or the comedi driver.
2. Those 6 terminal labels don't map to distinct counter inputs at the hardware level. One would mainly think in terms of signals labeled A,B, and Z when hooking up an incremental encoder because those are the signal names are in common use for encoders.
The SRC signal is the one that will cause the count register to increment. When you want to count edges, configure and edge-counting task and connect to the SRC terminal.
GATE is tougher to pin down because it can serve different purposes. I think of it as a kind of control input, but the nature of the control it exerts depends on other aspects of how the task is configured. It could be a "pause trigger" (kind of an enable/disable on counting), a sample clock, or a trigger. I'd guess that you want to measure the frequency of your RPM sensor; if so, you would configure a frequency measurement task and wire to the GATE terminal.
-Kevin P