semi-period counter

Does the semi-period mode in the counters actually measure period (that is, measuring between the ON edges of a digital signal), or does it measure pulse length (measuring the time the signal is OFF)?

I was about to wire up the trigger for some maxbotix SONAR when I realized that perhaps I could wire the entire thing to the digital sidecar, not the analog inputs. (That way there would be less noise, and there wouldn’t be the problem with sudden changes in distance).

Okay, I found a momentary push-button and made a test myself.
It does indeed measure the pulse width. Are there any specs on the accuracy?

Well, I either found the accuracy of the counter, or (more likely) I found the accuracy of the Digital Output “Pulse” function. It seems to be about 8 milliseconds longer than I tell it to be.
The Maxbotix Sonar sends a pulse width of distance (in) * 147 microseconds.

Anyways, for now I’ll just use Analog like usual, but I’d still like to get more info on the accuracy of the semi-period counter.

It can either measure the high pulse (rising edge to falling edge) or the low pulse (falling edge to rising edge). The Digital Module has a resolution of 6.525us. The counter IP has a resolution of 2us.

-Joe

I don’t have any idea what your test is, but it didn’t get anywhere near the correct results. Please try to describe your test.

-Joe

Oops, I’m sorry.
I was measuring low pulse, not the high pulse.
Yes, I confirmed accurate measurement down to 6 microseconds. This should do excellently.