To save a bunch of typing, the following is copied verbatim from a post I made years ago:
While the thread is fresh and FWIW, I'd like to add my own additions to a counter/timer wishlist:
1. Hardware-reload of count register based on signal edge. Currently, the only feature that's fairly close is the "Z-index reload" feature for encoder position measurement. There are many limitations and at least one quirk as presently implemented.
A. It only works in "position measurement" (a.k.a. "encoder") mode. At minimum, it should also be supported in edge-counting mode provided the other limitations/quirks are addressed. I've done a lot of measurements with an encoder mounted to a step-and-dir stepper motor. The step-and-dir motor must be measured as an edge-counting task with hw-controlled direction. The encoder's z-index pulse CAN'T be used to hw-reload the count of the edge-counting task in sync with the encoder task. It'd be GREAT if it could. Hw-reload of count could also be useful in other counter tasks, especially pulse(train) generation. I can imagine some clever tricks in the other modes (such as period measurement) as well.
B. It must be programmed to be "active" only during a specific 1 of the 4 possible states of encoder channels A & B -- LL, LH, HL, HH. This works out fine for real-life encoders that supply their own z-index signal. However, I've had numerous occasions where I would have logically preferred to reset the count value based on some other system pulse signal (can you say "Limit switch"?). I'd have liked to say, "perform hw-reload on rising edge of Z-index signal regardless of A&B state". But no such designation exists. I'd rather have the choices {Low, High, Either} for both A & B config.
C. The Z-index signal must be hard-wired to the counter's default GATE pin on the 6602 board. I *think* but haven't verified that it's user-selectable on the M-series. Dunno if it supports just PFI inputs or also RTSI signals. I would like to see a next-generation Counter/Timer allow user-programmable inputs for Z-index as well as encoder A & B channels.
D. At least on the 6602, the Z-index behavior is STATE-driven rather than EDGE-driven. Z-index reload happens whenever A&B are in the programmed state and Z is High. I tested by hard-wiring the Z-index signal to +5V and my X4 quadrature task counted 0,1,2,3,0,1,2,3,0,1... I don't recall this being spelled out clearly in the documentation -- I remember expecting it to be sensitive to a rising edge rather than a high state. I would very much like the option of making the hw-reload sensitive to an EDGE -- ideally {Rising, Falling, Either}.
Note: wishlist item "1C" has been fulfilled in M-series counters and probably also in X-series which I haven't yet tried.
-Kevin P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Implemented in DAQmx 9.2.0 for X Series devices and 2nd generation cDAQ chassis (NOT the 9172).