Advanced Programming - ILX Lightwave OMM-6810B User Manual

Optical power and wavelength meter
Table of Contents

Advertisement

3
C H A P T E R

Advanced Programming

Once you are familiar with the command syntax and structure, you may wish to
take advantage of some programming shortcuts which are available. Due to the
"tree-walking" capabilities of the 6810B firmware, you may elect to write command
strings without constantly repeating the entire command path for each command.
It may be necessary to review Table 4.1 for the following discussion.
The first command in the string must have it's entire path entered. Once a
command level is reached, other commands which are at the same level (or
higher level) may then be entered without repeating the entire path. To
accomplish this, a semicolon (;) must be used to separate the commands in the
string. The command following the semicolon need not specify its full path, if the
same path which was previously used could be used for the new command.
For example, the following legal command string could be used to (1) set the
6810B to display wavelength in nanometers and then (2) read the wavelength
reference point.
"WAVE:MODE NM; REFERENCE?"
In this case, the path "WAVE:" is 'remembered' by the 6810B when the
"REFERENCE" command is sent. Otherwise, the 6810B would proceed up the
command tree looking for a command until it reaches the root level. An error is
generated if the command cannot be found.
Care must be taken to avoid errors which are caused by trying to implement
commands from the wrong path or level. For example, the following command
string is intended to (1) set the device Condition Enable Register and (2) read the
device Condition Register:
"ENAB:COND 255; COND?"
Instead, the 6810B sets the Condition Enable Register to 255 then reads back the
Condition Enable Register rather than the Condition Register. Placing a colon (:)
before a command forces the parser to begin looking for the command at the root
level. The following example produces the desired effect.:
"ENAB:COND 255; :COND?"
The only exception to the rule described above is when common commands are
used. Common Commands may be injected between other commands at the
same level. The following command string is legal:
"WAVE:MODE CM; *CLS; REF 632.8 NM"
42
OMM-6810B
G P I B / I E E E 4 8 8 . 2 R E M O T E O P E R A T I O N
Advanced Programming
Note: CONSULT TABLE 4.1 WHEN A COMMAND STRUCTURE QUESTION ARISES.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents