gpib安装包 python_ioctl errorno:25在使用pythongpib的GPIB通信中
我正在嘗試與一個泰克示波器TDS210通信使用一個GPIB-USB-HS適配器的國家儀器。我的系統(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給我這個:
^{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)
有沒有人已經(jīng)有類似的問題或知道如何解決這個問題?在
總結(jié)
以上是生活随笔為你收集整理的gpib安装包 python_ioctl errorno:25在使用pythongpib的GPIB通信中的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: std中稳定排序算法_敏哥:深挖亚马逊A
- 下一篇: mfc指示灯报警显示_消防水炮需要外置声