element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Test & Tools
  • Technologies
  • More
Test & Tools
Blog Agilent 34461A Road Test: (3 of 3) Interfacing with LabVIEW
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Test & Tools to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: tassieengineer
  • Date Created: 28 Nov 2013 12:23 PM Date Created
  • Views 2201 views
  • Likes 0 likes
  • Comments 4 comments
  • 34461a
Related
Recommended

Agilent 34461A Road Test: (3 of 3) Interfacing with LabVIEW

tassieengineer
tassieengineer
28 Nov 2013

Part 1

Part 2

Part 3 (you're there)


This is the part I was looking forward to the most.

Interfacing the device with LabVIEW is simple, and quick. In fact I think it took less time to get it talking to LabVIEW than it did to do the initial set-up (even discounting the previously mentioned fuse replacement).

 

Instructions here are for LabVIEW version 8.6, some points will require you to modify the instructions. These should be obvious.

First you'll want to get the LabVIEW drivers for the 61A. Go to http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=21589 download them, and extract the "Agilent 3446X Series" folder to your instr.lib folder (in my case it was C:\Program Files\National Instruments\LabVIEW 8.6\instr.lib). There are some examples in the "Examples" folder, which can be a good start if you want to just double click something and start using it, however that's not the purpose of this blog post.

So lets see how to get your new shiny toy going in LabVIEW.

 

I'll assume you know how to use LabVIEW at a workable level for this, and I'll be using Australian English for the most part, but US English when required for LabVIEW related functions.

So open up LabVIEW and open a blank VI and go to the block diagram.

In the pallets you'll want to navigate to Instrument I/O -> Instrument Drivers -> Agilent 3446X (it may be worth pinning this open).

The first thing you want to do is initialise the device, so drop the "Initialize" VI onto the block diagram. Create a control for the VISA resource name.

Next you'll want to configure the various aspects of the device.

Go to the configure pallette -> measurement and put the configure measurement VI onto the block diagram, and wire the resource and error connections from the initialize VI. Create controls for the other inputs if desired.

Now I'll assume you want to trigger measurements somehow so drop the configure trigger VI onto the block diagram, wire in the resource and error connections and create controls for the others (if desired).

I left the inputs for autorange and autodelay as constants, as well as the trigger source as a constant (set to software).

At this point I have a configure multipoint VI. My VI is set to allow you to set the number of measurements you wish to average to determine each point.

That VI is in the "low level" pallette. I set a trigger count of 1, and used a control to set the number of points (called Sample Count).

 

At this point I'll pause to say that the VI being created will kind of emulate the "trend" function built into the 61A, but the refresh rate is likely to be slower.

 

So create a while loop and create a control attached to the loop condition.

 

Feed the VISA resource and error into the loop (you are keeping these going right?).

 

For the moment we'll revert back out of the loop to clean things up. Place the Error Query and Close VIs from the 6X palette and then a simple error handler.

 

Back inside the loop now. We have the device set up and roaring to go (not literally roaring of course, it's actually more of a quiet purr).

In the 6X data palette -> Low level, place in order, Initiate, Send Software Trigger and Fetch Multiple Points VIs. Wire the resource and error connections through, and then to the error handling stuff added previously.

 

If you were to run it now, it'd run fine, but you wouldn't get any data shown.

 

The data that you get out of the Fetch Multiple Points VI is 1D array. We'll find the average of this array and use that as the data output.

In the Numeric Palette, place the add array elements VI on your block diagram, and wire into it the output of the Fetch Mulitple Points VI.

Then just divide that by the sample count to get the array (this is left as an exercise for the reader [or just look at the screenshot]).

 

Add a chart to the front panel, place it's block diagram variable in the loop and connect it to your average value.

Connect up your 61A to the computer, turn it on, select the correct front panel settings, and hit run.

It’s also possible to modify your newly minted VI so that you can change the samples per point without having to stop the VI and rerun it through the use of an event loop .

image

image

You may also decide that you wish to log the data too. Well you can, and it's as simple as adding the bog standard write to spreadsheet file block and deciding exactly what it is you want to log.

In the example shown below (that I used for the testing in blog post 2) I am logging the set point, the "average value", and the individual readings. I am using %f as the string formatting so that I don't need to worry about the number of decimal places etc. I'm using comma as a separator to make the written file a CSV, and the filename is chosen at the start of the program, I'm also appending rather than overwriting.

image

So that's it everyone. You should now have a functioning LabVIEW interface for recording data from your Agilent 34461A.

 

I hope you enjoyed this series of blog posts.

  • Sign in to reply
  • bodgy
    bodgy over 11 years ago in reply to tassieengineer

    Sorry my prepositions went all awry - i meant 'in anger'

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • tassieengineer
    tassieengineer over 11 years ago in reply to bodgy

    What do you mean by "on anger"?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • bodgy
    bodgy over 11 years ago

    Thank you for your review.

     

    Do you intend to use it on 'anger' on anything else?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 11 years ago

    Very nice.

     

    I was hoping the Labview interface would be simple.

    When I saw the specs for the DMM I was sure it would be very useful to integrate into analysis instruments.

     

    DAB


    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube