EasyManua.ls Logo

Quantum Data 881 - Creating Executable Program Scripts; Getting Started

Quantum Data 881
1144 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
128 Chapter 15 Script SDK
Creating executable program scripts
This sections provides information and procedures for using the ScriptSDK application.
Getting Started
The following are the important points to keep in mind when creating executable scripts:
Naming files
Return values on exit
Enabling output
Softkey functions
These are described in the following subsections.
Naming the file and the executable script
The executable script will have the same base name as the source file. This name must
be lower-case, and it should be 8 characters or less in length. This name must be
appended to "Script_" to name the function.
For example, for an executable script called "demo" the source file will be demo.cpp. The
main function will be Script_demo(), and the resulting object file will be demo.o. The "load
& execute" command will send this object file to the generator, and it will be visible in the
Scripts menu as "demo."
Returning “true” on exit
The script's main function (e.g., Script_demo() ) must return "true" on exit. As in any C or
C++ program, it is okay to have multiple return points. Refer to the sample programs for
examples.
Enabling output to a serial terminal
By executing the CIOY command sc.Exec("CIOY"); you can enable output to the serial
terminal for debugging and/or status output via printf(). You can connect a simple serial
terminal (such as Hyperterm running on a PC). Serial port settings default to 9600 baud, 8
bits, no parity, 1 stop bit, no handshake. The required DB-9 null cable is included with all
880 series generators.

Table of Contents

Related product manuals