Monday, October 31, 2011

Agilent Releases "Command Expert" Software

Agilent recently released a free software package called "Command Expert." If you write software that controls test and measurement instruments Command Expert will make your life easier. For non-software writers that need to create remote instrument control sequences this will also make your life easier. One of the best things about Command Expert is it's free. The below bullets outline Command Expert's top four headlines.
  • Enables fast prototyping and development of instrument command sequences
  • Provides seamless integration with Excel, LabVIEW, Visual Studio, VEE and SystemVue
  • Makes it easy to find, use, and view full documentation for SCPI and IVI-COM commands
  • Simplifies the process of retrieving measurement data from instruments
Command Expert allows you to easily build instrument routines or sequences using SCPI and IVI commands. You can then test the sequences and read back measurement data right into the Command Expert interface. Once you have your finished sequence you can save it to run again later or you can export it to your current instrument control programming project. Command Expert will wrap the sequence up into a function that can be directly exported into your programming project (it generates the code for you). Supported development environments  include Visual Studio, VEE, LabView, Excel, and System Vue. You start out by adding your connected instruments to the instrument pane. From there you can select instruments to access their SCPI or IVI documentation. The documentation UI on Command Expert makes it really easy to search, find, and get info on the selected instruments command set. Once you begin adding a command to your sequence, Command Expert has command auto complete capabilities to make it easy. It also can quickly guide you through adding parameters to commands. Below is a screen shot of Command Expert's UI. It shows a user that adding a command to their sequence for a scope that they named "InfiniiVision" (click to enlarge).

You can also insert wait statements into sequences. Once your sequence is built you can test and fine tune it using Command Expert. When you are done you can save your sequence or export it to a programming environment. 

One of my favorite features on Command Expert is how it integrates with Excel. It automatically plugs into Excel allowing you to create stand alone Excel sequences. This an awesome feature for non-programmers or for programmers who just want to setup a test routine quickly. Once you create a sequence using Command Expert you can export it to an Excel spreadsheet where that sequence can run on its own with no coding required (Command Expert must be installed on the PC). On an Excel based sequence you can setup cells on the spreadsheet as input parameters for defining instrument ranges or settings and you can use plotting features for displaying measured data. Below is an example using a scope:

Once again Command Expert is totally free so I encourage you to check it out if you are instrument programmer or if you are looking for a away run instrument routines without buying expensive software packages.

Monday, October 24, 2011

Video Demo Using Agilent iOS Programming Tools with Xcode to Control LXI Instruments

In the video below I demonstrate how to use Agilent iOS IO programming tools using Apple's Xcode to connect and query an Ethernet connected instrument. The tools abstract low level network sockets, data buffering, and error handling to make the creation of instrument control apps faster and easier. The Agilent iOS IO programming tools are free for download along with the example app used in the video. If the video screen is too small to view in the blog just click on it to view directly in youtube where more sizing options are available.

The link below will take you to the webpage where you can download the programming tools demonstrated in the video. On the website you can also find programming tools for Android.

Smart device programming tools website

Monday, October 17, 2011

Matlab Program for Simulating ECG Waveforms with an Arbitrary Waveform Generator

Because of the popularity of my 2/21/11 post Simulating Complex ECG Patterns with an Arbitrary Waveform Generator I decided to create a Matlab program that allows you to create and customize electrocardiogram (ECG) waveforms that can be easily transferred to an arbitrary waveform generator (AWG). The program is called "ECG Waveform Simulator" and can be downloaded free of charge from Matlab Central (see link below). The program allows you to customize the "typical" ECG waveform by allowing you to modify amplitude, duration, and in some cases interval for the standard ECG waveform parts including the P wave, Q wave, R wave, S wave, T wave, and U wave. The program allows you to directly transfer the ECG waveform you created to an 33521A or 33522A AWG via a Ethernet connection or to store it on a CSV file that could later be uploaded to an AWG. This programmed combined with an AWG provides engineers involved with designing and testing ECG monitoring and measurement equipment an simple and flexible test solution.

One huge benefit of using modern AWGs, like the 33521A and 33522A, for simulating ECG waveforms is a feature typically referred to as arbitrary waveform (arb) sequencing. Arb sequencing allows the user to seamlessly create a complex waveform pattern combining multiple arbs stored on the AWG. It is analogues to creating a playlist on your MP3 player using various songs stored in the MP3's memory. Sequencing gives you the ability to create complex ECG patterns by combining multiple ECG waveforms. Below is a screen shot from a scope showing an example of three different ECG waveforms that I created using the ECG Waveform Simulator. The three waveforms were output using the sequencing capability on the 33522A AWG (notice the second waveform is played twice).

In the above sequence the first ECG waveform is played once, the second is played twice, and the third is played once. Of course we could have just as easily played the fist waveform 50 times, the second 10 times, and third 101 times. For more information on creating arb sequences with the 33521A or 33522A check out my post Creating Arbitrary Waveform Sequences.

