![Rohde & Schwarz CMW500 Series User Manual Download Page 183](http://html1.mh-extra.com/html/rohde-and-schwarz/cmw500-series/cmw500-series_user-manual_1477718183.webp)
Remote Control
R&S
®
CMW500
183
User Manual 1173.9463.02 ─ 02
Response buffers improve the efficiency of command macros containing queries. Similar
to command macros, the buffers are created at the beginning of a remote script. Buffers
remain valid until the active remote control connection is closed; they are not transferable
from one remote channel to another. It is possible though to assign buffers with the same
name (but generally different contents) to different connections.
See also
DCL, troubleshooting
A device clear (DCL) interface message does not deactivate the buffer. Errors in the
response buffers can be monitored using the status reporting system and the error queue
(
SYSTem:ERRor...?
).
6.8.1 Buffer Contents and Buffer Commands
Response buffers are defined and activated using a
STARt:BASE:BUFFer
'<BufferLabel>'
command. The buffer label serves as a reference in all other buffer
commands. It is possible to define several buffers, however, only one buffer can be active
at any time.
When a response buffer is active, the complete contents of the R&S CMW500's output
buffer are copied to the active buffer instead of being transferred over the remote inter-
face.
Every
program line in a command script containing queries generates a single new
buffer line. This includes the responses to system commands such as
SYSTem:ERRor?
. The queries are not stored together with the results.
Buffers may be temporarily deactivated, e.g. to exclude a response to
SYSTem:ERRor?
from the buffer. It is also possible to clear the buffer contents or delete
the buffer during program execution. The buffer contents can be read line by line. The
syntax of buffer commands follows general R&S CMW500 syntax rules; see
Memory size
The buffer size must not exceed 16
MB. When the maximum buffer size is reached, a
"Buffer Deadlock" error message is created and no additional data is appended to the
buffer. The previously stored data is retained.
6.8.2 Buffer Programming Example
The following example shows you how to work with response buffers. For a command
reference see
chapter 7.3.2, "Buffer Commands"
// Define a macro containing a query and create a buffer to record the responses
*RST; *CLS
*DMC 'Query_macro', 'SOURce:GPRF:GENerator:RFSettings:FREQuency $1; *WAI;
:SOURce:GPRF:GENerator:RFSettings:FREQuency?'
STARt:BASE:BUFFer 'Frequency_Buffer'
Response Buffers