Accelerate Program Development
using Command Expert with
Keysight VEE Pro
Application Note
Page 2
This application note
contains two main sections:
– Command Expert Basics
Introduces you to the Command
Expert user interface and shows
n example sequence.
– Command Expert in the Keysight
VEE Pro Environment
Describes how to how to run
and edit Command Expert
sequences from Keysight
VEE Pro.
Keysight Command Expert for fast and
easy instrument control!
Keysight Technologies, Inc. Command Expert is a FREE software application that provides fast and easy instrument control in many PC application
environments. Command Expert combines instrument command sets,
command sequences, documentation, syntax checking, and command
execution in one simple interface. Command Expert helps you to:
– Find instrument commands
– Access command documentation
– Verify command syntax
– Build instrument command sequences
– Execute instrument command sequences
– Integrate sequences into the MATLAB, Visual Studio, Excel,
LabVIEW, KeysightVEE, or Keysight SystemVue PC application
environment
– Generate code for command sequences in MATLAB,
Visual C#, Visual Basic .NET, and Visual C/C++
– Profile command execution time
– Debug command sequences using breakpoints and
single-stepping
Instrument command sets are available for instruments that use
Standard Commands for Programmable Instrumentation (SCPI)
or IVI-COM drivers.
2
Page 3
Command Expert Basics
This section describes how to download, install, and start Command Expert, and uses an example sequence to show the
features of the Command Expert user interface.
VEE Pro
Command Expert
Figure 1. Command Expert and VEE Pro Integration
Installing the Software
1. Download and install the Keysight IO Libraries Suite (Version 15.0 or above). This software is required by Command
Expert and VEE Pro to find and communicate with instruments. You can download Keysight IO Libraries Suite from
www.keysight.com/find/iosuite.
2. Purchase a license and install VEE Pro. Command Expert can be used with VEE Pro 9.22 or above. You can find out
more about VEE Pro at www.keysight.com/find/veepro.
3. Download and install Command Expert. If VEE Pro is already installed, the Command Expert VEE Pro Add-On will be
installed automatically. You can download Command Expert from www.keysight.com/find/commandexpert.
Figure 2. Command Expert Icon
3
Page 4
Starting Command Expert
Click Start > All Programs > Keysight Command Expert > Keysight Command Expert.
The Command Expert opening window (Welcome Window) is shown below.
Command Expert comes with a number of preconfigured examples for popular instruments. The installation software
installs an example instrument named N6700 that provides the commands for the Keysight N6700B Power Supply. We
will use this instrument and the N6700_PowerSupply_OutputSetup example to introduce you to the Command Expert
user interface.
Figure 3. Command Expert Welcome Window
Internet access and command sets
The N6700 instrument and its SCPI command set are installed by default. For other instrument examples, you
will be prompted to install the instrument’s command set. After installing Command Expert, you will need
Internet access to download SCPI command sets or IVI-COM instrument drivers for your instruments. If you
work in a secure environment with limited Internet access, you can still use Command Expert. Simply download
the SCPI command sets or IVI-COM instrument drivers using a computer with internet access. You can then
transfer the command sets or drivers to the computer with no internet access (using a USB drive, for example).
4
Page 5
The Command Sequence
The command sequence for the N6700_PowerSupply_OutputSetup example is shown in the Sequence Pane in the graphic
below. A Command Expert sequence is a series of steps that are executed in order to connect to an instrument, configure
an instrument, set outputs, and perform measurements.
Figure 4. Command Expert User Interface Overview
– The Instruments Pane shows your instruments and lets you connect to them.
– The Search/Browse Pane shows you the commands for the selected instrument and lets you search for commands.
– The Command Pane shows the selected command and its documentation, and lets you execute the command.
– The Status Bar shows progress messages as Command Expert performs operations.
– The Parameters Pane expands to show sequence parameters and lets you view and edit their names and values.
– The Sequence Pane shows the various steps in the Command Expert sequence and lets you edit the sequence and
replay commands. The Sequence Pane has the following features:
5
Page 6
Figure 5. Sequence Pane Details
The absence of a specific instrument address in step 1 of the sequence shown above indicates that we
are working offline. To connect to an actual instrument, select step 1 in the Sequence Pane, and enter the
instrument address in the address field in the Command Pane.
Working offline is a simulation mode where you can view and perform commands as usual, but the
commands return default values. This is a good way to explore a command set, view documentation, and
prototype sequences without having to connect to a physical instrument.
6
Page 7
Sequence Steps
Selecting a step in the Sequence Pane reveals details about the command and its parameters.
Figure 6. Command Details
Command Expert uses these types of steps:
– Connect steps (to connect to instruments) – Command steps (SCPI or IVI-COM commands) – Wait statements – Comments – Steps to control timeouts and error handling
7
Page 8
Sequence Debugging
You can debug a sequence by inserting breakpoints. When you run the sequence, execution pauses at the first step with a
breakpoint and Command Expert enters single-step mode. In single-step mode you can single-step the sequence, monitor
parameters and results, replay the sequence, and play selected steps. When you are ready to run the sequence without
pausing at the breakpoint, remove the breakpoint and run the sequence normally.
Figure 7. Debugging the Sequence
You can also skip steps to help with debugging.
Substituting an instrument
You can temporarily switch command sets in a sequence to see the effects of switching to a different
instrument. Any commands that aren’t supported by the new instrument are highlighted in red.
8
Page 9
Using IVI-COM
If you prefer, you can use IVI-COM commands instead of SCPI commands. Command Expert has a number of IVI-COM
examples and the operation is very similar to SCPI.
The example below (filename: N67xx_PowerSupply_OutputSetup.xlsx) uses IVI-COM commands:
Figure 8. IVI-COM Commands
IVI-COM command sets and drivers
IVI-COM command sets are automatically extracted from IVI-COM drivers. You must install an IVI-COM driver
(outside of Command Expert) before you can use the driver’s command set in Command Expert. You can
download Keysight IVI-COM drivers from www.keysight.com/find/ivi.
9
Page 10
Using IVI-COM cont’d
The Command Expert IVI-COM interface is very similar to the SCPI interface. All elements within the interface operate as
described earlier in this application note. For more information, see Command Expert for IVI-COM Tutorial in the Command
Expert help:
Figure 9. IVI-COM Help
Using Command Expert with Non-Keysight Instruments
You can use Command Expert with any SCPI instrument that follows the SCPI-99 standard, using the Generic SCPI-99
Instrument command set. This command set provides the commands that are common to SCPI-99 instruments.
You can also use direct commands to send additional SCPI commands. Using direct commands, you can send any SCPI
command to any SCPI instrument.
Any instrument that has an IVI-COM driver can be used with Command Expert, regardless of the manufacturer.
Getting Started with
Command Expert
To get started using Command Expert,
you can start with one of the many
example sequences and modify that
sequence, or you can create your own
sequence. For a step-by-step tutorial
showing how to create a sequence,
see Command Expert Tutorial in the
Command Expert help:
Figure 10. Command Expert Tutorial
10
Page 11
Command Expert in the VEE Pro Environment
The Command Expert VEE Add-On lets you use Command Expert within VEE Pro to create and run instrument command
sequences. The add-on provides a new VEE object called the Command Expert Sequence Object:
Figure 11. Command Expert Sequence Object
VEE Pro Examples
Command Expert comes with a number of examples showing how to use Command Expert and VEE Pro to control instruments. We will use the N6700_PowerSupply_OutputSetup.vee example to demonstrate how to use Command Expert with
VEE Pro to control a Keysight N6700 Power Supply:
Figure 12. Command Expert VEE Pro Example
11
Page 12
This example contains three Command Expert Sequence Objects that:
– Reset and clear the power supply (this object is used twice – once at the beginning and once at the end)
– Set the power supply’s voltage, current, over-voltage, and over-current protection
– Measure the output voltage
To run the example in VEE, configure the inputs and click Debug > Run/Resume. The measured voltage is output and
displayed in the Measured Voltage box.
In the example above, the absence of a specific N6700 Address indicates that we are working offline. To connect to
an actual instrument, enter a valid instrument address.
Working offline is a simulation mode where you can view and perform commands as usual, but the commands
return default values. This is a good way to explore a command set, view documentation, and prototype sequences
without having to connect to a physical instrument.
Editing Command Expert Sequence Objects
To modify a Command Expert Sequence Object, double-click in the center of the object:
Figure 13. Click the Center of the Command Expert Sequence Object
12
Page 13
Command Expert opens displaying the corresponding command sequence:
Figure 14. Corresponding Command Expert Sequence
You can now use Command Expert to edit the command sequence as shown earlier in this document. When finished
editing, click OK to save the updated command sequence into the Command Expert Sequence Object or Cancel to cancel
changes and return to the VEE application.
13
Page 14
Using IVI-COM
The preceding example used SCPI commands. If you prefer, you can use IVI-COM commands instead of SCPI commands.
Command Expert has a number of IVI-COM examples and the operation is very similar to SCPI. The example below shows
the Command Expert IVI-COM sequence associated with a VEE Command Expert Sequence Object:
Figure 15. Command Expert IVI-COM Sequence
14
Page 15
Where to Go Next
An easy way to get started using Command Expert with VEE Pro is to browse through the example folders and select an
example that is similar to your test and measurement application. Examples are located in:
– C:\Documents and Settings\All Users\Keysight\Command Expert\Examples (for Windows XP)
– C:\ProgramData\Keysight\Command Expert\Examples (for Windows 7)
Command Expert has extensive application documentation containing FAQs, tutorials, examples, and getting started information. You can use the VEE Add-on Tutorial, available in the Command Expert help, for step-by-step information on how
to use Command Expert with VEE Pro:
Figure 16. VEE Pro Add-On Tutorial
You can find more information on Command Expert, including links to other application notes, at
www.keysight.com/find/commandexpert.
15
Page 16
Command Expert PC Operating Requirements
Operating SystemWindows XP, Service Pack 2 or above, 32-bit only.
Editions: Home, Professional
Windows 7, 32-bit or 64-bit.
Editions: Starter, Home Basic, Home Premium, Professional, Ultimate, or Enterprise
Disk At least 1GB free disk space
Keysight IO Libraries Suite Version 15.0 or above
www.keysight.com/find/iosuite
MonitorAt least 1024x768 monitor resolution
BrowserInternet Explorer 6 or above (7 or above recommended)
You can find the current list of instrument SCPI command sets at: www.keysight.com/find/commandsetlist
Application Development Environment Requirements
MATLABMATLAB R2009a or above and Instrument Control Toolbox
Visual StudioVisual Studio 2005, 2008, 2010 or above
LabVIEWLabVIEW 8.2.1 or above.
VEEVEE Pro 9.22 or above.
ExcelExcel 2007 or Excel 2010.
Download Command Expert now and experience fast and easy instrument control:
www.keysight.com/find/commandexpert
16
Page 17
17 | Keysight | Accelerate Program Development using Command Expert with VEE Pro – Application Note
myKeysight
www.keysight.com/find/mykeysight
A personalized view into the information most relevant to you.
Three-Year Warranty
www.keysight.com/find/ThreeYearWarranty
Keysight’s commitment to superior product quality and lower total cost
of ownership. The only test and measurement company with three-year
warranty standard on all instruments, worldwide.
Up to five years of protection and no budgetary surprises to ensure your
instruments are operating to specification so you can rely on accurate
measurements.
www.keysight.com/go/quality
Keysight Technologies, Inc.
DEKRA Certified ISO 9001:2008
Quality Management System
Get the best of both worlds: Keysight’s measurement expertise and product
breadth, combined with channel partner convenience.
www.keysight.com/find/commandexpert
For more information on Keysight
Technologies’ products, applications or
services, please contact your local Keysight
office. The complete list is available at:
www.keysight.com/find/contactus