Reading the DIO pin at microsecond resolution

I’m trying to read a sensor on the DIO pin whose specs say that it will hold the pin low for 10 us (microseconds) per 10 cm. Embarrassingly, I’ve never had to read the DIO’s faster than a simple while loop and get would handle.

What’s the method in Labview for reading the DIO pins with microsecond accuracy?

For that kind of time scale you can use the counter methods. Our team used a sensor that has a similar conversion.

Configuration:

sensor_setup

Reading:
sensor_reading_snippet

1 Like

Cool. So in my case of 10us/cm, multiplying the period by 100000 would actually result in the Distance in cm. Thanks!

If you’re using an encoder (sounds like you’re probably not), there is actually an encoder library. I think it does some of the same things but there may be some differences.