Appendix A API Commands
ChartScan User’s Manual A-47
Q - Set Query Terminator
TYPE
System
EXECUTION
Deferred
SYNTAX
Qresp,
hll,
scan,
block,
sep
Set the query terminators with the following parameters: resp is the
response terminator, hll is the channel terminator, scan is the terminator
which follows each scan output, and block is the terminator which follows
each trigger block output.
sep determines whether or not a separator character should be used. Valid
options for sep are: 0 - Place no separators in returned buffered scan data
when it is read, and 1 - Place a separator whose value is determined by the
current Set User Terminator (V) command setting into the returned buffer
data when it is read.
Q?
Query current terminator settings.
DESCRIPTION
The Set Query Terminator (Q) command is used to set the following query terminators:
resp: This argument specifies the response terminator for general purpose queries issued by the controller.
These queries are queries that do not request High/Low/Last or Acquisition Buffer data. This terminator is us ed
in all query responses unless the query refers to data in the High/Low/Last registers or the Acquisition Buf fer. In
these cases, these types of queries have separate terminators as described below.
hll: This argument specifies the channel terminator to be used for queries which request data residing in the
High/Low/Last registers. When this terminator is specified, the terminator will be inserted between each channel
response when a High/Low/Last register query request is made. The queries that request High/Low/Last register
data are U4, U5, U13, and R#. Remember, the Read Last Readings (R#) command is an HLL register query.
scan: This argument specifies the terminator which will follow each scan that is output when a query request is
made for Acquisition Buffer data. When a query request is made for Acquisiti on Buffer data, this terminator will
be used to terminate each scan as it is output to the interface. This will be true except for the last scan in the
block. In this case, the trigger block terminator will be used to terminate the scan and the block. The only query
command which requests Acquisition Buffer data is the Read Buffered Data (R) comm and.
block: This argument specifies the terminator which will follow each trigger block that is output when a query
request is made for Acquisition Buffer data. When a query request is made for Ac quisition Buffer data, this
terminator will be used to terminate each trigger block as it is output to the interface. This terminator will be in
effect during Read Buffer Data (R) commands. It should be noted that the last scan in the t rigger block to be
output will be terminated by the defined trigger block terminator rather than the scan terminator.
Each of the above four arguments may be defined with one of the following terminator types, where USER is the
user-defined terminator corresponding to the numeric (ASCII) value val, as defined by the Set User Termi nator
(V) command:
Terminator Type
Terminator Description
IEEE-488
Serial
0
(None)
(None)
1
CR LF/EOI
CR LF
2
CR LF
CR LF
3
LF CR/EOI
LF CR
4
LF CR
LF CR
5
CR/EOI
CR
6
CR
CR
7
LF/EOI
LF
8
LF
LF
9
USER/EOI
USER
10
USER
USER
sep: This argument specifies whether or not a separator character should be placed between each returned
reading in the buffer scan data. This field will be in effect during Read Buffer Data (R) commands. The value of
this field is interpreted as follows: 0 - Place no separators in returned buffered scan data when it is read, and 1 -
Place a separator, whose value is determined by the current Set User Terminator (V) command setting, into the
returned buffer data when it is read.