beautypg.com

Query – Measurement Computing TempScan/1100 User Manual

Page 258

background image

A-62 API Command Reference

889897

TempScan / MultiScan User’s Manual

?

- Query

TYPE

System

EXECUTION

Immediate

SYNTAX

?

Query the present configuration or mode of the command preceding the

?

DESCRIPTION

Most commands have a corresponding query command formed by appending the question mark (

?

) command

extension. Stored in the output queue until the PC/IEEE 488 controller retrieves them, query command
responses consist of the present configuration or mode of the previously-executed command. When appropriate,
these query command responses take the form of a command string which, if it were executed, would put the unit
into the configuration it was in when the query was executed.

For example, the Set User Terminator (

V

) command query

V?

gives its response in the following form:

Vval

where

0

<

val

<

255

. This response is in the form of the previous Set User Terminator (

V

) command and, if it is

sent to the unit, it would set the user-defined User Terminator to the same value that it had when the query was
issued.

Query commands are immediate. However, even though query commands generate their responses as soon as
they are interpreted, before any other commands including the Execute (

X

) command, they must still be followed

by this Execute (

X

) command for proper termination. Any number of query commands can be combined into one

command string to create a specialized status command that responds with only the information of interest for a
given application. Query command responses are always fixed-length strings in a pre-defined format.

For more information on command execution, see section Command Interpretation at the beginning of this
chapter, and see command Execute (

X

).


EXAMPLE

PRINT#1, “OUTPUT07; V1X V?X”

‘ Get the response of the current User Terminator

PRINT#1, “ENTER07”

‘ Retrieve response

INPUT A$

PRINT A$

V1

‘ Screen shows the current User Terminator

V1

PRINT#1, “OUTPUT07; V0X V?X”

‘ Change the User Terminator and get response

PRINT#1, “ENTER07”

‘ Retrieve response

INPUT A$

PRINT A$

V0

‘ Screen shows new User Terminator

V0

PRINT#1, “OUTPUT07; V4 V?X”

‘ Change User Terminator and get response, without using

the intermediate Execute (

X

) command

PRINT#1, “ENTER07”

‘ Retrieve response

INPUT A$

PRINT A$

V0

‘ Screen still shows the

V0

because the immediate

command

V?

was executed before the deferred

command

V4

PRINT#1, “OUTPUT07; V?X”

‘ Again get the response of the current User Terminator

PRINT#1, “ENTER07”

‘ Retrieve response

INPUT A$

PRINT A$

V4

‘ Screen shows new User Terminator

V4

This manual is related to the following products: