The objective of this project is to develop a data acquisition application in LabVIEW that communicates with a virtual temperature sensor simulator based on Arduino Micro.
The application should implement:
The device simulates three temperature sensors. Measurement packets are transmitted over a serial port every 100 ms.
Some packets intentionally contain transmission errors:
The application must detect and distinguish different error types.
| Bytes | Content | Type | Size | Description |
|---|---|---|---|---|
| 0–2 | 's' 'n' 'p' |
char[3] | 3 B | Synchronization header |
| 3 | X | uint8 | 1 B | Number of float values in the packet |
| 4–7 | TEMP1 | float32 | 4 B | Temperature sensor 1 |
| 8–11 | TEMP2 | float32 | 4 B | Temperature sensor 2 |
| 12–15 | TEMP3 | float32 | 4 B | Temperature sensor 3 |
| 16–19 | TIME | float32 | 4 B | Time elapsed since startup [s] |
| 20–21 | CHKSUM | uint16 | 2 B | Checksum |
The total size of a valid packet is 22 bytes.
The transmission is implemented as a continuous binary data stream. If an error occurs, synchronization may be lost.
The application must not assume that every 22 received bytes form a valid packet.
Every valid packet begins with the sequence:
s n p 115 110 112 0x73 0x6E 0x70
The application should:
snp header,The checksum is calculated as the sum of the first 20 bytes of the packet.
U8.U16.CHKSUM value.73 6E 70 04 41 A0 00 00 41 9C 00 00 41 A8 00 00 40 20 00 00 03 D5
| Data | Value |
|---|---|
| TEMP1 | 20.0 °C |
| TEMP2 | 19.5 °C |
| TEMP3 | 21.0 °C |
| TIME | 2.5 s |
The first 20 bytes must be summed:
73 + 6E + 70 + 04 + ...
The calculated value should match:
03 D5
73 6E 70 04 41 A0 00 00 41 9C 00 00 41 A8 00 00 40 20 00 00 00 00
This packet should be classified as: checksum error.
73 6E 70 04 41 A0 00
This packet should be classified as: incomplete packet.
The application should display:
Valid packets: X (A %) Checksum errors: Y (B %) Incomplete packets: Z (C %)
Valid measurements must be saved into a CSV file:
Time,Temp1,Temp2,Temp3
Time format:
HH:MM:SS.xx
The filename should be provided by the user. The application must prevent accidental file overwriting.
The application should support:
| Mode | Description |
|---|---|
| Read mode | Display the complete dataset immediately |
| Simulation mode | Replay measurements with real-time timing |
Missing samples should be reconstructed using linear interpolation.
Example:
5.1 s → 20.0 °C 5.2 s → missing 5.3 s → 22.0 °C
Interpolated value:
5.2 s → 21.0 °C
| Stage | Tasks |
|---|---|
| 1 | UART communication setup |
| 2 | Frame synchronization and packet reception |
| 3 | Checksum and error handling implementation |
| 4 | Binary data decoding |
| 5 | GUI and plot implementation |
| 6 | State Machine and Event Structure implementation |
| 7 | CSV export implementation |
| 8 | Archived data loading |
| 9 | Simulation mode implementation |
| 10 | Testing and optimization |
| Project element | Points |
|---|---|
| UART configuration | 10 |
| Frame synchronization | 10 |
| Checksum verification | 10 |
| Error type recognition | 10 |
| float32 decoding | 10 |
| Data visualization | 10 |
| State Machine + Event Structure implementation | 10 |
| CSV export | 10 |
| Data loading and simulation | 10 |
| Code readability and organization | 10 |
| Total | 100 |
| Feature | Bonus points |
|---|---|
| Automatic COM port detection | +5 |
| Transmission timeout handling | +5 |
| Limiting the number of samples displayed on plots | +5 |
| PNG export of plots | +5 |