© 2017 Thorlabs GmbH
5 Write Your Own Application
43
Braces ( { } ) enclose the parameter choices for a given command string. The braces are not
sent with the command string. A vertical bar ( | ) separates multiple parameter choices for a gi-
ven command string.
Triangle brackets ( < > ) indicate that you must specify a value for the enclosed parameter. For
example, the above syntax statement shows the range parameter enclosed in triangle brackets.
The brackets are not sent with the command string. You must specify a value for the parameter
(such as "CURR:DC:RANG 50E-6").
Some parameters are enclosed in square brackets ( [ ] ). The brackets indicate that the
parameter is optional and can be omitted. The brackets are not sent with the command string.
In this example [:DC] can be omitted, so the command string can be shortened to
“CURR:RANG 50E-6”. If you do not specify a value for an optional parameter, the power/ener-
gy meter chooses a default value.
Command Separators
A colon ( : ) is used to separate a command keyword from a lower-level keyword. You must in-
sert a blank space to separate a parameter from a command keyword. If a command requires
more than one parameter, you must separate adjacent parameters using a comma as shown
below:
"SYST:TIME 10, 34, 48"
A semicolon ( ; ) is used to separate commands within the same subsystem, and can also mini-
mize typing. For example, sending the following command string:
"CORR:BEAM 1; WAV 1310"
... is the same as sending the following two commands:
"CORR:BEAM 1"
"CORR:WAV 1310"
Use a colon and a semicolon to link commands from different subsystems. For example, in the
following command string, an error is generated if you do not use both the colon and semico-
lon:
"CORR:BEAM 1;:AVER 300"
Using the MIN and MAX Parameters
You can substitute MINimum or MAXimum in place of a parameter for many commands. For ex-
ample, consider the following command:
CURRent[:DC]:RANGe {MINimum|MAXimum|<numeric_value>[A]}
Instead of selecting a specific current range, you can substitute MIN to set the range to its mini-
mum value or MAX to set the range to its maximum value.
Querying Parameter Settings
You can query the current value of most parameters by adding a question mark (?) to the com-
mand. For example, the following command sets the operating wavelength to 1550 nm:
"CORR:WAV 1550"
You can query the operating wavelength by executing: "CORR:WAV?". You can also query the
minimum or maximum operating wavelength allowed as follows:
"CORR:WAV? MIN"
"CORR:WAV? MAX"
Caution
If you send two query commands without reading the response from the first, and then attempt
to read the second response, you may receive some data from the first response followed by
the complete second response. To avoid this, do not send a query command without reading