beautypg.com

Commands and queries, Overview – Teledyne LeCroy X-STREAM OSCILLOSCOPES Remote Control User Manual

Page 13

background image

C

H A P T E R

O

N E

:

Overview

WM-RCM-E Rev D

ISSUED: February 2005

7

T

T

I

I

P

P

:

: The response to a query can be a useful

way of generating a command that is known to

be correct, and the response can be copied
straight into your program.

A query causes the oscilloscope to send a response message. The control program should read this message with
a ‘read’ instruction to the GPIB or LAN interface of the controller.

The response message to the above query might be: TIME_DIV 10 NS

The portion of the query preceding the question mark is repeated as part of the response message. If desired,

this text can be suppressed with the command: COMM_HEADER.

Depending on the state of the oscilloscope and the computation to be done, several seconds may pass before a

response is received. Command interpretation does not have priority over other oscilloscope activities.

The general form of a command or a query consists of a command header,

, optionally followed by

one or several parameters, , separated by commas:

[?] ,...,

The notation [?] shows that the question mark is optional (turning the command into a query).

There is a space between the header and the first parameter.

Use commas between parameters.

The terminator is not shown because usually it is automatically added by the interface driver routine writing to

GPIB.

T

T

I

I

P

P

:

: Set the controller I/O timeout conditions

to three or more seconds to give the scope time
to respond. An incorrect query will not get a

response; and, if Remote Control Assistant is
enabled, a beep will sound.

Following are examples of how program messages are made up of commands and queries.

GRID DUAL This program message consists of a single command that instructs the oscilloscope to display a

dual grid.

BUZZ BEEP; DISPLAY OFF; DATE? This program message consists of two commands, followed by a

query. They instruct the oscilloscope to beep once, turn off the display, and then ask for the current date. Again,
the terminator is not shown.

DATE 15,JAN,1993,13,21,16 This command instructs the oscilloscope to set its date and time to 15 JAN 1993,
13:21:16. The command header DATE indicates the action, the 6 data values specify it in detail.