日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程语言 > python >内容正文

python

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

發(fā)布時(shí)間:2025/1/21 python 61 豆豆
生活随笔 收集整理的這篇文章主要介紹了 gpib安装包 python_ioctl errorno:25在使用pythongpib的GPIB通信中 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

我正在嘗試與一個(gè)泰克示波器TDS210通信使用一個(gè)GPIB-USB-HS適配器的國(guó)家儀器。我的系統(tǒng)是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給我這個(gè):

^{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

但當(dāng)嘗試使用ibtest與示波器通信時(shí),我收到以下錯(cuò)誤:gpib status is:

ibsta = 0x8100 < ERR CMPL >

iberr= 0

EDVR 0: OS error

ibcnt = 25

對(duì)于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)

有沒有人已經(jīng)有類似的問題或知道如何解決這個(gè)問題?在

總結(jié)

以上是生活随笔為你收集整理的gpib安装包 python_ioctl errorno:25在使用pythongpib的GPIB通信中的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。