-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overflow during instrument initialization Chroma Power supply #34
Comments
Can you connect directly and send commands like this?
The only thing that I can think of is the power supply may not implement the clear command correctly. |
Hi,
Thanks for your answer, this is what I get. To me this looks like an
overflow when handling a response
Thanks in advance
>> import usbtmc
>> instr = usbtmc.Instrument('USB::5784::2103::009000000571::INSTR')
>> print(instr.ask("*IDN?"))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/usr/local/lib/python3.5/dist-packages/python_usbtmc-0.8-py3.5.egg/usbtmc/usbtmc.py",
line 629, in ask
File
"/usr/local/lib/python3.5/dist-packages/python_usbtmc-0.8-py3.5.egg/usbtmc/usbtmc.py",
line 609, in write
File
"/usr/local/lib/python3.5/dist-packages/python_usbtmc-0.8-py3.5.egg/usbtmc/usbtmc.py",
line 475, in write_raw
File
"/usr/local/lib/python3.5/dist-packages/python_usbtmc-0.8-py3.5.egg/usbtmc/usbtmc.py",
line 349, in open
File
"/usr/local/lib/python3.5/dist-packages/python_usbtmc-0.8-py3.5.egg/usbtmc/usbtmc.py",
line 699, in clear
File "/usr/local/lib/python3.5/dist-packages/usb/core.py", line 1043, in
ctrl_transfer
self.__get_timeout(timeout))
File "/usr/local/lib/python3.5/dist-packages/usb/backend/libusb1.py",
line 883, in ctrl_transfer
timeout))
File "/usr/local/lib/python3.5/dist-packages/usb/backend/libusb1.py",
line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 75] Overflow
…>>
On Thu, Aug 10, 2017 at 12:12 AM, Alex Forencich ***@***.***> wrote:
Can you connect directly and send commands like this?
instr = usbtmc.Instrument('USB::5784::2103::009000000571::INSTR')
print(instr.ask("*IDN?"))
The only thing that I can think of is the power supply may not implement
the clear command correctly.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#34 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AcxqLS58xHSmd_dECgML1JbxsWBfDL7xks5sWi7MgaJpZM4OYA1g>
.
|
I tried some modification to the libusb library to get a bit further, but
something else must be wrong. I have marked my modifications in BOLD.
Basically, the overflow happens when the low level routines check the
length field, increasing the data from 0x0001 into [0x0, 0x1], or incresing
the length by 1 removes the first overflow, but then the failure occurs
when waiting for the response to the IDN command. Basically we get a
timeout.
@methodtrace(_logger)
def ctrl_transfer(self,
dev_handle,
bmRequestType,
bRequest,
wValue,
wIndex,
data,
timeout):
addr, length = data.buffer_info()
length *= data.itemsize
* print ("CTRL ", self, dev_handle, bmRequestType, bRequest, wValue,
wIndex, data, timeout)*
* print ("CTRL a ", addr, length)*
* length = length + 1*
ret = _check(self.lib.libusb_control_transfer(
dev_handle.handle,
bmRequestType,
bRequest,
wValue,
wIndex,
cast(addr, POINTER(c_ubyte)),
length,
timeout))
* print (ret)*
return ret
0
0
CTRL <usb.backend.libusb1._LibUSB object at 0x7f697030d0b8>
<usb.backend.libusb1._DeviceHandle object at 0x7f697030d518> 128 6 768 0
array('B', [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0]) 1000
CTRL a 18966592 255
26
26
0
0
0
0
0
0
0
0
CTRL <usb.backend.libusb1._LibUSB object at 0x7f697030d0b8>
<usb.backend.libusb1._DeviceHandle object at 0x7f697030d518> 161 5 0 0
array('B', [0]) 5000
CTRL a 18691216 1
2
2
CTRL <usb.backend.libusb1._LibUSB object at 0x7f697030d0b8>
<usb.backend.libusb1._DeviceHandle object at 0x7f697030d518> 161 6 0 0
array('B', [0, 0]) 5000
CTRL a 18691216 2
2
2
0
CTRL <usb.backend.libusb1._LibUSB object at 0x7f697030d0b8>
<usb.backend.libusb1._DeviceHandle object at 0x7f697030d518> 161 7 0 0
array('B', [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0]) 5000
CTRL a 18630384 24
24
24
0
0
0
*-7*
*CTRL <usb.backend.libusb1._LibUSB object at 0x7f697030d0b8>
<usb.backend.libusb1._DeviceHandle object at 0x7f697030d518> 162 1 1 2
array('B', [0, 0]) 5000*
*CTRL a 18691280 2*
2
2
Traceback (most recent call last):
File "./testusb.py", line 5, in <module>
print(instr.ask("*IDN?"))
File
"/usr/local/lib/python3.5/dist-packages/python_usbtmc-0.8-py3.5.egg/usbtmc/usbtmc.py",
line 629, in ask
* File
"/usr/local/lib/python3.5/dist-packages/python_usbtmc-0.8-py3.5.egg/usbtmc/usbtmc.py",
line 609, in write*
File
"/usr/local/lib/python3.5/dist-packages/python_usbtmc-0.8-py3.5.egg/usbtmc/usbtmc.py",
line 492, in write_raw
File "/usr/local/lib/python3.5/dist-packages/usb/core.py", line 387, in
write
return self.device.write(self, data, timeout)
File "/usr/local/lib/python3.5/dist-packages/usb/core.py", line 948, in
write
self.__get_timeout(timeout)
File "/usr/local/lib/python3.5/dist-packages/usb/backend/libusb1.py",
line 825, in bulk_write
timeout)
File "/usr/local/lib/python3.5/dist-packages/usb/backend/libusb1.py",
line 924, in __write
_check(retval)
* File "/usr/local/lib/python3.5/dist-packages/usb/backend/libusb1.py",
line 596, in _check*
* raise USBError(_strerror(ret), ret, _libusb_errno[ret])*
*usb.core.USBError: [Errno 110] Operation timed out*
*0*
sps@kbg6229:~/rte/kmlib/instruments$
On Fri, Aug 11, 2017 at 10:21 AM, Santiago Palomino Sanchez-Manjavacas <
[email protected]> wrote:
… Hi,
Thanks for your answer, this is what I get. To me this looks like an
overflow when handling a response
Thanks in advance
>>> import usbtmc
>>> instr = usbtmc.Instrument('USB::5784::2103::009000000571::INSTR')
>>> print(instr.ask("*IDN?"))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/python_usbtmc-0.8-py3.5.egg/usbtmc/usbtmc.py",
line 629, in ask
File "/usr/local/lib/python3.5/dist-packages/python_usbtmc-0.8-py3.5.egg/usbtmc/usbtmc.py",
line 609, in write
File "/usr/local/lib/python3.5/dist-packages/python_usbtmc-0.8-py3.5.egg/usbtmc/usbtmc.py",
line 475, in write_raw
File "/usr/local/lib/python3.5/dist-packages/python_usbtmc-0.8-py3.5.egg/usbtmc/usbtmc.py",
line 349, in open
File "/usr/local/lib/python3.5/dist-packages/python_usbtmc-0.8-py3.5.egg/usbtmc/usbtmc.py",
line 699, in clear
File "/usr/local/lib/python3.5/dist-packages/usb/core.py", line 1043,
in ctrl_transfer
self.__get_timeout(timeout))
File "/usr/local/lib/python3.5/dist-packages/usb/backend/libusb1.py",
line 883, in ctrl_transfer
timeout))
File "/usr/local/lib/python3.5/dist-packages/usb/backend/libusb1.py",
line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 75] Overflow
>>>
On Thu, Aug 10, 2017 at 12:12 AM, Alex Forencich ***@***.***
> wrote:
> Can you connect directly and send commands like this?
>
> instr = usbtmc.Instrument('USB::5784::2103::009000000571::INSTR')
> print(instr.ask("*IDN?"))
>
> The only thing that I can think of is the power supply may not implement
> the clear command correctly.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#34 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AcxqLS58xHSmd_dECgML1JbxsWBfDL7xks5sWi7MgaJpZM4OYA1g>
> .
>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I am trying to run a simple example, but even if the device is enumerated properly with:
The initialization code fails with an overflow.
I Added some printout of the ctrl_transfers as they go, it is the last one that produces the overflow:
Thanks in advance
The text was updated successfully, but these errors were encountered: