EasyManua.ls Logo

Rohde & Schwarz CMW500 1201.0002K50 - Macro Contents and Macro Commands; Macro Programming Examples

Rohde & Schwarz CMW500 1201.0002K50
291 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
181User Manual 1173.9463.02 ─ 02
Queries in macros, response buffers
A query in a macro sequence suspends program execution until the controller has
retrieved the response. The R&S CMW500 provides response buffers to avoid delays;
see chapter 6.8, "Response Buffers", on page 182.
6.7.1 Macro Contents and Macro Commands
Macros are defined using the IEEE 488.2 common command *DMC '<MacroLabel>',
<MacroSequence>. Alternatively, they can be loaded from a macro file using
MMEMory:LOAD MACRo '<MacroLabel>', '<FileName>'. The macro label
(<MacroLabel>) serves as a reference in a command script or in other macro com-
mands.
The contents of the macro (<MacroSequence>) can be defined in different formats:
The common command *DMC supports entries in IEEE 488.2 block data format with
defined or indefinite length. "#0" introduces a data block of indefinite length. *GMC?
returns the macro contents in block data format.
See also "Block Data Format" on page 133.
As an alternative, *DMC accepts strings with a maximum length of 1023 characters.
Macro files can contain several command lines, in accordance with SCPI syntax
rules.
Memory size
The block data size of any single macro (and the size of a macro file) must not exceed
1 MB. The R&S CMW500 can process macros with a combined size of up to 16 MB.
6.7.2 Macro Programming Examples
The following examples show you how to use macros, macro parameters, and macro
files. For a command reference see chapter 7.3.1, "Macro Commands", on page 196.
Macro handling using common control commands
// Reset the instrument, define a macro to set the GPRF generator frequency
// to 1 GHz, query the contents of the macro (should be
// #247SOURce:GPRF:GENerator:RFSettings:FREQuency 1GHz) and the macro label
*RST
*DMC 'SetFrequency', 'SOURce:GPRF:GENerator:RFSettings:FREQuency 1 GHz'
*GMC? 'SetFrequency'
*LMC?
// Query the GPRF generator frequency, enable macro execution and
// execute the macro. Check whether the R&S CMW has actually changed
// the generator frequency
SOURce:GPRF:GENerator:RFSettings:FREQuency?
Command Macros

Table of Contents

Related product manuals