Data Logger and Controller using CompactDAQ and LabVIEW
Overview
Data logger and controller using CompactDAQ and LabVIEW. An automotive test lab needed a general data logger and digital controller to perform tests on their products. The system needed to monitor thermocouples, accelerometers, voltages, and a rotary encoder. Low and high limits needed to be assigned to the analog inputs, and if the measured value exceeded the limits the software would report a fault. The software had to also control digital outputs. The software needed to turn on and off digital outputs for a user specified time in a user specified sequence. Each digital output needed to controlled independently.
The customer wanted to use off the shelf data acquisition hardware to reduce costs and standardize the hardware in the lab. The hardware also needed to be able to measure different signal types i.e. thermocouples, thermocouples, and voltages.
The software needed to be able to add additional features to accommodate changing test requirements.
Solution
We developed a custom LabVIEW application using NI Compact DAQ hardware. A CompactDAQ system has a chassis that is connected to a PC through USB or Ethernet, and then populated with one or more conditioned I/O modules that provide direct sensor connectivity.
Example of CompactDAQ Hardware
The software easily allowed the user to set up a test. The user could set up the measurement and control channels and then save the settings to file. The user could save different measurement setups and load those setups for the respective part they needed to test.
The software also allowed the user to create sequences of digital outputs. The user could define a step time when certain digital outputs were on or off. The user was also able to create a group of sequences so multiple cycles of groups could be run.
The user had the ability to define limits on each of the analog inputs. When a measured value fell above or below the specified limit a fault would be generated.
Features
Main Screen
The main screen allowed the user to view the current measured values with respect to time. Controls were also available to start, record, stop acquiring and sequencing. The user could navigate to all the sequence, limits, and settings dialogs. Indicators were developed to show where the software was in the sequence. The user could also save and load test setups from the main screen.
Main Screen
Setup Options
This is the dialog screen that allows the user to set up the software. From the setup dialog the user could specify the test options and all the hardware channel address and properties. We used an object oriented approach that allows us to add or remove groups of options easily if the software needed to expand.
Setup Dialog
Hardware Setup
Shown here is how the user can set up Voltage channels. The user can set the channel name, physical hardware address, full scale value of the channel, engineering units, and calibration options.
Hardware Setup
Hardware Setup Calibration
This is an example of the analog input hardware channel calibration. The user can enter data from the calibration sheet directly into the table. A graph is plotted to make sure the entered values were correct.
Calibration Dialog
Sequence Editor
The sequence editor allowed the user to set up a sequence on a digital output. The user could specify what digital output to control, what would trigger the start of the sequence (button push or external digital input), and what would happen when a sequence ended. The user had the ability to add steps to a sequence. Each step would hold the digital output at a defined state for a specified time. The software would run though the steps the number of cycles entered. Up to 4 sequences could be run independently of each other.
Sequence Editor
Limits
The limit dialog allowed the user to specify fault limits on hardware channels. Shown below is the limits for the Analog Inputs. The channel names set up in the settings dialog are loaded into the channel names of the limit dialog. The user can specify a digital output channel to activate if the limit is exceeded. The user was able to modify the limit dialog while the test was running.
Limit Dialog
Data File
The data from the test was saved as a comma delimited file (CSV). This file format can be read by any analysis program such as excel.
Result
Data Logger and Controller using CompactDAQ and LabVIEW allowed the customer to easily measure and control the test they were running. The user interface was easy and intuitive to use requiring minimal operator training. The code was modular and written to current LabVIEW coding guidelines allowing future feature additions. This program was written over many years. The customer needed to add features as new test requirements were needed. We were able to keep adding functionality without re-writing the code. Because we used a modular architecture we were able to save the customer a lot of software development costs.
Let's build an application together. Contact us today
- Learn how we do a project
- Lean about PC based data acquisition
- Learn more about CompactDAQ
- Learn more about LabVIEW
- Learn about other test systems we have done for automotive customers