0

I have a working GPIB interface and Linux-GPIB package installed and working.

I only know two commands at the moment, x.write and x.find. I don't know much about Python, but I recognize the dot operator and realize that after importing gpib, I should get some functions at my disposal.

I have not been able to locate the list of GPIB functions.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
wbg
  • 866
  • 3
  • 14
  • 34

3 Answers3

1

If you are working in Python, I think the pyvisa is what you are looking for. It provides lots of useful high level functions which helps you to send a series of SCPI commands to your equipment via GPIB, such as write, read,ask and so on.

As for SCPI commands themselves, usually they will differ from the different vendors. So in terms of what kind of SCPI you should send to the equipment, you should read the corresponding datasheet. But in the other case, you could have installed the drivers which were provided by the vendor. In this case you can send some even higher commands. For instance, if you would like to control a voltage source, they have probably already got the function setvoltage(double voltage). Things will be much more easier for you.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
1

They are in the gpib library. You reference them like so: gpib.foo().

Add this line into your code:

help(gpib)

And browse through the functions/classes.

Blender
  • 289,723
  • 53
  • 439
  • 496
  • awesome thanks...I don't have my lab note book with me at home, and I was trying to remember the commands I had used. I do 'gpib(help)' from a python prompt ? – wbg Jun 08 '11 at 05:49
  • I can see a list of functions in what looks like VI, same for man pages. But I don't know how to navigate to 'clear' and read more details... – wbg Jun 12 '11 at 18:21
  • To exit, hit `q`. Navigate with the arrow keys. You can do `help()` on just about anything, so try it out. It only is helpful if the developers included comments in the code, though... – Blender Jun 12 '11 at 20:28
  • If I remember correctly the `gpib` module is the C extension and `Gpib` is the higher level interface. – P3trus Feb 20 '13 at 07:48
0

Actually there are many commands available. Except those two you mentioned, there are x.read, x.ask, x.ask_for_value and so on.

But I recommend your to read those help file, I think that will give you a better understanding.

2342G456DI8
  • 1,819
  • 3
  • 16
  • 29