Friday, July 9, 2010

Easy Instrument Connectivity with Matlab

Matlab is my favorite tool for creating complex arbitrary waveforms since it has a wealth of built-in mathematical capabilities and makes it easy to create and manipulate long floating point matrices. But often when I suggest matlab to colleagues as a tool for creating arbitrary waveforms for test instrumentation they either don't know matlab can connect to instruments or they think they have to sit down and learn how to use some complex driver. This could not be farther from the truth! Matlab makes it easy to connect to instrumentation by providing a graphical user interface instrument control toolbox. Here is a quick summary on how to access and use matlab's instrument control toolbox.
1. Go to matlab's 'Start' menu, select 'Toolboxes', select 'Instrument Control', and 'Test and Measurement Tool' as shown in the top figure.
2. Follow the instructions to establish a connection with the instrument as shown in the middle figure.
3. Go to the 'Session Log' tab and copy the needed connection code from the window and paste it in your script or function.
Now isn't that easy?
For any Matlab experts out there, when I try to build strings that are 1.2 MB long Matlab lab seems to lock up on me (I give it a while to run). Is there a special way to handle strings that long or is that out of matlab's capabilities (which I doubt)?

For more information on Matlab's instrument control toolbox click here


  1. Hey Neil, here's a link to an Agilent Forums post with an example program of how to create and download an arbitrary waveform in Matlab, to your Agilent function generator. The program shows you how to open a visa session and create a very basic pulse waveform. You can create much more complicated waveforms, but here's an example to help you get started.

  2. Really impressive post. I read it whole and going to share it with my social circules. I enjoyed your article and planning to rewrite it on my own blog.
    pop over to this site

  3. You have a real ability for writing unique content. I like how you think and the way you represent your views in this article. I agree with your way of thinking. Thank you for sharing.
    click to find out more