10
GPIB PROGRAMMING
DETAILED COMMAND LIST
In all of the commands listed here, i, j and k are
integer values and f, t and v may be integer,
floating point or exponential notation. Optional
parameters are enclosed in curly brackets. In
general, if optional parameters are omitted then
the current value of those parameters will be
sent back to the GPIB controller. For example,
the command "TM 3" sets the Trigger Mode to
mode 3 while the command "TM" will return
the response "3".
Command errors will be reported in the Error
Status Byte. The controller should verify that
the Error Status Byte is zero after each
command is sent: a nonzero value indicates a
programming problem. When an error is
detected, all of the pending commands in the
communication buffer are cancelled.
Also, blanks are ignored, case is ignored,
multiple commands may be sent on one line if
separated by semicolons. All responses are
terminated by a carriage return and line feed.
The line feed is sent with an EOI.
INITIALIZATION COMMANDS
CL
Clear instrument. The communication buffers
are cleared and the default settings are recalled.
The instrument default settings are:
Trig:
Trigger mode set to
Single-Shot (ie. triggers
are off)
Internal:
The default trigger rate is
10,000 Hz
Burst Mode:
Trigger rate = 10,000Hz, 10
pulses per burst and 20
periods per burst.
External:
+1VDC, positive slope,
high impedance
termination.
Delays:
All delays, A, B, C and D
are linked to T0 and set to
zero.
Outputs:
All outputs are set to drive
high impedance loads to
TTL levels.
GPIB:
The GPIB address is not
affected, but the terminator is
returned to its default value of a
carriage return and a line feed with
an EOI.
GT{i}{,j}{,k}
Specify one to three ASCII codes, which will
terminate each response from the DG535. The
default terminator for any response from the DG535
is a carriage return and a line feed. The line feed is
accompanied by an EOI. Example: to change the
terminator to line feed only, the command would be
"GT 10" (the ASCII code for line feed is 10
decimal). The EOI is always sent with the last
character of the terminator sequence.
STATUS COMMANDS
ES
Returns the Error Status byte. The error status byte
definition is given below. Example: if a command
was sent to the DG535 with too many parameters,
bit 1 would be set. If the ES command is used to
read the error status, and no other errors had
occurred, the value "2" would be returned. All bits
in the Error Status byte are latched and so will
remain set until the "ES" command is executed. All
bits are reset to zero after the "ES" command is
executed.
ES i
Returns bit i of the Error Status Byte. Example: the
command "ES 5" can be used to check for a delay
range error. If a delay range error had occurred since
the last ES or ES 5 commands had been sent, then a
"1" would be returned, otherwise the value "0"
would be returned. This command also resets the
error bit that is being checked.
ERROR STATUS BYTE DEFINITION
Bit Description
7
Always zero
6
Recalled data was corrupt
5
Delay range error
4
Delay linkage error
3
Wrong mode for the command
2
Value is outside allowed range
1
Wrong number of parameters
0
Unrecognized
command