Subscribe to Test & Measurement World
RSS
Reprints/License
Print
Email
Average Rating:
  • (0)
    Rate this:
  • Software wrapper links Matlab to instruments

    Martin Rowe, Senior Technical Editor -- Test & Measurement World, 12/1/2007 2:00:00 AM

    Matlab is a popular computing environment for electrical engineers. Many use it to analyze data, although they often save the data using another program, then import the data into Matlab. Mike Flaherty, an applications engineer at Agilent Technologies, wanted a direct programming interface from Matlab scripts to generate waveforms with an arbitrary waveform generator (AWG).

    Flaherty needed Matlab scripts that generate numerous waveforms, including 7-bit Barker-coded radar pulses, and multitone signals. The software needed to work with two AWGs: one through Ethernet, the other through CompactPCI.

    To provide an easy-to-understand programming interface, Agilent engineers developed several Matlab scripts to control the instruments. They used function names such as awg_open and awg_storewaveform.

    A Matlab MEX file provides an interface between Matlab and LXI or CompactPCI instrument drivers.

    These scripts call a Matlab MEX file, written in C, that in turn calls IVI-C drivers for the instruments. Those drivers then call the protocol stacks for the Ethernet and CompactPCI I/O ports (see figure).

    “The waveform generators are 100% code compatible with this application,” said Flaherty.

    Flaherty also developed a user interface that lets users select from a menu of signals, then select specific parameters. Using Matlab and Agilent Vee, he built prototypes of the user interface. He wanted to develop a compiled, stand-alone executable, though. Because Vee is an interpreted language, Agilent engineers ported the GUI and the control code to Microsoft C#. The waveform engine is still Matlab but is compiled and linked to the application when built.

    “The key to the application is the Matlab interface,” explained Flaherty. “It communicates through a MEX file to an instrument's IVI-C driver. It passes a resource string to a CompactPCI or Ethernet stack.”

    Average Rating:
  • (0)
    Rate this:
  • RSS
    Reprints/License
    Print
    Email
    Talkback
    Similar Content from T&MW

    No related content found.

    »MORE

    • 0 rated items found.

    Datasheets.com Electronic Parts & Inventory Search

    185 million searchable parts
    • Part Number
    • Description
    • Inventory
    • Products
    • Manufacturers
    Canon Resource Center

    Featured Company


    Most Recent Resources

    Featured Job On
    Scroll for More Jobs
    Advertisement
    More Content
    • Blogs
    • Webcasts

    Sorry, no blogs are active for this topic.

    » VIEW ALL BLOGS RSS
    • All


    Advertisement
    Advertisement
    About Us   |   Advertising Info   |   Site Map   |   Contact Us   |   FREE Subscription
    © 2011 UBM Electronics . All rights reserved.
    Use of this Web site is subject to its Terms of Use | Privacy Policy

    Feedback Form
    Feedback Analytics