pyvisa / pyvisa-py

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

Updated GPIB interface for review #197

Closed dirkenstein closed 5 years ago

dirkenstein commented 5 years ago

Added some comments as a response

MatthieuDartiailh commented 5 years ago

Great I will merge during the week as I test.

dirkenstein commented 5 years ago

Hi,

I need to release an extra update-

1) gpib_command definition is wrong- the visa implementation takes byes as an argument not an int. The pyvisa-py documentation contradicts the pyvisa documentation in that respect.

There are two outstanding issues:

1) The updates won't work with gpib_ctypes unless you allow _lib to be exported in init.py of that package. I can't figure out any way to work around this. I suggest we add the missing functions directly to gpib_ctypes. Even though this breaks complete compatibility with linux-gpib it makes sense to extend the ctypes version as at least that seems actively maintained and is designed to also work with other 488.2 libraries.

1) The pyvisa-py implementation of gpib_command is based on the gpib_ctypes version which should work. It looks like the linux-gpib version is missing the length argument so is actually buggy.

Regards,

Dirk

On Sun, Jul 14, 2019 at 10:59 PM Matthieu Dartiailh < notifications@github.com> wrote:

Great I will merge during the week as I test.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pyvisa/pyvisa-py/pull/197?email_source=notifications&email_token=AJBR63KEU6FRLB5ZMSDOQTDP7OOVNA5CNFSM4IDSADVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ4OE7Q#issuecomment-511238782, or mute the thread https://github.com/notifications/unsubscribe-auth/AJBR63NT6V6CUBACDDDLLTTP7OOVNANCNFSM4IDSADVA .

MatthieuDartiailh commented 5 years ago

Thanks for the fix I will merge now. I have, I believe, a workaround to access _lib (may not be pretty though). I am in contact with the author of gpib_ctypes and I do hope to upstream those changes for sure.