SC-01 LABVIEW TCP DRIVER V1.0

This source distribution provides LabVIEW files for communicating with an Aerosensor SC-01 pressure scanner over TCP.

--------------------------------------------------------------------------------------------------------------------------------------------------------
Before using these LabVIEW files, first download AeroDAQ for Windows or Mac from:
https://info.aerosensor.tech

Use AeroDAQ to configure and verify the SC-01 network settings, TCP port, and sample rate. 
Confirm that the scanner is works correctly in AeroDAQ via TCP before attempting to connect from LabVIEW.
Once these values are saved you will not need to open AeroDAQ unless you wish to change sample rate or connection settings.

To use these files in your own LabVIEW project, copy the entire SC01_LabVIEW folder into your project.
The file/folder names and hierarchy should not be changed to avoid having to relink vi's.

These files are intended to be adapted and integrated into your own LabVIEW projects.
You are free to modify the example and driver files as needed, but changes to typedefs, queue message formats, or VI connector panes may require corresponding updates elsewhere.
--------------------------------------------------------------------------------------------------------------------------------------------------------


BASIC USE

0. Download and install AeroDAQ from https://info.aerosensor.tech.
1. Use AeroDAQ to configure the SC-01 IP address, TCP port, sample rate and save your settings to the device.
2. Confirm that the scanner connects and streams correctly in AeroDAQ via TCP. More detailed instructions are available in the SC-01 User Manual on our website.
3. Open SC01 Example.vi.
4. Enter the SC-01 IP address and TCP port configured in AeroDAQ.
5. Run the VI.
6. Click Connect.
7. Click Get Device Info and Get Status.
8. Click Start Sampling to begin pressure streaming.
9. Use Tare Pressures to perform a 1-second tare while streaming.
10. Use Reset Tare to clear tare offsets.
11. Optionally select a .csv file path and enable logging.

For integration into another LabVIEW system, use SC01 Control.vi directly with the queue-based API.
Create a Command In Queue using SC01 Command Message.ctl and a Data Out Queue using SC01 Data Message.ctl, wire both into SC01 Control.vi, enqueue commands,
and consume data messages from the output queue.


INFORMATION

The main driver is SC01 Control.vi, which connects to the scanner using TCP and exposes a queue-based command/data interface intended for integration into existing LabVIEW systems.

SC01 Example.vi shows a simple user-facing implementation of the driver.
It demonstrates connecting to the scanner, requesting device information and status, starting and stopping pressure streaming, taring pressures, resetting tare, viewing live pressure data,
charting pressure channels, and optionally writing pressure batches to a CSV file.

The driver uses queues as the SC-01 continuously streams pressure data at high sample rates.
Commands are sent into SC01 Control.vi using SC01 Command Message.ctl, and parsed output data is returned using SC01 Data Message.ctl.
This avoids relying on a single ever-growing pressure array and allows user applications to process, display, or log pressure batches as required.

Pressure data returned by the driver is already tared.
If no tare has been applied, the tare offsets are zero and the output is the raw pressures.
Each pressure batch is a 2D DBL array where each row is one pressure sample, with timestamp in milliseconds and pressures in Pascals:
Timestamp, P1, P2, P3, P4, P5, P6, P7, P8


INTEGRATION

SC01 Command Message.ctl is used to send commands to SC01 Control.vi.

Common commands:
- Connect
- Disconnect
- Get Device Info
- Get Status
- Start TCP Stream
- Stop Stream
- Tare
- Reset Tare
- Shutdown

The Connect command also carries the IP Address and Port fields.


SC01 Data Message.ctl is used to receive data from SC01 Control.vi.

Public data fields:
- Connected
- Streaming
- Last Error
- Serial Number
- Firmware Version
- Model Name
- Sample Rate (Hz)
- Pressure Batch

Data Type indicates which fields are valid for a given message.
