beautypg.com

Ocean Optics Jaz Scripting Language and Scripting Engine User Manual

Page 52

background image

A: Example Scripts

44

013-RD000-000-12- 201010

A script must have a name and a 3-digit version number. As the product evolves, new script engines will
be produced, so it is important that a script targeted for a later version is not sent to an earlier version
engine. The intention is that all script engines be backward compatible with version 1.0.0. The script
writer adjusts this version tag to guarantee a match between script engines and the script.

SCRIPT Simple_test_of_scriptor

Version 0.0.1

VARIABLES

//
// File to store the Spectrum that we get

//
testfile1 FILE "testfile1.txt" ASCII

//

// SPECTRAL variable for the spectrum that we get from the Spectrometer
//

testspectrum SPECTRAL

//

// Channel that we are getting the spectrum from
//

channel INT_16

//

// Button choice variable
//

choice INT_16

//

// Variable to hold the Integration Time
//

integrationtime REAL

END

//

// Start of the Script

//
START

//

// Set variables

//
channel := 0

integrationtime := 0.0004

//

// Set the display precision
//

SetDisplayPrecision(8,6)