Overview
MultiThreaded application to read, graphically display and write serial port data to a spreadsheet file.
Description
This VI creates a multithreaded application that reads continuous packet data transferred over a specified Serial (COM) port while continuously displaying the data graphically and writing the data to a file. In this example, the data is from an accelerometer with a fixed packet length. The contents of the packet are Header, Data, CheckSum (comma delimited HEX values)
[4bytes][XData][YData][ZData][CHKSUM]
Once the Data is read from the COM port it is put into a thread safe queue for the second thread to process it.
Requirements
- LabVIEW 2013 (or compatible)
- Serial Instrument
Steps to Implement or Execute Code
- Create a serial packet like the example below from the serial instrument.
Serial Packet from serial instrument: FFAADDFF,5D,A6,55,CHKSUM
2. Configure the serial instrument by inputting strings below the Waveform Chart.
3. Check the Packet Data indicator and Chart.
Additional Information or References VI Block Diagram
VI Snippet
**This document has been updated to meet the current required format for the NI Code Exchange.**
Applications/Systems/Test
National Instruments | AWR Group