Blame | Last modification | View Log | RSS feed
RPC PROTOCOL FOR COMMUNICATING WITH VXI11-ENABLED DEVICES OVER ETHERNET FROM LINUX==================================================================================(including instruments such as oscilloscopes, by manufacturers such asAgilent and Tektronix, amongst others).By Steve D. Sharples, June 2006.This is a collection of source code that will allow you to talk to ethernet-enabled instruments that use the VXI11 protocol, from Linux. This includesa wide range of instruments (including oscilloscopes, logic analysers,function generators etc) by a wide range of manufacturers (includingTektronix and Agilent to name just a couple). An interactive "send andreceive" utility is included as an example.You may want to build on to this libraries for your specific instruments -I'm currently working on libraries for talking to Agilent Infiniium scopes,and will probably do the same for Tektronix scopes too. Basically if you'vegot a Programmer's Reference for your instrument, and this code, you shouldbe able to cobble something together.This collection of code has been produced because I grew frustrated at howdifficult it seemed to be to do a relatively simple task. None of themajor manufacturers had any "out of the box" Linux solutions to talking totheir instruments (although often I would talk to technical folks who wouldtry their best to help). One of the solutions offered was to use somethingcalled NI VISA; parts of this are closed source, it was enormous, and I hadworries about legacy issues with changing PC hardware.Via Guy McBride at Agilent, I obtained a copy of a vxi11.x RPC file similarto the one included here (although no-one at Agilent seemed to know or carewhere it came from). After lots of searching on the information superhighwayI located what I believe is the original source (or something like it); seethe section on vxi11.x below. This source seems to have literally been writtenfrom the published VXI11 protocol. I also received from Agilent a simpleexample program that showed you how to use the protocol; working from thisand the (open) source that uses the vxi11.x that is included here, I wrotevxi11_cmd and the user libraries.This collection of source code consists of:(1) vxi11.xThis file, vxi11.x, is the amalgamation of vxi11core.rpcl and vxi11intr.rpclwhich are part of the asynDriver (R4-5) EPICS module, which, at time ofwriting, is available from:http://www.aps.anl.gov/epics/modules/soft/asyn/index.htmlMore general information about EPICS is available from:http://www.aps.anl.gov/epics/This code is open source, and is covered under the copyright notice andsoftware license agreement shown below, and also at:http://www.aps.anl.gov/epics/license/open.phpIt is intended as a lightweight base for the vxi11 rpc protocol. If yourun rpcgen on this file, it will generate C files and headers, from whichit is relatively simple to write C programs to communicate with a rangeof ethernet-enabled instruments, such as oscilloscopes and functiongenerators by manufacturers such as Agilent and Tektronix (amongst manyothers).(2) vxi11_user.cc (and vxi11_user.h)These are (fairly) friendly user libraries. At the core are 4 key functions:vxi11_open(), vxi11_close(), vxi11_send() and vxi11_receive(). These allowyou to talk to your device. There are also some other functions that Iconsidered to be generally useful (send_and_receive, functions for sendingand receiving fixed length data blocks etc) that are all non-instrument-specific.(3) vxi11_cmd.cThis is a fairly simple interactive utility that allows you to sendcommands and queries to your vxi11-enabled instrument, which youlocate by way of IP address. I recommend you start with *IDN? It shows youhow the vxi11_user library works(4) MakefileType "make" to compile the source above. Type "make clean" to removeold object files and ./vxi11_cmd. Type "make install" to copy./vxi11_cmd to /usr/local/bin/(5) GNU_General_Public_License.txtFairly obvious. All programs, source, readme files etc NOT covered by anyother license (e.g. vxi11.x, which is covered by its own open sourcelicense) are covered by this license.These programs are free software; you can redistribute it and/ormodify it under the terms of the GNU General Public Licenseas published by the Free Software Foundation; either version 2of the License, or (at your option) any later version.These programs are distributed in the hope that they will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.The author's email address is steve.no.spam.sharples@nottingham.ac.uk(you can work it out!)