Results 1 to 4 of 4
Hello! I am new to Linux, using Ubuntu 9.04. I need to gather data from an Agilent Digital Multimeter model 34410A. So, I am looking for an API to do ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-13-2011 #1
- Join Date
- Jun 2011
API for Agilent Digital Multimeter
I am new to Linux, using Ubuntu 9.04. I need to gather data from an Agilent Digital Multimeter model 34410A. So, I am looking for an API to do so. I am having a lot of trouble understanding some of the material I found through some Google searches, such as information about "USBTMC". I do not even know if it is relevant for my goal.
Basically, I want to be able to take some readings from the multimeter and output them into the terminal. I just need some IO commands to do so.
Would be very grateful for any information. Hopefully this is in the correct forum.
- 06-19-2011 #2
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
From what I read, this device uses SCPI (Standard Commands for Programmable Instruments), an ASCII (text) based command language. From this, I would assume that when you plug it in to the USB port on your computer, it presents a standard serial usb interface, which is something that you can use normal I/O functions to communicate with if you are writing your own programs, or can use something like the minicom terminal emulator to manually communicate with the device. In any case, you need to know about SCPI and the commands/options this device supports. Here is a link to the SCPI command syntax guide: http://www.home.agilent.com/agilent/...5.536908384.00Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 06-20-2011 #3
- Join Date
- May 2009
I'm in a similar situation; the driver "usbtmc" takes a usb based device and acquires the USB connection to the device and makes it act like a GPIB bus. It's called USB488 interface inside the driver itself. The USB standard defines a common interface to measurement/test equipment devices. That driver handles some kind of conversion to USB packets of the text one sends, and gives extra controls (ioctls) for handling the device. I don't see much else in the source code of the driver.
Perhaps what I am trying (although it is not a solution) may help you troubleshoot as well.
I have a "SoftMark" USB-to-GPIB dongle that I am trying to connect to a tektronix oscilloscope to my computer with (no pci slots for a true GPIB card...). I was expecting it, too, to speak "SCPI" -- but I didn't see a device driver in Linux claim it when it was plugged in... The USB subsystem hooks up to it using a default mode of some kind, and it shows up in /dev/bus/usb/<foo bus #>/<foo device #>
I used the command line "lsusb" to find the usb bus and device number to decide which directory under /dev/bus/usb that I should change to.
I was hoping it was a text only interface -- but when I tried cat /dev/bus/usb/001/007 the SoftMark interface returned some binary formatted data; it isn't even unicode. So at least part of the interface is binary, and not human readable (the capabilities request, I think...). You could try that much on your device and see if it gives you text or binary information....
I'll start a thread on it tomorrow if I can't solve this quickly tonight; but I am having difficulty with getting the kernel driver to recognize the usb dongle in any event, usbtmc doesn't create a device node in my /dev/ directory that I can find -- nor does the dmesg command yield any useful information about it. So, it is possible that my dongle isn't compatible. If you have a module for "usbtmc", doing "modprobe usbtmc" and then plugging your cable in ought to cause a /dev/usbtmc0 to appear. That is a quick way -- that works for most people -- to see if you need usbtmc. I have udev running on my system, and I am not sure if it is causing problems or not -- because it doesn't have rules to recognize the dongle.
- 06-20-2011 #4
- Join Date
- Jun 2011
Since I posted the topic, I have managed to figure out how to communicate with the multimeter.
First, I went to the agilent site and downloaded and installed the USBTMC driver. (I cannot post links to this forum yet, so you'll have to search "agilent digital multimeter in linux" to find it)
Then, I ran the driver. While loaded, it creates several files located at /dev/usbtmc<some number> where the number can be from 0 through 9. Whenever commands are written to these files, the associated usbtmc compatible device overwrites the command with a response (same files). /dev/usbtmc0 contains information about the detected usbtmc compatible devices.
As for the commands, they are indeed SCPI commands. For example, the one I needed was MEAS:VOLT:AC? which means "query the AC voltage". When I typed:
Since it is a simple ASCII file, you can easily write to it with read/write commands in C or some other language.