That's an interesting one. The ++eos command sets the termination characters for data being sent from the interface over the GPIB bus, but there is no equivalent command to set termination for data being sent from the instrument back to the interface. Section "7.1 Binary Data Transmission" of the Prologix manual suggests that "No special action is necessary to receive binary data from instruments. Any binary data received from the instrument is transmitted over USB to PC unmodified, just as with ASCII data.", but also goes on to say that "...binary data from instruments is not usually terminated by CR or LF characters...". In this case it seems that we do have a LF (0x10) character in the returned data. Theoretically 'data' can include any character from 0 to 255. Since the data is not being read with '++read eoi', but is returned automatically in response to the PLOT command, it seems that there is no means to ignore the termination character and rely on the EOI signal to indicate the end of the data. If 0x10 is returned within the data, then, as artag points out, might it be possible for the sequence 0x13, 0x10 (CR LF) to be randomly and unexpectedly returned as well?
If the Prologix does not interpret the termination characters, then presumably it must be relying on the timeout to end the receive process? Otherwise if the instrument is not configured to send EOI, how would it know when to stop receiving? Curious.
tom_iphi, could you send me an example output? You can post it up on the AR488 GitHub issues page if you like (
https://github.com/Twilight-Logic/AR488/issues) or send me a PM. I will investigate further. It may be that the LF detection needs to be removed altogether. Another approach may be to introduce a custom command to deal with termination of data incoming from the instrument. I also look forward to your analysis with the logic analyser.
Regarding the ESP8266, there is an insufficient number GPIO pins available on the ESP8266 to drive all 16 signals on the GPIB bus. I have, however, been working on using an ESP8266 as an add-on module connected via the Tx/Rx pins to the Arduino. The code is 90% there, but there are a couple of sticking points to get past. The ESP32 is probably a better candidate as it does appear to have enough pins and the intention is to complete the work on the ESP8266 and then combine and port the complete code to the ESP32.
Incidentally, I have been working on adding further optional support for an SN75162 chip being used instead of an SN75161, but have ran into some difficulties. Theoretically the two chips function in the same way and both have a TE and DC control pin. However, the SN75162 has an additional separate SC pin to independently control REN and IFC. The logic is otherwise the same and it should be possible to match the exact operation of the SN75161 by synchronising the control of DC with SC except that the state of SC is reversed. While the SN75161 does not falter at all, the SN75162 behaves erratically under certain conditions. I'm wondering whether I am missing something of whether the chip might be a fake? On the datasheet, there are two longer 22 or 24 pin DIL package variants shown when compared to the 20 pin package of the SN75161, but their widths are consistent, whereas this IC is wider? Is there any way to tell whether this SN751262 is genuine or not? Both appear to have a TI logo and the one on the SN75160 looks just like on the datasheet, but on the SN75162 it looks rather different?