I need to measure two frequencies from a device. One is 30-90 kHz, and one is 1024 pulses per revolution. If the engine is not spinning, one of the counters will not sense a rising edge over the measurement period. This is on a real time system. I want to read the counter values at 10 Hz and then calculate values based on the change (or no change), in counter value. I have verified that counter 0 does measure pulses using NI MAX Test Panel. I have a few questions:
1. Can I make the counter task stop crying about no edges and just return 0, or do I need to handle the -200474 timeout error?
2. Is the period in the task setup the period of time that I want to count pulses? On a real time system can I assume the period is extremely accurate? The number of pulses that I count for speed is dependent on the duration of my read.
3. Is this function call returning frequency or the number of rising edges over my measurement period?
4. What would be the best method to implement this? Right now it looks like the 30-90 kHz clock is rolling over periodically so I get bad measurements from time to time, and I also have crappy resolution. I am getting measurements of 4,948 Nm (torque) or 5,015 Nm at 90 kHz precisely, when the measurement should be 5,000 Nm.