Overview This example explains how to use a Parallax Ping))) Ultrasonic Range Sensor with a DAQmx device and a small bit of external circuitry to complete a range measurement.
Description: The circuit used in this example allows one counter generate a accurate pulse while the other can make an accurate pulse width reading. The function of the diode is to keep the CNTR 0 output (while it is holding the signal to ground) from draining the response from the PING))) sensor. The added 10k resistor to ground keeps the signal from floating since the CNTR 0 drain is removed. The CNTR 1 gate can then freely monitor the signal line for a pulse width.
Steps to implement or execute code To implement this example:
Define the Physical channels for counter input and output to be used
(optional) Set the rest of the parameters as needed
Run the VI
(Optional) Turn on the Highlight Execution to see the flow of the VI
To execute this example:
Install the required software.
Connect the DAQ hardware that supports the counter features
Confirm the connection with the MAX with TestPanel
Open the VI and refer the Implement Steps
Requirements Software LabVIEW 2012 or compatible NI-DAQmx 16.0 or compatible
Hardware cDAQ with C series Counter Module
**This document has been updated to meet the current required format for the NI Code Exchange.**