The Read Data command allows data from a text file to be loaded into one or more application signals within Vehicle Spy.
The dialog box launched by double-clicking the Value field contains three tabs that let you select the file to read from, decide what data to read, and choose where to store it.
You will first see the leftmost tab, named Filename, which naturally is used to select the file to read data from (Figure 1).
You have two options to determine the filename:
Figure 1 shows the filename dynamically selected from the Read Data Filename application signal.
When checked, data will be stored in flash memory, if possible, instead of RAM.
Here you specify which line of the file you want to read, using an expression built with the Expression Builder. In Figure 2, we are choosing the line number based on the value of the Data Line application signal. You can also enter a static line number within the Expression Builder if you prefer.
In this tab you select one or more application signals into which to store the data that is read from the file.
If one signal is selected, it will be assigned the full contents of the line of data read. If multiple application signals are specified, then if the line of data read has multiple elements separated by commas, the line will be split using the commas as delimiters, with each element assigned sequentially to the application signals in the list. Figure 3 shows three application signals assigned to a Read Datacommand.
There are several buttons here for managing the application signal list, which are mostly self-explanatory: