Subversion Repositories f9daq

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
146 f9daq 1
RPC PROTOCOL FOR COMMUNICATING WITH VXI11-ENABLED DEVICES OVER ETHERNET FROM LINUX
2
==================================================================================
3
(including instruments such as oscilloscopes, by manufacturers such as
4
Agilent and Tektronix, amongst others).
5
 
6
By Steve D. Sharples, June 2006.
7
 
8
This is a collection of source code that will allow you to talk to ethernet-
9
enabled instruments that use the VXI11 protocol, from Linux. This includes
10
a wide range of instruments (including oscilloscopes, logic analysers,
11
function generators etc) by a wide range of manufacturers (including
12
Tektronix and Agilent to name just a couple). An interactive "send and
13
receive" utility is included as an example.
14
 
15
You may want to build on to this libraries for your specific instruments -
16
I'm currently working on libraries for talking to Agilent Infiniium scopes,
17
and will probably do the same for Tektronix scopes too. Basically if you've
18
got a Programmer's Reference for your instrument, and this code, you should
19
be able to cobble something together.
20
 
21
This collection of code has been produced because I grew frustrated at how
22
difficult it seemed to be to do a relatively simple task. None of the
23
major manufacturers had any "out of the box" Linux solutions to talking to
24
their instruments (although often I would talk to technical folks who would
25
try their best to help). One of the solutions offered was to use something
26
called NI VISA; parts of this are closed source, it was enormous, and I had
27
worries about legacy issues with changing PC hardware.
28
 
29
Via Guy McBride at Agilent, I obtained a copy of a vxi11.x RPC file similar
30
to the one included here (although no-one at Agilent seemed to know or care
31
where it came from). After lots of searching on the information superhighway
32
I located what I believe is the original source (or something like it); see
33
the section on vxi11.x below. This source seems to have literally been written
34
from the published VXI11 protocol. I also received from Agilent a simple
35
example program that showed you how to use the protocol; working from this
36
and the (open) source that uses the vxi11.x that is included here, I wrote
37
vxi11_cmd and the user libraries.
38
 
39
This collection of source code consists of:
40
 
41
(1) vxi11.x
42
This file, vxi11.x, is the amalgamation of vxi11core.rpcl and vxi11intr.rpcl
43
which are part of the asynDriver (R4-5) EPICS module, which, at time of
44
writing, is available from:
45
http://www.aps.anl.gov/epics/modules/soft/asyn/index.html
46
More general information about EPICS is available from:
47
http://www.aps.anl.gov/epics/
48
This code is open source, and is covered under the copyright notice and
49
software license agreement shown below, and also at:
50
http://www.aps.anl.gov/epics/license/open.php
51
 
52
It is intended as a lightweight base for the vxi11 rpc protocol. If you
53
run rpcgen on this file, it will generate C files and headers, from which
54
it is relatively simple to write C programs to communicate with a range
55
of ethernet-enabled instruments, such as oscilloscopes and function
56
generators by manufacturers such as Agilent and Tektronix (amongst many
57
others).
58
 
59
(2) vxi11_user.cc (and vxi11_user.h)
60
These are (fairly) friendly user libraries. At the core are 4 key functions:
61
vxi11_open(), vxi11_close(), vxi11_send() and vxi11_receive(). These allow
62
you to talk to your device. There are also some other functions that I
63
considered to be generally useful (send_and_receive, functions for sending
64
and receiving fixed length data blocks etc) that are all non-instrument-
65
specific.
66
 
67
(3) vxi11_cmd.c
68
This is a fairly simple interactive utility that allows you to send
69
commands and queries to your vxi11-enabled instrument, which you
70
locate by way of IP address. I recommend you start with *IDN? It shows you
71
how the vxi11_user library works
72
 
73
(4) Makefile
74
Type "make" to compile the source above. Type "make clean" to remove
75
old object files and ./vxi11_cmd. Type "make install" to copy
76
./vxi11_cmd to /usr/local/bin/
77
 
78
(5) GNU_General_Public_License.txt
79
Fairly obvious. All programs, source, readme files etc NOT covered by any
80
other license (e.g. vxi11.x, which is covered by its own open source
81
license) are covered by this license.
82
 
83
These programs are free software; you can redistribute it and/or
84
modify it under the terms of the GNU General Public License
85
as published by the Free Software Foundation; either version 2
86
of the License, or (at your option) any later version.
87
 
88
These programs are distributed in the hope that they will be useful,
89
but WITHOUT ANY WARRANTY; without even the implied warranty of
90
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
91
GNU General Public License for more details.
92
 
93
You should have received a copy of the GNU General Public License
94
along with this program; if not, write to the Free Software
95
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
96
 
97
The author's email address is steve.no.spam.sharples@nottingham.ac.uk
98
(you can work it out!)