R&S
®
ZVA / R&S
®
ZVB / R&S
®
ZVT Programming Examples
Basic Tasks
Operating Manual 1145.1084.12 – 30 1084
// An appropriate condition in the remote control program must cause the controller to wait until *OPC?
returns one.
// The controller is stopped from the moment when the condition is set.
INITiate1:IMMediate; *OPC? // Start single sweep in channel no. 1, indicate the end of the sweep by a 1
in the output queue.
// So far the controller may still send messages to other devices on the GPIB bus.
<Condition OPC=1> // Stop the controller until *OPC? returns one (program syntax depends on your
programming environment).
<Continue program sequence>
//
// 3. Start single sweep, use *OPC
// If *OPC follows INITiate<Ch>[:IMMediate], it sets the OPC bit in the ESR after the sweep is
terminated.
// This event can be polled or used to trigger a service request of the analyzer.
// The advantage of *OPC synchronization is that both the controller and the analyzer can continue
// processing commands while the sweep is in progress.
*SRE 32 // Enable a service request for the ESR
*ESE 1 // Set event enable bit for operation complete bit
INITiate1::IMMediate; *OPC // Start single sweep in channel no. 1, set the OPC bit in the ESR after the
sweep is terminated.
// The controller may still send messages, the analyzer continues to parse and execute commands.
<Wait for service request> // Controller waits for service request from the analyzer (program syntax
depends on your programming environment).
<Continue program sequence>
Retrieving Measurement Results
Programming task: Read the results acquired in a single sweep.
//
// 1. Read single values (-> Markers)
// Markers are the most convenient tool for determining and retrieving single values on traces.
// The analyzer provides up to ten markers; see Markers and Limit Lines.
//
// 2. Read complete trace
// Select a trace format and read formatted trace data.
CALCulate1:FORMat MLINear // Calculate the linear magnitude of z
CALCulate1:DATA? FDATa // Read the formatted trace data
//
Use CALCulate<Chn>:DATA:NSWeep:FIRSt? to retrieve a particular trace within a group of
sweeps.