Click here to download ECG Waveform Simulator from Matlab Central

Click here to check Agilent's AWGs

Monday, October 10, 2011

Determining How Much Oscilloscope Bandwidth is Needed to Accurately Capture a Signal

If you input a 100 MHz sine wave with a 1 Vpp amplitude into an oscilloscope with a max frequency of 100 MHz what will you see on the display? You will still see a 100 MHz sine wave, but it will no longer by 1 Vpp. Instead the measured amplitude will be about 700 mVpp. That is because the max frequency rating of a scope is its 3 dB roll off point, just like how a low pass filter is rated. That means any frequency components at the scope's max frequency will be attenuated 3 dB or 30%. For non-sine wave signals used at the a scope's upper frequency limits the result is even worse because entire frequency components can be eliminated. The figures below show a 100 MHz scope and a 500 MHz scope both measuring the same 100 MHz digital clock signal.
100 MHz Scope Measuring 100 MHz Digital Clock
500 MHz Scope Measuring 100 MHz Digital Clock

In the 100 MHz scope screen shot you can see that all frequency components that make up the digital square wave have been attenuated except for the center frequency. In the bottom 500 MHz scope screen shot we get a much better picture of what the clock signal really looks like. The following are good rules of thumb when determining how much scope bandwidth you need to accurately capture a signal:

  • For analog signals choose a scope bandwidth that is at least 3 times larger then the center frequency of the signal.
  • For square or pulse type waveforms choose a scope bandwidth that is at least 5 times larger then the center frequency of the signal. This will ensure you capture up to the 5th harmonic of the signal.
The two most common types of responses that scope's have at their max frequency are Gaussian response and Maximally-Flat response, which are both shown below.
Scopes with frequency ranges 1 GHz or below typically have the Gaussian response and high bandwidth scopes typically have the Maximally-Flat response. With knowledge of the response of your scope there is a much more accurate calculation you can perform to determine the scope bandwidth needed to measure a digital signal. The first step is to determine the maximum practical frequency component within the signal under test. We refer to this frequency component as fknee. Dr. Howard W. Johnson has written a book on this topic titled, “High-speed Digital Design – A Handbook of Black Magic ”. All fast rising edges have an infinite spectrum of frequency components. However, there is an inflection (or “knee”) in the frequency spectrum of fast edges where frequency components higher than fknee are insignificant in determining the shape of the signal. For digital signals with rise time characteristics based on 10% to 90% thresholds, fknee is equal to 0.5 divided by the rise time of the signal: 
fKnee = 0.5/RT (10% - 90%)

The next step is to determine the required bandwidth of the oscilloscope to measure this signal. The table below shows multiplying factors for various degrees of accuracy for scopes with a Gaussian or a Maximally-Flat frequency response.

This calculation has nothing to do with the frequency or clock rate of your signal, just the rise time. Let's walk through an example with a Gaussian Response scope measuring a signal with a 1 ns rise time and we want 3% accuracy or better. Using the "fknee" calculation above, the highest frequency component (fknee) would be 500 MHz. From the table above, to achieve 3% accuracy or better we need a scope with a max range of at least 950 MHz. For the example we just did the clock rate of the digital signal could have been 100 MHz or 500 MHz, it doesn't matter the rise time is what determined the bandwidth needed.

One last note, don't forget to check/consider the bandwidth of the cabling or probe you are using along with the connection method to the signal!

Monday, October 3, 2011

Plotting Tools Now Available for Displaying Measurement Data on Android Devices

Back in early September I blogged about how Agilent launched a webpage entitled "Smart Device Programming Tools and Examples for Instrument Control" that features IO programming tools for controlling LXI instruments with Android and iOS smart devices. The IO programming tools and accompanying example apps that demonstrate the use of the tools are all free to download (for more info on the IO tools click here). In this post I am happy to announce that last week programming tools for plotting and analyzing measurement data on Android devices were added to the webpage. The free plotting tools are called Agilent Android Plots or AAPlots for short. Below is a sample plot that was created using AAPlots on a Motorola Xoom:

AAPlots includes features like markers, pinch zoom, and touch panning. AAPlots includes the following chart types: XY line chart, scatter chart, stripline chart, histogram chart, area chart, and bar chart. 

Besides just AAPlots, the source code for four more Android example apps were added to the webpage, they are as follows:
  • AAPlotsDemo: This  app demonstrates the use of the AAPlots programming tools in detail
  • Example 34972A: This app demonstrates the use of AAIo and AAPlots on the 34972A DAQ / Switch Unit.
  • Example MSOX3054A: This app demonstrates the use of AAIo and AAPlots on the MSO-X 3054A Oscilloscope.
  • Example 53230A: This app demonstrates the use of AAIo and AAPlots on the 53230A Universal Counter.
The webpage includes an email link for sending sending comments, suggestions, and feedback on the iOS and Android instrument control programming tools.