Script Type Function Block Command: Read Data

Command Description

The Read Data command allows data from a text file to be loaded into one or more application signals within Vehicle Spy.

Value Field Parameters

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.

Filename Tab

You will first see the leftmost tab, named Filename, which naturally is used to select the file to read data from (Figure 1).

Dynamic File Name / Use Text File

You have two options to determine the filename:

Figure 1 shows the filename dynamically selected from the Read Data Filename application signal.

Fast Access for CoreMini

When checked, data will be stored in flash memory, if possible, instead of RAM.


Figure 1: Read Data command parameters - Filename Tab

File Line to Read Tab

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.


Figure 2: Read Data command parameters - File Line to Read Tab

Storage Signal Tab

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:


Figure 3: Read Data command parameters - Storage Signal Tab


  Spy Documentation - (C) Copyright 1997-2022 Intrepid Control Systems, Inc.