EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: ioctl errorno: 25 in GPIB communication using python-gpib
From: Vinícius Mariani Lenart <[email protected]>
To: [email protected]
Date: Thu, 26 Nov 2015 19:10:59 -0200
Dear EPICS,

      I recently discovered the site and I would like to congratulate the good work done. Furthermore, I would like to share a problem =). I post my problem in the stackoverflow site in this link ioctl-errorno-25-in-gpib-communication-using-python-gpib. But I paste a copy below.

I am trying to communicate with a Tektronix oscilloscope TDS 210 using a GPIB-USB-HS adapter of National Instruments. My system is Ubuntu 14.04.3 where I installed linux-gpib as described in this link: Linux GPIB Driver package (source) and also python-gpib. I reconfigured the /etc/gpib.conf like this:

interface {
    minor = 0   /* board index, minor = 0 uses /dev/gpib0, minor = 1 uses /dev/gpib1, etc. */
    board_type = "ni_usb_b" /* type of interface board being used */
    name = "tds"    /* optional name, allows you to get a board descriptor using ibfind() */
    pad = 0 /* primary address of interface             */
    sad = 0 /* secondary address of interface           */
    master = yes    /* interface board is system controller */
    timeout = TNONE /* timeout for commands */
}
device {
       minor = 0
       name = "ATTN"
       pad = 0
       sad = 0
}

The lsmod give me this:

$ lsmod | grep gpib
ni_usb_gpib            36515  1 
gpib_common            38274  3 ni_usb_gpib

The dmesg:

$ dmesg | grep gpib
[ 2173.992039] ni_usb_gpib driver loadingni_usb_gpib: probe succeeded for path: usb-0000:00:1a.0-1.2
[ 2173.992098] usbcore: registered new interface driver ni_usb_gpib
[ 2173.992102] gpib: registered ni_usb_b interface
[ 2173.995077] ni_usb_gpib: attach

But when a try to communicate with the oscilloscope using ibtest I receive this error:

gpib status is: 
ibsta = 0x8100  < ERR CMPL >
iberr= 0
EDVR 0: OS error
ibcnt = 25

And with Python:

import Gpib
tds = Gpib.Gpib(0,0)
tds.write("*IDN?")
---------------------------------------------------------------------------
GpibError                                 Traceback (most recent call last)
<ipython-input-4-e61e6a76ac49> in <module>()
      1 import Gpib
      2 inst = Gpib.Gpib(0,0)
----> 3 inst.write("*IDN?")

/usr/local/lib/python2.7/dist-packages/Gpib.pyc in write(self, str)
     47 
     48         def write(self,str):
---> 49                 gpib.write(self.id, str)
     50 
     51         def write_async(self,str):

GpibError: write() error: Inappropriate ioctl for device (errno: 25)
So, if you know how to fix or can share with the community I will appreciated.

Best regards!

--------------------------------------------------------
Vinícius Mariani Lenart
E-mail: [email protected]
Skype: vmlenart
www.researchgate.net/profile/V_M_Lenart/
"Live long and prosper"
--------------------------------------------------------

Replies:
Re: ioctl errorno: 25 in GPIB communication using python-gpib Rod Nussbaumer

Navigate by Date:
Prev: RE: How to study the epics system in no device? Mazanec Tomáš
Next: Re: ioctl errorno: 25 in GPIB communication using python-gpib Rod Nussbaumer
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: How to study the epics system in no device? Mazanec Tomáš
Next: Re: ioctl errorno: 25 in GPIB communication using python-gpib Rod Nussbaumer
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·