Answering my own problem here, just in case someone else bumps into it.
Adding "++read_tmo_ms 25000" gives enough time for the read to complete without timing out.
Glad you figured it out, although I am a little puzzled that it requires a delay quite that long. 100 AC power cycles at 50Hz would take 2 seconds to complete so no more than 2500 - 3000 milliseconds to allow a bit of headroom but I am not familiar with the meter and am not aware as whether there are other factors at play.
Hi John,
there is a possibility that I messed up and left the AR488_Config file in a state where pin 6 is being used by the SN7516 chipset
Indeed, you were spot-on.
I have commented out as instructed and now 7470.exe does receive plot data again. But the AR488 firmware still stalls at the end causing 7470.exe to crash, see attached screenshot. After the stall the 32u4 USB CDC port is still present, but no longer answers to commands like ++ver.
I have also attached logged com port traffic. The last ++ver command not being answered seems to cause 7470.exe to fire the error message and abort.
I know it is close to impossible to track this problem down without more detailled information, something I might be able to help with.
I do have a Saleae Logic 16 logic analyzer here, which I can hook up to the GPIB port and I can record a whole sequence. It seems I can also save a measured sequence to a file. The Saleae software appear to be available to the public for free. If you can install the software and import my measurement data, then you could have a direct look at what's going on on my GPIB bus.
Best regards, Tom
Tom, thanks. I do have the Saleae software installed, but I generally use the Sigrok GPIB Analyser to analyse traffic on the GPIB bus as it can display the decoded data with the trace.
Last night I had the idea to encode the plot data into the sketch and send it on demand with a ++ command. I now have this working and it avoids the problems I was having due to a lack of serial handshaking at the sending end while trying to use a python script to send data over a serial connection. I have been able to confirm that all plot data is now being correctly sent over the GPIB bus to its destination and received correctly by the receiving interface.
However, I then ran into further problems when I switched to Windows to try the 7470 program. After confirming that data is still being transmitted correctly by using the PuTTy terminal, I discovered that although the GPIB Configurator functions fine and identifies the interface and I updated my config.ini, the 7470 program will not communicate with my Uno. I had to defeat the Arduino reset on serial connection with a 10uF capacitor between RESET and GND which resolved this problem. The 7470 program now communicated with the interface and after selecting 'Plotter addressable at 5' from the GPIB menu and selecting 'Wait for device-initiated plot' now shows a red message stating that it is waiting for a plot. So far - so good.
As an aside, I had noticed this phenomenon when I was writing my python script to communicate with the Arduino interface. A two second delay is required to allow the Arduino to reset and reboot, otherwise the script ends up interrogating the bootloader instead and gets no response. I imagine that this does not affect the 32u4 in the same way since the 32u4 does not reset the MCU when a serial connection is made as it does the Uno, Nano and Mega2560.
Next comes the weird part. When I sent the plot and not getting anything in the 7470 program window, I could see in the serial monitor that the received data was now getting garbled. To cut a long story short, after numerous re-boots of the Arduinos and my PC and the problem persisting, I eventually discovered that the problem occurred after connecting the capacitor and seems to happen only while one of my USB hubs is connected. Removing the USB hub from the loop got things back to a sane state and I was then rewarded with my embedded plot appearing in the 7470 program. I repeated the process two or three times just to be sure.
Incidentally, I notice that the 7470 program sends a ++loc after the plot has been received? The ++loc command is not supported in device mode. When operating as a device, the interface cannot exert remote control over an instrument so in this context the ++loc command appears to be superfluous and the 'Unrecognized command' can be safely ignored.
I will have a look at your Saleae log data to see what I can learn. Regarding the delay, I'm not sure about the reason for this at present, but in my test I counted approximately 3 seconds to the red "Reading data..." banner and then 4 seconds after hitting <return> at the terminal for the plot to appear in the 7470 program. My next step is to repeat the process with the 32u4 using the Uno as the sender in case the problem specific to the way that the 32u4 handles serial ports. I will let you know how I get on.