Keysight M9260A Programming Manual
Keysight M9260A Programming Manual

Keysight M9260A Programming Manual

Pxie audio analyzer
Table of Contents

Advertisement

Quick Links

Keysight M9260A PXIe Audio
Analyzer
Programming
Guide

Advertisement

Table of Contents
loading

Summary of Contents for Keysight M9260A

  • Page 1 Keysight M9260A PXIe Audio Analyzer Programming Guide...
  • Page 2: Safety Information

    Conformity. understood and met. where in the EULA. Keysight shall be under no obligation to update, revise or otherwise modify the Software. With WARNING respect to any technical data as defined by FAR 2.101, pursuant to FAR...
  • Page 3: Safety Symbols

    Failure to comply with these precautions or with specific warnings elsewhere in this manual violates safety standards for design, manufacture, and intended use of the instrument. Keysight Technologies assumes no liability for the customer’s failure to comply with these requirements.
  • Page 4 CAUTION components in mains circuits - including the power transformer, test leads, and input jacks - must be purchased from Keysight. Standard fuses with applicable national safety approvals may be used if the rating and type are the same. Other components that are not safety-related may be...
  • Page 5: Environmental Conditions

    Environmental Conditions The M9260A is designed for indoor use and in an area with low condensation. The table below shows the general environmental requirements for this instrument. Environmental cond ition Requirement Operating condition – 0 °C to 55 °C Temperature Storage condition –...
  • Page 6: Regulatory Information

    – Canada: ICES/NMB-001: Issue 4, June 2006 – Australia/New Zealand: AS/NZS CISPR 11 Supplementary information: – The product was tested in a typical configuration with Keysight Technologies test systems. – This is a sensitive measurement apparatus by design and may have some performance loss when exposed to ambient continuous electromagnetic phenomenon.
  • Page 7: Regulatory Markings

    EMC Declaration. This is a Class A requirement. This affixed product label instrument suitable for professional indicates that you must not discard use and in electromagnetic this electrical or electronic product in environment outside of the home. domestic household waste. Keysight M9260A Programming Guide...
  • Page 8: Waste Electrical And Electronic Equipment (Weee) Directive 2002/96/Ec

    To return this unwanted instrument, contact your nearest Keysight Service Center, or visit http://about.keysight.com/en/companyinfo/environment/takeback.shtml for more information. Sales and Technical Support To contact Keysight for sales and technical support, refer to the support links on the following Keysight websites: – www.keysight.com/find/M9260A (product-specific information and support, software and documentation updates) –...
  • Page 9: Table Of Contents

    ......... .18 Theory of Operation for the M9260A Application Programming Interfaces (API) .
  • Page 10 ..........43 Example Program Codes for the M9260A Introduction .
  • Page 11 List of Figures Figure 2-1 Add reference to the M9260A driver ....30 Figure 2-2 M9260A SFP software connection ....35...
  • Page 12 THIS PAGE HAS BEEN INTENTIONALLY LEFT BLANK. Keysight M9260A Programming Guide...
  • Page 13: List Of Tables

    ....37 Table 2-2 Writing program commands ....40 Keysight M9260A Programming Guide...
  • Page 14 THIS PAGE HAS BEEN INTENTIONALLY LEFT BLANK. Keysight M9260A Programming Guide...
  • Page 15: Getting Started

    Programming Guide Getting Started Introduction to IVI Driver Programming for M9260A Before You Begin Theory of Operation for the M9260A Application Programming Interfaces (API) This chapter provides an overview about IVI driver programming for the Keysight M9260A PXIe Audio Analyzer.
  • Page 16: Introduction To Ivi Driver Programming For M9260A

    – Keysight M9260A PXIe Aud io Analyzer Programming Guide. This manual. For IVI-COM console applications. – Keysight M9260A PXIe Aud io Analyzer Startup Guide. Procedures to help you to unpack, inspect, install (software and hardware), perform instrument connections, and verify operability of the M9260A.
  • Page 17: Related Websites

    Getting Started Related websites – Keysight Technologies PXI and AXIe Modular Products (http:// www.keysight.com/find/modular) – Keysight M9260A PXIe Audio Analyzer (http://www.keysight.com/find/ M9260A) – Keysight Technologies (http://www.keysight.com) – IVI Drivers and components downloads (http://www.keysight.com/find/ivi) – Keysight I/O Libraries Suite (http://www.keysight.com/find/iosuite) – GPIB, USB, and Instrument Control Products (http://www.keysight.com/find/...
  • Page 18: Before You Begin

    1 Install Microsoft Visual Studio 2010 with .NET Visual C# on a PC running on Windows 7 or higher. The steps below are detailed in the Keysight M9260A PXIe Audio Analyzer NOTE Startup Guide (M9260-90000). However, these steps are repeated here and must be completed before you can programmatically control the M9260A PXIe Audio Analyzer hardware using the IVI Drivers.
  • Page 19: Theory Of Operation For The M9260A Application Programming Interfaces (Api)

    – Downconverter – Digitizer – Counter/Timer The M9260A PXIe Audio Analyzer IVI driver is an IVI custom specific driver and does not belong to any of these 13 IVI Instrument Classes. It is therefore described as a "NoClass" module. Keysight M9260A Programming Guide...
  • Page 20: Ivi Compliant Or Ivi Class Compliant

    Getting Started IVI Compliant or IVI Class Compliant The M9260A PXIe Audio Analyzer is IVI Compliant, but not IVI Class Compliant; it does not belong to one of the 13 IVI Instrument Classes defined by the IVI Foundation. IVI Compliant – The IVI Driver follows architectural specifications for these categories: –...
  • Page 21: Ivi Driver Types

    – Implements the Inherent Capabilities Specification – Complies with all of the architecture specifications – May or may not comply with one of the 13 IVI Instrument Classes – Is either an IVI Specific Driver or an IVI Class Driver Keysight M9260A Programming Guide...
  • Page 22: Ivi Driver Hierarchy

    – Is an IVI Driver needed only for interchangeability in IVI-C environments – The IVI Class may be IVI-defined or customer-defined IVI Specific Driver Is an IVI Driver that is written for a particular instrument such as the M9260A PXIe Audio Analyzer – IVI Class-Compliant Specific Driver –...
  • Page 23 These common functions and attributes are called IVI inherent capabilities, and they are documented in IVI-3.2 — Inherent Capabilities Specification. Drivers that do not support any IVI instrument class such as the M9260A PXIe Audio Analyzer must still include these IVI inherent capabilities. Keysight M9260A Programming Guide...
  • Page 24: Instrument-Specific Hierarchies For The M9260A

    KtM9260 is the driver name IKtM9260 is the root interface Perform the following steps to view the interfaces available in the M9260A PXIe Audio Analyzer using Visual Studio: 1 Right-click the KtM9260Lib library file in the References folder from the Solution Explorer window.
  • Page 25: Naming Conventions Used To Program Ivi Drivers

    – All instrument class names start with “Ivi” – Example: IviScope, IviDmm – Function names – One or more words use PascalCasing – First word should be a verb IVI-COM naming conventions – Interface naming – Class compliant: Starts with “IIvi” – I<ClassName> Keysight M9260A Programming Guide...
  • Page 26 – Enumerations and enum values are used to represent discrete values in IVI-COM – <ClassName><descriptive words>Enum – Example: IviScopeTriggerCouplingEnum – Enum values do not end in “Enum” but use the last word to differentiate – Examples: IviScopeTriggerCouplingAC, IviScopeTriggerCouplingDC Keysight M9260A Programming Guide...
  • Page 27 Step 5: Initialize the driver instances Step 6: Write the program steps Step 7: Close the driver Step 8: Building and running a complete example program using Visual C# This chapter describes the steps to programmatically control the M9260A IVI-COM drivers using Visual C#.
  • Page 28: Tutorial: Create A Project With Ivi-Com Using Visual C

    – Step 6. Write the Program Steps – Step 7. Close the Instance – Step 8. Building and running a complete example program using Visual C# For example codes used to programmatically control the M9260A IVI-COM drivers, refer to Chapter 3, "Example Program Codes for the M9260A".
  • Page 29: Step 1: Create A Console Application

    2 Select Project and click Add Reference. The Add Reference dialog appears. For this step, Solution Explorer must be visible (View > Solution Explorer) and the "Program.cs" editor window must be visible - select the Program.cs tab to bring it to the front view. Keysight M9260A Programming Guide...
  • Page 30: Step 2: Add References

    Tutorial: Create a Project with IVI-COM Using Visual C# Step 2: Add references In order to access the M9260A PXIe Audio Analyzer driver interfaces, a reference to its driver (DLL) must be created. 1 In Solution Explorer, right-click References and select Add Reference.
  • Page 31 Tutorial: Create a Project with IVI-COM Using Visual C# – If you have not installed the IVI Driver for the M9260A PXIe Audio Analyzer NOTE (as listed in the previous section titled "Before You Begin"), its IVI Driver will not appear in this list.
  • Page 32: Step 3: Add Using Statements

    You can create sections of code in your program that can be expanded and NOTE collapsed by surrounding the code with #region and #endregion keywords. Selecting the – and + symbols allows the region to be collapsed and expanded. Collapsed Expanded Keysight M9260A Programming Guide...
  • Page 33: Step 4: Create Instances Of The Ivi-Com Drivers

    Since the M9260A PXIe Audio Analyzer is considered a “NoClass” module (because it does not belong to one of the 13 IVI Classes), the COM Session Factory is not used to create instances of its IVI-COM drivers. So, the M9260A PXIe Audio Analyzer IVI-COM driver uses direct instantiation.
  • Page 34: Step 5: Initialize The Driver Instances

    – If you are actually establishing a communication link (an “I/O session”) with an instrument, you need to determine the Resource Name address string (VISA address string) that is needed. You can use an IO application such as Keysight Connection Expert, National Instruments Measurement, and Automation Explorer (MAX), or you can use the Keysight product’s SFP to get the physical...
  • Page 35: Set The Initialize() Parameters

    Tutorial: Create a Project with IVI-COM Using Visual C# Figure 2-2 M9260A SFP software connection Module name M9260A PXIe Aud io Analyzer Slot number VISA address PXI41::0::0::INSTR string resourceDesc = "PXI41::0::0::INSTR"; Set the Initialize() Parameters Although the Initialize() method has a number of options that can be...
  • Page 36: Call The Initialize() Method With The Set Parameters

    Development Environment (IDE) is IntelliSense. IntelliSense is a form of auto-completion for variable names and functions and is a convenient way to access parameter lists and ensure correct syntax. This feature also enhances software development by reducing the amount of keyboard input required. Keysight M9260A Programming Guide...
  • Page 37: Understanding Initialize Options

    IdQuery is set to true, this will query the instrument model and fail initialization if the model is not supported by the driver. Reset bool Reset = true; Setting Reset to true tells the driver to initially reset the instrument. Keysight M9260A Programming Guide...
  • Page 38 Initialize function assumes that everything following 'DriverSetup=' is part of the assignment. DriverSetup= Trace=false"; – Model=M9260A Instrument model to use during simulation. – Trace=false If false, an output trace log of all driver calls is not saved in an XML file. Keysight M9260A Programming Guide...
  • Page 39 Tutorial: Create a Project with IVI-COM Using Visual C# Additional information can be found under “Initializing the IVI-COM Driver” from NOTE the following: – M9260 IVI Documentation – Start > All Programs > Keysight M9260 PCIe Mod ule > M9260 IVI Documentation Keysight M9260A Programming Guide...
  • Page 40: Step 6: Write The Program Steps

    "Driver Call Log"; this driver call log is used to view a list of driver calls that have been performed when changes are made to the controls on the SFP. In this example, open the SFP for the M9260A PXIe Audio Analyzer and perform the following steps:...
  • Page 41 KtM9260AnalogAnalyzerTypeDifferential; KtM9260.AnalogAnalyzer.Channels.get_Item("Ana logAnalyzerChannel1").Configuration.Impedance = KtM9260AnalogAnalyzerImpedanceHighZ; KtM9260.AnalogAnalyzer.Channels.get_Item("Ana logAnalyzerChannel1").Configuration.Coupling = KtM9260AnalogAnalyzerCouplingDC; KtM9260.AnalogAnalyzer.Channels.get_Item("Ana logAnalyzerChannel1").Measurement.InitiateCon t = False; KtM9260.Apply(); // Apply initiate. KtM9260.AnalogAnalyzer.Channels.get_Item("Ana logAnalyzerChannel1").Measurement.Initiate(); // Wait for acquisition to complete. KtM9260.AnalogAnalyzer.Channels.get_Item("Ana logAnalyzerChannel1").Measurement.WaitForData (500); // Fetch acquired data. KtM9260.AnalogAnalyzer.Channels.get_Item("Ana logAnalyzerChannel1").Measurement.FetchArrayR eal64(0,32768,System.Double[],False); Keysight M9260A Programming Guide...
  • Page 42: Step 7: Close The Driver

    Failing to do this could mean that system resources are not freed up and your program may behave unexpectedly on subsequent executions. if (driver != null && driver.Initialized) #region Close Driver Instances driver.Close(); Console.WriteLine("Driver Closed"); #endregion Keysight M9260A Programming Guide...
  • Page 43: Step 8: Building And Running A Complete Example Program Using Visual C

    Rebuild Solution. Alternately, from the Debug menu, click Start Debugging or press the F5 key. Example programs may be found by selecting either one of the following: – C:\Program Files\IVI Foundation\IVI\Drivers\KtM9260\Examples – C:\Program Files (x86)\IVI Foundation\IVI\Drivers\KtM9260\Examples Keysight M9260A Programming Guide...
  • Page 44 Tutorial: Create a Project with IVI-COM Using Visual C# THIS PAGE HAS BEEN INTENTIONALLY LEFT BLANK. Keysight M9260A Programming Guide...
  • Page 45: Example Program Codes For The M9260A

    Programming Guide Example Program Codes for the M9260A Introduction Example Program 1: Performing waveform acquisition using the M9260A Analog Analyzer Example Program 2: Performing waveform generation using the M9260A Analog Generator This chapter provides M9260A example codes for commonly used functions.
  • Page 46: Introduction

    Performing waveform acquisition and performing waveform generation. The example codes can also be accessed by going to the following folder: Start > All Programs > Keysight Instrument Drivers > IVI-COM KtM9260 (version number) > Examples > CSharp DISCLAIMER NOTE ©...
  • Page 47: Example Program 1: Performing Waveform Acquisition Using The M9260A Analog Analyzer

    Example Program Codes for the M9260A Example Program 1: Performing waveform acquisition using the M9260A Analog Analyzer The following example code demonstrates how to instantiate a driver instance, read a few identity interface properties, set the resource name and various initialization values, as well as initiate the instrument specific functionality.
  • Page 48 Example Program Codes for the M9260A using System; using Keysight.KtM9260.Interop; namespace CS_Acquisition /// <summary> /// Keysight IVI-COM Driver Example Program /// Initializes the driver, reads a few Identity interface /// properties, and initiates instrument specific   /// functionality. /// Runs in simulation mode without an instrument.
  • Page 49 Example Program Codes for the M9260A * You can change the code below to hard-code your resource descriptor and simulation mode, or you can pass the resource descriptor in the command line when you run the example program to use that hardware in non-simulation mode.
  • Page 50 Example Program Codes for the M9260A // Create driver instances driver = new KtM9260(); const bool idquery = true; const bool reset = true; // Initialize the driver. See driver help topic "Initializing the IVI-COM Driver" for additional information. driver.Initialize( resource, idquery, reset, options );...
  • Page 51 Example Program Codes for the M9260A Console.WriteLine( "Identifier: {0}", driver.Identity.Identifier ); Console.WriteLine( "Revision: {0}", driver.Identity.Revision ); Console.WriteLine( "Vendor: {0}", driver.Identity.Vendor ); Console.WriteLine( "Description: {0}", driver.Identity.Description ); Console.WriteLine( "Model: {0}", driver.Identity.InstrumentModel ); Console.WriteLine( "FirmwareRev: {0}", driver.Identity.InstrumentFirmwareRevision ); Console.WriteLine( "Serial #: {0}", driver.System.SerialNumber );...
  • Page 52 Example Program Codes for the M9260A Channel1.Configuration.Coupling = KtM9260AnalogAnalyzerCouplingEnum.KtM9260AnalogAnalyzerCoupling Channel1.Configuration.Impedance = KtM9260AnalogAnalyzerImpedanceEnum.KtM9260AnalogAnalyzerImpedan ce600Ohm; Channel1.Configuration.LoopbackEnabled = false; Channel1.Configuration.Range = 1; Channel1.Configuration.Type = KtM9260AnalogAnalyzerTypeEnum.KtM9260AnalogAnalyzerTypeDifferen tial; // Set trigger source to Immediate. driver.Trigger.Source = KtM9260TriggerSourceEnum.KtM9260TriggerSourceImmediate; // Single shot acquisition. driver.AnalogAnalyzer.Measurement.InitiateCont = false; // Apply settings to hardware.
  • Page 53 Example Program Codes for the M9260A float[] data = new float[32768]; bool overload = false; Channel1.Measurement.FetchArrayReal32(0, 32768, ref data, ref overload); catch( Exception ex ) Console.WriteLine( ex.Message ); finally if( driver != null && driver.Initialized ) // Close the driver driver.Close();...
  • Page 54: Example Program 2: Performing Waveform Generation Using The M9260A Analog Generator

    Example Program Codes for the M9260A Example Program 2: Performing waveform generation using the M9260A Analog Generator The following example code demonstrates how to instantiate a driver instance, read a few identity interface properties, set the resource name and various initialization values, as well as initiate the instrument specific functionality.
  • Page 55 Example Program Codes for the M9260A using System; using Keysight.KtM9260.Interop; namespace CS_Generator /// <summary> /// Keysight IVI-COM Driver Example Program /// Initializes the driver, reads a few Identity interface /// properties, and initiates instrument specific   /// functionality. /// Runs in simulation mode without an instrument.
  • Page 56 Example Program Codes for the M9260A * You can change the code below to hard-code your resource descriptor and simulation mode, or you can pass the resource descriptor in the command line when you run the example program to use that hardware in non-simulation mode.
  • Page 57 Example Program Codes for the M9260A // Create driver instances driver = new KtM9260(); const bool idquery = true; const bool reset = true; // Initialize the driver. See driver help topic "Initializing the IVI-COM Driver" for additional information. driver.Initialize( resource, idquery, reset, options );...
  • Page 58 Example Program Codes for the M9260A Console.WriteLine( "Identifier: {0}", driver.Identity.Identifier ); Console.WriteLine( "Revision: {0}", driver.Identity.Revision ); Console.WriteLine( "Vendor: {0}", driver.Identity.Vendor ); Console.WriteLine( "Description: {0}", driver.Identity.Description ); Console.WriteLine( "Model: {0}", driver.Identity.InstrumentModel ); Console.WriteLine( "FirmwareRev: {0}", driver.Identity.InstrumentFirmwareRevision ); Console.WriteLine( "Serial #: {0}", driver.System.SerialNumber );...
  • Page 59 Example Program Codes for the M9260A Channel1.Configuration.Type = KtM9260AnalogGeneratorTypeEnum.KtM9260AnalogGeneratorTypeDiffer ential; // Configure waveform settings. Channel1.WaveformConfig.Amplitude = 1; Channel1.WaveformConfig.DCOffset = 0; Channel1.WaveformConfig.Frequency1 = 1000; Channel1.WaveformConfig.WaveformType = KtM9260AnalogGeneratorWaveformTypeEnum.KtM9260AnalogGeneratorWa veformTypeSine; // Output waveform immediately without waiting for trigger. Channel1.TriggerSourceEnabled = false; // Apply settings to hardware and start waveform generation.
  • Page 60 Example Program Codes for the M9260A driver.Close(); Console.WriteLine( "" ); Console.WriteLine( "Driver Closed" ); Console.WriteLine( "" ); Console.WriteLine( "\nDone - Press Enter to Exit" ); Console.ReadLine(); Keysight M9260A Programming Guide...
  • Page 61 This information is subject to change without notice. Always refer to the Keysight website for the latest revision. © Keysight Technologies 2017 - 2018 Edition 2, January 15, 2018 Printed in Malaysia *M9260-90001* M9260-90001 www.keysight.com...

Table of Contents