API Command Reference Appendix A
A-38 NetScan Users Manual
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 terminat or
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 iss ued by the controller.
These queries are queries that do not request High/Low/Last or Acquisition Buffer data. This t erm inator is used
in all query responses unless the query refers to data in the High/Low/Last registers or the Ac qui s ition Buffer. In
these cases, these types of queries have separate terminators as described bel ow.
hll: This argument specifies the channel terminator to be used for queries which request dat a res iding in the
High/Low/Last registers. When this terminator is specified, the terminator will be inserted bet ween each c hannel
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 f or Acquisition 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 Dat a (R) c ommand.
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 i s made for Acquisition 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 las t scan in the trigger 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 S et User Terminator
(V) command:
Terminator Type
Terminator Description
0
(None)
1
CR LF
2
CR LF
3
LF CR
4
LF CR
5
CR
6
CR
7
LF
8
LF
9
USER
10
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) comm and setting, into the
returned buffer data when it is read.