Skip to content
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

[COM] Performance issue - slow transfer - USB #422

Open
0xDEADBEEF-ASAP opened this issue Mar 28, 2024 · 4 comments
Open

[COM] Performance issue - slow transfer - USB #422

0xDEADBEEF-ASAP opened this issue Mar 28, 2024 · 4 comments

Comments

@0xDEADBEEF-ASAP
Copy link

0xDEADBEEF-ASAP commented Mar 28, 2024

Hi! SDS1202XE , USB, pyvisa, pyvisa-py, pyusb, arch Linux (os not virtualized).

750.1 KiB / 1 min transfer rate.

Can it be improved? What can I change or check to make it faster?

Tried different chunk size, timeouts, baudrates, with and without python venv, with and without '@py'.

IMG_221

IMG_20

IMG_20240328_132032

@MatthieuDartiailh
Copy link
Member

Can you post the output of ptvisa-info and try to downgrade to 0.7.1 ?

0.7.2 introduce a fix that may be responsible for the slow transfer you observe.

@0xDEADBEEF-ASAP
Copy link
Author

I will downgrade to 0.7.1 tomorrow, and post a feedback.

For now pyvisa-info:

Machine Details:
Platform ID: Linux-6.8.2-arch2-1-x86_64-with-glibc2.39
Processor:

Python:
Implementation: CPython
Executable: /home/arch/usbtmc/.venv/bin/python
Version: 3.11.8
Compiler: GCC 13.2.1 20230801
Architecture: ('x86', 64)
Build: Feb 12 2024 14:50:05 (#main)
Unicode: UCS4

PyVISA Version: 1.14.1

Backends:
ivi:
Version: 1.14.1 (bundled with PyVISA)
Binary library: Not found
py:
Version: 0.7.2
USB INSTR: Available via PyUSB (1.2.1). Backend: libusb1
USB RAW: Available via PyUSB (1.2.1). Backend: libusb1
TCPIP INSTR: Available
Resource discovery:

  • VXI-11: partial (psutil not installed)
  • hislip: disabled (zeroconf not installed)
    TCPIP SOCKET: Available
    ASRL INSTR:
    Please install PySerial (>=3.0) to use this resource type.
    No module named 'serial'
    VICP INSTR:
    Please install PyVICP to use this resource type.
    GPIB INSTR:
    Please install linux-gpib (Linux) or gpib-ctypes (Windows, Linux) to use this resource type. Note that installing gpib-ctypes will give you access to a broader range of functionalities.
    No module named 'gpib'
    GPIB INTFC:
    Please install linux-gpib (Linux) or gpib-ctypes (Windows, Linux) to use this resource type. Note that installing gpib-ctypes will give you access to a broader range of functionalities.
    No module named 'gpib'

@0xDEADBEEF-ASAP
Copy link
Author

0xDEADBEEF-ASAP commented Apr 3, 2024

Hi! pyvisa-py 0.7.1 it download screenshot super fast but first screenshot is incomplete 200kb , next screenshots are 60kb - full screenshot should be ~750kb). Oscilloscopeis has latest firmware.
0.7.2 can download full 750kb screenshot but it takes long time ~ 1 min.

Maybe a terminarion issue in 0.7.2?

Pyvisa-info:

Machine Details:
Platform ID: Linux-6.8.2-arch2-1-x86_64-with-glibc2.39
Processor:

