pyvisa / pyvisa-py

A pure python PyVISA backend
https://pyvisa-py.readthedocs.io
MIT License
282 stars 120 forks source link

Fix custom USB timeout and recover after USBTMC timeout #179

Closed ghost closed 5 years ago

ghost commented 5 years ago

48ef42325506da999e976c0cfe67e79f9bdc1eab implements an USBTMC abort sequence after a read timeout. Similar abort sequences are used by python-usbtmc and NI-VISA to recover after a read timeout. Also improves a few specific USBTMC technicalities. Fixes #177.

cdc3e47912349d08a4eda58eb8676b8c4a4fa442 fixes a bug in custom timeout handling for USB instruments. Fixes #178.

MatthieuDartiailh commented 5 years ago

Sorry for the slow feedback. See my answer to the read question. Also did you test the changes ? and could you update the changelog ?

ghost commented 5 years ago

Sorry for the slow feedback. See my answer to the read question.

No problem. Thanks for your review. I'm glad to have this alternative for NI-VISA, so it's worth putting in some time to improve it.

Also did you test the changes ?

Yes. I tested simple write/query communication and timeout behaviour with a Thorlabs PM100D power meter and Tektronix FCA3000 frequency counter. Tested again after the last changes.

and could you update the changelog ?

done.

MatthieuDartiailh commented 5 years ago

Thanks for the patch.

Merging

bors r+

bors[bot] commented 5 years ago

Build succeeded