EasyManua.ls Logo

Rohde & Schwarz CMW500 - Buffer Contents and Buffer Commands; Buffer Programming Example

Rohde & Schwarz CMW500
323 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Remote Control
R&S
®
CMW500
185User Manual 1173.9463.02 ─ 06
5.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 chap-
ter 6.3.2, "Buffer Commands", on page 201.
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.
5.8.2 Buffer Programming Example
The following example shows you how to work with response buffers. For a command
reference see chapter 6.3.2, "Buffer Commands", on page 201.
// 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'
// Execute the macro repeatedly, stop recording in order to query the number of
// buffer lines (3) and the buffer line contents
// (the responses should be 3 GHz, 2 GHz, 1GHz)
Query_macro 1 GHz
Query_macro 2 GHz
Query_macro 3 GHz
STOP:BASE:BUFFer
FETCh:BASE:BUFFer:LINEcount? 'Frequency_Buffer'
FETCh:BASE:BUFFer? 'Frequency_Buffer',3
FETCh:BASE:BUFFer? 'Frequency_Buffer',2
FETCh:BASE:BUFFer? 'Frequency_Buffer',1
// With stopped buffer, no further lines are appended.
// The line count query still returns 3.
Response Buffers

Table of Contents

Related product manuals