R E M O T E O P E R A T I O N
Advanced Programming
32
MPS-8033
C H A P T E R
3
!
Advanced Programming
Once you have become familiar with the command syntax and structure, you may take advantage of
some programming shortcuts which are available. Due to the "tree−walking" capabilities of the 8033
software, you may elect to write command strings without constantly repeating the entire command
path for each command.
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 8033 output power and
then (2) read the reference power:
LAS:POW 500 UW; REF?
In this case, the path "LAS:" is ’remembered’ by the 8033 when the "REF?" query is sent. In the next
example, the "COND?" query cannot be found in the "LAS:" path so the internal software looks for
"COND?" at the next higher level (root level, in this case). The 8033 will 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 8033 will set the Condition Enable Register to 255 then readback 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 would produce the
desired effect:
ENAB:COND 255; :COND?
Consult Table 4.1 on page 39 when a command structure question arises.
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:
LAS:POW .1 MW; *CLS; REF .5 MW
In this example, the output power is set to 0 .1 mW, the status registers are cleared, and
the reference power is set to 0.5 mW.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Содержание MPS-8033 Series
Страница 3: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 9: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 11: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 13: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 23: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 53: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 103: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 107: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...
Страница 111: ...I N D EX iv MPS 8033 Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com ...