Python:
Implementation: CPython
Executable: /home/arch/test2/.venv/bin/python
Version: 3.11.8
Compiler: GCC 13.2.1 20230801
Architecture: ('x86', 64)
Build: Feb 12 2024 14:50:05 (#main)
Unicode: UCS4

PyVISA Version: 1.14.1

Backends:
ivi:
Version: 1.14.1 (bundled with PyVISA)
Binary library: Not found
py:
Version: 0.7.1
USB INSTR: Available via PyUSB (1.2.1). Backend: libusb1
USB RAW: Available via PyUSB (1.2.1). Backend: libusb1
TCPIP INSTR: Available
Resource discovery:
- VXI-11: partial (psutil not installed)
- hislip: disabled (zeroconf not installed)
TCPIP SOCKET: Available
ASRL INSTR:
Please install PySerial (>=3.0) to use this resource type.
No module named 'serial'
VICP INSTR:
Please install PyVICP to use this resource type.
GPIB INSTR:
Please install linux-gpib (Linux) or gpib-ctypes (Windows, Linux) to use this resource type. Note that installing gpib-ctypes will give you access to a broader range of functionalities.
No module named 'gpib'
GPIB INTFC:
Please install linux-gpib (Linux) or gpib-ctypes (Windows, Linux) to use this resource type. Note that installing gpib-ctypes will give you access to a broader range of functionalities.
No module named 'gpib'

.
.
.
######## And log file: #########
.
.
.
(.venv) [arch@archlinux test2]$ sudo python ./3-sds-pyvisa.py
2024-04-03 06:45:14,175 - pyvisa - DEBUG - SerialSession was not imported No module named 'serial'.
2024-04-03 06:45:14,223 - pyvisa - DEBUG - USBSession and USBRawSession were correctly imported.
2024-04-03 06:45:14,235 - pyvisa - DEBUG - TCPIPSession was correctly imported.
2024-04-03 06:45:14,237 - pyvisa - DEBUG - GPIBSession was not imported No module named 'gpib'.
2024-04-03 06:45:14,238 - pyvisa - DEBUG - Created library wrapper for py
2024-04-03 06:45:14,239 - pyvisa - DEBUG - Created ResourceManager with session 3509306
2024-04-03 06:45:14,240 - pyvisa - DEBUG - USB0::62701::60986::SDS1EBAQ1R3930::0::INSTR - opening ...
2024-04-03 06:45:14,297 - pyvisa - DEBUG - USB0::62701::60986::SDS1EBAQ1R3930::0::INSTR - is open with session 6351064
2024-04-03 06:45:14,298 - pyvisa - DEBUG - USB0::62701::60986::SDS1EBAQ1R3930::0::INSTR - reading 1048576 bytes (last status <StatusCode.success_max_count_read: 1073676294>)
/home/arch/test2/.venv/lib/python3.11/site-packages/pyvisa_py/protocols/usbtmc.py:115: UserWarning: Unexpected MsgID format. Consider updating the device's firmware. See #20
warnings.warn(
2024-04-03 06:45:14,366 - pyvisa - DEBUG - USB0::62701::60986::SDS1EBAQ1R3930::0::INSTR - reading 1048576 bytes (last status <StatusCode.success_max_count_read: 1073676294>)
2024-04-03 06:45:14,376 - pyvisa - DEBUG - USB0::62701::60986::SDS1EBAQ1R3930::0::INSTR - closing
2024-04-03 06:45:14,377 - pyvisa - DEBUG - USB0::62701::60986::SDS1EBAQ1R3930::0::INSTR - is closed
2024-04-03 06:45:14,377 - pyvisa - DEBUG - Closing ResourceManager (session: 3509306)
(.venv) [arch@archlinux test2]$ sudo python ./3-sds-pyvisa.py
2024-04-03 06:45:33,084 - pyvisa - DEBUG - SerialSession was not imported No module named 'serial'.
2024-04-03 06:45:33,130 - pyvisa - DEBUG - USBSession and USBRawSession were correctly imported.
2024-04-03 06:45:33,142 - pyvisa - DEBUG - TCPIPSession was correctly imported.
2024-04-03 06:45:33,145 - pyvisa - DEBUG - GPIBSession was not imported No module named 'gpib'.
2024-04-03 06:45:33,146 - pyvisa - DEBUG - Created library wrapper for py
2024-04-03 06:45:33,146 - pyvisa - DEBUG - Created ResourceManager with session 2279201
2024-04-03 06:45:33,147 - pyvisa - DEBUG - USB0::62701::60986::SDS1EBAQ1R3930::0::INSTR - opening ...
2024-04-03 06:45:33,169 - pyvisa - DEBUG - USB0::62701::60986::SDS1EBAQ1R3930::0::INSTR - is open with session 7938331
2024-04-03 06:45:33,171 - pyvisa - DEBUG - USB0::62701::60986::SDS1EBAQ1R3930::0::INSTR - reading 1048576 bytes (last status <StatusCode.success_max_count_read: 1073676294>)
/home/arch/test2/.venv/lib/python3.11/site-packages/pyvisa_py/protocols/usbtmc.py:115: UserWarning: Unexpected MsgID format. Consider updating the device's firmware. See #20
warnings.warn(
2024-04-03 06:45:33,185 - pyvisa - DEBUG - USB0::62701::60986::SDS1EBAQ1R3930::0::INSTR - reading 1048576 bytes (last status <StatusCode.success_max_count_read: 1073676294>)
2024-04-03 06:45:33,195 - pyvisa - DEBUG - USB0::62701::60986::SDS1EBAQ1R3930::0::INSTR - closing
2024-04-03 06:45:33,196 - pyvisa - DEBUG - USB0::62701::60986::SDS1EBAQ1R3930::0::INSTR - is closed
2024-04-03 06:45:33,197 - pyvisa - DEBUG - Closing ResourceManager (session: 2279201)
(.venv) [arch@archlinux test2]$

@0xDEADBEEF-ASAP
Copy link
Author

Updated BIOS to latest - but there is the same issue. Maybe I have to change some BIOS settings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants