Computer Operations
Computer Interface Commands and Operation
4
4-13
instances, a terminator is automatically transmitted by the host at the end of the
command string, for example, commands entered in BASIC.
Input String Examples
Below are four input string examples. Example 1 - Select function for channel 1 as
ohms, 30-k range, 2-wire connection.
FUNC 1, OHMS, 3, 2 <CR/LF>
Example 2 - Select function for channel 12 as temperature, using K-type thermocouple.
FUNC 12, TEMP, K <CR/LF>
Example 3 - Select function for channel 7 as temperature, using platinum RTD, 2-wire
connection -and- set a new R0 [0 as in zero] value on the same channel of 101.22.
FUNC 7, TEMP, PT, 2;RTD_R0 7, 101.22 <CR/LF>
Example 4 - Set the interval between scans to 10 minutes -and- start scanning -and-
return the most recent measurement values for all scanned channels.
INTVL 0, 10, 0;SCAN 1;LAST? <CR/LF>
Sending Numeric Values to the Instrument
Numeric values can be sent to the instrument as integers, real numbers, or real numbers
with exponents, as shown in the following examples:
+12345Sends the signed integer+12345
123.45Sends the real number123.45
1.2345E+2Sends the number -1.2345 x 102
How the Instrument Processes Output
The instrument outputs alphanumeric character strings in response to a query command
from the host. A query command always ends with "?" (see Tables 4-4 and 4-5). An
instrument output string is terminated by a CR/LF (carriage return/line feed). When the
host sends a string to the instrument, wait for the instrument to return a prompt before
sending another command string. If a second command is sent before the prompt is
returned, a device-dependent command error (!>) is generated and the second string is
ignored. The prompts are in one of three forms:
=> The command was executed.
[Example, PRINT 1]
!> The command was recognized but couldn’t be executed.
[Example, PRINT 3, which has no meaning]
?> The command was not recognized due to syntax error.
[Example, PRITN 1, spelling error]
Numeric outputs from the instrument are either integer values or scientific notation
values. For example:
The query command RANGE? returns the number 3.
The query command ALARMS? returns the number 0.
A measurement returns +1.2345E+6 (1.2345x106).