You can add or replace the SCPI commands in this example program with your own. Internet connection required. Once the program is installed, search the PC hard drive for csc. NET directory. NOTE: If more than one folder contains csc. The following procedure uses the example filename MyProgram.
You can use any filename that you like. Several example lines are provided to demonstrate the syntax in which the SCPI commands must be contained. Compile your program by executing csc.
This creates a file named MyProgram. For example: MyProgram. The following steps show how to create shortcuts on your PC desktop to compile and run MyProgram. Using Windows Explorer, navigate to the folder that contains csc. Right-click on the desktop shortcut, then click Properties.
This example shows MyProgram. Contains "? Open hostName. Dispose. WriteLine "Press any key to exit. WriteLine e. ToString. WriteLine s. IndexOf '? Read. WriteLine tc. Open host .Create a Balanced Measurement. Channels, Windows, and Measurements. Triggering the Analyzer. Setup Phase Control. Configure an External Source.Digital Multimeter Programming in Visual Studio
Guided 2-Port Comprehensive Cal. Perform a CalAllChannels Calibration. Perform Unguided Cal on Multiple Channels. Perform an ECal User Characterization. Perform a Source and Receiver Power Cal. Create and Cal a Noise Figure Measurement. Create a Pulse Profile Measurement. Create a Wideband Pulse Measurement. Upload and Download a Segment List. Perform Linear Interpolation. Setup Measurements.
Catalog Measurements. Create an S-parameter Measurement. Create an FOM Measurement. Setup Sweep Parameters.S ee Also. Example Programs.
Synchronizing the Analyzer and Controller. Clears the instrument status byte by emptying the error queue and clearing all event registers. Sets bits in the standard event status enable register. Returns the results of the standard event enable register. The register is cleared after reading it.
Reads and clears event status enable register. Returns a string that uniquely identifies the analyzer. Note: Beginning with Rev 6. For example, A. Generates the OPC message in the standard event status register when all pending overlapped operations have been completed for example, a sweep, or a Default.
See Understanding Command Synchronization. Returns a comma-separated string identifying the analyzer option configuration. See a list of VNA options. The contents of the analyzer's non-volatile memory are not affected by this command.
Before reading a status register, bits must be enabled. This command enables bits in the service request register. The current setting is saved in non-volatile memory. Reads the current state of the service request enable register. The return value can be decoded using the table in Status Commands. See also Reading the Analyzer's Status Registers. Reads the value of the instrument status byte. The register is cleared only when the registers feeding it are cleared.
VISA commands for the 34972A
Returns the result of a query of the analyzer hardward status. An 0 indicates no failures found. Any other value indicates one or more of the following conditions exist. The value returned is the Weight or sum of the Weights of the existing conditions. For example:. Bit is set to 1 when the following conditions exist:. The source has lost phaselock. This could be caused by a reference channel open or a hardware failure. The source power is unleveled.
This could be a source is set for more power than it can deliver at the tuned frequency.Keysight Technologies formerly Agilent Technologies provides core measurement tools such as digitizers, function generators, multimeters, network analyzers, oscilloscopes, signal analyzers and generators, and vector signal analyzers.
Once data is in MATLAB, you can make customized measurements, perform data analysis, generate arbitrary waveforms, and develop automated tests. You can also create graphical interfaces for collecting and analyzing your data and automating tests.
In addition, Agilent offers integration with MATLAB that enables user-defined measurements on select instruments and expands the ability of Agilent oscilloscopes to analyze signals. An instrument driver lets you communicate with your instrument using higher-level commands. If an instrument driver is not available for your instrument, you can communicate directly with the instrument using SCPI commands over these communication protocols:.
Data Acquisition Toolbox supports some data acquisition hardware from Agilent. For the complete list of devices supported by the toolbox, see the Data Acquisition Toolbox supported hardware. Tell us about your Agilent or Keysight instrument, its model number, and the type of application you want to develop, or request additional information about Agilent or Keysight instruments.
Toggle Main Navigation. Instrument Control Toolbox. Search MathWorks. Trial software Contact sales. Instrument Type. Keysight Instrument Drivers. Find Keysight Instrument Drivers.Example Programs. Synchronizing the Analyzer and Controller. I EEE- Local Lockout. Electrical Delay and Phase Offset. Sends and queries data.
Differential IQ measurement. Balanced measurements and Fixturing. Read Gain compression data. Group Delay Aperture setting. X-axis display for FCA measurements. Receiver power cal Obsolete. Create and delete measurements. Spectrum Analyzer Markers. Point-to-point smoothing. Trace Hold.
Uncertainty Trace Properties. Interface control, ECal module state control, and Rear-panel connector control. Work with a Cal Set without having to select it into that channel.
Continuous or manual triggering.
Saves and recalls instrument states. Controls internal switch to reference receiver. Opt Active Hot Parameters. Sweep Averaging. IF Bandwidth. Returns measurement class name. Calibration and other correction settings.
Manage Cal Kits and ECal modules. Edit Cal Kit definitions. Perform Guided Cals.
Manage Cal Sets. Port Extensions. Chopped or Alternate sweep. Ecal user characterization. Frequency Offset opt FOM Segment.System commands control system functions that are not directly related to output control, measurement, or status functions. IEEE Returns the model numbers of the selected channels.
Multiple responses are separated by commas. If no option is installed, an empty quoted string "" is returned. Multiple responses are separated by semicolons. Remote and Local do the same thing and are included for compatibility with other products.
Both allow front panel control. RWLock disables the front panel keys. Then the instrument can only be controlled remotely. Returns the initial socket control connection port number.
After the control port number is obtained, a control socket connection can be opened. Groups multiple channels to create a single channel.
This effectively creates a single output with higher current and power capability. You can group up to four channels per mainframe. When ungrouping a channel, you must also remove the parallel connections between the output and sense terminals of that channel. Resets the front panel lockout password to zero. This command does not reset the calibration password.
The front panel password can also be reset to 0 by setting an internal switch on the unit.
C# Example Program
Refer to Calibration Switches for more information. Changes the manufacturer identity. This command is used to change the manufacturer's ID string for backward compatibility. This affects the following identity items:.
Changes the model number. This command is used to change the mainframe model ID string for backward compatibility.When one of these errors is generated, the command error bit in the event status register is set. Invalid character - Indicates a syntactic elements contains a character which is invalid for that type.
Syntax - Indicates that an unrecognized command or data type was encountered. For example, a string was received when the device does not accept strings. Invalid separator - The parser was expecting a separator and encountered an illegal character. For example, the semicolon was omitted after a program message unit. Data type -The parser recognized a data element different than one allowed.
For example, numeric or string data was expected but block data was encountered. Correct the program so that the GET does not occur within the program code. Parameter not allowed - Indicates that more parameters were received than expected for the header. Missing parameter - Indicates that less parameters were received than required for the header.
Command header - Indicates an error was detected in the header. This error is used when the device cannot detect the more specific errors through Header separator - Indicates that a character that is not a legal header separator was encountered while parsing the header. Program mnemonic too long - Indicates that the header contains more that twelve characters, see IEEE Undefined header - Indicates the header is syntactically correct, but it is undefined for this specific device.
Header suffix out of range - Indicates the value of a header suffix attached to a program mnemonic makes the header invalid. Invalid character in number - Indicates an invalid character for the data type being parsed was encountered.
For example, an alpha in a decimal numeric or a "9" in octal data. Too many digits - Indicates the mantissa of a decimal numeric data element contained more than digits excluding leading zeros, see IEEE Numeric data not allowed - Indicates that a legal numeric data element was received, but the device does not accept one in this position for the header. Suffix - This error, as well as errors throughare generated when parsing a suffix.
Suffix not allowed - Indicates that a suffix was encountered after a numeric element that does not allow suffixes. Invalid character data - Indicates that the character data element contains an invalid character or the particular element received is not valid for the header.
Character data too long - Indicates the character data element contains more than twelve characters, see IEEE Character data not allowed - Indicates a legal character data element was encountered where prohibited by the device. Invalid string data - Indicates that a string data element was expected, but was invalid, see IEEE For example, an END message was received befo re the terminal quote character.
String data not allowed - Indicates that a string data element was encountered but was not allowed by the device at this point in parsing. Block data - This error, as well as errors throughare generated when parsing a block data element.
This particular error message is used if the devi ce cannot detect a more specific error.