This example program emulates a handheld pH meter, and is based on a previous DevZone example for Traditional NI-DAQ (Legacy).
The program reads in voltage values from a pH probe connected to an E Series or equivalent DAQ device, while displaying the current pH measurement in a digital display and a gradiated color box. The program also offers a calibration subsection that allows the user to calibrate the ph probe and a data logging subsection.
This VI reads in a voltage from a pH probe, converts the voltage value to a pH and then displays the pH on the front panel. The probe uses a default calibration factor, however you can use the calibration option to self calibrate the meter. The calibration settings are stored in a datalog file (calibrate.dlg) so that the meter will retain the new calibration.
LabVIEW 2009 or compatible
DAQmx 8.9.5 or compatible
Most NI DAQ devices, but may require additional signal conditioning hardware
Steps to Implement or Execute Code
Select the appropriate data acquisition device, channel, terminal configuration and sample rate for your pH probe.
Click the Calibrate button to create a scaling function for your data using a known pH value and corresponding voltage measurement.
Click Begin Logging Data/Stop Logging Data to start and stop logging pH data to the pHlogfile.txt file.