For instance, let's assume that you have 4 simulators connected through an X-ACT Bridge Controller, at addresses 0, 1, 3 and 5. A script may allow you to fire the simulators in any order, with any delay between them in a predictable and reproducible way.
A script is a text file stored in the Download folder of your tablet that contains a sequence of commands and optional delays. Here is an example which arms two simulators, fires them at 1 seconds interval and return them to Idle mode.
0 #1,0 #1,3 #2,3 #1,4 w 800 #2,4 w 4000 #1,2 w 1000 #2,2Here is what this script does:
Note that the delay programmed with command "w xxx" is an additional delay between commands and does not include the built-in delay between commands (about 200mS). The built-in delay is the time it takes for a command to travel to the simulator and the simulator's response to travel back to the app. In effect, the delay is measured between the response to a command and sending the next command.
The execution of a script is verified on the screen. The picture below shows the execution of the script above:
Figure 8: Example of script result
In the screen shot above, the app displays the response to commands ARM, FIRE and IDLE as a 4 character string. This indicates successful execution of the command. A command that cannot be executed would ellicit a response of "NAK", for Not Acknowledge.
Figure 9: Example of script editing
You can use these buttons to respectively insert a new record (the new record will be inserted in the cursor location, the rest of the script will be pushed down), delete a record, edit a record or save the new script, under the same name or under a new name.
You cannot create a new script from scratch or delete an existing script directly within the app but if you want to create a new script, it is easy to open the demo script, modify it and save it under a new name.
The scripts are saved in the Download folder which makes it easy to exchange scripts via email. Scripts sent via email attachment can be easily saved to the download folder and opened from within the X-ACT app.
Available commands:
The following is a list of the commands most commonly used with scripts:
Action | Example | Comments |
Idle Command | '#1,2' | Places the simulator at address 1 in Idle state |
Arm Command | '#1,3' | Places the simulator at address 1 in Armed state |
Fire Command | '#1,4' | Executes the firing sequence on simulator at address 1 |
Wait <xxx> mS | 'w <xxx>' | Maximum: 30000 milliseconds (30 seconds) |
The single quote characters ' are used to show the start and end of the command message. They should not be used in the script.
The "Help with Scripts" menu is useful to remind you of the available commands: