File: README

package info (click to toggle)
linux-gpib-user 4.3.7-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,760 kB
  • sloc: ansic: 10,381; perl: 1,120; xml: 375; makefile: 335; yacc: 335; tcl: 308; python: 173; php: 157; lex: 144; sh: 134; lisp: 94
file content (51 lines) | stat: -rw-r--r-- 973 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

This is a python GPIB interface to use gpib library calls from python language.
(Quick hacked)

27 January 2004 -- added functions gpib.readbin() and gpib.writebin(), as well
as variables gpib.ibsta() and gpib.ibcnt(). -- John Ackermann <jra@febo.com>

Installation:

'make' then 'make install'

To use the GPIB extension directly the call syntax is similar as in the C library:

  ##
  # Include the GPIB extension
  ##
  import gpib

  ##
  # find & initialize the device
  ##
  device = gpib.find("my_device")
  
  ##
  # write a string to the device
  ##
  gpib.write(device,"A Command_String")

  ##
  # write a binary string to the device
  ##
  gpib.writebin(device,"A Command_String",16)

  ##
  # read a 25 byte string
  ##
  result = gpib.read(device,25)

  print 'the result is: ' + result

  ##
  # read a binary string
  ##
  result = gpib.readbin(device,4096)  #length of result equals ibcnt

To use the Gpib Class module see gpibtest.py


Have Fun!

clausi