Thanks Kofen.
I haven't actually used prologix before, I normally use pyvisa, which has a nice function to return all data as list of floats;
voltages = kei2000.query_ascii_values("trace:data?")
which works fine with usb-serial and twilight ar488, as one big read.
Maybe it's the additional network functionality that requires multiple reads, IDK.
Anyway, if multi-read fixes it, that's great.
I'll give it a try after the weekend.
Sounds like you have some nice kit...K2002, K2182. I do like the Keithley stuff.
Regards,
I realize I was a bit short in my reply yesterday.
Over GPIB there are usally two ways to know when the instrument is done sending/has cleared it buffer.
The gpib bus is quite robust as it has it own hardware line for this EOI (End Of Identify).
Normal behaviour of the Talker(the instrument sending data), is to raise this line to mark the end of a message/buffer.
This is the prefered way and is used on most instruments.
The other method is a line termination in the message string, usally LR/CR (Hence the \n hack in your code yesterday).
This is not the prefered method as this is not a requirement in the GPIB specification so the manufacturer is not required to enforce this, and when you ask for raw binary data of many instrument, you will not get the line termination.
The prologix does support EOI, but you need to handle it on the topside in the driver/library.
Prologix is a very low level bridge, made as transparent as possible so the logic handling is shifted to the driver, aka the user.
Since I have not used the library you are using, beside a quick test to confirm it was compatible with the adapter, I opted to hack in the \n as I know this behaviour is supported by the DMMs in question.
But it is not a fix for all. I don't know how it handles EOI in the background, if at all.
Since the adapter is made to be 100% compatible with prologix ethernet adapter, I do not wish to make any changes on the fw on the adapter to enforce other behaviour as this will just break everything and make it harder for people(aka me) to switch adapter depending on which one is closest in my drawer.
Now more interesting is the VXI apporach, here we have much more options and this is something me and bateau020 need to look at and discuss when he is back.
The goal should not have it mimic a DMM6500 as then we create an "instrument" for the instrument, but rather we should study the behaviour of the Agilent GPIB Gateway as this is a very robust device(and I have one for easy testing comparison). Since we do not need to clone a speific device behaviour, we are much more free to decide how to handle interactions on the instrument side. But every smart logic we add to the adapter, makes for increased risk of incompaible behaviour of older instruments / instruments that do not enforce thru GPIB standard implementation.
I'll admit, I have not yet fully dug into the VXI code for the adapter, as bateau020 did the heavy lifting there and I have focused on fixing bugs in the prologix parts and support.
When it comes to the AR488 serial adapter behaviour, I have no way of knowing why your script works with that, as I have not seen the code. IRCC, it spits out byte for byte on the serial bus so I am sure the heavy lifting is done topside there as well.
What is very important to me is the feedback from all the users, that helps define what is needed for this adapter to work for all of you, regadless of Python / code foo.
Maybe looking into the pyvisa prologix fork and get that pushed to main is good enough. Maybe we need to create a more robust prologix python library to suit more of the use cases?
I don't know, but with feedback and help with issues in this thread we will figure it out, but I hope for some understanding that I need some time to get the overview.
What I do wish for all of you, if you have issues, write it in the thread, not on PM, as this helps us share the challenges so we all learn, and then we can compile it to an FAQ.
Creating my first "popular" open source project is a big learning curve, the most obvious thing that is missing is good documentation, that should have been done before launching, but I did not know any better and I am working on it. But right now I am in a bit of catch22 as I try to write docs to help, but also have a lot of support cases to get you guys running. This is in no way of a complaint, I am very grateful for your orders and support, I just need some patience from you guys. I am truly humble that you have trusted me and supported me.