Sending commands and queries, Sending multiple commands and queries per line – Quantum Data 802BT User Manual

Page 112

Advertising
background image

102

Chapter 7

Using GPIB Interface

Sending commands and queries

The generator parses command lines one at a time. Command lines must be terminated

with a carriage return (<cr>).The generator immediately echoes each character as it is

received and places it in a command line buffer. This buffer currently has room for a total of

256 characters. If more than 256 characters are sent before sending a <cr>, then the

following response will be given:

Buffer overflow<cr><lf><cr><lf>R:\>

Upon receiving a carriage return, the generator immediately echoes the <cr> and follows it

with a line feed (<lf>). The generator then parses the command line and initiates whatever

processing is implied. The generator then responds with one of the following four

responses depending on the condition:

Command invalid<cr><lf><cr><lf>R:\>

<message1><cr><lf><message2><cr><lf>...<messageN><cr><lf><cr><lf>R:\>

Execution error: <nnnn><cr><lf><cr><lf>R:\>

R:\>

Where <cr> and <lf> are the carriage return and line feed characters, respectively.

Note: Handshaking routines should only look for > and not R:\>. In the future, the R:\ part

of the prompt may change (for example, may be expanded to indicate the current path).

Bench-top generators output the following prompt on their serial port after finishing the

power-on procedure.

R:\>

This feature allows ATE systems to know when the generator is ready.

Sending multiple commands and queries per line

You cans send multiple commands and queries per line by separating each command or

query with a semi-colon (;) character. For example:

HTOT 900; ALLU

The response to multiple queries will be a series of data elements separated by

semi-colons (;). For example, with the VGA_m3 format loaded, the following command

string will produce the response shown.

HRES

?;

VRES

?;

VTOT

?

640;480;525

Normally, all of the commands on a command line associated with a single command

terminator are read as a single command message without regard for execution or

completion order. However, by inserting the *WAI command, you can force the generator

Advertising
This manual is related to the following products: