gpib安装包 python_ioctl errorno:25在使用pythongpib的GPIB通信中

我正在尝试与一个泰克示波器TDS210通信使用一个GPIB-USB-HS适配器的国家仪器。我的系统是ubuntu14.04.3,在这里我安装了linuxgpib,如链接所述:Linux GPIB Driver package (source)和python gpib。我重新配置了/etc/gpib.conf像这样: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

}

lsmod给我这个:

^{pr2}$

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

但当尝试使用ibtest与示波器通信时,我收到以下错误:gpib status is:

ibsta = 0x8100 < ERR CMPL >

iberr= 0

EDVR 0: OS error

ibcnt = 25

对于Python:import Gpib

tds = Gpib.Gpib(0,0)

tds.write("*IDN?")

---------------------------------------------------------------------------

GpibError Traceback (most recent call last)

in ()

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)

有没有人已经有类似的问题或知道如何解决这个问题?在


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部