Set query terminator – Measurement Computing TempScan/1100 User Manual
Page 244

A-48 API Command Reference
889897
TempScan / MultiScan User’s Manual
Q
- Set Query Terminator
TYPE
System
EXECUTION
Deferred
SYNTAX
Qresp,
hll,
scan,
block,
sep
Set the query terminators via the following parameters:
resp
is the response
terminator,
hll
is the channel terminator,
scan
is the scan terminator, and
block
is the Trigger Block terminator.
sep
is the separator terminator which 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 data output terminators via the following parameters –
resp
,
hll
,
scan
,
block
, and
sep
. Each of the first four arguments may be defined with one of the following
terminator types, where
USER
is the user-defined User Terminator corresponding to the ASCII decimal value
val
, as defined by the Set User Terminator (
V
) command:
Terminator
Type
Terminator Description
Terminator
Type
Terminator Description
IEEE-488
Serial
IEEE-488
Serial
0
(None) (None)
1
CR LF/EOI
CR LF
6
CR CR
2
CR LF
CR LF
7
LF/EOI LF
3
LF CR/EOI
LF CR
8
LF LF
4
LF CR
LF CR
9
USER/EOI USER
5
CR/EOI CR
10
USER USER
The first argument
resp
specifies the response terminator for general purpose queries which do not request
High/Low/Last or Acquisition Buffer data. The second argument
hll
specifies the channel terminator to be used
for High/Low/Last (HLL) Registers query requests. The third argument
scan
specifies the terminator which will
follow each scan that is output for Acquisition Buffer query requests, except when following the last scan in the
Trigger Block. In this case, the next argument
block
specifies the terminator which will follow each Trigger
Block. The last argument
sep
specifies whether or not a reading separator character should be placed between
each returned reading in the Acquisition Buffer scan data. Like the
USER
terminator, this separator is a user-
defined User Terminator with the ASCII decimal value
val
, set via the Set User Terminator (
V
) command.
For more information on terminators, see section Data Format Configuration in the chapter System Configuration.
EXAMPLE
PRINT#1,"OUTPUT07;C1-2,1X"
‘ Configure two channels for Type J thermocouples
PRINT#1,"OUTPUT07;F0,0X"
‘ Configure Engineering Units, degrees C
PRINT#1,"OUTPUT07;Q7,7,0,0,0X"
‘ Set the
resp
and
hll
terminators to
LF/EOI
PRINT#1,"OUTPUT07;Q?X"
‘ Get the current query terminators
PRINT#1,"ENTER07"
Q07,07,00,00,00
‘ Screen shows the current query terminators
PRINT#1,"OUTPUT07;U13X"
‘ Request the last readings
PRINT#1,"ENTER07"
‘ Get reading for Channel 1
INPUT#1 A$
+0104.20
‘ Screen shows reading
PRINT#1,"ENTER07"
‘ Get reading for Channel 2
INPUT#1 A$
+0010.40
‘ Screen shows reading
PRINT#1,"OUTPUT07;Q7,0,0,0,0X"
‘ Now set the
resp
terminator only to
LF/EOI
PRINT#1,"OUTPUT07;U13X"
‘ Request the last readings
PRINT#1,"ENTER07"
‘ Get readings for Channels 1 through 4
INPUT#1 A$
+0104.20
+0010.40
' Screen shows readings for Channels 1 and 2
together, instead of one at a time