Anritsu Site Master S331L Scpi Programming Manual

Anritsu Site Master S331L Scpi Programming Manual

Handheld cable and antenna analyzer
Hide thumbs Also See for Site Master S331L:
Table of Contents

Advertisement

Quick Links

SCPI Programming Manual
S331L Site Master™
Handheld Cable and Antenna Analyzer
Anritsu Company
Part Number: 10580-00322
490 Jarvis Drive
Revision: F
Morgan Hill, CA 95037-2809
Published: March 2022
USA
Copyright 2022 Anritsu Company
http://www.anritsu.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Site Master S331L and is the answer not in the manual?

Questions and answers

Summary of Contents for Anritsu Site Master S331L

  • Page 1 SCPI Programming Manual S331L Site Master™ Handheld Cable and Antenna Analyzer Anritsu Company Part Number: 10580-00322 490 Jarvis Drive Revision: F Morgan Hill, CA 95037-2809 Published: March 2022 Copyright 2022 Anritsu Company http://www.anritsu.com...
  • Page 2 NOTICE Anritsu Company has prepared this manual for use by Anritsu Company personnel and customers as a guide for the proper installation, operation and maintenance of Anritsu Company equipment and computer programs. The drawings, specifications, and information contained herein are the property of Anritsu Company, and any unauthorized use or disclosure of these drawings, specifications, and information is prohibited;...
  • Page 3: Table Of Contents

    Table of Contents Chapter 1—General Information About this Manual ..........1-1 Introduction .
  • Page 4 Table of Contents (Continued) Chapter 3—All Mode Commands Chapter 4—Cable & Antenna Analyzer Mode Commands Appendix A—Examples C/C++ ........... . . A-1 Visual Basic .
  • Page 5: Chapter 1-General Information

    The commands are organized by measurement mode starting in Chapter This manual is intended to be used in conjunction with the Site Master S331L User Guide. Refer to the instrument user guide for general information about the instrument, including equipment setup and operating instructions.
  • Page 6 1-3 Remote Operation Setup and Interface Chapter 1 — General Information USB Interface, Type Mini-B The USB 2.0 Mini-B device connector is used to connect the instrument directly to a PC. The first time the instrument is connected to a PC, the normal USB device detection by the computer operating system takes place.
  • Page 7: Chapter 1-General Information

    Chapter 1 — General Information 1-3 Remote Operation Setup and Interface 4. Select to allow the Wizard to search for and install the USB software automatically. Figure 1-2. USB Found New Hardware Wizard 5. After the software installs, close the Wizard by clicking Finish. Figure 1-3.
  • Page 8: Ethernet Interface Connection And Setup

    Chapter 1 — General Information Ethernet Interface Connection and Setup The Site Master S331L fully supports the IEEE-802.3 standard. Most Site Master functions (except power On/Off) can be controlled via an Ethernet connection to a PC that is connected directly (with an Ethernet cross-over cable) or through a network.
  • Page 9: Connectivity

    Site Master LAN Connections The S331L requires the use of an external USB-Ethernet dongle, such as Anritsu part number 2000-1810-R, to connect the Site Master to a local area network (LAN). Integrated into this dongle are two LEDs (Light Emitting Diodes). The amber LED indicates the speed of the LAN connection (ON for 100 Mb/s and OFF for 10 Mb/s), and the green LED flashes to show that LAN traffic is present.
  • Page 10: Sending Scpi Commands

    1-4 Sending SCPI Commands Chapter 1 — General Information Sending SCPI Commands SCPI commands can be sent to the instrument through any Virtual Instrument Software Architecture (VISA) controller. VISA is a commonly used API in the Test and Measurement industry for communicating with instruments from a PC. The physical connection between the PC and the instrument is USB or Ethernet.
  • Page 11 Chapter 1 — General Information 1-4 Sending SCPI Commands 2. Verify that the USB Settings list the correct Manufacturer, Model, and Serial Number, as shown in the example below. Figure 1-5. NI VISA Interactive Control USB Configurations / Settings Tab S331L PM PN: 10580-00322 Rev.
  • Page 12 3. Select the Input/Output Basic I/O tab and execute the default *IDN? Query. If the PC is connected to the instrument the command returns the following information from the Buffer: manufacturer name (“Anritsu”), model number/options, serial number, and firmware package number, as shown in the example below.
  • Page 13: Ethernet Connectivity

    Chapter 1 — General Information 1-4 Sending SCPI Commands Ethernet Connectivity 1. On the PC, run NI Measurement & Automation Explorer or VISA Interactive Control and create a new LAN Resource under Network Devices. Add the TCP/IP resource using a Manual Entry of Raw Socket, as shown in the example below.  ...
  • Page 14 1-4 Sending SCPI Commands Chapter 1 — General Information 2. Enter the IP address that the instrument has acquired (go to System, Status, Connectivity Info). Enter the port number as 9001, as shown in the example below.   Figure 1-8. NI VISA Interactive Control LAN Resource Settings of IP Address and Port Number Figure 1-9.
  • Page 15 Chapter 1 — General Information 1-4 Sending SCPI Commands 3. Select the Configuration I/O settings tab and verify that the Termination Methods are set as shown in the example below. Figure 1-10. NI VISA Interactive Control LAN Resource I/O Termination Method Settings S331L PM PN: 10580-00322 Rev.
  • Page 16 4. Select the Input/Output Basic I/O tab and execute the default *IDN? Query. If the PC is connected to the instrument the command returns the following information from the Buffer: manufacturer name (“Anritsu”), model number/options, serial number, and firmware package number, as shown in the example below.
  • Page 17: Chapter 2-Programming With Scpi

    Introduction to SCPI Programming Anritsu instruments can be operated with the use of SCPI commands. SCPI is intended to give the user a consistent environment for program development. It does so by defining controller messages, instrument responses, and message formats for all SCPI compatible instruments.
  • Page 18: Scpi Common Commands

    2-2 Introduction to SCPI Programming Chapter 2 — Programming with SCPI SCPI Common Commands Some common commands are defined in the IEEE-488.2 standard and must be implemented by all SCPI compatible instruments. These commands are identified by the asterisk (*) at the beginning of the command keyword.
  • Page 19: Subsystem Commands

    Chapter 2 — Programming with SCPI 2-3 Subsystem Commands Subsystem Commands Subsystem commands control all instrument functions and some general purpose functions. All subsystem commands are identified by the colon used between keywords, as in :INITiate:CONTinuous. The following information is provided for each subsystem command described in the following chapters.
  • Page 20: Hierarchical Command Structure

    2-3 Subsystem Commands Chapter 2 — Programming with SCPI Long Format vs. Short Format Each keyword has a long format and a short format. The start frequency can be specified by :SENSe:FREQuency:STARt or :SENS:FREQ:STAR. The capital letters in the command specification indicate the short form of the command.
  • Page 21: Query Commands

    Chapter 2 — Programming with SCPI 2-3 Subsystem Commands :CONFigure :ACPower :OBWidth :CHPower :OTA :DEMOD :Pfail :FSTRength :MEASure :PVTFrame :MENU :PVTSlot :S11 :1PHASEe :SPECTRUM :SMCHart :MULTi :VSWR :SINGle :SUMMARY :VNA Figure 2-2. SCPI :CONFigure Subsystem A colon (:) separates each subsystem. For example, the command :SENSe:FREQuency:STARt <freq>...
  • Page 22: Data Parameters

    2-3 Subsystem Commands Chapter 2 — Programming with SCPI Data Parameters Data parameters, referred to simply as “parameters,” are the quantitative values used as arguments for the command keywords. The parameter type associated with a particular SCPI command is determined by the type of information required to control the particular instrument function.
  • Page 23: Notational Conventions

    Chapter 2 — Programming with SCPI 2-4 Notational Conventions Notational Conventions The SCPI interface standardizes command syntax and style that simplifies the task of programming across a wide range of instrumentation. As with any programming language, the exact command keywords and command syntax must be used. Unrecognized commands or improper syntax will not function.
  • Page 24: Notational Examples

    2-5 Notational Examples Chapter 2 — Programming with SCPI Notational Examples Table 2-4 provides examples of valid command syntax: Table 2-4. Creating Valid Commands Command Specification Valid Forms The following all produce the same result: [:SENSe]:FREQuency:STARt <frequency>{Hz|kHz|MHz|GHz} :SENSe:FREQuency:STARt 1 MHZ :SENS:FREQ:STAR 1 MHZ :sense:frequency:start 1000000 :FREQ:STAR 1000 KHZ...
  • Page 25: Formatting Conventions

    Chapter 2 — Programming with SCPI 2-6 Formatting Conventions Formatting Conventions This manual uses the conventions listed below in describing SCPI commands. The abbreviations “Cmd” and “Param” are used to represent “Command” and “Parameter”. Table 2-5. Formatting Conventions Commands are formatted to differentiate :COMMands:LOOK:LIKE:THIS them from their description.
  • Page 26 2-6 Formatting Conventions Chapter 2 — Programming with SCPI 2-10 PN: 10580-00322 Rev. F S331L PM...
  • Page 27: Chapter 3-All Mode Commands

    Chapter 3 — All Mode Commands The commands in this section apply to all instrument modes. *IDN? Query Description: Provides information about the device. Return format: Anritsu,<model-number>/<options>,<serial-number>,<package-version > Example: To get device information: *IDN? *OPC? Query Description: Blocks the SCPI engine from receiving new commands until system completes all pending operations.
  • Page 28: Base:directory:make <"Directory

    Chapter 3 — All Mode Commands :BASe:DIRectory:MAKe <"directory"> Cmd Description: Create a directory. Param Type: String Param Description: Directory path Example: To create a directory: :BAS:DIR:MAK "/internal/folder1/" :BASe:FILe:COPY <"source-filename">, <"destination-filename"> Cmd Description: Copy an existing file to another filepath. For USB drives, ensure /usb/ or /usb2/ is correctly used as the root folder.
  • Page 29: Configure:base:poweroff 0|1

    Chapter 3 — All Mode Commands :CONFigure:BASe:POWeroff 0|1 Cmd Description: Command cycles the power to the instrument (0) or turns it completely off (1). Cycling the power does not save the current setup (instrument will restart with last saved setup) whereas turning the instrument off will store the current setup.
  • Page 30: Instrument:catalog:full

    Chapter 3 — All Mode Commands :INSTrument:CATalog:FULL? Query Description: Queries the available modes. ’CAA’2 for Advanced Cable Antenna Analyzer mode, ’Power Meter’6 for Power Meter, ’HI_PM’10 for High Accuracy Power Meter, ’cCAA’201 for Classic Cable Antenna Analyzer mode, ’VIP’202 for Visual Inspection Probe Example: To query available application modes: :INST:CAT:FULL? :INSTrument:NSELect <application-mode-number>...
  • Page 31: Mmemory:load:state 1,<"Filename

    Chapter 3 — All Mode Commands :MMEMory:LOAD:STATe 1,<"filename"> Cmd Description: Recall the given setup file. Param Type: Integer, String Param Description: Param1: Must send 1 as first parameter, Param2: Filepath with extension. Example: To recall a setup (include extension): :MMEM:LOAD:STAT 1, "/internal/temp.stp" :MMEMory:LOAD:TRACe 1,<"filename">...
  • Page 32: Mmemory:store:trace ,<"Filename

    Chapter 3 — All Mode Commands :MMEMory:STORe:TRACe <integer>,<"filename"> Cmd Description: Stores the trace data and settings into a file with specified type. Param Type: Integer, String Param Description: Param1: An integer representing the file type where 1 or 0 : Measurement file (default), 5: Text (only valid in CAA), 6: CSV (only valid in CAA), Param2: Filepath without extension.
  • Page 33: System:mbtemperature

    Chapter 3 — All Mode Commands :SYSTem:MBTemperature? Query Description: Query returns motherboard temperature in degree C. Example: To query motherboard temperature: :SYST:MBT? :SYSTem:OPTions? Query Description: Query returns option string delimited by "/". Example: To query full option string: :SYST:OPT? :SYSTem:PRESet Cmd Description: Presets the application to its default state.
  • Page 34: [:Sense]:Base:net:manual:gateway <"Default-Gateway

    Chapter 3 — All Mode Commands [:SENSe]:BASe:NET:MANual:GATEway <"Default-Gateway"> [:SENSe]:BASe:NET:MANual:GATEway? Cmd Description: Command sets the static Gateway. Query Description: Query returns the static Gateway in string format. Param Type: String Param Description: Default Gateway Example: To set static Gateway: :BAS:NET:MAN:GATE "192.35.101.1" [:SENSe]:BASe:NET:MANual:IP <"IP-address">...
  • Page 35: [:Sense]:Base:net:mode:manual:restart

    Chapter 3 — All Mode Commands [:SENSe]:BASe:NET:MODE:MANual:RESTart Cmd Description: Command sets the Ethernet configuration to static (manual) and restarts the instrument. Example: To set the Ethernet configuration to static (manual) and trigger a restart: :BAS:NET:MODE:MAN:REST [:SENSe]:BASe:REMote 0|1|2 Cmd Description: Command sets instrument into local lock-out for remote operation. Send 0 is to get out of remote mode and restore front-panel operation, 1 to set remote mode with synchronous communication, and 2 to set remote mode with asynchronous communication.
  • Page 36: [:Sense]:Base:time

    Chapter 3 — All Mode Commands [:SENSe]:BASe:TIME <time-in-seconds> [:SENSe]:BASe:TIME? Cmd Description: Command sets the time. Send a -1 to synchronize the system time with GPS. Query Description: Query returns value that represents the number of seconds from 1/1/1970. Param Type: Integer Param Description: Number of seconds from 1/1/1970 Default Units: s(seconds) Example: To set the time to 3:09 on January 5, 2012:...
  • Page 37: Chapter 4-Cable & Antenna Analyzer Mode Commands

    Chapter 4 — Cable & Antenna Analyzer Mode Commands The commands in this section apply to the Cable and Antenna Analysis mode. :CALCulate#:DATA? FDATa|SDATa|FMEM|SMEM Query Description: Query returns formatted data block of the specified trace. Param Range: FDATa|SDATa|FMEM|SMEM Example: To query trace 1 S-data: :CALC1:DATA? SDATA Notes: Replace ’#’...
  • Page 38: Calculate#:Limit:lower:segment:add

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :CALCulate#:LIMit:LOWer:SEGMent:ADD <StartX><StopX><StartY><StopY> Cmd Description: Command adds a segment to the lower limit line. Param Type: Float Default Units: X units: Hz for Frequency domain, m or ft for Distance domain; Y units: same as current active trace y-axis units Example: To add a lower limit segment from 1MHz to 1GHz with value 20 dB for trace 1:...
  • Page 39: Calculate#:Limit:lower:segment:start:x

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :CALCulate#:LIMit:LOWer:SEGMent:STARt:X <value> :CALCulate#:LIMit:LOWer:SEGMent:STARt:X? Cmd Description: Command sets the lower limit line X start value for current segment. Query Description: Query returns the lower limit line X start value for active segment. Param Type: Float Default Units: Hz for Frequency domain, m or ft for Distance domain, s for Time domain...
  • Page 40: Calculate#:Limit:lower:segment:stop:y

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :CALCulate#:LIMit:LOWer:SEGMent:STOP:Y <amplitude> :CALCulate#:LIMit:LOWer:SEGMent:STOP:Y? Cmd Description: Command sets the lower limit line Y stop value for active segment. Query Description: Query returns the lower limit line Y stop value for active segment. Param Type: Float Default Units: Current active trace y-axis units Example: To set limit stop amplitude to 20 dB for trace 1:...
  • Page 41: Calculate#:Limit:lower[:State] Off|On|0|1

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :CALCulate#:LIMit:LOWer[:STATe] OFF|ON|0|1 :CALCulate#:LIMit:LOWer[:STATe]? Cmd Description: Command sets the low limit line state for the specified trace. Query Description: Query returns the lower limit line state for the specified trace. Param Range: OFF|ON|0|1 Default Value: OFF|0 Example: To set limit on for trace 1: :CALC1:LIM:LOW ON...
  • Page 42: Calculate#:Limit:upper:segment:edit

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :CALCulate#:LIMit:UPPer:SEGMent:EDIT <StartX><StopX><StartY><StopY> Cmd Description: Command edits the upper limit active segment. The active segment index must be updated when adding/deleting a segment. Param Type: Float Default Units: X units: Hz for Frequency domain, m or ft for Distance domain; Y units: same as current active trace y-axis units Example: To edit the active segment and set it to 1MHz to 1GHz with value 20 dB for trace 1:...
  • Page 43: Calculate#:Limit:upper:segment:stop:x

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :CALCulate#:LIMit:UPPer:SEGMent:STOP:X <value> :CALCulate#:LIMit:UPPer:SEGMent:STOP:X? Cmd Description: Command sets the upper limit line X stop value for active segment. Time units are available only if option 2 is installed. Query Description: Query returns the upper limit line X stop value for active segment. Param Type: Float Default Units: Hz for Frequency domain, m or ft for Distance domain, s for Time domain...
  • Page 44: Calculate#:Limit:upper:y

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :CALCulate#:LIMit:UPPer:Y <amplitude>{dB,s|ms|ns|ps} :CALCulate#:LIMit:UPPer:Y? Cmd Description: Command sets the upper limit line value. In group delay mode, the value is in units of time. Query Description: Query returns the upper limit line value. Param Type: Float Default Units: Current active trace y-axis units Example: To set limit amplitude to 20 dB for trace 1:...
  • Page 45: Calculate:limit:message

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :CALCulate:LIMit:MESSage OFF|ON|0|1 :CALCulate:LIMit:MESSage? Cmd Description: Command sets the limit message state. Displays a Pass/Fail message to indicate whether the trace crosses the limit line. Query Description: Query returns the limit message state. Param Range: OFF|ON|0|1 Default Value: OFF|0 Example: To set limit message on:...
  • Page 46: Calculate:limit:upper:segment:active

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :CALCulate:LIMit:UPPer:SEGMent:ACTive <Index> Cmd Description: Command sets the given upper segment index active. Param Type: int Example: To set upper segment 1 active: :CALC:LIM:UPP:SEGM:ACT 1 :CALCulate:LIMit:VALue <amplitude>{dB} :CALCulate:LIMit:VALue? Cmd Description: Command sets the limit line value. Query Description: Query returns the limit line value.
  • Page 47: Calculate:marker#:Peak:bounded

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :CALCulate:MARKer#:PEAK:BOUNded Cmd Description: This command sets specified marker to the trace peak value between two markers. Markers 5 and 7 will search for the peak between markers 1 and 2. Markers 6 and 8 will search for the peak between markers 3 and 4.
  • Page 48: Calculate:marker#:Valley

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :CALCulate:MARKer#:VALLey Cmd Description: This command sets specified marker to the trace valley value. Example: To set marker 5 to the valley of the trace: :CALC:MARK5:VALL Notes: Replace ’#’ with the required marker number. Check User Guide for the number of supported markers in each mode.
  • Page 49: Calculate:marker#:Y

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :CALCulate:MARKer#:Y? Query Description: Query returns the amplitude value for the specified marker. Example: To query marker 3 amplitude value: :CALC:MARK3:Y? Notes: Replace ’#’ with the required marker number. Check User Guide for the number of supported markers in each mode.
  • Page 50: Calculate:marker:preset

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :CALCulate:MARKer:PRESet Cmd Description: Presets markers. Example: To preset markers: :CALC:MARK:PRES :CALCulate:MATH:FUNCtion NONE|SUBTraction|ADDition|AVERage :CALCulate:MATH:FUNCtion? Cmd Description: Command sets the trace math function. NONE - no trace math applied; SUBT - memory trace subtracted from active trace; ADD - memory trace added to active trace;...
  • Page 51: Calculate:transform:distance:cabloss { Db/M,Db/Ft

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :CALCulate:TRANsform:DISTance:CABLoss <cable-loss>{ dB/m,dB/ft} :CALCulate:TRANsform:DISTance:CABLoss? Cmd Description: Command sets the cable loss. Verify that the appropriate unit is used. Query Description: Query returns the cable loss based on the current units. Param Type: Float Default Value: 0 Default Units: dB/m Example: To set cable loss to 2:...
  • Page 52: Calculate:transform:distance:start { M|Cm|Mm,Ft

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :CALCulate:TRANsform:DISTance:STARt <distance>{ m|cm|mm,ft} :CALCulate:TRANsform:DISTance:STARt? Cmd Description: Command sets the start distance. Verify the appropriate unit is used. Query Description: Query returns the start distance in the current units. Param Type: Float Param Description: Distance Default Units: m(meter) Example: To set start distance to 1 m:...
  • Page 53: Calculate:transform:distance:window Rectangular|Mslobe|Nslobe|Lslobe

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :CALCulate:TRANsform:DISTance:WINDow RECTangular|MSLobe|NSLobe|LSLobe :CALCulate:TRANsform:DISTance:WINDow? Cmd Description: Command sets the window type for time domain. Query Description: Query returns the window type for time domain. Param Type: Character Param Range: RECTangular|MSLobe|NSLobe|LSLobe Default Value: NSLobe Example: To set time domain window type to rectangular: :CALC:TRAN:DIST:WIND RECT :CAPTure:STARt...
  • Page 54: Configure:measure:display Single|Dual

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :CONFigure:MEASure:DISPlay SINGle|DUAL :CONFigure:MEASure:DISPlay? Cmd Description: Command sets the display format to single or dual traces. Only supported in Advanced Cable & Antenna Analyzer mode. Query Description: Query returns the display format. Only supported in Advanced Cable & Antenna Analyzer mode.
  • Page 55: Display:window:trace:state Trace|Memory|Both

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :DISPlay:WINDow:TRACe:STATe TRACe|MEMory|BOTH :DISPlay:WINDow:TRACe:STATe? Cmd Description: Command sets the trace display type for the active trace. TRAC - only active trace is shown; MEM - only memory trace is shown; BOTH - both active and memory traces are shown.
  • Page 56: Display:window:trace:y[:Scale]:Top {Db

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :DISPlay:WINDow:TRACe:Y[:SCALe]:TOP <amplitude>{dB} :DISPlay:WINDow:TRACe:Y[:SCALe]:TOP? Cmd Description: Command sets the display top value. Query Description: Query returns the display top value. Param Type: Float Default Value: Return Loss = 0dB; DTF Return Loss = 0dB; Cable Loss = 0dB; VSWR = 3;...
  • Page 57: Initiate#:Data? Fdata|Sdata|Fmem|Smem

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :INITiate#:DATA? FDATa|SDATa|FMEM|SMEM Cmd Description: Command triggers a sweep and returns the data block of the specified trace at the end of sweep. If the system is in continuous mode, then this command is ignored.
  • Page 58: Source:power Low|High

    Chapter 4 — Cable & Antenna Analyzer Mode Commands :SOURce:POWer LOW|HIGH :SOURce:POWer? Cmd Description: Command sets the source power level. Default is high. Query Description: Query returns the source power level, LOW or HIGH. Example: To set source power to low: :SOUR:POW LOW :STATus:OPERation? Query Description: Queries sweep status.
  • Page 59: [:Sense]:Application:tst:result

    Chapter 4 — Cable & Antenna Analyzer Mode Commands [:SENSe]:APPLication:TST:RESult? Query Description: Query returns self-test details. The self-test command (See [:SENSe]:APPLication:TST? [NORMal]) must be sent before getting the self-test details. Example: To retrieve application self-test result: :APPL:TST:RES? Notes: The response begins with an ASCII header. The header specifies the number of following bytes.
  • Page 60: [:Sense]:Correction:collect:info:status

    Chapter 4 — Cable & Antenna Analyzer Mode Commands [:SENSe]:CORRection:COLLect:INFO:STATus? Query Description: Query returns 0 if calibration is not in progress, 1 if calibration is in progress, 2 if calibration was aborted, 3 if cal-coefficients are being calculated, or 4 if calibration has completed. Example: To query calibration progress status: :CORR:COLL:INFO:STAT? [:SENSe]:CORRection:COLLect:INITialize...
  • Page 61: [:Sense]:Correction:collect:status? {Initialize|Open|Short|Load|Save|All|Thru|Zero

    Chapter 4 — Cable & Antenna Analyzer Mode Commands [:SENSe]:CORRection:COLLect:STATus? {INITialize|OPEN|SHORt|LOAD|SAVE|ALL|THRU|ZERO} Query Description: Query with step parameter returns 1 if a specified cal step is completed. Otherwise, it returns 0. Query without any parameter returns 0 if no cal started, 1 if cal already started, 2 if cal has been aborted, 3 if cal is calculating, or 4 if cal has been completed.
  • Page 62: [:Sense]:Correction:type Standard|Flex

    Chapter 4 — Cable & Antenna Analyzer Mode Commands [:SENSe]:CORRection:TYPE STANdard|FLEX [:SENSe]:CORRection:TYPE? Cmd Description: Command sets correction type. Query Description: Query returns correction type. Query returns STAN|FLEX. Param Range: STANdard|FLEX Default Value: STANdard Example: To set correction type to flex: :CORR:TYPE FLEX [:SENSe]:CORRection[:STATe] ON|OFF|1|0 [:SENSe]:CORRection[:STATe]?
  • Page 63: [:Sense]:Frequency:cable:name <"Cable-Name

    Chapter 4 — Cable & Antenna Analyzer Mode Commands [:SENSe]:FREQuency:CABLe:NAMe <"cable-name"> [:SENSe]:FREQuency:CABLe:NAMe? Cmd Description: Command sets the cable name. Query Description: Query returns the cable name. Param Type: String Param Description: Cable name Default Value: NONE Example: To set the cable to "AVA5-50 7/8": :FREQ:CABL:NAM "AVA5-50 7/8"...
  • Page 64: [:Sense]:Rfon[:State] On|Off|1|0

    Chapter 4 — Cable & Antenna Analyzer Mode Commands [:SENSe]:RFON[:STATe] ON|OFF|1|0 [:SENSe]:RFON[:STATe]? Cmd Description: Command sets the RF power output state when the sweep is in Hold mode. Query Description: Query returns the RF power output state when the sweep is in Hold mode.
  • Page 65 Chapter 4 — Cable & Antenna Analyzer Mode Commands [:SENSe]:SWEep:RFIMmunity HIGH|LOW|1|0 [:SENSe]:SWEep:RFIMmunity? Cmd Description: Command sets the RF immunity state. Query Description: Query returns the RF immunity state, 1 for low immunity and 0 for high immunity. Param Range: HIGH|LOW|1|0 Default Value: LOW|1 Example: To set RF immunity to low: :SWE:RFIM LOW...
  • Page 66 Chapter 4 — Cable & Antenna Analyzer Mode Commands 4-30 PN: 10580-00322 Rev. F S331L PM...
  • Page 67: Appendix A-Examples

    Appendix A — Examples C/C++ This example is run on the command line. It sends the *IDN? query to the instrument and prints the response to the console. // IdnExample.cpp : Microsoft Visual Studio-Generated Example Based on Example 2-1 in the NI-VISA User Manual Usage : IdnExample “USB0::0x0B58::0xFFF9::xxxxxxxx_xxx_xx::INSTR”...
  • Page 68 A-1 C/C++ Appendix A — Examples printf(”Usage: IdnExample \”USB0::0x0B58::0xFFF9::xxxxxxxx_xxx_xx::INSTR”); printf(”\t where xxxxxxxx_xxx_xx is the USB Device ID of your instrument.\n”); return -1; /* Store the address. */ pAddress = argv[1]; /* Begin by initializing the system*/ status = viOpenDefaultRM(&defaultRM); if (status < VI_SUCCESS) /* Error Initializing VISA...exiting*/ printf(”Can't initialize VISA\n”);...
  • Page 69 Appendix A — Examples A-1 C/C++ strncpy(tempDisplay, buffer, retCount); tempDisplay[retCount] = 0; /* Null-terminate display string. */ printf(”*IDN? Returned %d bytes: %s\n”, retCount, tempDisplay); /* Close down the system */ /* TODO: Add error handling. */ status = viClose(instr); status = viClose(defaultRM); return 0;...
  • Page 70: Visual Basic

    A-2 Visual Basic Appendix A — Examples Visual Basic This function can be called in a Visual Basic program. It sends the *IDN? query to the instrument and returns the byte count and ASCII response string. Rem This example is based on Example 2-1 from the NI-VISA User Manual. Public Sub IdnMain(ByVal address As String, ByRef byteCount As String, ByRef returnBytes As String) Const BUFFER_SIZE = 200...
  • Page 71: Visual Basic

    Appendix A — Examples A-2 Visual Basic stat = viWrite(sesn, “*IDN?”, 5, retCount) stat = viRead(sesn, buffer, BUFFER_SIZE, retCount) Rem TODO: Add code to process the data. byteCount = retCount returnBytes = Left(buffer, retCount) Rem Close down the system Rem TODO: Add error handling. stat = viClose(sesn) stat = viClose(dfltRM) End Sub...
  • Page 72: Visual Basic

    A-3 Visual Basic Appendix A — Examples Visual Basic This function can be called in a Visual Basic program. It performs an RF Calibration in Cable & Antenna Analyzer mode. Communication with the instrument uses USB protocol. Public Sub OnePortCalibrationInCAAMode() Const MAX_CNT = 200 Dim stat As Variant Dim dfltRM As Variant...
  • Page 73 Appendix A — Examples A-3 Visual Basic sInputString = ":INST:NSEL 2" stat = viWrite(sesn, sInputString, Len(sInputString), retCount) Sleep (200) sInputString = ":INST:NSEL?" stat = viWrite(sesn, sInputString, Len(sInputString), retCount) stat = viRead(sesn, Buffer, MAX_CNT, retCount) Loop Until Val(Buffer) = 2 'System preset sInputString = ":SYSTEM:PRESET"...
  • Page 74 A-3 Visual Basic Appendix A — Examples sInputString = "SENSe:CORRection:COLLect:INITialize" stat = viWrite(sesn, sInputString, Len(sInputString), retCount) 'Wait for previous operation to be completed sInputString = "*OPC?" stat = viWrite(sesn, sInputString, Len(sInputString), retCount) Buffer = "" stat = viRead(sesn, Buffer, MAX_CNT, retCount) 'measure open MsgBox "Connect open at port 1"...
  • Page 75 Appendix A — Examples A-3 Visual Basic MsgBox "Connect load at port 1" sInputString = ":SENSe:CORRection:COLLect:LOAD" stat = viWrite(sesn, sInputString, Len(sInputString), retCount) Sleep (200) 'wait load measurement to complete and returns 1 sInputString = ":SENSe:CORRection:COLLect:STATus? LOAD" stat = viWrite(sesn, sInputString, Len(sInputString), retCount) stat = viRead(sesn, Buffer, MAX_CNT, retCount) Loop Until Val(Buffer) = 1 'Save and apply calibration...
  • Page 76 A-4 Visual Basic Appendix A — Examples Visual Basic This function can be called in a Visual Basic program. It demonstrates connection and setting parameters in the instrument while using Ethernet Socket protocol. Public Sub CommunicationWithTCPIPSocket() Const MAX_CNT = 200 Dim stat As Variant Dim dfltRM As Variant Dim sesn As Variant...
  • Page 77 Appendix A — Examples A-4 Visual Basic stat = viOpen(dfltRM, "TCPIP0::" & ipAddress & "::" & Port & "::SOCKET", VI_NULL, VI_NULL, sesn) Rem Set some visa attributes Rem recommandation timeout >= 90 sec stat = viSetAttribute(sesn, VI_ATTR_TMO_VALUE, 90000) stat = viSetAttribute(sesn, VI_ATTR_SEND_END_EN, VI_TRUE) Rem VI_ATTR_SUPPRESS_END_EN has to set to False during Ethernet Socket communication stat = viSetAttribute(sesn, VI_ATTR_SUPPRESS_END_EN, VI_FALSE)
  • Page 78 A-4 Visual Basic Appendix A — Examples stat = viWrite(sesn, sInputString, Len(sInputString), retCount) 'read back the strat frequency sInputString = ":SENSe:FREQuency:STARt?" & vbLf stat = viWrite(sesn, sInputString, Len(sInputString), retCount) Buffer = "" stat = viRead(sesn, Buffer, MAX_CNT, retCount) 'Set stop frequency sInputString = "SENSe:FREQuency:STOP 4 GHz"...
  • Page 79: Labview

    Appendix A — Examples A-5 LabVIEW™ LabVIEW™ This example shows how to read the trace data from the instrument in 32-bit integer format. The output is an array of data point magnitudes. Figure 1 shows the data capture and conversion to 32-bit integers in the format used by LabVIEW. Figure 2 shows the details of the conversion.
  • Page 80 A-5 LabVIEW™ Appendix A — Examples Figure A-1. Data Capture A-14 PN: 10580-00322 Rev. F S331L PM...
  • Page 81 Appendix A — Examples A-5 LabVIEW™ Figure A-2. Data Conversion S331L PM PN: 10580-00322 Rev. F A-15...
  • Page 82 A-5 LabVIEW™ Appendix A — Examples A-16 PN: 10580-00322 Rev. F S331L PM...
  • Page 83 Appendix B — List of Commands by Mode Appendix B — List of Commands by Mode Chapter 1—General Information Chapter 2—Programming with SCPI Chapter 3—All Mode Commands *IDN?............. . .3-1 *OPC? .
  • Page 84 Appendix B — List of Commands by Mode [:SENSe]:BASe:NET:MANual:IP? ........3-8 [:SENSe]:BASe:NET:MANual:SUBnet <"Subnet-Mask">...
  • Page 85 Appendix B — List of Commands by Mode :CALCulate:LIMit:ALARm OFF|ON|0|1 ........4-8 :CALCulate:LIMit:ALARm? .
  • Page 86 Appendix B — List of Commands by Mode :CALCulate:TRANsform:DISTance:WINDow? ......4-17 :CAPTure:STARt ........... . 4-17 :CAPTure:STOP .
  • Page 87 Appendix B — List of Commands by Mode [:SENSe]:CORRection:TYPE STANdard|FLEX ......4-26 [:SENSe]:CORRection:TYPE? ......... .4-26 [:SENSe]:CORRection[:STATe] ON|OFF|1|0 .
  • Page 88 Appendix B — List of Commands by Mode PN: 10580-00322 Rev. F S331L PM...
  • Page 89 Appendix C — List of Commands, Alphabetical Appendix C — List of Commands, Alphabetical All SCPI Commands in Alphabetic List :BASe:DIRectory:COPY <"source-directory">,<"destination-directory"> ..3-1 :BASe:DIRectory:DELete <"directory">, {1|0} ......3-1 :BASe:DIRectory:MAKe <"directory">...
  • Page 90 Appendix C — List of Commands, Alphabetical :CALCulate:TRANsform:DISTance:DMAX? ......4-15 :CALCulate:TRANsform:DISTance:PVELocity <propagation-velocity>..4-15 :CALCulate:TRANsform:DISTance:PVELocity? .
  • Page 91 Appendix C — List of Commands, Alphabetical :CONFigure:BASe:MASTerreset .........3-2 :CONFigure:BASe:POWeroff 0|1 .
  • Page 92 Appendix C — List of Commands, Alphabetical :SYSTem:MBTemperature? ..........3-7 :SYSTem:OPTions? .
  • Page 93 Appendix C — List of Commands, Alphabetical [:SENSe]:FREQuency:CABLe? .........4-26 [:SENSe]:FREQuency:STARt <frequency>{ Hz|kHz|MHz|GHz} .
  • Page 94 Appendix C — List of Commands, Alphabetical PN: 10580-00322 Rev. F S331L PM...
  • Page 96 Anritsu Company 490 Jarvis Drive Anritsu utilizes recycled paper and environmentally conscious inks and toner. Morgan Hill, CA 95037-2809 http://www.anritsu.com...

Table of Contents