SC01 LABVIEW FILE REFERENCE V1.0

This file provides a short description of the main files included in the SC01 LabVIEW project.


TOP-LEVEL VIS

SC01 Control.vi
- This is the vi needed to communicate with the scanner. Almost all other vi's are just helpers for this vi.
- Queue-driven driver for communicating with an SC-01 pressure scanner over TCP. Receives SC01 Command Message.ctl commands through Command In Queue and returns SC01 Data Message.ctl messages through Data Out Queue.

SC01 Example.vi
- User-facing example showing how to use SC01 Control.vi. Provides buttons for connecting, querying status/device info, starting/stopping streaming, taring/resetting tare, charting live pressure data, and optional CSV logging.


CTLS

SC01 Command Message.ctl
- Public command message typedef used to send commands into SC01 Control.vi.

SC01 Data Message.ctl
- Public data message typedef used to receive connected state, streaming state, device information, status, errors, and pressure batches from SC01 Control.vi.

SC01 Update Message.ctl
- Internal update message typedef used inside SC01 Control.vi to pass messages from the Comms / Parser Loop to the Data Output Loop.

SC01 Packet Type.ctl
- Internal packet type enum used by the packet extraction/parsing code.

SC01 Tare State.ctl
- Internal cluster storing tare offsets, tare active state, start tick, accumulator, and sample count.


SUB_VIS

SC01 Process RX Buffer.vi
- Processes the accumulated TCP RX buffer. Extracts complete packets, parses known packet types, applies tare, and publishes internal update messages.

SC01 Read Available Bytes.vi
- Performs non-blocking TCP reads and returns bytes currently available from the TCP connection.

SC01 Send Basic Command.vi
- Sends a basic SC-01 command over TCP using the command sub-ID.

SC01 TCP Read Exact.vi
- Helper TCP read utility.

SC01 Try Extract Next Packet.vi
- Attempts to extract one complete SC-01 packet from the RX buffer while preserving incomplete bytes for the next loop iteration.


HELPERS

SC01 Apply Tare.vi
- Applies tare offsets to pressure samples. Timestamp column is unchanged; pressure columns have tare offsets subtracted.

SC01 Build Basic Command.vi
- Builds a basic SC-01 command packet from a command sub-ID.

SC01 CRC 16 CCITT False.vi
- Calculates the CRC-16/CCITT-FALSE checksum used by SC-01 command packets.

SC01 Format Latest Pressure Sample.vi
- Formats the latest sample from a pressure batch into a 1D string array for display in SC01 Example.vi.

SC01 Parse Device Packet.vi
- Parses a device information packet into serial number, model name, firmware version, and related fields.

SC01 Parse Pressure Packet.vi
- Parses a pressure packet into a 2D DBL pressure batch array. Each row is one sample: Timestamp, P1, P2, P3, P4, P5, P6, P7, P8.

SC01 Parse Status Packet.vi
- Parses a status packet into streaming state, TCP connected state, sample rate, and related status fields.

SC01 Pressure Batch To Chart Rows.vi
- Converts pressure batch rows from Timestamp + P1-P8 into P1-P8 chart rows for waveform chart display.

SC01 Read LE SGL.vi
- Reads a little-endian 32-bit floating point value from a U8 byte array.

SC01 Read LE U32.vi
- Reads a little-endian unsigned 32-bit integer from a U8 byte array.