The script in a Script Type Function Block consists of a series of commands that instruct Vehicle Spy to perform certain actions. Each step in the script consists of one command, a set of parameters (if needed) and an optional comment.
Table 1 contains a list of all of the available commands for function block scripts. Each row has a short description of the command and the parameters associated with it, and includes a link to a page containing full details.
Command | Description | Parameters (Value Column) |
---|---|---|
Clear History | Clears the message history. | -- |
Clear Stats | Resets the statistical data for messages or networks. | Selection of whether to clear stats for one message, stats for one network, or all stats. |
Comment | Documents the script with an explicit comment. | -- |
CoreMini Action | Starts, stops, or downloads CoreMini scripts (.vs3cmb files) that run in ICS hardware while disconnected from a computer. | Action to perform, and for a download, the storage medium and CoreMini file to use. |
DAQ Action | Starts, stops, calls, saves data from, or waits for the completion of a VehicleScape DAQ Job. | Action to perform and DAQ job to act upon. |
Diag Job Action | Starts, stops, calls, saves data from, or waits for the completion of the specified Diagnostics Job. | Action to perform and diagnostic job to act on. |
Else | Marks the end of the commands executed when an If or Else If expression evaluates as True, and the start of those executed when that expression is False. | -- |
Else If | Combines an Else and If statement. Marks the end of the commands executed in a preceding If or Else If block, and the start of a new set of commands executed if a specified condition is True. | Conditional expression created with the Expression Builder. |
End If | Marks the end of an If / Else / Else If / End If control logic structure. | -- |
End Loop | Marks the end of a loop begun by the Start Loop command. | -- |
Function Block Action | Starts, stops, calls, triggers, or saves the data of a function block. | Action to perform and function block to act upon. |
Starts an If / Else / Else If / End If conditional logic structure, specifying an expression that, if it evaluates as True, causes the following commands to be executed until an Else, Else If or End If command is encountered. | Conditional expression created with the Expression Builder. | |
Jump If | Jumps to a specified step in the script if a specified condition is True; otherwise, continues with the next sequential step. | Step number and expression created with the Expression Builder. |
Jump To | Jumps to a specified step in the script. | Step number. |
Load Message Data | Loads hex data from a file into a transmit message. | File name, file start index, length, message name, message start index, and fast load option. |
Log Data | Logs selected data to a file or monitoring device. | File name, log type, data to log and optional parameters. |
neoVI PRO Action | (This command is deprecated.) | -- |
Pause | Displays a message to the user in a dialog box, then waits for a button click from the user to either continue or terminate the script. | A message for the user, which is created using the Expression Builder. |
Read Data | Reads data from a specified location in a file and stores it into one or more application signals. | Name of file, location in file to read from, and signal(s) to hold data. |
Set Value | Set the value of a signal in Vehicle Spy. | Expression defining signal to be set and value to be assigned. |
Set Value If | Combines an If and Set Value into a single command, assigning a value to a signal or variable and executing the following commands if an expression evaluates as True. This command guarantees that no signal values will change between evaluating the expression and making the assignment. | Conditional expression and assignment expression. |
Show Panel | Displays a specified graphical panel. | Graphical panel window and specific panel to show. |
Sleep | When run within a CoreMini script, forces the network interface hardware into a sleep state. Not valid for function blocks run in Vehicle Spy. | -- |
Start Loop | Starts a loop of steps that are repeated a number of times. | Number of iterations for the loop, which can be a simple integer or an expression. |
Stop | Ends the function block. | -- |
Test DTC | Tests a received J1939 message for DTCs and copies the DTC information to an application signal. | Receive message to test, DTCs to look for, application signal to store the data, and other settings. |
Text API | Sends a Text API command. | Text API string created using the Expression Builder, optional application signal to receive the string and optional remote server. |
Transmit | Transmits a message. | Transmit message to send. |
Wait For | Waits a specified amount of time before moving to the next step. | Number of seconds to wait, specified either numerically or through an expression. |
Wait Until | Waits until the desired condition is True, then moves on to the next script step. | Expression created with the Expression Builder. |