在当前版本的Measurement Computings通用库中,UniversalLibrary.py模块已损坏。 解决方法是:
def cbGetStatus(BoardNum, Status, CurCount,
CurIndex, FunctionType):
"""Returns status about potentially currently running background operation"""
Status = ctypes.c_short(Status)
CurCount = ctypes.c_long(CurCount)
CurIndex = ctypes.c_long(CurIndex)
## Legacy call doesn't work with current cbw32.dll
## CHK( cbw.cbGetStatus(BoardNum, byref(Status), byref(CurCount),
## byref(CurIndex), FunctionType))
CHK( cbw.cbGetIOStatus(BoardNum, byref(Status), byref(CurCount),
byref(CurIndex), FunctionType))
return Status.value, CurCount.value, CurIndex.value
From: https://bytes.com/topic/python/insights/556033-python-universal-library-bug-fix