The Data Logging can be separated into 5 parts:
If data logging isn't started, the main loop will run every 0.5 seconds.
1. Create Channel List
This part creates a list of channels, where the data is written. There are two options to select the necessary channels:
- 'Use Buttons':
With this option, the user can choose the targets (SF1, SF2, ...), modules (HeatSink, CHP, ...) and signal types (temperature, flow, ...) in the GUI, the channel list is then automatically created by a SubVI. - 'Use Channel List':
With this option, the user can choose the signals he wants to log in a .csv file by marking the signals with an 'x'. - Additional signals can be stored as well, if the channel path is known to the user by typing in the channel and the name, the signal should be stored by.
2. Prepare Logging file
In this part, the user input (file path and name, logging time, ...) are processed, the logging file gets created and the header written.
3. Data Logging
This part writes the signals from the VeriStand project to the .csv file.
If the sample rate is > 1s, the loop will run every second (in order to prevent a long duration for shutdown) and write every x-th iteration. If the sample time is below 1s, the loop will run at the sample rate.
The data logging will stop when:
- the data logging time is exceeded (this will also automatically undeploy the project)
- the user clicks at 'Stop Datalogging'
- the project gets undeployed
- an error occurs
4. Stop Data Logging
This part resets the data logging
5. GUI setup
In this part, the GUI will be changed according to the user input, e.g. which targets are used or which option is chosen to define the channels that should be stored.