Creating Executable Program Scripts; Getting Started - Quantum Data 881 User Manual

Hide thumbs Also See for 881:
Table of Contents

Advertisement

Creating executable program scripts

Getting Started

128
Chapter 15 Script SDK
This sections provides information and procedures for using the ScriptSDK application.
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.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

882

Table of Contents