EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: WaveyDipole on February 07, 2019, 01:09:29 pm

Title: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 07, 2019, 01:09:29 pm
For the last 4 months or so, I have been working on an updated GPIB firmware for the Arduino. This was originally inspired by Emanuele Girlando's Arduino GPIB sketch which can be found here:

http://egirland.blogspot.com/2014/03/arduino-uno-as-usb-to-gpib-controller.html (http://egirland.blogspot.com/2014/03/arduino-uno-as-usb-to-gpib-controller.html)

My updated sketch implements the same pin assignment scheme, but the sketch is an almost complete re-write of Emanuele's original code with the remaining controller functions now implemented. SRQ and REN lines are now fully supported and device mode has also been added. The ++lon device mode command is currently the only unsupported command. Since I don't have a device that supports secondary addressing to test with, secondary addressing has not been implemented yet. This sketch has been released with Emanuele Girlando's permission and I would like to gratefully acknowledge his helpful observations. I would also like to thank Luke Mester for his invaluable and considerable help with testing.

The code can be found here:
https://github.com/Twilight-Logic/AR488 (https://github.com/Twilight-Logic/AR488)

Problems with the firmware can be logged via the Issues feature on the GitHub page.
Any observations and suggestions for further improvement are welcome.


This thread has gotten pretty long over time so here are links to some of the AR488 projects that have been mentioned within the discussion:

3D Case by Pepsi1
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2348046/#msg2348046 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2348046/#msg2348046)

Enclosure by H.O
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2431767/#msg2431767 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2431767/#msg2431767)

USA Cal Club PCB by Vindoline
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2531685/#msg2531685 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2531685/#msg2531685)
https://github.com/vindoline/AR488-USB-GPIB (https://github.com/vindoline/AR488-USB-GPIB)

Reference to atmega-gpib for MEGA128/MEGA2561 by texaspyro
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2609733/#msg2609733 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2609733/#msg2609733)

Reference to Bench Briefgs article about the HP59401A Bus System Analyser by bitseeker
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2631336/#msg2631336 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2631336/#msg2631336)


PCB for Pro Micro by artag
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2684736/#msg2684736 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2684736/#msg2684736)
(see also subsequent posts)

UNO enclosures by rhb
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2735644/#msg2735644 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2735644/#msg2735644)
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2793884/#msg2793884 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2793884/#msg2793884)

Nano adapter by Alfons
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2748512/#msg2748512 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2748512/#msg2748512)

ESP8266/Pro Micro adaptation by tom_iphi
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2891608/#msg2891608 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2891608/#msg2891608)
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/375/ (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/375/)

GNUPlot logging and adapter based on artag PCB by grizewald
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2922434/#msg2922434 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2922434/#msg2922434)
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3024494/#msg3024494 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3024494/#msg3024494)

Logging from a Fluke 8840a by kc9qvi
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2985784/#msg2985784 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2985784/#msg2985784)

Modification to add temperature sensor by serg-el
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3002852/#msg3002852 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3002852/#msg3002852)
https://radiokot.ru/forum/viewtopic.php?p=3815540#p3815540 (https://radiokot.ru/forum/viewtopic.php?p=3815540#p3815540) (Russian)

Plotting from TDS700 using the 7470A tool in KE5FX tools by james_s
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3024494/#msg3024494 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3024494/#msg3024494)

Tek Flash drive (related project combining AR488 and SDcard) collaboration by waveydipole and mmcgraw74
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3144360/#msg3144360 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3144360/#msg3144360)
https://www.facebook.com/groups/1157781747606102 (https://www.facebook.com/groups/1157781747606102)

Powerless AR488 adapter by maxwell3e10
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/600/ (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/600/)

AR488 Utility by Nx-1997
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3431088/#msg3431088 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3431088/#msg3431088)
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3586488/#msg3586488 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3586488/#msg3586488)

Possibly pin differences on Micro Pro highlighted by eliocor
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3437870/#msg3437870 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3437870/#msg3437870)

Parameter setting for HP34401A post by I3VGV
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/650/ (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/650/)

EZGPIB success connecting to Prologic screenshot by Sprock
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3476564/#msg3476564 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3476564/#msg3476564)

Screenshot of Luke Mesters HP3478A Control Utility by AtlnticSurfer
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3478956/#msg3478956 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3478956/#msg3478956)

Luke Mesters HP3478A Control Utility being used to save CAL data by mcj7247
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3493244/#msg3493244 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3493244/#msg3493244)

3D printed enclosure for Pro Micro version by dl6lr
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3481518/#msg3481518 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3481518/#msg3481518)

Using with HP33120 and HP3478A by caiser01
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3810788/#msg3810788 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3810788/#msg3810788)

Another HP3478A calibbration read using adapter with point-to-point wiring and SN7516x buffers by pqass
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3813158/#msg3813158 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3813158/#msg3813158)

STM32F303/ESP32 vwersion by douardda
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3827363/#msg3827363 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3827363/#msg3827363)
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4072366/#msg4072366 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4072366/#msg4072366)
https://github.com/douardda/AR488/tree/esp32 (https://github.com/douardda/AR488/tree/esp32)

Custom board with SN7516x buffers and Bluetooth by ONLYA
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3942949/#msg3942949 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3942949/#msg3942949)
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3973676/#msg3973676 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3973676/#msg3973676)

Rugged-datin' da connector by chickenHeadKnob
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3954854/#msg3954854 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3954854/#msg3954854)

Cypress FX2LP based Sniffer board for Sigrok by artag
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4405006/#msg4405006 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4405006/#msg4405006)

Buffered AR488 board by Jay_Diddy_B
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4448758/#msg4448758 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4448758/#msg4448758)
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4483507/#msg4483507 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4483507/#msg4483507)

Connection to HP16702A Logic Analyser by Jay_Diddy_B
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4456264/#msg4456264 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4456264/#msg4456264)

Cypress FX2LP based Sniffer board in use by Jay_Diddy_B
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4503640/#msg4503640 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4503640/#msg4503640)

Ordering buffered AR488 board via JLPCB by Jay_Diddy_B
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4590094/#msg4590094 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4590094/#msg4590094)

Reference to PyMeasyre by gmac34
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4604662/#msg4604662 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4604662/#msg4604662)

Building the buffered version of the AR488 by DC1MC
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4610047/#msg4610047 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4610047/#msg4610047)

Reference to xyphro's UsbGpib (32u4 based) by Nx-1997
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4659160/#msg4659160 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4659160/#msg4659160)


Various versions of adapters based on the PCB by artag
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3100417/#msg3100417 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3100417/#msg3100417)
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3106704/#msg3106704 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3106704/#msg3106704)
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3360670/#msg3360670 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3360670/#msg3360670)
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3360898/#msg3360898 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3360898/#msg3360898)
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3435998/#msg3435998 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3435998/#msg3435998)
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3866630/#msg3866630 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3866630/#msg3866630)
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3954854/#msg3954854 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3954854/#msg3954854)

Title: Re: AR488 Arduino-based GPIB adapter
Post by: sundance on February 07, 2019, 02:34:10 pm
Thank you very much for your excellent work!
Last year I also decided to write my own GPIB controller software for the Arduino (when I bought an HP-3478A). It worked - although I didn't finish it yet. And it's always extremely interesting to see how others do it...

-sundance
Title: Re: AR488 Arduino-based GPIB adapter
Post by: metrologist on February 07, 2019, 05:37:12 pm
Spectacular. I was concerned because I recall Girlando did not want derivatives. You mention he reviewed and authorized this.

Inspired by the original work of Emanuele Girlando, licensed under a Creative
Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
Any code in common with the original work is reproduced here with the explicit
permission of Emanuele Girlando, who has kindly reviewed and tested this code.

Thanks also to Luke Mester for comparison testing against the Prologix interface.
AR488 is Licenced under the GNU Public licence.


I'm not that versed on the licensing though and it is not clear to me if your code is protected by Creative
Commons Attribution-NonCommercial-NoDerivatives 4.0 International License or the GNU Public licence, or if those are the same references as you mention both. Sorry to bring up licensing topic, but I am not sure now what is restricted to modify and if possible what, and thanks for the work to advance the code.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: sundance on February 07, 2019, 06:05:26 pm
Quote
(...) but the sketch is an almost complete re-write of Emanuele's original code
That sounds more than just some adjustments/patches to Emanuele's code. And if you compare both WaveyDipole's to Emanuele's code there are not too many sections that are similar, except the obvious parts that cover hardware compatibility.
It's like with my own code: I took ideas from Emanuele and others (like here: http://www.rudiswiki.de/wiki/GPIBtoUSB_Nano3 (http://www.rudiswiki.de/wiki/GPIBtoUSB_Nano3)) who wrote GBIB software for the Arduino. But since I also wrote it from scratch, the final result is completely different. The only thing (concerning licence and patents) that worried me was the use of the (quasi standard) Prologix command syntax.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: kutte on February 07, 2019, 06:16:14 pm
thank you,
but does not compile. Errors are
AR488-0-45-10:758: error: invalid conversion from 'void (*)()' to 'void (*)(char*)' [-fpermissive]
plenty of them..
AR488-0-45-10:758: error: invalid conversion from 'void (*)()' to 'void (*)(char*)' [-fpermissive]
AR488-0-45-10.ino: In function 'bool gpibSendData(char*, uint8_t)':
AR488-0-45-10:1964: error: return-statement with no value, in function returning 'bool' [-fpermissive]
invalid conversion from 'void (*)()' to 'void (*)(char*)' [-fpermissive]
Kutte


Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on February 10, 2019, 12:36:17 am
I tried it with an Atmega328p NANO board. It works OK if I don't use ++auto command.   If I use ++auto 1 command, everything gets slowed down, so even ++ver  response is delayed by the timeout. Also the ++rst command makes it hang.

To make EZGPIB recognize the adapter, it needs to have "GPIB-USB" string in the ++ver response.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: texaspyro on February 10, 2019, 05:09:20 am
To make EZGPIB recognize the adapter, it needs to have "GPIB-USB" string in the ++ver response.

Years ago I had to make a GPIB interface that emulated a Prologix adapter (at the time the Prologix code wrote to EEPROM every time certain commands were sent and this killed the EEPROM rather quickly if you talked to multiple devices).  To get my code to work with the program that was controlling it I had to output the ++ver (or was it a help command?) verbatim to what Prologix was sending.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: kutte on February 10, 2019, 04:23:06 pm
thank you,
but does not compile. Errors are
AR488-0-45-10:758: error: invalid conversion from 'void (*)()' to 'void (*)(char*)' [-fpermissive]
plenty of them..
AR488-0-45-10:758: error: invalid conversion from 'void (*)()' to 'void (*)(char*)' [-fpermissive]
AR488-0-45-10.ino: In function 'bool gpibSendData(char*, uint8_t)':
AR488-0-45-10:1964: error: return-statement with no value, in function returning 'bool' [-fpermissive]
invalid conversion from 'void (*)()' to 'void (*)(char*)' [-fpermissive]
Kutte

error handling seems to have been downgraded to warnings after updating Arduino IDE fro 1.6.5 to 1.8.19
Kutte
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 10, 2019, 04:33:37 pm
I tried it with an Atmega328p NANO board. It works OK if I don't use ++auto command.   If I use ++auto 1 command, everything gets slowed down, so even ++ver  response is delayed by the timeout. Also the ++rst command makes it hang.

To make EZGPIB recognize the adapter, it needs to have "GPIB-USB" string in the ++ver response.

The string can be changed with the ++setvstr command and saved with the ++savecfg command.

Thanks for the feedback regarding the NANO, including slowdown and ++rst hanging.
I will need to investigate these further.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 10, 2019, 10:17:42 pm
thank you,
but does not compile. Errors are
AR488-0-45-10:758: error: invalid conversion from 'void (*)()' to 'void (*)(char*)' [-fpermissive]
plenty of them..
AR488-0-45-10:758: error: invalid conversion from 'void (*)()' to 'void (*)(char*)' [-fpermissive]

error handling seems to have been downgraded to warnings after updating Arduino IDE fro 1.6.5 to 1.8.19
Kutte

I am using Arduino IDE version 1.8.7 (Linux)/1.8.8 (Win) standalone (.zip package) downloaded directly from the Arduino.cc site for development and neither seems to generate these errors or warnings. I haven't tested it with v1.8.8/1.8.19 downloaded from the Win 10 store though. I will investigate further.
Issue logged: https://github.com/Twilight-Logic/AR488/issues/2

EDIT: Tested with Arduino IDE 1.8.8/1.8.19.0 downloaded from the Win10 store and it seems these warnings do indeed appear in that version. I will investigate and see whether the code can be adjusted to avoid them. For further updates, please follow the linked issue on GitHub.

AR488-0-45-10.ino: In function 'bool gpibSendData(char*, uint8_t)':
AR488-0-45-10:1964: error: return-statement with no value, in function returning 'bool' [-fpermissive]
invalid conversion from 'void (*)()' to 'void (*)(char*)' [-fpermissive]
Kutte

I believe I know what the problem is and it will be fixed in the next update.
Issue logged: https://github.com/Twilight-Logic/AR488/issues/1
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 12, 2019, 12:01:45 pm
Version 0.45.11 uploaded. This should address the compiler warnings in Arduino IDE v1.8.8/1.8.19.0.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: kutte on February 13, 2019, 10:34:13 am
Version 0.45.11 uploaded. This should address the compiler warnings in Arduino IDE v1.8.8/1.8.19.0.

thank you again, but a lot of warnings still exist:

Y:\USB_16GB\Voltage reference\GPIB\ar488-arduino\ar488\AR488.ino:153:0: warning: "SPE" redefined

 #define SPE 0x18

In file included from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\io.h:272:0,
                 from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\pgmspace.h:90,
                 from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:28,
                 from sketch\AR488.ino.cpp:1:
c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\iom328p.h:294:0: note: this is the location of the previous definition
 #define SPE 6
Y:\USB_16GB\Voltage reference\GPIB\ar488-arduino\ar488\AR488.ino:758:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

 Y:\USB_16GB\Voltage reference\GPIB\ar488-arduino\ar488\AR488.ino:758:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

Y:\USB_16GB\Voltage reference\GPIB\ar488-arduino\ar488\AR488.ino:758:1: warning: invalid conversion from 'void (*)()' to 'void (*)(char*)' [-fpermissive]

Y:\USB_16GB\Voltage reference\GPIB\ar488-arduino\ar488\AR488.ino:758:1: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

and many !!! more, Kutte
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on February 13, 2019, 10:53:46 pm
Witch arduino version do you have when you try to compile it  ???,  please  be more specific with your errors to help  WaveyDipole

On my 1.8.8 IDE   it compiled and sent just fine for an duemilanove and a uno,  for tests purposes ??
Title: Re: AR488 Arduino-based GPIB adapter
Post by: kutte on February 14, 2019, 04:08:37 pm
compiled with version 1.8.8 this time without any erros. Don't know what happend the last time, sorry for any confusion.
Kutte
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 14, 2019, 05:53:51 pm
kutte, thanks for the update. The warning is interesting since it indicates a definition as it indicates that 'SPE' is defined elsewhere in the Arduino IDE support files. I will need to have a think about how to deal with this - probably will have to change all of my #define names.

Glad you got it compiled without error in the meantime. Curious that the IDE should behave in such an inconsistent manner.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Kean on February 15, 2019, 10:58:28 am
kutte, thanks for the update. The warning is interesting since it indicates a definition as it indicates that 'SPE' is defined elsewhere in the Arduino IDE support files. I will need to have a think about how to deal with this - probably will have to change all of my #define names.

Yes, you may want to add a prefix in front of your shorthand definitions just to be on the safe side.

In particular SPE is also defined in various Arduino hardware includes as the "SPI Enable" bit in one of the AVR Special Function Registers.
See for example hardware/tools/avr/avr/include/avr/iom328p.h (included via hardware/tools/avr/avr/include/avr/io.h)

Thanks for this updated code by the way.  It is something I think I can use in the future for some HPIB CS/80 disk interfacing I want to do.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 23, 2019, 06:24:01 pm
I tried it with an Atmega328p NANO board. It works OK if I don't use ++auto command.   If I use ++auto 1 command, everything gets slowed down, so even ++ver  response is delayed by the timeout. Also the ++rst command makes it hang.

To make EZGPIB recognize the adapter, it needs to have "GPIB-USB" string in the ++ver response.

Could you please provide the exact sequence of commands you used to reproduce the issue?
Also, what equipment are you driving please?

I am using quite a slow meter, so perhaps not noticing the issue.

Thanks.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on February 23, 2019, 10:26:49 pm
I was testing it with HP3457 meter. I use a serial terminal to issue ++addr 22 command and then start sending commands through it. If I set ++auto 1 and the meter is send command TRIG SGL, then there is a significant delay before it gives a reading. Also there is the same delay for ID? command or ++ver command.

On the other hand, if I set the meter to TRIG AUTO, the program gives a continuous stream of voltage readings in the ++auto 1 mode. This maybe is useful, but its not the behavior one would expect.  I think the problem maybe that the program issues a continuous stream of ++read commands in the ++auto 1 mode. My guess is that the buffer is getting delayed by ++read commands when no answer is supposed to come from the meter.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 24, 2019, 08:15:04 pm
On the other hand, if I set the meter to TRIG AUTO, the program gives a continuous stream of voltage readings in the ++auto 1 mode. This maybe is useful, but its not the behavior one would expect.  I think the problem maybe that the program issues a continuous stream of ++read commands in the ++auto 1 mode. My guess is that the buffer is getting delayed by ++read commands when no answer is supposed to come from the meter.

Thank you for taking the time to feed back the details of the problem. The section on the auto command in the Prologix manual says that it "saves the user from having to issue read commands repeatedly", which sounds like a process that performs repeated read commands automatically. Having read that section again in conjunction with your observations, I am now wondering whether what was meant is that it should perform ONE read automatically after a command is issued, saving the user from having to issue a ++read after each command sent to the instrument? In that context the note regarding the "Query unterminated or -420 error" starts to make sense. However, the example still doesn't seem to fit in somehow so I'm still not sure. Moreover, how does one set parameters for this automatic read (e.g. ++read eoi)? It would be appreciated if you or someone else reading this could explain what behavior one would expect from the auto 1 command?

I will be happy to adjust the program to comply with the expected behavior.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on February 24, 2019, 11:19:19 pm
I don't have Prologix's original software, but the behavior I observed with Girlando's code is that in ++auto 1 mode just one ++read command is issued after each command sent to the device. This generally make sense, since most GPIB instruments (except some meters in auto mode) don't have new data available in the buffer for reading at all times, only in response to a specific command.

On the other hand, for the case when data are available, it maybe useful to keep the auto mode as you have implemented it, simulating "Talk only" GPIB mode. So perhaps it would make sense to keep the continuous reading option that you have already implemented with something like ++auto 2 setting.

An even fancier implementation would be to look for "?" as the last character in the command sent to the meter. If there is a ?, then execute one ++read command, if not then don't execute the read command.  Otherwise, the ++auto 1 mode can still cause errors if a command doesn't generate a response from the device.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: GregDunn on February 27, 2019, 02:27:14 am
I appreciate the effort in producing a GPIB compatible interface for Arduino.  My boards are on the way and should be here soon; meanwhile, I'm trying to assemble the resources so that I can put them to use.

I have downloaded the AR488 code and it compiles properly, so shipping it to the Uno board (standard FTDI interface, not the CH340G) should be straightforward.

Now, here's where I need some guidance: I have one PC, but it's in a different room from the workspace and would be very inconvenient.  I have several Macs, of which two are portable and can be set up on the bench.  I understand that EZGPIB and the GPIB Toolkit only run on Windows, but that having the FTDI drivers I can talk directly to the AR488 with GPIB commands via a terminal through USB, correct? 

Is it possible to script communications to the interface without the special software, using the terminal and a shell script?  I realize I'd be giving up some of the capabilities, but all I really need to do is read and write a few things from the target device (DMM data and in the case of my HP 3478A, cal data).  It doesn't have to be anything fancy, and I'm comfortable with *nix shell scripting.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on February 27, 2019, 05:03:18 am
Yes, all of these serial-interface GPIB don't require a special driver. A simple serial terminal program can be used interactively or any program (pythod, matlab) that can talk to the serial port.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: GregDunn on February 28, 2019, 08:02:40 pm
Well, that was anticlimactic.   :D  Plugged the Uno into a USB port, uploaded the sketch, connected via 'screen' and it just worked.  Unfortunately, there's a bug in 'screen' that prevents setting local echo, so I've been using CoolTerm to verify that the interface is communicating to the Mac.  (I really want to use *nix scripting to do this, rather than CoolTerm's Applescript.   :P  I may end up using another screen emulator)

Now, to wire up the GP-IB plug and try it out on my HP 3478A...
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Krampmeier on February 28, 2019, 08:11:12 pm
Many thanks for creating and sharing this!
I built the adapter with a chinese Arduino Nano clone, using the latest "nightly" Arduino compiler. Got a lot of warnings (including the one about the duplicate definition of  'SPE' ), but no errors.

Communication with my HP 4192A impedance analyzer sees to work fine, but when I sent *IDN? to a Keithley 2001, the first 1 to 3 characters of the response were always wrong. Same with a Keithley 2010.

I just tried it again:
Quote
*idn?
++read
OEITHLEY INSTRUMENTS INC.,MODEL 2010,0632912,A15  /A02
fetch?
++read
m9.59916086E-01
:SENS:FUNC?
++read
bVOLT:DC"

Edit: I just noticed that the Keithley's display twitches when I send the ++read command. The instrument also clears the "REM" indicator, so it goes out of remote mode. Hmmm. Did I make a mistake in the wiring?

The behaviour with ++auto 1 does not make sense with the DMMs, as the DMM starts showing Errors when the adapter tries to read something when nothing is there. It does work with the 4192A. I agree with maxwell3e10 that there are two options for "auto read" which can make sense depending on the instrument.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on February 28, 2019, 09:14:38 pm
would be nice to have a final schematic / wiring to be sure we dont miss something ??
Title: Re: AR488 Arduino-based GPIB adapter
Post by: GregDunn on February 28, 2019, 09:30:05 pm
I was just planning to use the wiring diagram included in the .docx file unless there is in fact a later version?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Miti on February 28, 2019, 09:49:50 pm
Could this project be combined with this one
https://www.eevblog.com/forum/projects/project-extending-hp3478a-functionality/75/ (https://www.eevblog.com/forum/projects/project-extending-hp3478a-functionality/75/)
If we redefine the pins?
At least for HP3478A.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 01, 2019, 05:09:26 pm
I don't have Prologix's original software, but the behavior I observed with Girlando's code is that in ++auto 1 mode just one ++read command is issued after each command sent to the device. This generally make sense, since most GPIB instruments (except some meters in auto mode) don't have new data available in the buffer for reading at all times, only in response to a specific command.

On the other hand, for the case when data are available, it maybe useful to keep the auto mode as you have implemented it, simulating "Talk only" GPIB mode. So perhaps it would make sense to keep the continuous reading option that you have already implemented with something like ++auto 2 setting.

An even fancier implementation would be to look for "?" as the last character in the command sent to the meter. If there is a ?, then execute one ++read command, if not then don't execute the read command.  Otherwise, the ++auto 1 mode can still cause errors if a command doesn't generate a response from the device.

Thank you for those suggestions. An updated version has now been uploaded to repository on GitHub. This version fixes the #include naming clash which I am hoping that this gets rid of the remaining warnings. The behaviour of the ++auto command has also been modified and now behaves as follows:

++auto 0 = auto off
++auto 1 = auto on - (Prologix style?), executes a read after every command* string sent to the instrument
++auto 2 = auto on - executes a read only after a query ('?') terminated command string
++auto 3 = auto on - executes continuous reads after the first ++read command issued

*the interface does not distinguish between instrument commands, queries or data being sent to the instrument.

Please note that, ++auto 1 executes a read after sending any CR/LF terminated string to the instrument. It will execute a read after any direct instrument commands (e.g. ID? or TRIG), whether terminated with '?' or not. In the case of ++auto 2, a read is executed only after a string terminated with a '?' is sent, i.e. it responds only to queries. Currently neither option executes a read after any ++ commands. As far as I can tell, the only command where this might be useful is perhaps after the ++trg command. If such functionality is something that might be useful then I would consider adding it. Any thoughts?

would be nice to have a final schematic / wiring to be sure we dont miss something ??
I was just planning to use the wiring diagram included in the .docx file unless there is in fact a later version?

The pinouts between the Arduino and the GPIB connector are documented in the manual which is already on the GitHub repository:

https://github.com/Twilight-Logic/AR488

There is no later version just yet, but assuming this update is OK, then I will be updating the text of the ++auto command. I was also considering drawing up a diagram or two in due course.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: GregDunn on March 01, 2019, 08:57:26 pm
Both the current (0.46.01) and previous versions compiled without error on my Mac (1.8.9 hourly).  I am going to hack together a compatible GP-IB cable this weekend and test it out.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Miti on March 01, 2019, 09:13:57 pm
I get lots of warnings compiling on Windows 1.8.8.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 01, 2019, 10:39:54 pm
I get lots of warnings compiling on Windows 1.8.8.

Thanks for your feedback.

I have been curious about this issue for a while since I have been compiling on both Linux with version 1.8.7 and Windows 10 with version 1.8.8 and not getting any errors or warnings. However, digging a little further this evening, I discovered that in preferences, there is a setting called 'Compiler warnings:'. Can I ask, what is it set to on your system?

In both environments on my computer this is set to 'None'. Since I have never changed this setting, it would seem that it was set at installation time. There are also settings for 'Default', 'More' and 'All', with 'Default' seemingly the logical default setting. Switching to 'Default' or 'More' does indeed bring up some warnings. I guess that someone in their wisdom decided at some point that hiding warnings was a good idea. If the value was set to 'Default' in earlier versions of the IDE and remained unchanged after subsequent upgrades, or perhaps some have made this change manually, then this would explain why some of us are getting these warnings whereas others (myself included) do not.

Looking at the warnings themselves, unused variables should cause no problems and these will be removed. I will have a closer look at the other warnings. Missing that setting is a bit of an embarrassing oversight, but now that the mystery is solved, I will now spend some time working through the code to eliminate these warnings and tidy things up.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on March 01, 2019, 11:25:34 pm
No problems on my 1.8.8 on Win10 x64   for an genuino or an uno  ???


Edit :  Damn    oh  if i put  compiler warnings at "default" it was settled by default to "none" in my installation,
I have tons of warnings, they repeats many times ??



ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

invalid conversion from 'void (*)()' to 'void (*)(char*)' [-fpermissive]

In function 'void aspoll_h()':
Title: Re: AR488 Arduino-based GPIB adapter
Post by: GregDunn on March 02, 2019, 12:44:10 am
 |O  Indeed, it looks like the compiler warnings are disabled by default.

Other than the uninitialized index 'i' and the 'no return statement' warnings, mine look like unused variables and C++ related type conversion non-issues.  Those two might be of concern, depending on how each environment handles the variable space.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: GregDunn on March 02, 2019, 01:17:05 am
Still have a few minor warnings:

AR488.ino:1156:18: warning: unused parameter 'params' [-Wunused-parameter]
 void clr_h(char *params) {

[ x10 in different functions ]

and

AR488.ino: In function 'spoll_h':
AR488.ino:1368:12: warning: 'i' is used uninitialized in this function [-Wuninitialized]
   for (int i; i<15; i++){
            ^
AR488.ino: In function 'trg_h':
AR488.ino:1283:12: warning: 'i' is used uninitialized in this function [-Wuninitialized]
   for (int i; i<15; i++){
            ^
AR488.ino:1314:14: warning: 'i' may be used uninitialized in this function [-Wmaybe-uninitialized]
     for (int i; i<cnt; i++){
              ^

But they don't cause the compilation to fail.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 02, 2019, 01:23:00 am
I have just spent a couple more hours getting rid of the compiler warnings and have now uploaded an updated v0.46.02 sketch.

- commented out all unused variables
- corrected conversion issues
- corrected all no return statement warnings

I compiled with Compiler Warnings set to 'More' and worked through all of the warnings until I got to a point where there were no further errors or warnings. I did a few tests with my Solatron 7150 and all seems to work OK.

If one compiles with the 'All' setting then there are still warnings to deal with. It seems that I am now getting warnings on some of my workarounds!

Title: Re: AR488 Arduino-based GPIB adapter
Post by: GregDunn on March 02, 2019, 01:34:21 am
Yes, if I set mine to 'more' I get no warnings.  I understand why the cast warnings in the cmdRec array would be hard to remove without redesigning it.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on March 02, 2019, 01:37:01 am
me too   seems to compile faster too ......  were getting there loll   thks for your work
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 02, 2019, 01:54:48 am
Just posted a minor update (0.46.3) to get rid of the remaining undefined 'i' variable warnings.

Its 02.00hrs in the morning here so I'm going to call it a night and have a think about this later, but, yes, I will need to have a think about the "unused parameter 'params'" related ones. It will require some re-designing of that array and the way it is processed I think.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Miti on March 02, 2019, 03:32:02 am
Mine was set to All. If I change it to None, I don't get warnings but with All, I still get warnings even with 0.40.03. See the attachment.
I tried it with Arduino Uno on my HP3478A and it seems to work well.

Thanks for the effort!!

I also tried it with Arduino Pro Mini since I recently made a board for Kirill's project to extend the functionality of HP3478A. The difference is that it runs on Arduino Pro Mini and the pin allocation is a bit different. I changed the pins definition, it compiles without problems, it responds to ++ commands but I can't get it to control the instrument. I've attached the new file. Could you give me a hint why it doesn't work? I would really like to have that option since It is installed inside the instrument and I don't need a GPIB connector.
Thanks in advance,
Miti
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on March 02, 2019, 03:57:18 am
Same thing with the ''all" option only and the "default" and "more" shows nothing .......

Not sure if its the ide the problem,   ill try to find slightly older versions to test ??

---------------------------------------------------------------------------------------------------------------------------------------
warning: unused parameter 'params' [-Wunused-parameter]

void clr_h(char *params) {

                  ^
warning: unused parameter 'params' [-Wunused-parameter]

void ifc_h(char *params) {

                  ^
warning: unused parameter 'params' [-Wunused-parameter]

void rst_h(char *params) {

                  ^
warning: unused parameter 'params' [-Wunused-parameter]

void srq_h(char *params){

                  ^
warning: unused parameter 'params' [-Wunused-parameter]

void save_h(char *params){

                   ^
unused parameter 'params' [-Wunused-parameter]

void aspoll_h(char *params) {

                     ^
warning: unused parameter 'params' [-Wunused-parameter]

void dcl_h(char *params) {

                  ^
warning: unused parameter 'params' [-Wunused-parameter]

void default_h(char *params) {

                      ^
warning: unused parameter 'params' [-Wunused-parameter]

void ppoll_h(char *params) {

                    ^
warning: unused parameter 'params' [-Wunused-parameter]

void verb_h(char *params) {

                   ^
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on March 02, 2019, 05:09:52 am
The behaviour of the ++auto command has also been modified and now behaves as follows:

++auto 0 = auto off
++auto 1 = auto on - (Prologix style?), executes a read after every command* string sent to the instrument
++auto 2 = auto on - executes a read only after a query ('?') terminated command string
++auto 3 = auto on - executes continuous reads after the first ++read command issued

*the interface does not distinguish between instrument commands, queries or data being sent to the instrument.

Currently neither option executes a read after any ++ commands. As far as I can tell, the only command where this might be useful is perhaps after the ++trg command. If such functionality is something that might be useful then I would consider adding it. Any thoughts?

I tested the ++auto modes, they work great! One nice thing about ++auto 3 mode is that it allows in some situations to use a simple serial plotter or logger program without having to continuously issue commands to the instrument.

A few bugs I found:
++status command returns "Unrecognized command"
++auto state is not saved by ++savecfg command

++trg command is typically used to trigger multiple instruments simultaneously. So it would usually require a more complicated series of commands to read different addresses.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: ejeffrey on March 02, 2019, 06:37:50 am
The problem I had with the prologix GPIB-LAN/USB devices is the eot_char implementation is basically defective.  The manual suggests it is recommended for use with binary data that is not normally terminated with a newline.  This doesn't make any sense since any character is valid binary data.  What is needed is to escape the termination character when it appears within the body of the response so that you can unambiguously determine the end of input.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 02, 2019, 10:45:17 am
I tested the ++auto modes, they work great! One nice thing about ++auto 3 mode is that it allows in some situations to use a simple serial plotter or logger program without having to continuously issue commands to the instrument.

A few bugs I found:
++status command returns "Unrecognized command"
++auto state is not saved by ++savecfg command

++trg command is typically used to trigger multiple instruments simultaneously. So it would usually require a more complicated series of commands to read different addresses.

Thanks again for the feedback. Can I just confirm that you used the ++status command in device mode? This command allows the user to set the status byte of the device to be returned to the controller in response to a serial poll. The command will not function in controller mode. Any command issued when the interface is set to a mode that it is not designed to operate in returns "Unrecognized command" as does the Prologix adapter.

You are correct that the auto setting is not saved to EEPROM. The Prologix manual states that it should be one of the parameters that is saved, so I will update the code to do this. I have logged an issue for this problem.

Same thing with the ''all" option only and the "default" and "more" shows nothing .......

Different settings will yield a varying number of warnings, presumably depending on the relative severity of each warning as determined by the compiler, evidently the 'All' setting being the strictest. So, how far does one need to go for released code to be acceptable? And why is the setting configured by default to 'None'?

Personally I think it is a good idea to heed all warnings because it forces one to think about the issues involved and follow good coding practices. Now that I am aware of this setting I intend to ensure that any further code will pass the 'All' level. I am aware of the reason for the remaining warnings and plan to do some work to remove them, but this will require a little bit of restructuring of the command parser. Hopefully it will not take too long.

I appreciate all of the valuable feedback. It has been very helpful.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on March 02, 2019, 11:15:46 am
Once again  Thanks for all the time and efforts put in this project, i'll never thank you enough for your contribution    :-+
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 02, 2019, 02:09:32 pm
Ok, I have now dealt with the remaining warnings and tested with the Compiler Warnings option set to 'All'. I have also updated the code so that the value of the auto setting is saved in EEPROM when a ++savecfg is issued. I have also updated the description of the ++auto command in the manual.

The updated sketch (version 0.46.10) and manual have been uploaded to the repository.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: GregDunn on March 02, 2019, 09:41:16 pm
I'm not used to things working this easily. 

Loaded the sketch, bodged together a quick GPIB connector/cable, and plugged it into the 3478A - upside down.  :-DD  This is what happens when you check every wire, every interconnection, and then assume that the connector is "right side up".     :palm:  No harm done; flip it over, and it just works.  ++auto 3, ++read, and the DMM started dumping measurements as fast as it could go.  I was able to set ranges, modes, and local/remote easily.  Now to figure out how to script it so I can log measurements to a file.

Love it!

Title: Re: AR488 Arduino-based GPIB adapter
Post by: Krampmeier on March 02, 2019, 09:55:29 pm
I just tried v0.46.10. It compiled just fine, but I still get the problems with the first character of the device response, and the device going out of remote mode.

Keithley 2010
Code: [Select]
AR488 GPIB controller, version 0.46.10, 02/03/2019
⸮5.49378228E-01
OEITHLEY INSTRUMENTS INC.,MODEL 2010,0632912,A15  /A02 

Keysight E36312A
Code: [Select]
⸮eysight Technologies,E36312A,MY57290136,1.1.1-1.0.2-1.05
Keithley 196 - no communication at all, does not go into remote mode. Broken GPIB interface?

Adret 103A - works fine, but this is a "listen only" device.

Any ideas on what might be going wrong with the Keithley and Keysight devices?
I use about one meter of ribbon cable, not a genuine GPIB cable, but I have seen GPIB work fine with much longer ribbon cables, and 8 devices on the bus...

Edit:
The effect changes when DEBUG7 is defined and I switch verbose mode on:
Code: [Select]
> *idn?
> ++read
OAfter loop:
2
0
0
Bytes read: 1

> ++read
MTHLEY INSTRUMENTS INC.,MODEL 2010,0632912,A15  /A02 
After loop:
2
0
0
Bytes read: 54
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Miti on March 02, 2019, 10:23:31 pm
I was able to set ranges, modes, and local/remote easily.  Now to figure out how to script it so I can log measurements to a file.

You don't need to. It's been done.  :-+
https://www.eevblog.com/forum/testgear/free-hp3478a-multimeter-control-program/msg2136739/#msg2136739 (https://www.eevblog.com/forum/testgear/free-hp3478a-multimeter-control-program/msg2136739/#msg2136739)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: GregDunn on March 03, 2019, 12:29:35 am
Excellent - and in Python, no less.  That will save me some effort, thanks!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on March 03, 2019, 01:56:21 am
There maybe some timing parameters that need to be fine-tuned. For me it worked just fine with HP 3457A, but when I hooked it up to HP53310A, it would sometimes have problems, reading only the first character of the instrument's response string. If I upload the original Girlando's sketch to the same board, it works fine.

The repeated ++auto mode turned out to be really useful for streaming data. This made me think that with Arduino architecture one can go beyond the typical role of GPIB controller by shifting some GPIB commands to the Arduino itself. In this way it would be similar to the new DMM7510 and DMM6500 from Keithley that allow SCPI command scripts running on the instrument.

With Arduino, one would have the option of setting up some custom routines that send a few commands repeatedly or do some simple data processing. For example, some instruments need repeated FETCH? commands or in HP3457A one could read the high resolution register and add it to the reading before sending to the computer. With a simple template for such routine anyone could add commands within the Arduino IDE. This would make this GPIB-USB driver not only much cheaper, but also more powerful than anything on the market!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 04, 2019, 08:54:39 am
Many thanks for creating and sharing this!

You're welcome.

Communication with my HP 4192A impedance analyzer sees to work fine, but when I sent *IDN? to a Keithley 2001, the first 1 to 3 characters of the response were always wrong. Same with a Keithley 2010.

I just tried it again:
Quote
*idn?
++read
OEITHLEY INSTRUMENTS INC.,MODEL 2010,0632912,A15  /A02
fetch?
++read
m9.59916086E-01
:SENS:FUNC?
++read
bVOLT:DC"

Edit: I just noticed that the Keithley's display twitches when I send the ++read command. The instrument also clears the "REM" indicator, so it goes out of remote mode. Hmmm. Did I make a mistake in the wiring?

I have noted this and have logged an issue. I'm not sure how I'm going to diagnose this as I do not have a Keithley or Keysight device, but thany you for providing the DEBUG7 output in your subsequent post.

https://github.com/Twilight-Logic/AR488/issues/5

There maybe some timing parameters that need to be fine-tuned. For me it worked just fine with HP 3457A, but when I hooked it up to HP53310A, it would sometimes have problems, reading only the first character of the instrument's response string. If I upload the original Girlando's sketch to the same board, it works fine.

That is also very interesting to note. I have noticed that occasionally prototype board wiring can be quite prone to loose connections and noise which can cause problems, but it is noteworthy that Emanuelle's sketch works OK on the same board. Reading just the first character is a bit odd too. Timing may well be the issue but I will investigate.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Kleinstein on March 04, 2019, 09:39:01 am
AFAIK GPIB uses open collector drivers and pull ups. Depending on the length of cable and instruments attached this can slow down the bus. Though maybe not part of the GPIB specs, it may thus be a good idea to have the option to run slower if needed.  Usually it's better to run slow than with errors.

Also the choice of the pull up resistors may have an effect.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on March 04, 2019, 10:47:01 am
would it be ok to add some buffer chips / line drivers ??  would it help ?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on March 04, 2019, 02:22:21 pm
Of course one should have proper line drivers, but the whole beauty of this approach is that it requires nothing more than a small Arduino board. So I think its better to slow down the interface, one rarely needs full speed.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Kleinstein on March 04, 2019, 04:17:24 pm
The AVRs output drivers are relatively powerful and can drive quite some current.
There are special driver chips, mainly SN75161+75162. However these chips tend to cost more than the mega88 µC and are more difficult to get. So directly using the µC is not such a bad idea for a low cost solution, especially with the µC in a DIP socket.
The AVR also has schmidt-trigger inputs, so not so bad for the input side.

I don't think the direct solution would be that much slower. The limiting part is often the signal coming back up through the pull up resistors - so not much a driver could do there (except to add some active drive instead of the standard pull up). The input levels might be slightly better with the special chips.

For protection it might be a good idea to have a power supply to the AVR that is not too powerful, so that in case of a ESD or similar spike an SCR latchup would not cause a permanent damage, but just short out the supply in a way that it can recover. So a low current regulator could save the chip.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Miti on March 04, 2019, 08:48:57 pm
The line drivers are essential in daisy chain configuration. Can this adapter be used to drive multiple daisy chained  devices or in star configuration only?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 04, 2019, 11:19:22 pm
I think I had read somewhere that the collector current on the Arduino IO pins cannot handle more than maybe two or three devices.

Regarding the The SN75161+75162. chips, these require at least two control lines each in addition to the 16 GPIB signal and data lines that are being buffered. The number of IO pins required exceeds that available on the 328p as used on the UNO or the NANO. Currently only pin D6 and pin D13 are spare. Of these, pin D13 also connects to the internal LED which could be removed to allow unimpeded use of the pin. However, pins 0 and 1 are reserved for the serial IO and are not available to use. This means we would need a board with more IO pins such as the Mega 2560, but I guess it could be done.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on March 05, 2019, 05:09:08 am
At a few $/µC, it is much cheaper than a proper GPIB cable. So its not obvious that one would even want to have multiple devices connected to the same controller. It is  only necessary for group trigger commands. Maybe better think of it as a GPIB-to-USB port converter individual to each device. Even better if it can be loaded with custom macros for that instrument. The key to low-cost solution is avoiding a custom circuit board.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: texaspyro on March 05, 2019, 05:15:01 am
The key to low-cost solution is avoiding a custom circuit board.

Not really.  A custom PCB would run around $2-$5 each depending upon quantity... well worth it as a time saver.  Connecting 20+ wires to an Arduino is a tedious, error prone, unreliable task.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on March 05, 2019, 05:29:12 am
Not really.  A custom PCB would run around $2-$5 each depending upon quantity... well worth it as a time saver.  Connecting 20+ wires to an Arduino is a tedious, error prone, unreliable task.
Plus shipping, plus whoever wants to do it on a regular basis would need to charge something for their time. There have been a few attempts at such effort, I don't think they have been sustained for a long time. Its better to have a standard commercial hardware platform and then one can have open-source software that a few people contribute to.  Of course one can also offer a complete product with a nice 3D printed case.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: texaspyro on March 05, 2019, 05:46:56 am
The circuit board could just have a place to plug in the Arduino board and break out the pins to a GPIB connector or to a ribbon cable connector (with a GPIB connector on the end of a ribbon cable).   Assuming the board is 4 square inches OSHPARK will ship you three of them for $20 (including shipping).   Chinese suppliers could do 10+ of them for the same price or less.   I don't know how you value your time, but that is a bargain.

If somebody laid out a board they could post the Gerbers or Eagle .brd file and anybody could send those off and have the boards made.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on March 05, 2019, 06:02:11 am
Still one would have to get the driver chips, populate the board, solder the connector wires or find a PCB-mounted connector.

This is about as simple a soldering project as it gets:
Title: Re: AR488 Arduino-based GPIB adapter
Post by: GregDunn on March 05, 2019, 06:09:38 am
Still one would have to get the driver chips, populate the board, solder the connector wires or find a PCB-mounted connector.

This is about as simple a soldering project as it gets:

Agreed - I don't mind having a spare board for each meter, and if someone like me can open the box, program the board, and errorlessly wire up a connector in a couple of hours it's clearly a win.  If someone wants to spend the time to design, prototype, debug, manufacture and distribute a better version for $5 delivered, feel free to let us know.  Meanwhile, I'm using this one and getting work done.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: macboy on March 05, 2019, 04:25:32 pm
AFAIK GPIB uses open collector drivers and pull ups. Depending on the length of cable and instruments attached this can slow down the bus. Though maybe not part of the GPIB specs, it may thus be a good idea to have the option to run slower if needed.  Usually it's better to run slow than with errors.

Also the choice of the pull up resistors may have an effect.
Yes, it is specified to use open collector I/O with Thevenin termination to +5v (3k1) and to ground (6k2) which results in ~ 3.3 V floating voltage on the bus. The logic levels are the same as TTL, which means that >= 2.0 V shall be interpreted as a high and <= 0.8 V shall be a low.  Very importantly, these voltages do not match the Arduino CMOS logic inputs, where > Vcc/2 (so 2.5V) is a high and < Vcc/2 is a low. The use of TTL-input buffers is a good solution. Powering the Arduino from a lower Vcc might also work (e.g. 4.0 V, so that Vcc/2 is 2.0 V). I'd also recommend adding termination to the Arduino side of the bus, even if it is only pull-up resistors, which will help to drive the high (floating) voltage higher.

After addressing the voltage input level issue, there is no need to worry about bus speed. GPIB uses two-way handshaking, and since the handshake lines use the same termination and logic levels as the data lines, the handshake signals should propagate as fast (or slow) as the data, ensuring synchronization. Adding some delay between seeing DAV (Data Available/Valid) asserted and reading the bus might help, but it is the data source's job to insert a delay between putting data onto the bus and asserting DAV.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Kleinstein on March 05, 2019, 05:48:24 pm
The input level can be even worse: to get a sure high the AVR powered with 5 V might need up to 70% of VCC and this 3.5 V. A little more than 2.5 V (e.g. 2.75 due to a typical 0.5 V hysteresis) is just the typical value.  A slightly lower voltage could help, but increase the chance to get current through the diodes towards VCC. Extra pull ups sound like a good idea and could solve some of the issues.

The main driver to consider in the instruments would be SN75160/75161, these seem to give a high level of some 3.5 V with no load - so just border line for the AVR.

As the cable is quite expensive, I would also consider the main use with a single instrument, with a fixed cable / plug. The low side drive should be still powerful enough to also work with more instruments (e.g. 5 ). The problem is more that with more instruments the high level may not be that good anymore, especially with another instrument connected by not powered.

External drivers would need more control signals. I don't think the LED would be a problem to use that IO pin as an output - so this pin would be usable. One might have to drop one of the less important handshake signals for an extra control.  With extra drivers it would be only logical to have a board made that could than also include the µC and maybe UART to USB bridge or possibly opto-couplers for the UART.

Ideally the handshaking would take case of the speed / delay. However with logic levels just at edge the transition from L to H might take considerable longer than the other way or on the handshake line. So some extra delay may help.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Tj138waterboy on March 06, 2019, 12:54:29 am
Thanks to all that are making the code and sharing the knowledge. I am slowly in the process of making my own adapter for a 3478A and did a quick draft of a arduino nano V3 module with the ieee-844 male pcb connector from https://www.eztapzmarket.com/index.php?main_page=product_info&products_id=432924. (https://www.eztapzmarket.com/index.php?main_page=product_info&products_id=432924.) Price is currently under $10 for just the ieee-844 part but I did see them cheaper on ebay. Be warned that this is just a draft and im no expert in pcb layout and design but maybe someone can optimize and make smaller. Updated footprints to match Arduino Nano V3.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: oPossum on March 06, 2019, 01:14:19 am
with the ieee-844 male pcb connector from https://www.eztapzmarket.com/index.php?main_page=product_info&products_id=432924. (https://www.eztapzmarket.com/index.php?main_page=product_info&products_id=432924.) Price is currently under $10 for just the ieee-844 part but I did see them cheaper on ebay.

Starting at $4.29 qty 1 from the major suppliers

https://octopart.com/search?q=112-024-113R001 (https://octopart.com/search?q=112-024-113R001)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on March 06, 2019, 03:14:02 pm
I brought my simply-wired Arduino Nano to work and tested it with a variety of instruments. Note that I was using Girlando's code, http://egirland.blogspot.com/2014/03/arduino-uno-as-usb-to-gpib-controller.html (http://egirland.blogspot.com/2014/03/arduino-uno-as-usb-to-gpib-controller.html)
Also note that he has updated his code within the last few months to fix a couple of small bugs.
With that code I was able to communicate with all instruments I tried without obvious errors. See log below. So I think from the hardware perspective, direct wiring of Arduino to GPIB is good enough, at least to drive one instrument at a time.


Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on March 06, 2019, 05:58:47 pm
For more I/O   maybe an stm32 blue pill could do ??  they're sold pretty cheap ??

Nice job  tj138, could be a nice daughter board, i would buy you 2 boards
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Tj138waterboy on March 06, 2019, 11:39:23 pm
Thanks for the compliment but I am not selling the boards it was more of a side project to see if anyone thought it would be a good idea. Im not 100% sure if it is going to work or not I will be ordering the board and connectors from jlcpcb this weekend I was kind of waiting on the guys that currently have used wires straight to the connector from Arduino Nano 2 bless off on if it is 100% safe not to have any pull up or pull down resistors on any of the pens also I was thinking about the option of a heartbeat sensor flash status indicator LED as well. I am not sure which lines wood even be used for the status LED or if it would need an extra line of code in the Arduino. If anyone has suggestions feel free and I will modify the board and if anyone wants these schematics let me know
Title: Re: AR488 Arduino-based GPIB adapter
Post by: texaspyro on March 07, 2019, 02:04:42 am
Once it gets verified as working, post the Gerber files here so that anybody that wants one can send them off to their favorite PCB maker.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: GregDunn on March 07, 2019, 08:00:15 pm
Just as a comparison, I programmed one of my UNO boards with AR488 and the other with GPIB6.1 to test them with my setup.  The GPIB6.1 seems to be slightly more user-friendly when communicating, but the AR488 added features are definitely worth having.  With ++auto 3 and ++read, I can log data quickly and not even have to send a native command to the target instrument if I don't want to.  Also, the GPIB6.1 sometimes sends a garbage character back with the instrument's response initially.  I also am having intermittent responses via GPIB6.1 (sometimes a native command won't work) whereas AR488 hasn't given me that problem.  I am using the exact same board and GPIB connector, FYI.

For others using a Mac, I strongly recommend using an official UNO (or a clone) which uses the ATmega16U2 as the USB-serial chip.  I have tried a CH340-series version UNO clone and it just does not work, despite multiple workarounds and drivers on two completely different computers.  One driver (the recommended version, in fact) crashed the Arduino IDE badly.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: texaspyro on March 07, 2019, 08:58:12 pm
For others using a Mac, I strongly recommend using an official UNO (or a clone) which uses the ATmega16U2 as the USB-serial chip.  I have tried a CH340-series version UNO clone and it just does not work, despite multiple workarounds and drivers on two completely different computers.  One driver (the recommended version, in fact) crashed the Arduino IDE badly.

I have noticed that a lot of the Linux CH340 drivers will not set the baud rate on CH340 clone chips...  there may also be other incompatibilities.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on March 12, 2019, 07:22:18 pm
Earlier versions of the linux CH340 drivers would only set a limited range of baud rates. It's definitely OK with a 4.9 kernel but I'm not sure when it changed. I think I had problems with 3.something.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on March 12, 2019, 07:40:41 pm
I'm looking at porting this to an Arduino prop micro or something else with a built-in USB port. The motivation is to avoid problems with serial port handshaking by moving the serial device into software.

However, it does require changing the pin mapping because the SRQ and ATN lines used in the existing layout don't have a pin-change interrupt on the atmega32u4. It would be great if they could be the same on as many variants as possible.

Would it be a big problem to move the SRQ and ATN pins to port B ? That's Uno / Nano pins in the range 8-13.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on March 12, 2019, 08:16:53 pm
I dont think it would be a problem if you redefine/redirect the pins in the file ?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on March 12, 2019, 08:35:52 pm
It can be defined in the file, yes, but it also needs some conditional compilation to use the correct mask register (the current sources use PCMSK2 which doesn't exist on the 32u4).  It probably also affects the bit-shifting and masking used to shuffle the control and maybe data bits.

Technically that's fine, but if the same registers are used in both versions the code is tidier.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 15, 2019, 06:38:40 pm
There maybe some timing parameters that need to be fine-tuned. For me it worked just fine with HP 3457A, but when I hooked it up to HP53310A, it would sometimes have problems, reading only the first character of the instrument's response string. If I upload the original Girlando's sketch to the same board, it works fine.

I spent quite a bit of time looking at the timing today. Since I do not have the instruments that the problem was observed with and cannot replicate the problem here, I could only compare the behaviour of Emanuelle's code and mine. My investigation did reveal what seems a minor difference in behaviour of the interface when transitioning between addressing the instrument and reading data. I have tinkered a little with the code to try and address this issue, but it seemed to have little or no impact when reading my Solatron meter so the investigation was otherwise inconclusive.

I did notice that the UNO reads my Solatron meter OK, but the NANO does have a problem with misreading the first character. Having looked at traces on the logic analyser, the reason could be tracked down to a spurious blip on D3 (A2) which occurs just a fraction after the start of the handshake to read a character. Consequently the value of the byte on the bus is being mis-read as 0x2F instead of 0x2B resulting in '+' being transformed into '/'. The effect is reproducible and consistent and occurs regardless of whether I use the GPIB6.1 or the AR488 code. It does not occur on the UNO board works perfectly fine every time. It would therefore seem to be a problem with the NANO. Once key difference is that the UNO has a proper shielded cable to the instrument, whereas the NANO sits on a prototype board and is hooked up to the UNO via Dupont wires, so it could be that the jumper wires are picking up interferance from something.

I have now uploaded an modified sketch (AR488.ino.0.46.12a) to the GitHub, but I consider this an experimental version rather than a release, which is why I have placed it accordingly in a directory called 'Experimental'. As per suggestions earlier on the thread, I have also added 3 commands for configurable timing parameters:

++tmc - settling time after changing GPIB control state
++tmd - settling time after placing a data byte on the GPIB data bus
++tml - read loop delay (delay between reading characters)

Each parameter can be set between 0 and 255 microseconds.

The default settings are tmc =3, tmd = 3, tml = 0; Please note that if a configuration has been previously saved in EEPROM, then the values of 255,255,255 (i.e. 0xFF) will be read back from the empty EEPROM space, so these parameters will need to be set with the appropriate command and the configuration saved with ++++savecfg command. Alternatively, use +default, then set up the interface as required and save the config with ++savecfg.

I would like to request further observations about the following:

1. Is there a correlation with the board being used, i.e. does the problem happen only on the NANO or on both NANO and UNO?

2. Does changing the newly added timing parameters have any effect?

3. Is there anyone with a meter that exhibits this problem that also has a Logic Analyser and could provide me with a trace, particularly of the ATN, NDAC, NRFD and DAV signal lines along with the data lines (A01 thru A04 would probably suffice for reference but all 8 bits would be ideal) while doing a ++read command for reference?

Incidentally, an issue was logged on the GitHub by 'cabo' to point out that I had omitted the ground connections in the cross-reference table in the manual. My apologies for this and hopefully no one would have omitted a ground connection from their interface assembly, but a ground connection is essential and the details have now been added to the manual.

Any information that can help nail this problem will be much appreciated.

Would it be a big problem to move the SRQ and ATN pins to port B ? That's Uno / Nano pins in the range 8-13.

Since Pins 8-12 are already occupied, there is only one pin, pin 13, left remaining on port B. On the UNO, that pin is connected via a resistor to an 'internal' on-board LED. This electrical difference was the reason why I was advised to avoid using pin 13 as a standard IO pin. I don't think that the NANO has this arrangement but the LED could be removed from the UNO if desired. There is also pin 6 available on port D. It would have been nice if the 8 control signals could be placed on one port and the 8 data signals on another, but alas this is not possible with the layout of the 328p.

Looking at the datasheet for the 32u4 it looks like at bit of work would be required to re-shuffle things and although I am not averse to this, there are other differences such as the position of the Tx and Rx pins which would make obtaining a consistent layout between the 328p and the 32u4 difficult. I will need to have a think about how to approach this.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on March 16, 2019, 05:24:00 am
I have found that setting ++tmd parameter to 120 or larger makes the errors for HP53310A fairly infrequent, although they still happen once every few hundred commands or so even if ++tmd is set to 255. The other parameters don't seem to have any effect.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: vindoline on March 16, 2019, 02:15:48 pm
WaveyDipole, this re-write is great! I've been using the Girlando code for a couple of years now with a couple of minor modifications. There is some issue with my HP 3456A. It would randomly reset the adapter. My Keithley 196 worked perfectly. With your code I've had NO PROBLEMS with the HP! It just WORKS! THANK YOU!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: vindoline on March 16, 2019, 10:14:40 pm
Another thing, I laid out a small 50x50 board for the GPIB adapter. Unfortunately, I wired the SRC line to a different Arduino pin than WaveyD did. I want to make a few changes to the layout now that I've been using it for a few years, so I'll change the pinout also. Anyhow, I have a few boards left. If anyone wants one, message me.

All the adapter boards I've seen (including mine) stick out horizontally behind the GPIB connector. That makes the boat-anchors stick out even farther from the wall and it's rather fragile. My next board will sit vertically. I'll post the new gerbers and layout files when I finish. Thanks again.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Krampmeier on March 16, 2019, 10:55:08 pm
Oops, I should have noticed that there were no grounds connected, but I sheepishly followed the wiring list and did not connect those pins at all.
I bodged in at least one temporary GND connection now, and that seems to have fixed the "first character wrong" problem.

With the Keithley 2000, the read stops consistently after the first character is received now. When I send the ++read command again,  I get the complete answer (so the first character is now on the screen twice) and the DMM beeps and shows Error -410 (Query interrupted).

Setting the ++tmd to 250 made that problem appear less frequently, about once in 20 ++read commands.
Lower tmd settings (like 100) did not help.

Changing both occurences of delayMicroseconds(AR488.tmd); to delayMicroseconds(10*AR488.tmd); and setting tmd to 50 seemed to fix the problem completely.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 18, 2019, 07:28:16 pm
I have found that setting ++tmd parameter to 120 or larger makes the errors for HP53310A fairly infrequent, although they still happen once every few hundred commands or so even if ++tmd is set to 255. The other parameters don't seem to have any effect.

I bodged in at least one temporary GND connection now, and that seems to have fixed the "first character wrong" problem.

With the Keithley 2000, the read stops consistently after the first character is received now. When I send the ++read command again,  I get the complete answer (so the first character is now on the screen twice) and the DMM beeps and shows Error -410 (Query interrupted).

Setting the ++tmd to 250 made that problem appear less frequently, about once in 20 ++read commands.
Lower tmd settings (like 100) did not help.

Thank you for those ovservations, which have proved very helpful.

It has now become evident to me that after a few hours spent reviewing logic analyser traces and experimenting, that tiredness took its toll and an error had crept in to the experimental code. The instance of AR488.tmd in line 2555 actually affects the writing of data on the GPIB bus rather than reading from it. It therefore seems unlikely that this instance of the variable actually had any impact, except maybe affecting the length of time that it would have taken for the controller to send commands to the instrument. However, no one actually reported an issue with that.

The second instance in line line 2731, is most likely the one that made the difference. However, the variable here should have been AR488.tmc. My apologies for the typo.

This particular delay occurs each time the status of the control bus changes between different controller states. I don't quite understand why a delay here should be necessary at all, but I have made some further adjustments to the code. The second instance of the AR488.tmd variable has now been changed to AR488.tmc as it was originally meant to be. I have also removed the instance of AR488.tmd from the data writing routine and placed the "tmd" delay to occur between the controller addressing the instrument and the instrument sending data. The delay starts at the point that ATN is un-asserted and the controller switches into listening mode. The controller will pause keeping NRFD asserted, indicating that it is not yet ready to accept data. The instrument will have to wait until the delay ends, at which point NRFD will be un-asserted to indicate that the controller is now ready to accept data and receiving of data from the instrument will commence.

Changing both occurences of delayMicroseconds(AR488.tmd); to delayMicroseconds(10*AR488.tmd); and setting tmd to 50 seemed to fix the problem completely.

Well its interesting to note that the time interval needed to be increased well into the millisecond range. Quite why some instruments run Ok with no delays at all and start to play up only when they are present and exceed certain thresholds, while others actually require delays of several milliseconds I am not sure. I did note that Emanuelle's code has programmed delays of 20-30ms in between sending commands and after changing the status of ATN. I initially figured on not introducing any unnecessary delays, but it seems that sometimes they are essential.

The tmc and tmd parameters can now be with values up to 30,000 microseconds (30 milliseconds). I expected that the interval between each character (tml) would turn out to be significant, but since it has been reported that this parameter had no effect, I guess it isn't.

I have uploaded an updated sketch AR488.ino.0.46.12c into the Experimental directory.

I will be interested to know whether whether the value of tmc or tmd now solves the problem.

I am also curious as to whether the instruments with the problems support IEEE 488.2 and/or HS488? I did have a look at a couple of Keithley manuals (the 2000 and the 2015) and I think both are IEEE 488.2 compliant, but it is not entirely clear whether they support HS488. I am speculating whether some instruments are trying to use HS488 mode? Perhaps the delays are necessary in order for them to recognize a standard mode device and fall back to the standard GPIB protocol.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Krampmeier on March 18, 2019, 09:01:41 pm
I did not have much time to test it, and it will take a couple of days before I have, but a quick check with the Keithley 2010 showed that the situation got even stranger.

TMD = TMC = 500 and TML = 100 -> First character "-" is often read as "m", the entire string is read only every second time, and the meter shows error -410
Increased TMD to 1000 -> no change
Also Increased TMC to 1000 -> some readings work fine, but 1 out of 10 times still get the error.
TML to 3 -> same
TMD to 3 -> OK.
TMC to 500 -> Error is back consistently.

So, it works with TMD=TML = 3 and TMC = 1000.

WaveyDipole, I have sent you a personal message which may help to speed up the bugfixing process.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on March 20, 2019, 01:37:16 am
All the adapter boards I've seen (including mine) stick out horizontally behind the GPIB connector. That makes the boat-anchors stick out even farther from the wall and it's rather fragile. My next board will sit vertically. I'll post the new gerbers and layout files when I finish. Thanks again.

I've got a layout that puts a Nano directly behind a straight male connector, so the resulting board is the same size as the connector itself, as deep as two stacked pcbs (one for the connnector, one is the nano) and the usb cable comes out the end. Could be a problem if you use jack screws, but it's quite compact.

I'm not going to get any made until I'm happy with the connections and I'll probably actually go for the pro micro layout instead. But you're welcome to work on it if you want  (it's in Kicad format).

The Nano can be a bit better than the Uno as it has all of port C available (it adds A6 and A7). So maybe it's not worth trying to keep them all the same but instead make a way to keep the code differences supported tidily - the existing structure is good except for the interrupt inputs which have the port hardcoded in the form of the mask register.

Thanks very much to waveydipole for pushing this forward. I know IEEE-488 is a bit unloved these days but this sort of hack could drag a lot of fine instruments into modern setups cheaply and easily. I much prefer putting a $5 adapter on every instrument than having a single interface and a lot of thick cabling. There are a lot of possible alternate implementations once we have good stable code - arduino, blue pill, cypress ez-usb (the cheap 'saleae clone' boards) & others.



Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on March 20, 2019, 05:58:57 am
I'm seeing similar results to Krampmeier using a K2015 and 0.46.12c, except that tml=tmd=3 and tmc=1000 gives similar works / fails alternately (with the sign only transferred sometimes).

Oddly, it worked fine on *idn? initially, even with the 0.46.10 code, then started failing for no apparent reason.

I should be able to get logic analyser traces (might take me a day or two) and also have hp instruments, but not sure I can get a 'good' trace. What signals do you want to see ? I do have wide analysers but the 8 bits of a Saleae is by far the easiest to acquire.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on March 20, 2019, 10:28:25 am
All the adapter boards I've seen (including mine) stick out horizontally behind the GPIB connector. That makes the boat-anchors stick out even farther from the wall and it's rather fragile. My next board will sit vertically. I'll post the new gerbers and layout files when I finish. Thanks again.

Thanks very much to waveydipole for pushing this forward. I know IEEE-488 is a bit unloved these days but this sort of hack could drag a lot of fine instruments into modern setups cheaply and easily. I much prefer putting a $5 adapter on every instrument than having a single interface and a lot of thick cabling. There are a lot of possible alternate implementations once we have good stable code - arduino, blue pill, cypress ez-usb (the cheap 'saleae clone' boards) & others.


I would not say unloved,  the problem is  :  too much fakes from china,  genuines if you find any, are very high priced  and you're not totally sure they are still legit ..

This project is a big helper, you learn while you build it :)   I think the only thing left is timing issues ??    the IEEE-488 is not perfect across many brands  i think.

Great work and thanks to thoses working and finding the glitches
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 21, 2019, 01:00:06 pm
The Nano can be a bit better than the Uno as it has all of port C available (it adds A6 and A7). So maybe it's not worth trying to keep them all the same but instead make a way to keep the code differences supported tidily - the existing structure is good except for the interrupt inputs which have the port hardcoded in the form of the mask register.

While it is true that it does have the whole of port C available, pins A6 and A7 on the NANO are ADC inputs only. There is no digital or output capability  and there is no input pull-up resistor. It would not be possible to use them to send data to the GPIB bus. It would have been helpful if this were possible and would have made coding easier.

I should be able to get logic analyser traces (might take me a day or two) and also have hp instruments, but not sure I can get a 'good' trace. What signals do you want to see ? I do have wide analysers but the 8 bits of a Saleae is by far the easiest to acquire.

If you have an 8 bit Saleae, then ATN, NRFD, NDAC, DAV and the first 4 data bits would be helpful. A couple of captures of the ++read command should suffice. If one of them does a partial read, then both the partial read and the following read would be useful. I am considering porting the code to the Mega2560. I haven't really looked into Blue Pill or other microcontrollers yet.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on March 21, 2019, 03:43:16 pm
I'd forgotten the mixed capabilities of the analog pins :(

Here's a capture of 3 successive *IDN? commands. Everything (including tmc etc.)  is default except 'auto 1' and 'addr 23'.

The first command works, the second only returns 'K' and the third works but sounds an error beep.

AR488 GPIB controller, version 0.46.12c, 16/03/2019
KEITHLEY INSTRUMENTS INC.,MODEL 2015,0993190,B15  /A02 
KKEITHLEY INSTRUMENTS INC.,MODEL 2015,0993190,B15  /A02 

Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on March 21, 2019, 07:41:10 pm
Here's the same operation with the Girlando code, which seemed to work OK though I haven't compared them in detail
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 22, 2019, 12:38:39 pm
Thank you for taking the time to record those traces.

These are helpful and sufficient for me to determine that the behaviour is rather different in some respects to what I am getting from my Solatron 7150. For example, there were no state changes on the ATN line, and whereas one trace had the line constantly HIGH, the other showed it constantly LOW. There should have been a couple of transitions (HIGH[idle]->LOW[cmd-address]->HIGH[read data]->LOW[cmd-unadddress]->HIGH[idle]), during each read in both cases.

I will hopefully soon be getting a Keithley 2000 series DMM so I will be able to see what is going on first hand. Hopefully then I can then get the issue resolved.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on March 22, 2019, 12:52:43 pm
I was concerned about the lack of ATN changes, though I hadn't noticed it was different, only unchanging. I did manage to get it to pulse during a ++loc command (with your code) though so it does seem to be active.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: uslrs on March 22, 2019, 05:29:09 pm
Hi, I've built the Arduino GPIB interface and connected it to my Datron 1065.  I've fired up EZGPIB and run the debug messages to test the setup.  I know the arduino is on Com9 but the EZGPIB debug message is reporting that Com9 has been opened but no CTS signal detected and thereafter disregards the port.  The AR488 manual identifies an issue with the ch340g chip not asserting a CTS signal and suggests a work around by connecting pin 14 to pin 9 on the chip.  The Arduino I've got is a Uno R3 which uses an ATmega16U2 as the UART-USB adaptor, so is there a similar work around for the ATmega16U2 that will provide a CTS signal?  Many thanks, Les.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on March 22, 2019, 06:05:00 pm
For EZGPIB there is a software-only way to get around the CTS signal problem. See http://www.dalton.ax/gpib/ (http://www.dalton.ax/gpib/)  at the bottom of the page. You have to open the EZGPIB executable with a hex editor and change a couple of bytes.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on March 22, 2019, 06:46:55 pm
That problem could also be fixed at the arduino end.

From the AR488 manual it doesn't appear to be possible to do the hardware mod, but the code running on the 16u2 is open source and could probably be modified to report a different CTS state. However, you'd need a second arduino to reprogram the 16u2. It would be amusing to do it using the atmega328 on the same board but probably not worth the bricking risk.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 22, 2019, 08:47:40 pm
maxwell3e10's post reminded me that I had not yet got around to modifying my EZGPIB.exe binary so having been prompted again I decided to go ahead and do so. According to the paragraph under the 'Notes' heading the first HEX sequence to look for is F6 02 24 10, but my Hex editor could not find this sequence. I checked to make sure that I have the 20121217 version and indeed I have. I looked for the second sequence 24 04 10 0F 95 which the editor did find, so I changed the 95 to a 94. But what about the first sequence? I had another look but the same result. I then tried searching for the sequence 24 10 74 06 (the last two bytes of the original sequence, 24 10, plus the two bytes following, i.e. 74 06) and got a hit, but the two preceding bytes were F6 04 instead of F6 02. Since there was no other ocurrence of the sequence in the file, I went ahead and changed the 74 06 to 75 06 and saved the file. I then tested it with the Nano which has not been modified and the interface was detected on COM8 as hoped for.

Subsequently I looked at the screenshots that are linked at the very end of the paragraph where it says "See here and here." and discovered that in the second image, the sequence to look for is, in fact, shown as F6 04 24 10. There is a typo in the sequence shown in the paragraph. The correct sequence to look for is the one found in the screenshot.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on March 23, 2019, 12:41:54 am
Sorry, I made a mistake connecting the logic analyzer for those captures. I had pin 7 connected to REN instead of ATN.
Here are the corrected versions.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 23, 2019, 09:50:52 am
Sorry, I made a mistake connecting the logic analyzer for those captures. I had pin 7 connected to REN instead of ATN.
Here are the corrected versions.

Thank you once again for taking the time and trouble to take another reading of the traces. I could more-or-less make out where the transitions were at the start and end of each read in the previous traces, but now, with the ATN trace present, it is clearly evident that there is an additional transition in the middle of each read. From the original trace characteristics I suspected as much but wasn't sure. In this respect the Keithley behaves differently to the Solatron as it appears to send two lots of data during the read - a short burst and a long burst - instead of just one single burst. During the second read, this longer bust of data is missing on the AR488 trace. I'm not yet sure what this all means and will need to do some further detailed analysis in order to work out exactly what it is going on. The updated traces are very helpful. Thank you.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 26, 2019, 01:50:38 pm
Just a quick update.

I now have a Keithley 2000 meter available to the project and so can now confirm that the AR488 is having problems reading from it. While looking at the GPIB section in the user manual I noticed that the meter can be set to 3 different GPIB languages: Keithley 199, SCPI and Fluke 8842. By default this is set to SCPI and always reverts back to this mode after being powered down and switched on again. However, I thought it might be worthwhile to check how it behaves with the other (older) modes. I found that when I selected either the Keithley 199 or Fluke 8842 language, the AR488 did seem to be able to communicate with the meter just fine with all timers set to zero.

Would I be correct in assuming that the Keysight E36312A and the HP53310A (with which the AR488 has also been reported to have problems communicating) also communicate in the SCPI language? If so, then the SCPI language might be the common factor and the next task will be to determine why the interface mis-behaves when communicating in this mode.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on March 26, 2019, 02:45:05 pm
I am surprised that it makes a difference. Nominally SCPI just refers to the syntax of the commands, not the hardware specifications (one can send SCPI commands over RS232 or USB).  On HP53310 I can set  TMD=TML = 0 and TMC = 1000 and it seems to work quite reliably. I briefly looked at the captures posted by artag, it seems there are substantial differences, hard to say which ones are crucial.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 26, 2019, 03:43:09 pm
Yes, I am a little surprised as well, especially as the focus seemed to be on timing, but I wanted to test from all angles. This may not mean that the problem is caused by the SCPI language per se, but there may be a factor such as a particular character, character sequence or length of response or some other factor that messes things up. Ascii characters such as the colon or asterisk should have no bearing. Further investigation and analysis will be required.

Anyone have an EZGPIB or Python script for a Keithley DMM that they use so I can get some idea of the SCPI command sequences that are being used?

What I have found is that if I do a *idn? followed by a ++read this returns the full version string every time, although each subsequent response is displaced to the right and one line down from the last rather than from the beginning of a new line. The effect is similar when I do ++auto 1 and then repeatedly type :data. However, when I start to use other commands things get a "interesting" and unpredictable and I start to get errors. I did notice that if you use commands like *cls with ++auto set to 1 then the meter would sound a beep and return error 420, which one might expect since there is no response to read. Here ++auto 2 worked better. I am however just experimenting and issuing commands manually from a terminal rather than at speed from a script.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: macboy on March 26, 2019, 05:04:26 pm
Hi, I've built the Arduino GPIB interface and connected it to my Datron 1065.  I've fired up EZGPIB and run the debug messages to test the setup.  I know the arduino is on Com9 but the EZGPIB debug message is reporting that Com9 has been opened but no CTS signal detected and thereafter disregards the port.  The AR488 manual identifies an issue with the ch340g chip not asserting a CTS signal and suggests a work around by connecting pin 14 to pin 9 on the chip.  The Arduino I've got is a Uno R3 which uses an ATmega16U2 as the UART-USB adaptor, so is there a similar work around for the ATmega16U2 that will provide a CTS signal?  Many thanks, Les.
The best solution to the handshake flow control issue is to actually implement the handshake. I prefer to buy UNO clones that have the handshake lines broken out into a header, like the following example. Note the unlabeled 4-pin header near the CH340 chip. This has handshake lines on it. You can see that pins 9, 10, 12, 13 are connected to the header, and these are CTS, DSR, DCD, DTR. The software changes to implement the handshaking on GPIO pins are trivial.
By implementing the handshake, you can improve reliability of all serial communication substantially.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 27, 2019, 05:30:43 pm
I have uploaded an update (0.46.12d) into the "experimental2 folder on the GitHub. This update should mark a significant improvement towards solving the problem with the corrupted readings being obtained when the interface is used with a Keithley series 2000. It now seems to work fine on a UNO connected to the Keithley 2000 here with commands such as *idn?, :read?, :fetc? and :meas? and *rst, with commands both typed in at the terminal and called from a short python script. I am a bit cautious about calling it a fix at this stage as it has not yet been tested on any other instruments that have exhibited this problem, and there are numerous individual SCPI commands that have not yet been tested.

I am expecting that the timers will no longer make any difference and they can probably be set to zero. Depending on feedback, I may remove them completely when the next version is released as I now believe that any effect they had was co-incidental.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on March 28, 2019, 01:59:42 pm
Well done !
Briefly tested on K2015 and HP53131A and seems OK. Will try some other instruments when I get a chance

Title: Re: AR488 Arduino-based GPIB adapter
Post by: uslrs on March 29, 2019, 06:02:20 pm
Thanks for that - I've got the same Uno clone, so will have a crack at getting the handshaking sorted, so that EZGPIB is usable.  I've managed to get the Datron communicating via Realterm and the ++auto 3 command has allowed me to set up a data logging function using Realterm's capture facility, so making some progress.  I'm now attempting to find out how to remotely control the function and range settings on the Datron - not had much success so far, but pleased that I can now read data into the PC.  Onwards and upwards!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on April 02, 2019, 03:27:53 am
I tested the new version d and it seems to work OK in terms of transmitting all the strings properly. The ++llo and ++loc also work as intended. The only problem that I found is with inconsistent response for ++auto 1 command.

For  Agilent 33512 it does not automatically return an answer for *IDN? command, but returns an answer for FREQ? command. On the other hand, for Keithley  DMM7510, it responds properly to *IDN? command but does not respond to read? command. In all cases, the answer can be obtained by sending an extra ++read command.  See attached log file.

It would be really nice to add a couple of extra functionalities to this program. One would be to have a loop where it sends one string over and over and reads the response. One could have something called auto_str that can be set to save the command string (like "FETCH?") to be send to the instrument to get a response.

Another functionality is to have a skeleton for a custom routine that can be added to Arduino code by the user. Here one can program a more complicated series of commands for processing (such as limit checking or basic arithmetic). This will shift the program to the Arduino, so the output can be used easily for logging, for example, without requiring another programming layer.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 02, 2019, 10:03:30 pm
For  Agilent 33512 it does not automatically return an answer for *IDN? command, but returns an answer for FREQ? command. On the other hand, for Keithley  DMM7510, it responds properly to *IDN? command but does not respond to read? command. In all cases, the answer can be obtained by sending an extra ++read command.  See attached log file.

Thanks for your further feedback. I could partially replicate this on the Keithley here. After power up I could send an *idn? and the DMM would reply with its ID string. I then send a read? and get a beep with a -213 (init ignored) error. Subsequent read? commands always result in a beep although sometimes a reading is returned. A logic analyser trace showed the command string terminated with a CR+LF always gets sent to the meter, but the meter, more often than not, does not return any data. By contrast, the fetc? command seemed to work every time. If I sent a meas?, a reading was returned and after that, all 3 commands - fetc?, read? and meas? would work normally without any beeps. It seems that at least in this respect, the meas? command behaves differently from read?, at least on the Keithley. After a power cycle it was back to the same behaviour.

After a bit of digging I found a reference that suggested that if the meter returned -213 errors, then sending an *rst command should clear it. So I power cycled the meter, did and *idn? and followed this by *rst and sure enough all 3 commands now worked OK without any bleeps. So was the *idn? command leaving the meter in some sort of error state? To test this, I power cycled the meter again and this time without sending a *idn? command, just started sending read? commands, but got the same problem result. Therefore it was nothing to do with the *idn? command and once again sending an *rst cleared it.

At this point in time, I don't know why the DMM is behaving in that way. I did notice that when the meter is power cycled, after starting up, it sits periodically refreshing its display with a reading. It continues to do this even after sending an *idn?, read? or fetc? commands. However after sending an *rst, the display shows  "------- VDC" until a read? or meas? is sent, at which point it will show a reading. Not surprisingly if a fetc? is sent while there is no reading displayed, the meter returns an error as no data is available yet. If you send a read? after the *rst, or send a meas? at any time (either before or after an *rst), the display shows a static reading and no longer refreshes periodically. It therefore seems that meas? and *rst both stop the meter from automatically taking readings (equivalent to ':init:cont off' perhaps?), but read? does not, and will display readings without error only after an *rst. The meas? command does not require additional commands such as *rst to be sent. Not sure if that is significant, but clearly meas? and read? behave differently on the Keithley.

It would be really nice to add a couple of extra functionalities to this program. One would be to have a loop where it sends one string over and over and reads the response. One could have something called auto_str that can be set to save the command string (like "FETCH?") to be send to the instrument to get a response.

Another functionality is to have a skeleton for a custom routine that can be added to Arduino code by the user. Here one can program a more complicated series of commands for processing (such as limit checking or basic arithmetic). This will shift the program to the Arduino, so the output can be used easily for logging, for example, without requiring another programming layer.
[/quote]

Implementing the command loop should not be too difficult, but the second function is a rather more complex proposition. Given the memory constraints of a Nano or Uno, the "complicated series of commands" would have to take no more than 256 bytes of memory, and that is provided it can be implemented in a way that does not impact adversely on the already tight runtime memory. The Mega2560 has greater memory capacity and would offer more possibilities in this regard. It might just be pushing things a bit too far on the Nano and the Uno.

I will have an attempt at implementing the first function, but will have to give the second one some careful thought.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on April 02, 2019, 10:43:11 pm
Is that because the data segment would be too big  ?

The situation could be improved by putting any required command strings in program memory. This has been done for most of the internal strings though a scattering still need it. There are also some command and pointer tables in ram that could possible be moved.

There seems to be plenty of program memory available still.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 02, 2019, 11:15:32 pm
Is that because the data segment would be too big  ?

The situation could be improved by putting any required command strings in program memory. This has been done for most of the internal strings though a scattering still need it. There are also some command and pointer tables in ram that could possible be moved.

There seems to be plenty of program memory available still.

While it is possible to use flash (program) memory to store static strings at compile time (such as error and other messages), AFAIK it is not possible to use this space dynamically. Any commands entered by the user at runtime would have to be saved in EEPROM memory, otherwise they will not survive a restart. Such commands would also have to be retrieved and parsed at runtime. That process would, in turn, take up significant amounts of SRAM. I suppose it might be possible to use something like a PROGMEM structure to hold the commands within the sketch itself, but the commands would be hard-coded so to speak and not possible to change at runtime.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on April 03, 2019, 12:09:27 am
Yes, that's correct about the progmem segment, but I read maxwell3e10's suggestions as

1. Provide a single command that would be executed repeatedly - so you'd set the instrument and interfaces into the correct mode and then repeatedly enter "fetch?" or whatever. 

Sounds useful, might need multiple commands (meas, read?) for some instruments, and I'd ask for a configurable delay too.

2. A way to make a special version of the interface that sets up and operates an instrument from power-up, with the necessary commands in arduino code. If this used F() strings for any embedded HPIB commands, they wouldn't take precious data segment space. I don't understand this as a request for a higher level command execution unit that would accept and store a scripting language.

I would think this would require a function to provide an interface command (like rst, or addr), a function to send a string on the bus, and a function to receive a result. Parsing the result and changing the program flow, if required, would be in arduino code but a fairly simple sequence would do to set up the instruments and make repeated reads which would then be sent back over USB like talk-only mode.




Title: Re: AR488 Arduino-based GPIB adapter
Post by: texaspyro on April 03, 2019, 12:36:03 am
A program can write flash memory on an AVR... otherwise boot loaders won't work.  You may have to put the writing code in the bootloader section with some chips.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on April 03, 2019, 02:30:08 am
Regarding the reply for ++auto 1, part of it could be due to getting out of sync with available data. But maybe adding a little delay between sending a command and executing a read will help. In my limited testing, if there was no immediate response, then executing another ++read command by hand would always return the correct answer.

Regarding the programming options, the first one was meant to be defined at run time. One would give a string (could have a few commands separated by semicolon, but probably much less than 100 characters) and expect a single response from the device. Whatever initial setup would be done  by hand (either remotely or on front panel). The arduino code just needs to have one additional fixed loop with the user-defined string sent to the instrument and a ++read command.
 
For the second option I meant it to be hard-coded for a given instrument into the arduino sketch and compiled by the user. It might be similar to what one would put into a short EZ-GPIB script: A few initialization commends and a loop which maybe gets several responses from the device and combines them in some way. The main advantage of Arduino is that it can be easily reprogrammed on the fly over the same USB, so one can play with scripts specific to the instrument. It can be hard-coded with GPIB address, so upon boot up it configures the device and starts to send data.  Here one needs just a couple of extra run-time commands, to start and stop the script and an auto-start option, and an example arduino code loop that users will modify. The total length for the code and fixed command strings would be fairly small compared with the rest of the program.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 03, 2019, 03:38:55 pm
Regarding the reply for ++auto 1, part of it could be due to getting out of sync with available data. But maybe adding a little delay between sending a command and executing a read will help. In my limited testing, if there was no immediate response, then executing another ++read command by hand would always return the correct answer.

I also observed that when :read? fails to return a result, a subsequent ++read command will usually return one. I found that the problems are more pronounced on my Nano than on the Uno but when I experimented introducing various delays, the results were mixed. I'm still working on that one...

Regarding the programming options, the first one was meant to be defined at run time. One would give a string (could have a few commands separated by semicolon, but probably much less than 100 characters) and expect a single response from the device. Whatever initial setup would be done  by hand (either remotely or on front panel). The arduino code just needs to have one additional fixed loop with the user-defined string sent to the instrument and a ++read command.

I have uploaded the next version (0.46.15) which includes a first stab at this feature. This version has no ++tmc, ++tmd and ++tml timing parameter settings. Instead, there is just one settable parameter called ++tmbus which is equivalent to the only parameter that actually made any difference during experimentation.

The new feature can be accessed via the ++repeat command as follows:

++repeat count delay commandstring

Count can be anything from 2 to 255 (a count of 1 would not be 'repeat'). The delay can be anything from 0 to 10,000 milliseconds (or 10 seconds). The parameter buffer currently has 64 characters so the command string plus the numeric parameters cannot exceed 64 characters in total. At present there is no mechanism to stop the repeat loop once it has begun. It will keep running until it is complete.

For the second option I meant it to be hard-coded for a given instrument into the arduino sketch and compiled by the user.

Ah, in that case this should be achievable, and indeed possible to implement using Arduino's PROGMEM feature. I will investigate further and experiment with it.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 04, 2019, 10:20:07 am
Just posted a further update (0.46.16) which now has a startup script feature. It is also now possible to enter commands in upper or lower case as well - i.e. ++auto 1 or ++AUTO 1 are both now acceptable.

The startup script can be enabled by un-commenting the define:

Code: [Select]
//#define STARTUP
by changing the line to :

Code: [Select]
#define STARTUP
The script itself is found in the DEFINED SCRIPTS section just below the help information. Due to the way that strings in program memory are implemented on the Arduino, the STARTUP script is composed of two sections which unfortunately means that is looks rather convoluted:

Code: [Select]
#ifdef STARTUP
const char start01[] PROGMEM = "++addr 7";
const char start02[] PROGMEM = "++auto 1";
const char start03[] PROGMEM = "*IDN?";
const char start04[] PROGMEM = "*RST";
const char start05[] PROGMEM = ":func 'volt:ac'";
const char * const startup_script[] PROGMEM = {
  start01,
  start02,
  start03,
  start04,
  start05
};
#endif

The first section is a list of 'const char startxx' definitions which define the individual command strings. Any number of command strings can be added simply be adding more 'const char' string definitions as follows:

Code: [Select]
const char start[i]xx[/i][] PROGMEM = "[i]commandstring[/i]";

where xx is the next consecutive and unique line number and commandstring is the command to be executed.

The second section is the the array defined as expression 'const char * const startup_script[]'. This contains the sequence of command strings that actually forms the startup script. In order for a command to be executed as part of the script, a corresponding entry (e.g. startxx) must be added to the sequence of elements in this array.

As I said, it does look a bit complex but it seems that this is the only way to get a list of character strings stored in program memory on the Arduino. Hopefully, it is still obvious what is happening here. Trying to simplify it by doing something like:

Code: [Select]
const char * const startup_script[] PROGMEM = {
  "command1",
  "command2",
  "command3",
};

simply does not work because the strcpy_P command required to retrieve the strings from program memory into a buffer at runtime, does not retrieve the correct characters. It seems that the strings have to be individually defined before they can be stored in the array.

It would, perhaps, be possible to store one long list of commands, separated by a suitable delimiter character, as one long string, however, this approach does have a couple of disadvantages:

- a long string of characters is more difficult to read as a script, especially when the line starts to wrap
- at runtime, the string as a complete single entity (i.e. the whole script) would have to be copied into runtime memory first before it could be parsed. The impact on runtime memory would depend on the length of the script and could be unpredictable.

Using an array of strings means that only one command needs to be copied at a time, keeping things relatively efficient. Using this approach would probably allow for the possibility of creating additional scripts which could be activated, say, via a ++macro command at runtime while minimising the impact on runtime memory.

There is probably further work required and I may need to add the option to pause between commands, but this short script worked on my Keithley to set it ++auto 1 and the meter into AC volts mode.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on April 04, 2019, 12:34:59 pm
Code: [Select]
const char * const startup_script[] PROGMEM = {
  "command1",
  "command2",
  "command3",
};

Yes, that defines the array to be of type PROGMEM, it doesn't say that about the strings themselves. The whole thing about memory types is something of a hack to C and using two tricks at once - auto-initialised arrays and memory types - may be asking too much. Some advice from comp.lang.c or use of the 'cdecl' utility might be helpful.

Another option is to use either preprocessor or string concatenation tricks to rearrange it. Note that
"abc" "def"; is identical to "abcdef", so a single long string with embedded separators can be rearranged as a series of separate lines without any difficulty. If it's actually entered as

"command 1\n"
"command ?\n"
"++read\n"

and the characters copied from newline to newline instead of end of string, then most of the other difficulties can be skipped.

I would say use whatever is the simplest option for now and revisit it when it's seen some use : there may well be changes it is worthwhile making for other reasons.


Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 06, 2019, 01:14:16 pm
atrag, thanks for your helpful comments. I have now uploaded version 0.46.20. The macro feature as I've now called it, has been refined. The sketch now supports up to 9 user macros that can be called at runtime in addition to the startup macro. All macros must be defined at compile time before uploading the sketch to the Arduino.

The construction of macros is now much simpler. Here is an example of the startup macro:

Code: [Select]
const char startup_macro[] PROGMEM = {
  /* Insert startup macro here ->*/
  "++addr 7\n"
  "++auto 1\n"
  "*RST\n"
  ":func 'volt:ac'\n"
  /*<-End of startup macro*/
};

It is now necessary for the user to change only the code between the two comments. The lines must be between double quotes and a '\n' newline character is required to delimit each line. The '\n' at the end of the last line of the macro is optional.

The startup macro is macro 0. There a 9 user defined macros labelled macro_1 to macro_9. Each macro can be run from the custom ++macro command. To run a specific macro, just specify its number, for example, to run macro 1, type:

Code: [Select]
++macro 1

Running ++macro without parameters lists the macros that have been defined by number. One possible enhancement might be to add a short description. Only the user defined macros, 1 - 9 can be run from the ++macro command. Macro 0 (startup) will only run at interface startup, i.e. when the interface is powered up or when a serial connection is initiated (the latter prompting a reset). Detailed information about macros has been added to the AR488 manual.

I am open to any observations or comments and am happy to tweak things or make improvements provided that they are practicably possible.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on April 06, 2019, 03:26:14 pm
Thanks, I looked at the code and hope to play with it more this weekend. A macro would be useful in many cases, but I thought one could also do some more data processing. For example, if  using an input scan card, read several channels and output them all on one line. Or measure voltage and current and then calculate power.

This first requires a  different version of  gpibReceiveData(), which appends characters to a string instead of directly sending them to the serial port. It will of course have some limit on the maximum length of string. Then one would use toFloat() to get a number and perform some arithmetic before outputting the result to serial port. One could start with your ++repeat code and add some more general commands to it.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on April 06, 2019, 09:15:12 pm
I tested the code with HP3457A. It works as intended. Regarding the reliability of ++auto command, it works well if one sets ++read_tmo_ms to 100 msec or longer. For slow commands I sometimes even increased it beyond 3 sec. Maybe a default value of 1 sec would be optimal with maximum allowed up to 30 sec.

For repeat command it would be nice to allow infinite repetition number, but still have a way to interrupt the loop. It could be programmed the same way as ++auto 3 command is programmed now, as part of the main loop.




Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on April 06, 2019, 09:52:35 pm
I think I recall that the correct IEEE-488 doesn't have a timeout. This is a pain, of course, but might explain why there is a wide variation of the speed with which results are returned. Most implementations do actually time out but the default may be quite long, especially on older interfaces.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 11, 2019, 05:17:19 pm
Thanks, I looked at the code and hope to play with it more this weekend. A macro would be useful in many cases, but I thought one could also do some more data processing. For example, if  using an input scan card, read several channels and output them all on one line. Or measure voltage and current and then calculate power.

Will have a think about that one. Also, a scan card would be required to develop and test this feature. I don't see any on eBay at the moment but I will keep an eye out in case one turns up for a reasonable price. In the meantime, I will see what I can do about doing some basic math like measuring power, however, this would assume that the DMM is capable of taking both measurements at the same time.

Regarding the reliability of ++auto command, it works well if one sets ++read_tmo_ms to 100 msec or longer. For slow commands I sometimes even increased it beyond 3 sec. Maybe a default value of 1 sec would be optimal with maximum allowed up to 30 sec.

For repeat command it would be nice to allow infinite repetition number, but still have a way to interrupt the loop. It could be programmed the same way as ++auto 3 command is programmed now, as part of the main loop.

Points noted and added to my work list.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on April 11, 2019, 06:39:51 pm
Will have a think about that one. Also, a scan card would be required to develop and test this feature. I don't see any on eBay at the moment but I will keep an eye out in case one turns up for a reasonable price. In the meantime, I will see what I can do about doing some basic math like measuring power, however, this would assume that the DMM is capable of taking both measurements at the same time.
These are just examples that came to mind (I happen to have an HP3457 with a scan card). Once there is a gpibReceiveDataToString() function that returns the GPIB string within the program  the user can build an arbitrary complicated program (subject of limitations of the processor). I am planning to write a couple of such programs for the HP3457 but anyone could adapt it to their instruments and applications.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on April 11, 2019, 11:14:26 pm
I've looked out for a keithley scan card but they're usually a bit pricy for my minimal likely usage. It's just the compulsion to fill that empty slot in the meter :)

However, the schematic is available and pretty simple. If you want a simple mux it would be easy enough to clone and I'm tempted to do that sometime. If you wanted to use it for thermocouple signals it might need a bit more care.

I think I've got an older Keithley with a built in scanner (one of those hideous brown things) but it might be pre-SCPI. I've also got a Datron scanner but that's definitely pre-SCPI.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Krampmeier on April 12, 2019, 07:42:10 pm
I have just tried version 0.46.20 of the AR488 firmware. It works great with my Keithley 2010 now!  :-+

I'd prefer if the allowed values for the ++read_tmo_ms could be extended a bit though. If I use long integration time and averaging, it can take way more than 3 seconds before the DMM answers to a :READ? command...
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 16, 2019, 04:57:00 pm
I've looked out for a keithley scan card but they're usually a bit pricy for my minimal likely usage. It's just the compulsion to fill that empty slot in the meter :)

However, the schematic is available and pretty simple. If you want a simple mux it would be easy enough to clone and I'm tempted to do that sometime. If you wanted to use it for thermocouple signals it might need a bit more care.

I was expecting that it might be a bit pricey, and I'm guessing from what you say that I would have the same difficulty justifying the purchase. I would be interested in the schematic. I had a look online but couldn't find it.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 16, 2019, 05:09:58 pm
I've looked out for a keithley scan card but they're usually a bit pricy for my minimal likely usage. It's just the compulsion to fill that empty slot in the meter :)

However, the schematic is available and pretty simple. If you want a simple mux it would be easy enough to clone and I'm tempted to do that sometime. If you wanted to use it for thermocouple signals it might need a bit more care.

I was expecting that it might be a bit pricey, and I'm guessing from what you say that I would have the same difficulty justifying the purchase. I would be interested in the schematic. I had a look online but couldn't find it.

I have just tried version 0.46.20 of the AR488 firmware. It works great with my Keithley 2010 now!  :-+

That is good to hear.

I'd prefer if the allowed values for the ++read_tmo_ms could be extended a bit though. If I use long integration time and averaging, it can take way more than 3 seconds before the DMM answers to a :READ? command...

I just stuck with Emanuelle Girlando's original parameters which I think were based on the Prologix, but I don't think there is any reason why the maximum limit couldn't be extended. I will add it to my list of tasks.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Pepsi1 on April 17, 2019, 01:27:53 am
Glad to be able to use the AR488 software on my Nano 3.0 it gave me the opportunity to make a small 3d case using the Centronics Connector sold by Aliexpress. The design was done using 123D Design.  I have attached the files below.... 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on April 17, 2019, 02:46:03 pm
I love Pepsi  loll

nice case  :-+
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on April 22, 2019, 03:18:53 am
Here is one application of the ++repeat command. The HP3457A is a 6.5 digit multimeter, but  one can obtain an extra digit for NPLC=10 or 100 by sending a separate GPIB command and adding the result to the previous reading:
https://www.eevblog.com/forum/testgear/the-mysterious-_7th-digit_-(hp-3457a-dmm)/msg385219/#msg385219 (https://www.eevblog.com/forum/testgear/the-mysterious-_7th-digit_-(hp-3457a-dmm)/msg385219/#msg385219)

This is generally somewhat annoying, so I implemented a different procedure: NPLC 1; NRDGS 10,1; TRIG SGL; - this gets 10 readings at NPLC 1 for each trigger. Then in the repeat command one sets: ++repeat 254 1 MATH STAT;TRIG SGL;RMATH MEAN; -this returns the mean of 10 measurements. It allows direct logging at 7.5 digit resolution, so any serial logger program can be used. It works a little slower, 0.9 sec for each such reading compared with 0.55 sec for one high-resolution reading at NPLC 10.

One could even use the DISP command of the multimeter to display the 7.5 digits on the display in real time if the multimeter response  could be read into the Arduino program as a string and passed on as an argument to another GPIB command.


Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on May 10, 2019, 09:09:53 pm
It has be brought to my attention that the macro feature was left enabled in the last update. This will cause the example startup macro to run which may cause an unintentional startup configuration. My apologies for this oversight. I have now edited the file to comment out the relevant lines. Anyone downloading after 8/5/2019 will not have this issue.

If you have downloaded sketch version 0.46.20 prior to 8/5/2019 and do have a requirement to use the macro feature, then please comment out lines 29 & 30 in the Macro Options section:

Code: [Select]
//#define MACROS    // Enable the user macros feature
//#define STARTUP   // Enable the startup macro

This will ensure that macros are disabled and the startup macro will not run.

Glad to be able to use the AR488 software on my Nano 3.0 it gave me the opportunity to make a small 3d case using the Centronics Connector sold by Aliexpress. The design was done using 123D Design.  I have attached the files below.... 

I'm glad you have been able to make use of the AR488 sketch and thank you for sharing your case design.

Here is one application of the ++repeat command. The HP3457A is a 6.5 digit multimeter, but  one can obtain an extra digit for NPLC=10 or 100 by sending a separate GPIB command and adding the result to the previous reading:
https://www.eevblog.com/forum/testgear/the-mysterious-_7th-digit_-(hp-3457a-dmm)/msg385219/#msg385219 (https://www.eevblog.com/forum/testgear/the-mysterious-_7th-digit_-(hp-3457a-dmm)/msg385219/#msg385219)

This is generally somewhat annoying, so I implemented a different procedure: NPLC 1; NRDGS 10,1; TRIG SGL; - this gets 10 readings at NPLC 1 for each trigger. Then in the repeat command one sets: ++repeat 254 1 MATH STAT;TRIG SGL;RMATH MEAN; -this returns the mean of 10 measurements. It allows direct logging at 7.5 digit resolution, so any serial logger program can be used. It works a little slower, 0.9 sec for each such reading compared with 0.55 sec for one high-resolution reading at NPLC 10.

That's an interesting and clever use of ++repeat to get 7.5 digit logging. Thank you for sharing it.

One could even use the DISP command of the multimeter to display the 7.5 digits on the display in real time if the multimeter response  could be read into the Arduino program as a string and passed on as an argument to another GPIB command.

I will investigate this possibility when time allows. Thanks.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on May 10, 2019, 11:11:06 pm
Thanks for updating the code. I continue to find new uses of it. For example, one can use the startup macro to initialize internal parameters. Mine now has:
"++read_tmo_ms 10000 \n"
"++tmbus 0 \n"

It may be useful to provide explicitly the documentation and initialization of all internal parameters in the beginning of the file. Also documentation of the "repeat" command in the beginning of the file, as I keep referring back to this blog to check on the syntax.


Title: Re: AR488 Arduino-based GPIB adapter
Post by: rachdatu on May 18, 2019, 10:48:41 am
@WaveyDipole
That's a very cool application. Congratulations!  :-+
I had to verify if my PM6666 counter was working so I quickly built an AR488 with an Arduino Uno.
And eveything works!

I guess I can put one of these cheap Saleae 16 channels logic analyzer clones between the GPIB connector and the Arduino to look at some signals.

Thanks again

Walter
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on May 21, 2019, 10:13:07 am
have you seen the newest pre-order arduinos ?   :  the  Every, the nano 33 IOT / BLE  .... they start at 10$ usd ...     But not so sure they have 5 v  i/o 's,  seems to be yes  on the mega datasheet.

Maybe more memory and speed would  help future implementations ??
Title: Re: AR488 Arduino-based GPIB adapter
Post by: H.O on May 23, 2019, 06:17:56 pm
Just wanted to say thank you to WaveyDipole and anyone else involved in this. I've be contemplating getting one of the Chinese copies of the Agilent adapter but this seem to do what I need.

Since I don't yet have a 3D-printer I asked a colleague to print a nice little enclosure for me:
(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=744462)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on May 27, 2019, 05:04:55 pm
H.O, That's a really nice case! Certainly more professional than my cheap acrylic one from eBay!

@WaveyDipole
That's a very cool application. Congratulations!  :-+
Well the original credit goes to Emanualle Girlando. I sort of picked up, I believe, due to time constraints.
https://egirland.blogspot.com/2014/03/arduino-uno-as-usb-to-gpib-controller.html

I had to verify if my PM6666 counter was working so I quickly built an AR488 with an Arduino Uno.
And eveything works!
Glad to hear it helped you out.

I guess I can put one of these cheap Saleae 16 channels logic analyzer clones between the GPIB connector and the Arduino to look at some signals.
Yes that is exactly what I did to help me with development. It can be a little puzzling to follow what is going on at first but its not that difficult. The probe wires do add a little noise, but it does work.

have you seen the newest pre-order arduinos ?   :  the  Every, the nano 33 IOT / BLE  .... they start at 10$ usd ...     But not so sure they have 5 v  i/o 's,  seems to be yes  on the mega datasheet.

Maybe more memory and speed would  help future implementations ??
Not until just now when I saw your post!. Had a quick read up on it. I wonder whether pins A6 and A7 are fully functional on the basic 8-bit version? The 32-bit versions look interesting with BT and WiFi built in. And yes, more memory would certainly be useful.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on May 29, 2019, 06:32:57 pm
The sketch has been updated to version 0.46.30. The new version now includes code for Bluetooth support.
A supplementary guide has been uploaded with instructions on setting it up.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: dkozel on July 05, 2019, 09:51:19 am
Does anyone know who designed the PCBs being sent out as part of the USA Cal Club?

(https://www.eevblog.com/forum/metrology/usa-cal-club-getting-started-user-guide/?action=dlattach;attach=777249;image)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: vindoline on July 05, 2019, 11:07:37 pm
Does anyone know who designed the PCBs being sent out as part of the USA Cal Club?

(https://www.eevblog.com/forum/metrology/usa-cal-club-getting-started-user-guide/?action=dlattach;attach=777249;image)

That's me!

Vindoline
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on July 06, 2019, 01:41:07 am
I thought that photo looked familiar. ;D
Title: Re: AR488 Arduino-based GPIB adapter
Post by: vindoline on July 07, 2019, 02:54:38 am
Does anyone know who designed the PCBs being sent out as part of the USA Cal Club?

(https://www.eevblog.com/forum/metrology/usa-cal-club-getting-started-user-guide/?action=dlattach;attach=777249;image)

Since there's been a bit of interest in my board for the AR488 USB-GPIB project I thought I'd put the Diptrace and Gerber files up on Github (my first!)

If anyone wants to get their own GPIB adapter PCB, the files are at: https://github.com/vindoline/AR488-USB-GPIB (https://github.com/vindoline/AR488-USB-GPIB)

The gerbers have also been shared on OSHPark: https://oshpark.com/shared_projects/zpvaL7rz (https://oshpark.com/shared_projects/zpvaL7rz)

For what it's worth, I've frequently seen comments by much more experienced members decrying the fact that these inexpensive adapters don't use the correct GPIB line driver chips and that they probably won't work with multiple devices. I have my little adapter running an automated measurement setup with an HP 3488A switch, an HP 3456A voltmeter, a Fluke 8506A DMM and a Keithley 196 DMM with no problems! YMMV of course!

Have fun! And thank you again for the excellent re-write of the GPIB firmware!  :-+ :-+ :-+
Title: Re: AR488 Arduino-based GPIB adapter
Post by: ArthurDent on July 07, 2019, 03:18:10 am
I'm hoping there is still one of the blank boards left when the USA Cal Club reference get to me. I getting pretty close on the list!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: vindoline on July 07, 2019, 12:34:48 pm
I'm hoping there is still one of the blank boards left when the USA Cal Club reference get to me. I getting pretty close on the list!

I've got a pretty good feeling that you'll be fine... 8)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Kinkless Tetrode on July 12, 2019, 10:06:56 am
Since there's been a bit of interest in my board for the AR488 USB-GPIB project I thought I'd put the Diptrace and Gerber files up on Github (my first!)

If anyone wants to get their own GPIB adapter PCB, the files are at: https://github.com/vindoline/AR488-USB-GPIB (https://github.com/vindoline/AR488-USB-GPIB)

The gerbers have also been shared on OSHPark: https://oshpark.com/shared_projects/zpvaL7rz (https://oshpark.com/shared_projects/zpvaL7rz)

For what it's worth, I've frequently seen comments by much more experienced members decrying the fact that these inexpensive adapters don't use the correct GPIB line driver chips and that they probably won't work with multiple devices. I have my little adapter running an automated measurement setup with an HP 3488A switch, an HP 3456A voltmeter, a Fluke 8506A DMM and a Keithley 196 DMM with no problems! YMMV of course!

Hi vindoline,

Thanks for the links, this is exactly what I've been looking for.

I want to create an automated measurement setup just like what you have.  In fact, we almost have exactly the same equipment.  We are just off by one on the model numbers... I have an HP 3488A, 3457A, Fluke 8505A! (and a Keithley 197 but without GPIB)  :-+

I want to setup a measurement network with 3488A to switch between DMMs and probes and automate the process via GPIB.  I'm just getting started with this project, so I'm still learning the details.

How long has your setup been up and running?  Was it difficult to configure and get it all going?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: pwlps on July 14, 2019, 08:32:32 am
I don't have Prologix's original software, but the behavior I observed with Girlando's code is that in ++auto 1 mode just one ++read command is issued after each command sent to the device. This generally make sense, since most GPIB instruments (except some meters in auto mode) don't have new data available in the buffer for reading at all times, only in response to a specific command.

On the other hand, for the case when data are available, it maybe useful to keep the auto mode as you have implemented it, simulating "Talk only" GPIB mode. So perhaps it would make sense to keep the continuous reading option that you have already implemented with something like ++auto 2 setting.

An even fancier implementation would be to look for "?" as the last character in the command sent to the meter. If there is a ?, then execute one ++read command, if not then don't execute the read command.  Otherwise, the ++auto 1 mode can still cause errors if a command doesn't generate a response from the device.

Or even simpler using ++spoll , the bit 5 of the returned status byte will tell if there is a response waiting in the buffer.
Bit 5 is for 488.2, for older or non-compliant devices check in their manual.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: vindoline on July 14, 2019, 04:14:19 pm
Hi vindoline,

Thanks for the links, this is exactly what I've been looking for.

I want to create an automated measurement setup just like what you have.  In fact, we almost have exactly the same equipment.  We are just off by one on the model numbers... I have an HP 3488A, 3457A, Fluke 8505A! (and a Keithley 197 but without GPIB)  :-+

I want to setup a measurement network with 3488A to switch between DMMs and probes and automate the process via GPIB.  I'm just getting started with this project, so I'm still learning the details.

How long has your setup been up and running?  Was it difficult to configure and get it all going?

How difficult it is will depend on your software skills. Mine were practically non-existent at the beginning. My measurement setup consists of the various meters daisy-chained together with GPIB cables. Then the GPIB-USB adapter. This is connected to a headless Raspberry Pi running the various logging scripts written in Python. The Pi also has two BME280 sensors to log the ambient temperature and humidity. I connect to the raspberry Pi from any of my computers by wifi. The starting point for all of my logging scripts was provided by member Muxr. It's called muxrplot: https://github.com/sirmo/muxrplot (https://github.com/sirmo/muxrplot). If you search, the original posts will show up. One of these days I plan on doing a more complete expaination of the setup.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on July 14, 2019, 10:38:35 pm
Vindoline, let me know when you post that setup description. I'll link to it from the Cal Club User Guide. :-+
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on July 23, 2019, 05:40:10 pm
First and foremost a *huge* thank you to WaveyDipole, cellularmitosis, TiN and vindoline for their work.

Now that I am logging data and can finally relax I'm thinking about what next.  Trying to combine the system time, the Tempduino T & RH and the DMM measurements was *rather* a headache.

So I've been considering what a better arrangement for logging DMM data would look like and could that be incorporated in the AR488 software.  At present I am using what is basically a pair of Unos each with more than enough horsepower to do everything.

So here's what I am thinking as add ons to the basic AR488 FW functionality for junior league voltnut use.

real time clock
temperature and humidity sensor (possibly more than one)
4-8 port input relay matrix
2-4 port output relay matrix
generation of sampling requests with AR488 (from a table of commands downloaded to the board)
CSV format output stream
option to drive a pair of 44421A relay boards for input and output switching (for TiN and Andreas wannabes ;-)

Over the course of the last few days I was quite appalled at how severely my programming skills had deteriorated during several years in which I did not do any significant programming.  So I need some practice and this seems a good project for accomplishing that.  I hacked the Tempduino code to let me just grab a single T & H pair so I could generate a CSV file with seconds, temperature, humidity, DMM-1 & DMM-2.  I'm going to send that out with the kit as a spare as I was not able to reproduce bitseeker's glitches.  I did not modify the FW in the Uno bitseeker used.

The first order question is, is there anything else someone might want to have incorporated?

The card edge connectors for the 44421A relay boards are *very* difficult to source. I was able to get the driver side connectors from a 3497A backplane headed for scrap, but have not been able to source the input edge connectors.  I bought 3 boards which had the terminal blocks, but those are commonly trashed when the systems are decommissioned. 

So for most purposes just removing the relays for use in a new board makes more sense.  And most of us won't have more than 8 voltage references or resistors to measure or more than 4 DMMs to measure them with.  There are 21 relays on the 44421A boards, so it's around $1.50 per relay.

Comments?  Is there a feature I've missed?  This has been on my "ToDo" list for a long time.  Now is a good time to do it while a lot of the details are fairly fresh in my mind.

Reg
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on July 23, 2019, 08:37:22 pm
Could be practical, but i think this project could not be called AR488 Arduino-based GPIB adapter anymore ??

I could be entirely a new project ?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on July 23, 2019, 09:49:56 pm
@rhb, contextually, perhaps you meant to post that in the cal club thread?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on July 26, 2019, 01:31:13 am
I meant to post it here because it seems to me a pretty clean extension to select particular GPIO pins to control relays.  It might require a Mega256 instead of an Uno though.  But I don't see that as a big deal.

I *hate* code forks.  Far too much of my career was misery induced by code forks.  I'd much rather add "++input n" and "++output n" to the AR488 code base to control relays and "++date" for the RTC than fork the code base.

If you don't need it or want it, it doesn't cause a problem.  I don't expect WaveyDipole to code it. That would be quite unreasonable.  I'd like to know if he'd accept conditional compilation of the features, and is there more functionality that would be desirable.

I want to have a fully automated calibration system that lets me connect all my gear through a set of relays and cables and do a full cal of all my gear once a year.  Ideally referenced to a small number of references which get sent to a cal lab every 2-3 years.

I have an HP  8648C, 5386A, 8753B, 2x 34401A, 2x 3478A, 438A w/ 8481D & 8482A, 8560A, 8566B, 16500C, 33622A, a couple of GPSDOs and a Tek 11801.   That's the stuff I have today that has a GPIB port.  I'd like to hook up the system, tell it to run and 24 hours later get full cal data for the stack printed out to put in a notebook with suitable notation of  deviations from prior years.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on July 26, 2019, 06:56:07 am
I'm not  WaveyDipole, he's done a terrrific job up to now,  BUT   i would stay true to the ar488 project.   Other projects / variants should be taken over by other people(s) 

One of the original fork  http://egirland.blogspot.com/2014/03/arduino-uno-as-usb-to-gpib-controller.html (http://egirland.blogspot.com/2014/03/arduino-uno-as-usb-to-gpib-controller.html)  doesn't seem to be updated frequently, now a version 6.1  and it seem pretty stable ?


It can or will be messy with all the forks / versions,  check this error or that error ... the list goes on and on,  It will be time consuming.

As bitseeker wrote  it should be posted in the cal club thread ....
Title: Re: AR488 Arduino-based GPIB adapter
Post by: vindoline on July 26, 2019, 04:30:56 pm
rhb, I agree with the above. The AR488 works very well (for me!) as a GPIB-USB adapter. One already has to use another program to "talk" to it. I think the switching, logging, etc. belongs in that code. Compared to your stated expertise in various languages, I'm a complete beginner. However, I was able to hack together* a number of Python scripts running on a Raspberry Pi that handle all of my logging needs!

-Vindoline

* With lots of help from eevblog members! Thanks!

PS: the only modification of the AR488 code I had to make was increasing the maximum time-out. I use 8 seconds in my scripts as my ancient instruments are SLOW to respond. Most of the troubleshooting I've had to do with the GPIB logging has to do with timing issues.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on July 26, 2019, 06:03:37 pm
In principle, the ability to reprogram an Arduino on the fly using the same USB port allows one to rethink the concept of a GPIB adapter. Instead of being just a dumb protocol translator, it can now take over some of the roles typically played by a program running on the computer. It maybe advantageous in some cases, since its a real-time processor. The down side is that a program like that could become less general. Still, its an interesting direction to explore. One example (not based on AR488 code) is  https://www.eevblog.com/forum/projects/project-extending-hp3478a-functionality/ (https://www.eevblog.com/forum/projects/project-extending-hp3478a-functionality/)
How to organize it logistically is an open question, anyone willing to invest their time can decide for themselves.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on July 26, 2019, 06:39:31 pm
I can avoid a fork by simply maintaining a patch against the most recent version of AR488.  That's easy for me, but not necessarily comfortable for other people.  You need to be Unix literate and comfortable using patch and compiling, etc.  It's also complicated by the number of variants of Larry Wall's original patch program which are not quite compatible.

Because Prentice-Hall would not allow AST to post the Minix source on line, we had to do updates to the OS via patch(1).

My preference would be to allow enabling the relay control with "make -DRELAY".  It has been a very long time since I did any serious programming outside of a rather elaborate, mutliplatform build system I wrote on top of Gnu make.  That system has multiple layers which take care of various compiler and system dependencies.  So if it runs anything that even remotely resembles Unix and has Gnu make available it's completely transparent after I've configured the compiler and linker options.

So all I ever do is one of the following:

make
make test
make install
make DEBUG=1
make DEBUG=2

I can't see adding a 2nd Arduino to control the relays when the one handling the GPIB could do it.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on July 26, 2019, 08:21:39 pm
Something like a mega could do the task, tons of i/o to play with ?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on July 27, 2019, 09:43:02 am
So here's what I am thinking as add ons to the basic AR488 FW functionality for junior league voltnut use.

real time clock
temperature and humidity sensor (possibly more than one)
4-8 port input relay matrix
2-4 port output relay matrix
generation of sampling requests with AR488 (from a table of commands downloaded to the board)
CSV format output stream
option to drive a pair of 44421A relay boards for input and output switching (for TiN and Andreas wannabes

Any additional hardware would use additional control pins which on a UNO are already in very short supply. On a UNO/Nano, it may be possible to use a temperature and humidity sensor requiring one control pin each, but otherwise it would depend on how many control pins are required. The RTC, presumably something like a DS3231 Module uses the SDA and SCL pins, but these correspond to A4 and A5 on a UNO/Nano so that might also be a problem.

Generation of sampling requests using a table of commands should already be possible via the Macro feature, however downloading commands to the interface dynamically is presently resticted by the limited amount of dynamic runtime memory available on a UNO/Nano. EEPROM memory on these boards is even more limited so storing command sequences there is not viable. The "macro" feature was offered for the preset as a practical workaround as it stores command sequences in program memory. Both AR488 ++ and insturment commands can be used in the sequence and the can be exected at runtime with a single ++macro x command, where x is a number between 1 and 9. There is also a macro 0 which is the startup macro which can be used to initialise the board. I had updated the manual some time ago, but it seems that the online copy did not get updated. I have now rectified this and details of the macro command can now be found in the manual.

Creating a CSV output stream should not be that difficult.

I'd like to know if he'd accept conditional compilation of the features, and is there more functionality that would be desirable.

Conditional compiling of features as needed does seem to make sense. I had started to introduce some features on a "opt in" basis by removing the comment flag before certain #define statements, partly because not everything can be used at the same time due to overlapping pin requirements (on a UNO or NANO). Bluetooth and WiFi (still working on WiFi) are an example of this. They cannot be run concurrently on a UNO/Nano as there is only one UART. I hadn't got to the point of exploring compiler flags though.

Something like a mega could do the task, tons of i/o to play with ?

Yes, all the above are good reasons to explore the Mega. This would allow rather more flexibility to develop additional features. It may be that the UNO/NANO version would remain the "basic" implementation, while the Mega would be the "advanced" version. It really depends what can be squeezed in to the lower end boards. I actually  purchased a Mega a couple of months ago to play with, but am still working on the WiFi feature so haven't got around to that stage yet. It sounds like I should probably focus on this next and get it done sooner rather than later?

Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on July 27, 2019, 01:24:12 pm

Yes, all the above are good reasons to explore the Mega. This would allow rather more flexibility to develop additional features. It may be that the UNO/NANO version would remain the "basic" implementation, while the Mega would be the "advanced" version. It really depends what can be squeezed in to the lower end boards. I actually  purchased a Mega a couple of months ago to play with, but am still working on the WiFi feature so haven't got around to that stage yet. It sounds like I should probably focus on this next and get it done sooner rather than later?

With Chinese Uno  copies selling for ~$3 US I think the Uno/Nano should remain the basic implementation and that if someone wants additional features beyond time, temperature and humidity they should use a Mega. 

GPIB cables have become expensive and hard to get.  They are also very bulky.  I could never connect my bench using those.  However, I could put  a 328p based interface on each instrument, connect them to a USB hub and connect that to the computer.  I can cable from a single Arduino using custom made IDC connector cables and that is what makes sense for a Mega based unit driving relays.

I bought a 37203A GPIB extender to use the case for running one or more of the 44421A boards.  AS I am a world class example of Attention Deficit Disorder nothing much has happened on that except for using the board to test my desoldering tools and salvaging the TTL chips. The problem was severely exacerbated by a *major* TEA binge.  At present I have an 8753B/85046A, 8566B, 16500 & Tek 11801 parked in my living room because I don't have anywhere else to put them yet.  And that is only about half the gear I bought post 37203A time.

For two months prior to the Cal Club kit arriving all my attention had been on mechanical engineering related to rebuilding a $525 Chinese mini-lathe into a high precision instrument maker's lathe. All of which has taken my attention away from playing jazz guitar.  so Murphy says that my friend who is a professional session player will show up to play when I'm so out of practice I can't quite keep up.

I'm putting the Cal Club kit in the post Monday at which time I'll load AR488 on a Mega, print the source code,  put it in a notebook and start studying.  I'm having my prostate removed on Thursday, so I will have a couple of weeks during which my mobility is rather restricted.  So a good time to work on adding enhancements to AR488.  Starting with learning the current source code.

My post was intended to help define what I should do, not what WaveyDipole should do.  That's your decision.  I have a lot of experience working with very large legacy code bases.  One of the things you learn quickly is to make your work fit in with the existing work as seamlessly as possible.

The purpose of my post was to see if there were other things I should be thinking about where to fit them when I study the source code. One thing that occurred to me yesterday was to have a multiline LCD panel option that would provide a scrolling display of what the interface was doing.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on July 27, 2019, 02:55:42 pm
@rhb

The " lcb tft touch "backpack for the mega would be an awesome addition ...  your sucess may depend on how you'll add thoses functions vs all the i/o's available,  maybe some i2c expanders, i2c adc / dac ???

Dallas one wire temperature sensors ?

I have an Teensy 3.2 who's sitting duck in a drawer, maybe i could use its horse power ?? :)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on July 27, 2019, 05:32:34 pm
The purpose of my post was to see if there were other things I should be thinking about where to fit them when I study the source code. One thing that occurred to me yesterday was to have a multiline LCD panel option that would provide a scrolling display of what the interface was doing.

Yes, depending on screen space and layout, in addition to the interface's state, the status of the bus (data and control lines) would be useful.

As a separate project idea, I had thought about making something similar to the HP 59401A, but more user friendly.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on July 27, 2019, 08:10:43 pm
@coromonadalix & @bitseeker

Thanks.  I'll look into those.  I have a slew of MCU dev boards to choose from in addition to the Arduinos.  I need to make some mockups of a front panel using the standard HP dimensions for that size instrument and study the 44421A schematic to see how many GPIOs I need to drive it.

I'm likely to wind up with a couple of versions.  For the lab self cal system I'd prefer to use N connectors because they're much more robust.

It appears I could just fit a pair of 4421A relay boards in the 37203A case with the terminal blocks sticking out the front.  Or I could use a single relay board and get 20 banana jack pairs, but neither of those would leave much room for a screen.

So what is cheap and uses the 8560 size HP enclosure?  Or is a standard blank 19" rack enclosure a cheaper choice?

Off to look at the listings for TFT LCD Arduino Mega backpacks ;-)

Have Fun!
Reg
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on July 29, 2019, 03:23:13 am
I had updated the manual some time ago, but it seems that the online copy did not get updated. I have now rectified this and details of the macro command can now be found in the manual.
Thanks for updating the manual. It looks like it is missing the ++repeat feature, which is very handy.
The bluetooth capabilities look really cool too, I should play with it sometime. I wonder if one can steal power from rarely used GPIB lines and use a small boost converter to generate 5V for power and make the adapter completely wireless.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on July 29, 2019, 11:04:41 pm
Thanks for updating the manual. It looks like it is missing the ++repeat feature, which is very handy.

Thanks for spotting that! The omission has now been corrected.

The bluetooth capabilities look really cool too, I should play with it sometime. I wonder if one can steal power from rarely used GPIB lines and use a small boost converter to generate 5V for power and make the adapter completely wireless.

The IEEE488 connector does not provide any power, only signal pins and ground.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on July 29, 2019, 11:19:34 pm
The AR488 is now available for the MEGA2560.

The code has now been ported and should hopefully provide a basis for future expansion projects such as the work proposed by rhb. Since the MEGA2560 has a different pin layout to the UNO and NANO, the original AR488.ino sketch will NOT work with this board. A new revised sketch, AR488-mega.ini has now been uploaded and is available for use on the MEGA2560. With the exception of low level pin and interrupt handling, the code is essentially the same and works the same as the UNO/NANO version.

Having looked at various shield boards and displays, it became evident that it was not possible to accommodate every conceivable option. Most shields plug into the single row of connectors either side of the board, but the more advanced displays (e.g. touchscreens) use the 'digital' connector at the end of the board. It seemed unlikely that the use of shields would be required, so reservation of the 'digital' connector for displays was given priority. In addition, implementation of the data bus does not require the use of PCINT's so the use of analog pins A0-A7 as digital pins for the data bus was preferred over using pins A8-A15. As  result, pins 2-5, 13 (LED), analog pins A8 to A15, as well as the entire "digital" connector (pins 22 to 53) at the end of the board are not used by the sketch and remain available for expansion.

Please be aware that pins 16 and 17, corresponding to TXD2 and RXD2 (the Serial2 port) are used by the sketch to handle GPIB control signals and cannot be used for serial communication. They were chosen because they map to port H along with pins 6-9. Having all GPIB control pins assigned to the same port makes things much easier to to program. It seems unlikely that all 4 serial ports would be required and serial ports 0, 1 and 3 remain available for use. I considered this to be a reasonable compromise to allow the maximum possible potential for expansion, nevertheless, I am open to suggestion regarding the pin assignment.

There is still some work to be done on the sketch in connection with the management of serial ports, for example, Serial1 will be used for Bluetooth communication and WiFi passthough on the MEGA2560. However, that aside, the sketch is functional and did seem to work fine with my MEGA2560 board and both the Solatron and Keithley DMMs. Admittedly I haven't tested device mode yet.

The documentation has been updated to include the MEGA2560 and wiring diagrams have been added for both the UNO and the MEGA2560.

Although Mega boards cost a little more than UNO or NANO, there are some MEGA2560 'mini' boards that are not actually that much more expensive:
https://www.ebay.co.uk/itm/Mini-MEGA-2560-Pro-Micro-USB-CH340G-ATMEGA2560-16AU-For-Mega-2560-R3-Arduino-UK/192781866481?epid=13032626770 (https://www.ebay.co.uk/itm/Mini-MEGA-2560-Pro-Micro-USB-CH340G-ATMEGA2560-16AU-For-Mega-2560-R3-Arduino-UK/192781866481?epid=13032626770)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on July 29, 2019, 11:29:49 pm
I wonder if one can steal power from rarely used GPIB lines and use a small boost converter to generate 5V for power and make the adapter completely wireless.
The IEEE488 connector does not provide any power, just signal pins and ground.
Yes, that's what makes me wonder about it, otherwise it would not be interesting :) I think I have a plan for how to do it, we'll see if it works.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on July 30, 2019, 12:55:52 am
The "supply trick" was on rs232 to hold some "unused lines" at high, and with small signal diodes harvest some supply current


Thank WaveyDipole for the mega conversion
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on July 30, 2019, 01:50:17 am
Yes, I think all the lines on GPIB are used some of the time, but if one connects all control lines to a boost converter with Schottky diodes and a big capacitor, it may work OK.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on July 30, 2019, 03:14:00 am
The AR488 is now available for the MEGA2560.

Very cool! It'll be exciting to see what kinds of things this upgrade enables. I suppose this could also enable more than one GPIB bus with the additional digital pins.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on July 30, 2019, 03:24:36 pm
I had not seen those mini Mega256 boards before.  At under $8 US I'm going to get some for the final build and use the larger units I have just for dev work.  I'm not a big fan of the MCU chip, but the prices make them very compelling.

Thanks for doing the port.  That will let me focus on various RTC clocks, T&H sensors and driving things like the 44421A boards.

Have Fun!
Reg

Who is finally destressing now that the Cal Club kit is in the post.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on July 30, 2019, 07:27:26 pm
Thanks for doing the port.  That will let me focus on various RTC clocks, T&H sensors and driving things like the 44421A boards.

You're welcome. It seemed an opportune time to get the MEGA2560 port to a working level at least on par with the existing UNO/NANO version. As mentioned, there is still a bit more work to do so there will be further updates at some point. In the meantime, it is encouraging to see someone wanting to further enhance the usefulness of this project and I look forward to seeing how your ideas progress.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: theHWcave on July 30, 2019, 10:53:09 pm
Powering from GPIB might just be possible. I found accidentally in my Arduino Nano based GPIB-to-USB converter, that the ATmega328pb was “powered” through its IO lines when the USB power was off but the GPIB was left on.
In that stage, VCC was 2.2V coming via IO lines and termination resistors from the GPIB. The ATMega did not like that at all and corrupted the flash memory every time that happened. Had to reload the program to get the converter working again. In the end I enabled Brown-Out detection (BOD), set to 4.3V to hold the chip in reset until 5V from the USB was detected, and that fixed the problem. You can see the story on this here https://youtu.be/DAS1KVU_FaA 

So in this case, I did not want the feed from GPIB but using a circuit that would combine through diodes the voltage of some of the GPIB lines, buffer it in a large cap and boost it if necessary to 3.3V or so, may be able to do the trick if you use low power WiFi (or BlueTooth). 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on July 30, 2019, 11:56:55 pm
Yes, there's a little power available on the lines, but they're not intended to be for powering devices. Signal integrity could be compromised. At worst, you might burn out the output drivers of instruments on the bus.

I found some electrical info on this page: http://www.interfacebus.com/Design_Connector_GPIB.html. (http://www.interfacebus.com/Design_Connector_GPIB.html.) See the table, "IEEE-STD-488 I/O Characteristics."
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Brumby on July 31, 2019, 08:56:43 am
I can see myself getting interested here.....
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on July 31, 2019, 05:34:41 pm
Come on in, the water's fine.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on July 31, 2019, 06:18:38 pm
I ordered all the parts to try the self-power trick. But since I am unwilling to pay more than $1 for each, it will take a month for them to get here. If one looks at a GPIB driver chip like SN75161 it should be possible to pull about 10 mA from each line. Arduino + Bluetooth might draw together anywhere from 20 to 70 mA, depending on how careful one is. So it might work, but will be close.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on August 01, 2019, 01:24:05 pm
Powering from GPIB might just be possible. I found accidentally in my Arduino Nano based GPIB-to-USB converter, that the ATmega328pb was “powered” through its IO lines when the USB power was off but the GPIB was left on.

Dave covers that parasitic power phenomenon here:
https://www.eevblog.com/forum/blog/eevblog-831-power-a-micro-with-no-power-pin (https://www.eevblog.com/forum/blog/eevblog-831-power-a-micro-with-no-power-pin)!/

It is for this reason that I included a paragraph in the manual to advise that when multiple devices are connected to the GPIB bus, that the Arduino should be removed from the bus when it is not powered. In a one-to-one situation, the issue does not arise.

Your comment makes an interesting point about the brownout detection (BOD) setting though. I checked my boards (2 X UNO and 1 x MEGA2560) and found that the extended fuse is set to FD on all three. My NANO failed some time ago so I can't report on that particular board. Being set to FD means that the first three bits are set to 101 and therefore that BOD is set to BODLEVEL1 with a threshold of 2.7v. Since I had made no previous attempt to change this fuse on any board, I can reasonably assume this to be the default setting for both UNO with 328p and MEGA2560 boards.

It is curious, then, that on your board this was set to FF. Is this something specific to boards using the newer 328pb processor perhaps? Did the manufacturer not program the board properly? Or did the fuse get inadvertently changed somehow? I might be useful to know whether other boards with this newer 328pb processor have their extended fuse also set to FF?

In the meantime, it is helpful to know that if the fuse is disabled then flash memory could get corrupted, so thanks for pointing that out. I will be adding this information in the AR488 manual.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: OH2LIY on August 03, 2019, 01:13:37 pm
Hi, this is very nice code, tnx! Is there any interest port it to ESP32 (if there is enough I/O), this will give native wlan support. I have tested adaper with ESP8266 and https://github.com/jeelabs/esp-link (https://github.com/jeelabs/esp-link). Esp-link is nicest code what I have found for IP/Wlan<->serial bridge.

Ramppa
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on August 03, 2019, 04:05:17 pm
Hi, this is very nice code, tnx! Is there any interest port it to ESP32 (if there is enough I/O), this will give native wlan support. I have tested adaper with ESP8266 and https://github.com/jeelabs/esp-link (https://github.com/jeelabs/esp-link). Esp-link is nicest code what I have found for IP/Wlan<->serial bridge.

Ramppa

I had purchased an ESP32 to do some work with, but haven't got around to that yet. Having had a quick look at the documentation, it does seem that the ESP32 has more pins than the ESP8266. The ESP8266 does not have sufficient IO and I have done some work on a serial interconnect with an Arduino board but that work is not yet complete.

Although I need to have a look in more detail, there does appear to be a sufficient number of IO pins on the ESP32 board, so it might be possible to run the firmware directly on the ESP32 and have a web based config and telnet access over LAN. There are some questions, for example, does the ESP32 operate at 5v, or like the ESP8266, at  3.3v? Is 3.3v sufficient to drive the GPIB bus? Its certainly an interesting idea and I will do some more research.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on August 03, 2019, 05:04:09 pm
Hi WD,

ESP32 can run on 2.3 V to 3.6 V, and 3.3 V is the recommended voltage with a power supply of at least 500 mA. I didn't see anything explicitly stating that the I/O is 5-volt tolerant, so assume 3.3 V.

GPIB Signal TypeDC Characteristics
Input Voltage HighVIH = 3.4 volts typical, 2.4 volts minimum
Input Voltage LowVIL = 0.22 volts typical, 0.4 volts maximum
Input Current HighIIH = 2.5mA maximum
Input Current LowVIL = -3.2mA maximum
Output Voltage HighVOH = 3.4 volts typical, 2.5 volts minimum
Output Voltage LowVOL = 0.22 volts typical, 0.5 volts maximum
Output Current HighIOH = -5.2mA maximum
Output Current LowIOL = 48mA maximum

So, ESP32 could probably receive OK, but there is some risk if a device on the bus goes too much higher than typical.

It looks like ESP32 max source is 20–40 mA (depending on power domain) and max sink is 28 mA. I don't know if that GPIB IOL is often so high, maybe when there are many devices on the bus or at max bus length, so it may or may not be an issue.


Ref:
https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf (https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf)
http://www.interfacebus.com/Design_Connector_GPIB.html (http://www.interfacebus.com/Design_Connector_GPIB.html)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on August 03, 2019, 08:40:38 pm
The ESP32 is very cool.  I have several, but not had time to get acquainted yet.  But I question how useful a WiFi GPIB controller is given all the other wires required.  Perhaps for remote data logging using a directional antenna, but around a small  lab it's hard to see much benefit.

Now, a large student lab with multiple instruments and computer workstations is another matter.  I can see a lot of use for it in an academic setting.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: _Wim_ on August 04, 2019, 06:25:01 am
The ESP32 is very cool.  I have several, but not had time to get acquainted yet.  But I question how useful a WiFi GPIB controller is given all the other wires required.  Perhaps for remote data logging using a directional antenna, but around a small  lab it's hard to see much benefit.

Now, a large student lab with multiple instruments and computer workstations is another matter.  I can see a lot of use for it in an academic setting.

Even in a small lab, I find the max USB cable length quite limiting if the equipment is in a rack or on a large shelf. Wired or wireless Ethernet is for me personally much more attractive. Wired has maybe still the advantage that power can be supplied also. The low cost POE switches found on Ali-express combined with a low-cost Ethernet GPIB adaptor seem like the ideal alternative to GBIB cabling equipment together.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: _Wim_ on August 04, 2019, 06:38:16 am
Wired has maybe still the advantage that power can be supplied also. The low cost POE switches found on Ali-express combined with a low-cost Ethernet GPIB adaptor seem like the ideal alternative to GBIB cabling equipment together.

Something like this board, but with a GPIB connector already fitted...

https://wesp32.com/ (https://wesp32.com/)
or this
https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-source-hardware (https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-source-hardware)
https://www.olimex.com/Products/IoT/ESP32/ESP32-POE-ISO/open-source-hardware (https://www.olimex.com/Products/IoT/ESP32/ESP32-POE-ISO/open-source-hardware)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on August 04, 2019, 06:54:50 am
Funny you should mention GPIB and Ethernet. I recently ran across an Arduino Leonardo ETH. They're discontinued, but essentially a standard Leonardo with onboard Ethernet and SD card reader (instead of using a separate Ethernet shield). It's almost a GPIB-Ethernet gateway with built-in log storage, just needs a shield for the GPIB connector.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: _Wim_ on August 04, 2019, 07:02:37 am
Then if we add a Lipo to ensure the device keeps on logging to the SD card we arrive at something like this:
https://www.olimex.com/Products/IoT/ESP32/ESP32-EVB/open-source-hardware (https://www.olimex.com/Products/IoT/ESP32/ESP32-EVB/open-source-hardware)

Off course one of the goals should be that the final device is cheap enough so one can be fitted to each test instrument as an alternative to GPIB wiring and a single GPIB adaptor.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on August 04, 2019, 07:20:00 am
That eval. board is not a bad price when compared to how expensive GPIB interfaces are. However, making a dedicated board would be more space efficient for use directly on every device as you describe.

Since I already have GPIB cables between instruments, I might one day turn a Leonardo ETH into an Ethernet gateway. I imagine the AR-488 firmware would port over to the 32u4 without too much trouble. Then, it's a question whether there's enough code space for the Ethernet part.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: _Wim_ on August 04, 2019, 07:44:13 am
Since I already have GPIB cables between instruments, I might one day turn a Leonardo ETH into an Ethernet gateway. I imagine the AR-488 firmware would port over to the 32u4 without too much trouble. Then, it's a question whether there's enough code space for the Ethernet part.

From what I have read, I think the hardware of the arduino as it is cannot handle daisy chained devices on GPIB. For this to work, additional hardware needs to be implemented.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on August 04, 2019, 12:23:49 pm
Since I already have GPIB cables between instruments, I might one day turn a Leonardo ETH into an Ethernet gateway. I imagine the AR-488 firmware would port over to the 32u4 without too much trouble. Then, it's a question whether there's enough code space for the Ethernet part.

From what I have read, I think the hardware of the arduino as it is cannot handle daisy chained devices on GPIB. For this to work, additional hardware needs to be implemented.

This comes up about every other day based on someone's experience using another MCU, especially PICs.  All MCUs are not the same.

It helps to read the datasheets and the GPIB electrical spec.  One can use dedicated GPIB drivers, but it's not needed with the parts used in the Uno and Mega.  They only provide 40 mA of drive  rather than the 48 mA of the GPIB spec.  So they won't drive a full bus load of 16 devices and there are some other issues with certain software packages such as EZGPIB, but all this is covered rather well in the AR488 manual.

While I'm not an Arduino fan, I've developed a good deal more respect for them after using one of vindoline's boards  to read a pair of 34401As continuously for 6 days.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Kean on August 04, 2019, 12:53:11 pm
It helps to read the datasheets and the GPIB electrical spec.

Yes, it does.   ;D

The 40mA of drive on the ATmega is the "absolute maximum" per pin, and there is also an absolute maximum of 200mA for the whole IC.  It is a bad idea to push the output FETs if you want to keep the chip working long term, so best to keep to only a few devices on the bus.  Another point is that you aren't guaranteed to meet the GPIB spec for low level output voltage (VOL) at more than 10mA or so, thus leading to a good chance of other problems.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on August 04, 2019, 12:57:06 pm
75161 or 75162 type line drivers,

The drivers are designed to handle sink-current loads up to 48 mA

https://www.ti.com/lit/ds/symlink/sn75als161.pdf (https://www.ti.com/lit/ds/symlink/sn75als161.pdf)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Kean on August 04, 2019, 01:02:53 pm
75161 or 75162 type line drivers could pump it to 48 ma ...
https://www.ti.com/lit/ds/symlink/sn75als161.pdf (https://www.ti.com/lit/ds/symlink/sn75als161.pdf)

Exactly!  Usually only needed when running with a loaded bus (4+ devices).  In which case you must have lots of test equiment, and will probably buy a real GPIB controller...
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on August 04, 2019, 01:42:42 pm
The AR488 is a great solution, but if people(s) need to adress more than 4 units, we have to upgrade the ar488 project ... and adding them in soic packages, i dont think the ar488 project would cost a fortune to make/adapt ?  or make a daughter board or a shield ??
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on August 05, 2019, 06:58:29 pm
An Uno-compatible shield with the connector and line drivers on it would be neat for experimenting with different Arduino boards.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on August 08, 2019, 02:31:06 am
WaveyDipole

I'm looking at the Mega 2560 wiring.  Is there any reason  not use 24 pins on the two row header at the end?  It's been a couple of years since I looked at the board details, but a 24 pin ribbon cable on the 2 x 18 header at the end feeding the GPIB bus connectors via a ribbon cable seems a lot cleaner than the current wiring for the 2560.  Though perhaps not as convenient if one wants to use a stock LCD display.

Is there a pin assignment constraint that prevents doing that?  All MCUs have various constraints on which pins you can use for what and sorting out usable connections can be a real headache.  You're obviously very aware of the issues.

I've ordered the minimal form factor Mega 2560 boards, but they will take a while to arrive.  I've got a bunch of regular Mega 2560 boards, but only one prototype board.  I'd like to get an initial prototype with an RTC and CH11 T&H sensor put together this weekend.  With luck my Si7021s will show up before Sunday and I can assemble and test  both RTCs and both T&H sensors.  If I *really* get lucky I might have all 4 permutations working by the end of next week.

Are there GPIB pins with special needs?  I'd like to create an alternative layout for attaching a ribbon cable using the dual row Mega connector with some diverted wires if required. 

I looked at the Uno wiring again and it doesn't look as if it is possible to add both the the RTC and a T&H sensor to an Uno based unit.  Relative to the cost of commercial GPIB-USB interfaces, the extra cost of a Mega hardly matters.

Thanks a lot.

Have Fun!
Reg
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on August 08, 2019, 01:46:44 pm
@ rhb   read the previous post,  the pinout is mentioned  and the reasons why too

https://github.com/Twilight-Logic/AR488/blob/master/AR488-manual.pdf

see post #161
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on August 08, 2019, 04:17:57 pm
Where do you think I got the current pinout information from?

I don't want an LCD, just an RTC and a pair of T&H sensors.  I am *not* suggesting WaveyDipole should change his version.  I'm asking if there is a gotcha in the Mega pin choices he made, i.e. certain signals for GPIB can *only* be generated by certain pins on the Mega.

I'd like to be able to simply connect a 2 x 12 ribbon cable header connector to an Arduino Mega with a series of 2 x 12 Centronics connectors and have it all wired up using IDC connectors.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on August 08, 2019, 04:48:29 pm
Well  i think you know  how, normally you can rewite his code to asign the pins you want to use, or make an shield / daughter board ??

Wavey did tell the reasons has you know / read for the pins used ....  what more do you want to know ?

Its not a rant or any argument war.

And i will say it again,  it is not this original thread mission, you have to take it to a new thread.


I'm trying myself to build an arduino gpib interface,  have problems to find a pcb mount gpib connector here ......  i'm trying to understand the provided code(s) and read arduinos boards pro's and con's.

I wanted to play with my teensy 3.2 and my mega2560 before the code was re-written by wavey

You have a very powerful teensy 4 who just got out ... you have a very good forum help on pjrc ...  still pro's and con's too.


@RHB   Maybe im wrong,  but you seem to need someone to fork a arduino code for you ???   You tell what you need or desire but do you provide some starting points / code snippets etc ... ?

I can't  since im very bad at coding myself, i read and i try to understand, thats all i can contribute.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on August 08, 2019, 07:47:52 pm
I don't really see the point of driving a 488 bus full of instruments. These arduino-based interfaces are cheaper than the 488 cables, and USB cables are more convenient (thinner). So if you want to control multiple instruments, just give them a USB interface each.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on August 08, 2019, 08:59:34 pm
There is a SCPI command GET which will execute a synchronized measurement on multiple devices on the GPIB bus.  It is unlikely that attempting that with multiple GPIB-USB devices would achieve as tight a synchronization. This can be very important if one meter is reading the voltage and the other is reading the current under dynamic load conditions.

If you have a stack of DMMs, being able to read all of the stack using a single GPIB-USB adaptor and  12" of ribbon cable and an IDC Centronics connector per meter is a lot cheaper and more convenient.  And then there is the minor detail of just how many USB serial ports will the OS support. At the moment I have 13 instruments with GPIB interfaces.  The number is going to get larger, not smaller.  I'm sure I'll need more than one GPIB-USB interface.  How many is yet to be determined.

Code forks mean that there is another place that the same bug has to be fixed.  I am prepared to go to a *lot* of trouble to avoid code forks.  Spend a few years maintaining a pair of 300KLOC forks so they work together and you'll understand why I don't like them.  Or 500KLOC which was copy-paste-modified over a dozen times so you have a dozen or more places the same bug has to be fixed each time someone finds a bug.

My concern is some subtle GPIB electrical interface requirement that can only be satisfied by certain pins on the Arduino.  Very often you only learn about those the hard way trying to figure out why it won't work.

Old guys who have spent lots of time battling terminal, modem and printer configurations worry about such things.  Not knowing about the footnote on page 644 of a 1786 page manual can eat more of your life than you can imagine.  Nothing triggered as much fear and dread in a senior sys admin 35 years ago as a nice shiny $100K graphics terminal that one of the users had just bought and wants connected to do DMA out of main memory of a super computer to the graphics processor.  Imagine having to get an nVidia card with no software drivers working.  You're the admin, you're the one who gets to write the driver for your super computer, not the vendors.  Documentation, you don't get no stinking documentation.  That's proprietary.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on August 08, 2019, 11:20:54 pm
I do understand all of that    BUT  the arduino ar488 project is a somewhat cheap substitute to really expensives  usb-gpib adapters .. like the famously cloned Agilent, or an National Instrument gpib  etc...

I would advise caution using this on one or many instruments in a chain .. with known current drive limitations for the outputs.

On many occasions you had timing issues and small nicks between many brands, and the updated codes helped a lot fom Wavey

Thats all   Im just saying its too easy to forget thoses things and have many problems happening while doing seroius jobs.

Unless someone wants to upgrade it to an industrial device, adding input/output protections, surge protectors,  emi rfi shielding etc ...   it wont be a simple project anymore.


@rhb   Did you tried using hp main frame like the 34970 ??   you had other main frames sold recently on fleabay  for very cheap prices ...
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on August 09, 2019, 01:54:41 am
40 mA vs 48 mA is not a big limitation.  It's 3 fewer devices on the bus.  Except for that, the Mega meets all the IEEE-488 specs so far as I can tell.  My biggest concern is I/Os which are only available on certain pins of the Mega.  In particular the pins for I2C for the RTC and T&H sensors.

I ignored the Arduino for many years because it targeted non-engineers.  But I've developed much greater appreciation for them because they interface well with TTL and are very cheap.

I'm probably going to use two Megas.  One to control the RF deck and one to control the DMM deck.  The DMM deck will get much heavier use scanning voltage references than the RF deck which will almost exclusively be used for doing cals on the RF gear.

WaveyDipole and I have exchanged some PMs on this.  Nothing is decided, but it looks as if I can make what I'm doing fit in to the existing framework.  The price of the Keysight and National Instruments interfaces is ridiculous.  There is just not that much hardware in them.  The Prologix syntax that WaveyDipole copied lends itself to adding "++time", "++temp", "++humid",  "++relay in n",  etc, very neatly.  If it is "#ifdef MEGA" it doesn't break anything if someone is using an Uno.

I'm not looking for someone to do any of what I want.  I'm trying to make sure that what I do doesn't break something I don't know about. And as a point of professional pride, when I get done it should be impossible for anyone else to tell what I wrote and what WaveyDipole wrote.

On my first contract job for a major oil company, I wrote a couple of 15KLOC libraries which *never* had a bug reported against them in 12-15 years of deployment.  The only change ever made was when Sun released a C standard library which failed to set errno properly after a call to getcwd(3c).  That project was a 500KLOC port from VMS to Unix.  After the first year of deployment I prepared the release notes.  We had under a dozen user submitted bug reports.  As we added new programs to the package the bug count went down from there.  We had a huge regression test suite that we ran every time we did a build which checked everything we knew to check. After 7 years, a merger in 1999 ended support for the package, but because it was so reliable it ran on until it was simply obsolete. 

I ported it to 6 different Unix workstations.  I don't know how many it was actually supported on as I left to avoid suffering through the misery of another layoff.  The new client had an unannounced  layoff the day after I got there.

We had done HP and AIX ports following the initial Intergraph and Sun ports.  I did the Ultrix and Irix ports as an afternoon lark one day when I didn't have anything to do.  All the business affiliates insisted on buying whatever they wanted.  Our policy was, "Yes, sir.  We can provide that on any system you choose.  You merely need to pay for the 2 weeks of staff time required to verify that the results are correct."  The code had two "#ifdef"s, byte order and "RECL=" in words or bytes.  Pretty good for a dusty deck FORTRAN port to 6 Unix platforms from VMS.  I wrote a program which converted all the VAX run time library calls to functions we wrote using the C standard library in all 500KLOC in a single run.  It checked the code out of SCCS, converted it and checked it back in.

There is *no* excuse for buggy software.  Buggy production grade software is a clear demonstration of incompetence.  Research code is a bit different.  But there is a factor of 3-4x difference in the labor required to write research code vs production code.  Fred Brooks wrote very eloquently on the topic in "The Mythical Man Month".

But to reiterate, I'm still trying to figure out *what* I'm going to do.  And I'm looking for obscure edge cases.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on August 09, 2019, 11:03:18 am
I agree there are certain GPIB operations that wouldn't work well on multiple USB connections, or even ethernet. For those, you probably do need a traditional interface with proper buffering. But I'm not convinced they're terribly important for a random collection of old test instruments - I can see their utility in a carefully orchestrated ATE setup but that's not what I'm running. I just want a convenient way to extract and log data from instruments too old to have USB or ethernet - and if they did have they, they still wouldn't have the GPIB operations like device to device transfer or parallel polling.

So I think worrying about that buffering on a cheap-as-chips interface is overthink. If I needed to do that I'd probably be willing to spend the money on a full-on interface. In fact I picked up an NI-USB interface for peanuts recently - but I like the open source possibilities of this design better. Another option is to get one of the much cheaper ISA or PCI interfaces, put it in a dedicated machine with ethernet, and build it into an intelligent bus controller that does everything you want. I have most of the bits stacking up for this too - just needs a convenient old mini-ITX board with pci to fit the case !

I believe the popular Prologix interface also has no 161 buffers, at least in the USB implementation. There's also a relatively cheap (cheaper than prologix) device by Galvant that _does_ have buffers but unfortunately uses a Microchip controller with its restrictive compiler. I prefer gcc and AVR. I don't want my instruments on wifi, I prefer the predictability of wired so esp8266 is unappealing (though esp32 can support a wired ethernet interface - it's just that there isn't a cheap off the shelf module that offers that).

A USB network can get a bit clumsy but it has thin wires, self-powered interfaces and easily overreaches the 31 device limitation of GPIB. So I'd prefer ethernet but I'll put up with USB for the wiring convenience.

I don't, however, have any problem forking the code. It's convenient to be able to pick up improvements to the main branch but in practice, onmce it's working, it's likely to stay untouched. The most likely area of incompatibility is in pin assignments - I want to build a version that avoids the serial interface and uses a 32u4, perhaps based on a simple PCB adapter between the footprint of a 488 plug and the footprint of an arduino pro micro. It may be that WaveyDipole's work to implement it for 2560 has already made this part more portable : I suggest it could eventually just be an included file of #defines rather than conditionals.

And I *am* an old guy. I have alkl those concerns about doing it properly. But this, I think, is an occasion where doing a carefully-selected partial implementation wins for some specific - but very common - cases.


Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on August 09, 2019, 01:17:03 pm
AR488 is a FW stack.  What particular HW is used is a different matter.  My goal is for the FW stack to be absolutely bullet proof,  do *anything* that makes sense and be trivially configurable to whatever HW the user chose whether it's a single Uno and DMM or something very exotic.

I happen to be at the 3 sigma high end wanting to switch an 8560A, 8566B, 8648C, 438A w/ 8481D & 8482A, 5386A and GPSDO for a full calibration test.  I also want to scan multiple voltage references 24 x 7 over multiyear durations while cycling an environmental chamber.

Very likely I'll use a Pi as the data logger, but I've got a lot of software to write to interface the Arduino to the 44421A relay board, T & H, RTC , etc first.  So all in due time.  Right now I'm analyzing the data from my USA CAl Club: Round 2 run.

For someone installing AR488 on an Uno or Mega using the  Arduino IDE, nothing will look any different other than the presence of an #ifdef which I'll use in a traditional Makefile to include all the exotic options.

I recently acquired a 16500 logic analyzer, so I'll be writing a test suite that exercises the full functionality of the AR488 FW stack and checks it using the LA for correctness.  It will all get done when I get it done, so don't expect me to put in 40+ hr weeks to meet some deadline.

While it's not needed for most use cases, it would be nice if someone spun an OSHW board using the TI GPIB interface chips on an Arduino shield footprint.  I don't have any PCB layout tool skills.  Everyone has their limitations.  I'm no exception.

Have Fun!
Reg
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on August 09, 2019, 10:48:04 pm
FWIW I read all the Mega version code today.  It's *really* well written.  So it will be a real pleasure to work with. 

Unless you've done it, you can't imagine what it's like to have to debug and support 750KOC of scientist written software in which the only comments are the author's name.  When there are half a dozen algorithms in the literature for doing something, it's a lot of work to figure out from the code which one is being used.

The author of one 50KLOC program reported it crashed.  I tracked it down to an uninitialized variable.  He couldn't figure out what the variable was, so I never fixed it.  He was the only user.

I got my Si7021 boards today, so I hope to have a AR488 Mega based GPIB-USB adaptor working soon with the time, temperature and humidity reporting via Prologix style commands.

Of course, neither of the two RTC nor the Si7021 boards came with *any* documentation :-(

So I get to play hunt the wumpus on the internet looking for documentation.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on August 09, 2019, 10:57:29 pm
Hunt the wumpus. Classic!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on August 10, 2019, 05:32:55 am
Hunt the wumpus. Classic!

LoL!  Living as I do among a great mass of semi-literate hillbillies, it's a great delight to converse with literate people who recognize obscure references.

I rather dread fixing the Tempduino bug. My 2424.378 C readings at the end of  the PX/FX ratio run suggest a buffer pointer  bug in something which will be difficult to work on.  Could you post a sample of Tempduino log output  you encountered? 

The Wire libraries are in stark contrast to the careful style of the AR488 code.  Error checking?  We don't need no stinking error checking! I rather fear that will require a code fork. Past experience with code cowboys has not been good.  I'd fix it and they'd break it, again. And again.

Fortunately, if you go through adding error handling, most things become much more reliable without doing anything more difficult than suffering the tedium of writing all the error return handling.

But at this point, all I can do is hope.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on August 11, 2019, 07:51:52 am
WaveyDipole

I'm looking at the Mega 2560 wiring.  Is there any reason  not use 24 pins on the two row header at the end?  It's been a couple of years since I looked at the board details, but a 24 pin ribbon cable on the 2 x 18 header at the end feeding the GPIB bus connectors via a ribbon cable seems a lot cleaner than the current wiring for the 2560.  Though perhaps not as convenient if one wants to use a stock LCD display.

Is there a pin assignment constraint that prevents doing that?  A

Since the possibility of adding a touch display was mentioned, I looked into the displays available for the Mega and it turned out that the touch display uses that two row header. On the other hand, shields tend to use the side connectors and the basic two row text display can make use of any available pins. There was no possible solution that could satisfy keeping both the two row connector and sufficient pins for shields free. I was also unsure about using the pins designated for the SPI bus for PCINTs (50-53) so in the end I decided to go with leaving the end connector free. However, *theoretically* there is no reason that the GPIB controls pins could not be confined to the two-row header. On the UNO, pins 11 and 12 are also allocated to MOSI and MISO but using them for GPIB control seems to have had no ill effect on being able to use the SPI connector to program the board with an AVR programmer. I therefore suspect that there should be no problem using pins 50-53, but not having tested it, at this time I can't say for sure.

The port layout is still a bit awkward as each register port corresponds to 4 pins on each row so to use one port you have to use 4 pins across two rows rather than 8 consecutive pins on one row. Since a couple of pins with PCINTs are required, the GPIB control pins would perhaps have to occupy the left hand side (39-53 and 38-52) and the remaining pins could be used for other purposes including to control GPIB Bus driver chips. I could implement the code so that the current layout and the two row connector layout are selectable by means of a #define directive providing the user/developer with the option to use either.

On another note, regarding the ESP32, it seems that the ESP32 board documentation makes no mention of PCINTs or pin register ports. Interrupt handling is provided but seems to be implemented somewhat differently and it seems that pins would have to be managed using pinMode(), digitalWrite() and digitalRead() methods which are slower than direct port manipulation that is being presently used to maximise performance. The current code would therefore need a substantial re-write and performance may be impacted somewhat, but I do intend to do some work on it in due course.

For the present, I would like to focus on the Mega and complete what I have planned as well as include any further suggestions.

With regards to that, I found the multiple GPIB buses idea interesting. Theoretically one should be able to accommodate up to 3 GPIB ports on the mega with a handful of pins to spare. Whether that would mean having 3 separate GPIB buses or just one bus with 3 ports I'm not yet sure, but it would certainly allow significantly more instruments to be connected. If this is something that is likely to be useful, then I will consider adding that as a feature. It does have an impact on the use of the two row header so implementation would need some careful thought, especially if the flexibility of using different layouts as discussed above is to be maintained.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on August 11, 2019, 04:14:25 pm
I had a long look at the Uno and Mega pin layout yesterday and am pretty much in agreement with your choices.  It *might* be desirable to free up the 8 ADC pins, but for now I'm going to stick with what you've done and focus on adding an RTC and T&H sensor.  I now have all my parts except for documentation, so I'm hoping that perhaps by the end of the week I'll have it working.  But a lot depends on how much work I need to do on the Wire library for I2C support.

On general principle I'd like to merge the Uno and Mega versions so there is only a single point of maintenance.  So I'll be looking closely at what is needed to achieve that.  I also *very* much want to implement "++lon" for use as part of a test harness.

It was a huge pleasure reading your code.  I wish I could say the same for the Wire library.

AR488 looks quite suitable as the base for a GPIB-USB interface that can equal or exceed anything on the market.  For a wide range of reasons, I think that ethernet connectivity is best done with a Pi or Beagle.  The main reason being that for multiyear logging of a suite of voltage references using a 44421A relay card for switching it makes more sense from a power consumption basis to record the data on something like a Pi. It also allows running everything from some sealed lead acid batteries.

BTW the 44421A needs 9 pins per board to select any of 20 inputs.  The thermal EMF of the relays is specified at under 1 uV, but I'm considering bonding an aluminum plate to the relays with thermal silicone sheeting and then monitoring the temperature with thermistors and the Arduino ADC inputs.  With appropriate care I think that it might be possible to get well below 1 ppm error.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: sixtimesseven on August 11, 2019, 04:31:54 pm
Nice Work!

Could I suggest looking into supporting ESP8266 or even better ESP32 boards as well? This would open the possibility of connecting via wifi and in the case of the ESP32, bluethooth as well :)

I designed a little board featuring a ESP32 and optionally the proper 488 line drivers but I have not been able to test it so far. To much other stuff to do :(

https://github.com/sixtemesseven/WGPIB (https://github.com/sixtemesseven/WGPIB)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on August 11, 2019, 07:15:36 pm
If I may ask the obvious.

Why not use the AR488 via USB from an ESP32?

To my mind, the whole point of using an Arduino is it is TTL compatible.  Aside from pin assignments and writing WiFi services, the AR488 code should be pretty straight forward to run on an ESP32.

TANSTAFL.  I would never use wireless if a wire is convenient.  It consumes spectrum I might need for something else.

The ESP8266 is a power hog.  So I have a problem seeing any benefit to using that.  It's like WiFi security cameras.  What's the point of wireless data if you still have to run power?  PoE is much more sensible.

But I'm still left with the question, what GPIB instrument needs a wireless connection and why?  Cite a use case.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on August 11, 2019, 09:34:13 pm
On general principle I'd like to merge the Uno and Mega versions so there is only a single point of maintenance.  So I'll be looking closely at what is needed to achieve that.

Funnily enough I was thinking the same today and it would be a good idea to do this sooner rather than later, maintenance being the key factor. On the other hand, I envisage that there will be a lot of code that will be applicable exclusively to the Mega only which will probably take a rather different direction so at this point I am undecided but considering it.

I also *very* much want to implement "++lon" for use as part of a test harness.

I had fun an games with that and could not get it to work reliably so I shelved it for later, but was going to revisit it at some point. If I have time over the next few days I will have another look at it.

For a wide range of reasons, I think that ethernet connectivity is best done with a Pi or Beagle.

I had considered the the possiblility of using an Ethernet shield and maybe implementing LXI, but that was something to consider further down the road and only possible on the Mega so I read this comment with interest. Of course, the PI has the advantage of having Ethernet already built in.

Could I suggest looking into supporting ESP8266 or even better ESP32 boards as well? This would open the possibility of connecting via wifi and in the case of the ESP32, bluethooth as well :)

This is currently under consideration and some work has already been done to support the ESP8266 connected via serial to the Arduino - it doesn't have enough GPIO pins to drive the GPIB bus directly - but it is still a work in progress. The ESP32 is also being considered.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on August 11, 2019, 10:10:28 pm
A big advantage to using a Pi or Beagle for ethernet is that a single Pi with a USB hub could service a lot of instruments and also provide backup archival storage.

An ethernet shield on an Arduino is limited to the GPIB bus capacity whereas with multiple AR488 interfaces you could support many more.  It also doesn't require any extra work.  I suspect that trying to cram all of AR488 *and* ethernet into a Mega would be challenging.

Now to find RTC documentation for the DS1302 and DS3231 w/ an Atmel832.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on August 11, 2019, 10:12:46 pm
I haven't yet tested WaveyDipole Bluetooth interface. But if it works reliably, I am leaning toward minimalistic Pro Mini 5V board, since one wouldn't need a permanent USB connection, only for programming. These boards (as well as nano) also have extra A6 and A7 pins. Using one of the alternative Wire libraries it should be possible to implement I2C on them and then have an interface to BME280 sensor and DS3231 RTC. If by some magic the whole thing can be powered by stealing power from the instrument GPIB lines, it would be a complete solution.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: texaspyro on August 12, 2019, 02:12:58 am
Here's a post with a link to my GPIB code.  It runs on a ATMEGA 2561 and emulates a Prologix adapter.   

https://www.eevblog.com/forum/projects/atmega-gpib-yet-another-diy-gpib-to-usb-project/msg1298075/#msg1298075 (https://www.eevblog.com/forum/projects/atmega-gpib-yet-another-diy-gpib-to-usb-project/msg1298075/#msg1298075)

The code in the link to Github  has some I2C routines (in twi.c and twi.h)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mlefe on August 19, 2019, 01:46:00 pm
Guys, I might have some time to try to port this to the blue pill (stm32f103c8t).
Is anybody working on this? (I want to avoid the double work...)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on August 19, 2019, 02:18:46 pm
not to my knowledge

Would be nice to have one ported to the bluepill :)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on August 20, 2019, 11:43:08 am
Before you start to port any GPIB-USB code to the STM32 line I suggest you read the electrical specifications for the IEEE-488 bus.

Can it be done?  Yes.  But you will spend as much money on the GPIB bus drivers as the price of an Arduino.  GPIB is a 5 V TTL level bus and requires 3 mA per pin per device on the bus for reliable operation.  The STM32 cannot provide that.  You'll also need to make a board for the drivers unless you dead bug the  driver chips.  And don't forget, you still need 5 V for the driver chips.

The 328P and 2560 chips at 40 mA drive per pin don't quite meet the 488 spec of 48mA per pin to drive 16 devices,   But the SMD parts will source or sink a total of 200 mA.  With an Arduino all you need is ribbon cable and IDC 24 pin Centronics connectors and you can drive a reasonable number of devices simply by soldering the cable to the Arduino.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: H.O on August 20, 2019, 01:31:23 pm
Just a quick note on the electrical specifications for the 328P.
The logic low input voltage for IEEE-488 (as for TTL) is max 0.4V. Looking at figure 29-8 in the datasheet (http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf) for the 328P one can see that in order to meet that specification you can't sink more than ~17mA @25°C and if we're going by the "typical" low level voltage of 0.22V then it's more like 9mA.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on August 20, 2019, 01:49:01 pm
Although you're perfectly correct to say it won't drive the bus, I don't think of this as a multiple instrument driver (as I've said before). The STM32 will drive 6mA which is fine for 1 instrument.

Just give each instrument it's own USB interface.
If you want to drive a full bus (or even more than a couple of instruments I'd suggest using proper drivers.

At the price, I think this is a fair tradeoff for being unable to perform the few parallel operations that GPIB requires a bus for. It might not suit you :)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: MarkL on August 20, 2019, 02:29:25 pm
Just a quick note on the electrical specifications for the 328P.
The logic low input voltage for IEEE-488 (as for TTL) is max 0.4V. Looking at figure 29-8 in the datasheet (http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf) for the 328P one can see that in order to meet that specification you can't sink more than ~17mA @25°C and if we're going by the "typical" low level voltage of 0.22V then it's more like 9mA.

Actually, the IEEE-488 input spec is more lax than that.  From 488.1-2003, receiver sec 5.4.1:

    Low state: Input voltage ≤+ 0.8 V
    High state: Input voltage ≥ + 2.0 V

And while we're at it, driver sec 5.3.2:

    Low state: Output voltage (three-state or open collector drivers) < + 0.5 V at + 48 mA sink current
    The driver shall be capable of sinking 48 mA continuously
    High state: Output voltage (three-state) ≥ + 2.4 V at –5.2 mA

So, there's a lot of room in there for marginal implementations to drive less than a full bus of instruments.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: H.O on August 20, 2019, 04:06:20 pm
Mark,
Thanks, I grabbed my numbers from here (http://www.interfacebus.com/Design_Connector_GPIB.html) but I'll happily stand corrected. Perhaps they've changed the voltages in later versions of the standard meaning older instruments might not be that allowing - but I'm speculating.

I think this AR488 and the work that has gone in to it is great. My point was simply that the 328P, in reality, is a bit more limited than what was suggested in a previous message.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on August 20, 2019, 05:39:02 pm
The bus specs reflect the technology of the time which was  TTL.  Don Lancaster wrote the classic work on it, "The TTL Cookbook" which is available for free on his website (tinaja.com) as a PDF.  He goes into considerable discussion of the way the chips work.  Reading the first couple of chapters is quite worth while. 

The GPIB specified voltages reflect the diode drops and noise margins needed for reliable operation of the TTL logic with which it was originally implemented.  Understanding the context of TTL logic imposed limitations will make the numbers in the IEEE-488 standard more meaningful.

The SMD 328P and 2560 packages have the same source and sink ratings of 200 mA.  The DIP 328P can only source 100 mA.   I don't yet know what the maximum demand per device for the bus is.  It depends upon the status of the control lines.  The data bus is 8 bits, so that's 24 mA for the selected device as unselected devices would have the data lines in high impedance state.  I'd expect the load for selecting a device to be the number of devices times the number of pins needed to retain control of the bus.  But I've not confirmed that yet.

Prior to wanting to automate a full cal of my bench I didn't have a lot of respect for the ATMEGA line.  But they fit in with a 5 V TTL world quite well and are cheap.  I've got  a lot of relays to drive, so I plan on using a pair of Mega2560s for the RF deck and another one to drive one or two  44421A boards from a 3497A for reading voltage references, etc.  That puts me at 4-6 devices per GPIB bus which should leave enough drive to power the 5 V relays which will control the 28 V RF relays and the 5 V 44421A relays.

Have Fun!
Reg
Title: Re: AR488 Arduino-based GPIB adapter
Post by: MarkL on August 20, 2019, 05:48:17 pm
Mark,
Thanks, I grabbed my numbers from here (http://www.interfacebus.com/Design_Connector_GPIB.html) but I'll happily stand corrected. Perhaps they've changed the voltages in later versions of the standard meaning older instruments might not be that allowing - but I'm speculating.

I think this AR488 and the work that has gone in to it is great. My point was simply that the 328P, in reality, is a bit more limited than what was suggested in a previous message.

Well, it looks like www.interfacebus.com (http://www.interfacebus.com) got it wrong in that table.  The input and output values they give amount to a negative noise margin.  I also have the 1987 version of IEEE 488 and the driver/receiver specs haven't changed.

Agreed on the 328P.  For microcontrollers with enough pins, there's also a possibility of paralleling output pins as long as they can be switched at the same time by putting them on the same I/O port.  The current sharing should be pretty good.  But for many microcontrollers the per chip maximums will start to get in the way.

EDIT:  One additional thought.... If there are enough microcontroller pins, the 48mA pulldown could probably be handled with a much cheaper driver like the ULN2003A or ULN2003LV.  The main reason not use the SN75161B/SN75162B sounds like it's cost (?).
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mlefe on August 21, 2019, 03:22:40 am
I have a (quick and dirty) first version of the port to the blue pill.
The tough (and ugliest) part of the code is the management of the registers, masks and so on, but I've tested the code on the side and looks like it works (it puts each pin in the right state).
The problem is that I can't have any communication with the 34401 nor the TDS744a that I have with me (and I know they're fine because they responded with Emanuel's code on an arduino).
Going deeper, I never get to the part where the devices are supposed to drive the NDAC low to start receiving, it's just like if they were not aware that the bus has a controller.
I'm almost certain that the problem is with my code but I can't figure out where I made the mistake
    --> do you know which lines should be driven (what state they should be in) to put the devices in "remote" mode?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on August 21, 2019, 04:28:26 am
This Bench Briefs article may be helpful. It describes the HP 59401A Bus System Analyzer, which is used to debug GPIB communications, and walks you through interacting with a device including which lines should be doing what and when.

http://www.hparchive.com/Bench_Briefs/HP-Bench-Briefs-1980-09-11.pdf (http://www.hparchive.com/Bench_Briefs/HP-Bench-Briefs-1980-09-11.pdf)

Especially take a look at the section, "Typical Data Exchange."
Title: Re: AR488 Arduino-based GPIB adapter
Post by: JXL on August 21, 2019, 05:50:56 am
To put the device in remote mode, you have to turn on REN (logic 0).
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mlefe on August 22, 2019, 04:50:49 am
I think I've managed to kill the GPIB on my 34401a  |O
I have no response to an asserted REN (LOW) nor I get any information from the data pins when I put the device on address 31 (talk only).
I move to troubleshoot that... as soon as I fix it, I'll come back to the port: I'm sorry!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on August 22, 2019, 01:19:17 pm
Maybe, *just* maybe mind you, 5 V logic will not work properly using 3.3 V logic levels.

5 V TTL logic high will source current at around 3.3 V ("The TTL Cookbook" p 10).  There are some diode drops between the rail and the output.  So if you knock 1.7 V off 3.3 V what do you get?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on August 22, 2019, 04:26:31 pm

@mlefe :

Did you modify it inline for the blue pill or isolate the register access
?

I did a 32u4 port of an earlier version of the code but never got around to testing it. When I redo it I'd prefer to break the hardware-specific parts out into macros so they can be swapped easily, but if someone else already did that I'd rather build on their work.


Title: Re: AR488 Arduino-based GPIB adapter
Post by: mlefe on August 22, 2019, 06:20:43 pm
Well, the good news is that I've talked too soon: I put together Emanuele's version on an Arduino UNO and I'm able to communicate with my devices again...
SO... back to troubleshooting the STM32 version.
@rhb, I believe the 3.3V should be fine because when I was testing my 34401a I've realised that it's using 3V for the HIGH (it uses a 75ALS162 as driver: it receives 5V internally but puts around 3V in the GPIB port).
I'll let you guys know if I make any progress.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mlefe on August 22, 2019, 06:22:45 pm

@mlefe :

Did you modify it inline for the blue pill or isolate the register access
?

I did a 32u4 port of an earlier version of the code but never got around to testing it. When I redo it I'd prefer to break the hardware-specific parts out into macros so they can be swapped easily, but if someone else already did that I'd rather build on their work.

I've used #define to isolate the code and not disturb the original one in an attempt to not disrupt it while rewriting some of the necessary functions that used the registers and pins.
I can share my code, but at this point is really ugly and doesn't work...
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on August 22, 2019, 07:10:07 pm
Well, the good news is that I've talked too soon: I put together Emanuele's version on an Arduino UNO and I'm able to communicate with my devices again...
SO... back to troubleshooting the STM32 version.
@rhb, I believe the 3.3V should be fine because when I was testing my 34401a I've realised that it's using 3V for the HIGH (it uses a 75ALS162 as driver: it receives 5V internally but puts around 3V in the GPIB port).
I'll let you guys know if I make any progress.

Please read "The TTL Cookbook", p 10 available from the author at no cost at tinaja.com.

Put a 1k resistor in series with the STM32 pin, drive the pin high and measure the voltage at the pin.  For it to be reliable that voltage *must* be significantly more than 2.0 V.  TTL logic by design provides a 1.3 V noise margin.  The 3 mA per pin per device GPIB spec was not made up just because someone wanted to do that.  It was because it reflects the reality of driving 5 V TTL logic gates on the end of a long cable.  Where any stray signal pickup can shift the voltage up or down by a few tenths.

The worst possible outcome is you get your 34401A to function at 2.1 V and a lot of other people find that theirs won't work reliably.  For which all the blame will be yours for ignoring basic digital electronics requirements.

It's easy to dismiss "The TTL Cookbook" as obsolete and irrelevant, but nothing could be farther from the truth.  Don discusses the device level physics and those don't change.  The same diode drops apply.  The only thing that has changed is the noise margins are a *lot* narrower.  Which is why I have fixed a good bit of 3.3 V logic consumer electronics simply by cleaning the residual solder flux off the board.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on August 22, 2019, 07:13:01 pm
How are you programming the blue pill ?

I have some here but haven't really got a usable workflow for them. But I have got a logic analyser and even one of those old HPIB analysers bitseeker mentions.



(very puzzled as to why I was entering a newline every time I hit '?'. Thought it was the forum software but it was because of a bit of hot glue that had fallen between the shift and return keys ...)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on August 22, 2019, 07:50:01 pm
rhb,

From table 36 (output driving characteristic) on page 65 of the STMF103 datasheet, we get :

With 8mA pin drive, Vdd 2.7-3.6 V

Output low level for a CMOS port I/O pin when 8 pins are sunk at the same time, max 0.4V
Output high level for a CMOS port I/O pin when 8 pins are sourced at the same time, min Vdd -0.4
Output low level for a TTL port I/O pin when 8 pins are sunk at the same time, max 0.4V
Output high level for a TTL port I/O pin when 8 pins are sourced at the same time, min 2.4V

which seems OK. But at 20mA per pin, Voh is only 1.3V (or VDD-1.3 for CMOS) which is too low.

So I'd think it was OK for 2 loads and possibly 3 (unspecified, but there's a good margin at 2 loads) but not for 6 or 7.

I'm not really sure why they specify CMOS and TTL ports as though they're something different. As far as I can tell those figures apply to all ports except for 3 specific pins which have a 3mA limit. The CMOS/TTL designation just seems to be to distinguish the spec of 2.4V for TTL and Vdd - 0.4 for CMOS. Vdd - 0.4 would still give at least 2.4V out down to a supply of 2.8V but spec says its maintained to 2.7V Vdd. At 3.3V and 8mA it should be at least 2.9V.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: mlefe on August 22, 2019, 09:28:39 pm
How are you programming the blue pill ?

I have some here but haven't really got a usable workflow for them. But I have got a logic analyser and even one of those old HPIB analysers bitseeker mentions.



(very puzzled as to why I was entering a newline every time I hit '?'. Thought it was the forum software but it was because of a bit of hot glue that had fallen between the shift and return keys ...)
Everytime I receive a new one, I perform these steps to install the firmware from stm32duino:
1. I connect a FTDI to the blue pill
2. I move the "upper" jumper to 1
3. I connect the FTDI to a USB port. I verify that it appears as "Prolific USB To Serial Port (COM 6)" (6 or whatever other port)
      If this step fails, I download PL2303_64bit_Installer that installs version 3.8.18.0 (this one works for Win10)
4. Then I go to "C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\tools\win"
5. I then execute this line: stm32flash.exe -w ..\..\STM32F1\binario\generic_boot20_pc13.bin COM6 (6 is an example, you should use the previous port)
6. I shift the upper jumper back to "0"

Then I use the arduino IDE with the following settings (in the "Tools" menu):
Board: Generic STM32103C
Variant: STM32F103CB (20k RAM, 128K Flash)
CPU Speed: 72MHz
Upload Method: STM32duino Bootloader

Sometimes when I'm uploading the sketch it gets stuck waiting for the DFU interface, if that happens I quickly reset it (so it starts in DFU mode) and that's enough to make it work.

If you have any doubt on the steps or the files needed let me know ;)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on August 22, 2019, 10:34:42 pm

So I'd think it was OK for 2 loads and possibly 3 (unspecified, but there's a good margin at 2 loads) but not for 6 or 7.

I'm not really sure why they specify CMOS and TTL ports as though they're something different. As far as I can tell those figures apply to all ports except for 3 specific pins which have a 3mA limit. The CMOS/TTL designation just seems to be to distinguish the spec of 2.4V for TTL and Vdd - 0.4 for CMOS. Vdd - 0.4 would still give at least 2.4V out down to a supply of 2.8V but spec says its maintained to 2.7V Vdd. At 3.3V and 8mA it should be at least 2.9V.

That assumes there is no noise from the other lines in the bus or the environment.

I *love* the STM32 series.  I've spent more time with those and Mecrisp than any other MCU.  But it's the wrong tool for driving TTL devices.  They are 5 V tolerant, so it's OK to use one to listen.

Why make something that is inherently unreliable by design?    It's begging for trouble when you least expect it and it causes you the most pain.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on August 27, 2019, 06:47:36 pm
Everytime I receive a new one, I perform these steps to install the firmware from stm32duino:
1. I connect a FTDI to the blue pill
2. I move the "upper" jumper to 1
3. I connect the FTDI to a USB port. I verify that it appears as "Prolific USB To Serial Port (COM 6)" (6 or whatever other port)
      If this step fails, I download PL2303_64bit_Installer that installs version 3.8.18.0 (this one works for Win10)
4. Then I go to "C:\Program Files (x86)\Arduino\hardware\Arduino_STM32\tools\win"
5. I then execute this line: stm32flash.exe -w ..\..\STM32F1\binario\generic_boot20_pc13.bin COM6 (6 is an example, you should use the previous port)
6. I shift the upper jumper back to "0"

Then I use the arduino IDE with the following settings (in the "Tools" menu):
Board: Generic STM32103C
Variant: STM32F103CB (20k RAM, 128K Flash)
CPU Speed: 72MHz
Upload Method: STM32duino Bootloader

Sometimes when I'm uploading the sketch it gets stuck waiting for the DFU interface, if that happens I quickly reset it (so it starts in DFU mode) and that's enough to make it work.

Thanks for sharing that process.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on September 08, 2019, 02:45:21 pm
I rebuilt my ar488 today and when testing, noticed that ++rst caused it to enter a reboot loop.

I think what's happening is that I'm using a nano with the 'old bootloader'. Early versions of the arduino bootloader didn't deal with watchdog resets properly, and ++rst uses the watchdog timer to reset the board.

The watchdog reset status bit gets set and isn't cleared by a button-reset operation (also the reprogramming reset) so a power cycle is needed to get it working again. I haven't tried this with the later (uno-style) bootloader but I expect that to fix it. Many nanos are still supplied with the old (Duemilanove) bootloader.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on September 13, 2019, 01:28:13 am
I've got this code working with the arduino pro micro, which has a built-in USB port. It's also a very small board that fits neatly on the back of a GPIB connector, making a really tiny interface.

I've designed (but not yet received) a PCB to mangle the wiring appropriately but will publish that once it's proven.

Waveydipole has a copy of my changes (which also support the Uno and Mega versions in the same Arduino project) and will make that available in due course.

Apart from the size (an arduino nano also fits quite nicely on the back of a plug), the use of the 32u4 should make it possible to support the RTS/CTS pins correctly (though I haven't tried to do that yet) and maybe at some point support USBTMC as an alternative to serial.


Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on September 13, 2019, 02:08:39 am
That sounds cool. Looking forward to seeing it.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on September 14, 2019, 11:08:18 am
It seems that the CDC serial port driver used by the arduino (and most other) USB virtual serial ports doesn't support CTS from device to host. This isn't a shortcoming of the serial port, it's not present in the CDC spec and hence not available in the OS driver. So it isn't possible to trivially add it to satisfy EZGPIB. Other possibilities are emulating a device that does have hardware CTS (and using its driver on the PC, rather than the CDC driver), or emulating some other device EZGPIB supports such as an NI adapter.

A good description of the issue here : https://www.microchip.com/forums/m746114.aspx (https://www.microchip.com/forums/m746114.aspx) , here http://janaxelson.com/forum/index.php?topic=1414.0 (http://janaxelson.com/forum/index.php?topic=1414.0) and here http://janaxelson.com/usb_virtual_com_port.htm (http://janaxelson.com/usb_virtual_com_port.htm)

It seems worth doing. EZGPIB has some excellent features and if you look at the code you find an incredible wealth of knowledge about the quirks of certain instruments. I've tended to avoid it since it's only offered for Windows, but after discovering how thorough it is, and that it seems to be sufficiently well-behaved to work reliably under Wine, I'm inclined to investigate it further.

Waveydipole has kindly put the pro micro / uno / mega combined version up at https://github.com/Twilight-Logic/AR488/tree/master/Contributed/artag (https://github.com/Twilight-Logic/AR488/tree/master/Contributed/artag)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on September 15, 2019, 02:57:32 am
It seems that the CDC serial port driver used by the arduino (and most other) USB virtual serial ports doesn't support CTS from device to host. This isn't a shortcoming of the serial port, it's not present in the CDC spec and hence not available in the OS driver. So it isn't possible to trivially add it to satisfy EZGPIB.
There is a simple way to edit EZGPIB executable to make it ignore the CTS/RTS control. See http://www.dalton.ax/gpib/ (http://www.dalton.ax/gpib/) at the bottom under "Notes".

It is in fact easy to use EZGPIB, although sometimes it behaves in somewhat funny ways.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on September 15, 2019, 10:57:22 am
There is a simple way to edit EZGPIB executable to make it ignore the CTS/RTS control. See http://www.dalton.ax/gpib/ (http://www.dalton.ax/gpib/) at the bottom under "Notes".

Yes, that solution appeared earlier in this thread. But patching binaries isn't an ideal solution, even when it's a 7-year-old release and the author died 5 years ago. It probably makes more sense to change the code : the source is available. or possibly not  - I may be confusing it with the KE5FX suite.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on September 30, 2019, 04:58:45 pm
I have now uploaded a new version (0.47.36) that combines the Uno/Nano and Mega code into one code base. All configuration, including board selection and macros, is now done in the separate Config.h file and a new module called AR488_Hardware has been added and contains the platform specific code.

In addition there is an option to specify a custom layout. The caveat is that interrupts have to be disabled in favour of in-loop checking of the status of the SRQ and ATN (device mode) pins. It has come to my attention that some alternative boards do not support features as SerialEvent or EEPROM. I have therefore removed SerialEvent dependent code as SerialEvent has to wait for the loop anyway so there should be no performance penalty. I have provided an option to disable EEPROM support. The functional code is essentially the same otherwise.

The new code architecture should facilitate adding support for further boards as the layout can be easily added to the AR488_Hardware module. I would like to add support for the 32u4 (artag - see contributed code) and STM32 (mlefe). I have received my 32u4 boards, but it looks like I might have to wait another month for the STM32 ones! I am also considering adding another separate C++ module for external hardware such as sensors or relays etc. Bluetooth has been temporarily removed because the code needs to be updated to work with the new sketch architecture, although the previous version (0.46.32) is still available in the Archive directory should anyone need it.

At present I am currently trying to finish the ESP8266 WiFi add-on which will then allow me to move on to the ESP32.

I would like to say that I appreciate the support and interest that has been shown in this project in the last couple of months. Thank you  :-+
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on October 01, 2019, 01:48:37 pm
PCBs have arrived, and it looks like they work (not too surprising as it's a completely passive circuit that I'd already breadboarded).

The result is pretty pleasing : a usable (~20kbyte/s transfer) cheap (<£10) USB adapter that's smaller than the traditional IEEE-488 stacking plug.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on October 01, 2019, 01:49:57 pm
more pics
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on October 01, 2019, 01:53:02 pm
Could really do with a case to stop things shorting out and some strain relief for that fragile USB socket.
Maybe a 3d print ? Or a laser-cut acrylic sandwich ?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: vindoline on October 01, 2019, 05:25:10 pm
Artag, nice work! That's pretty sweet.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: metrologist on October 01, 2019, 11:22:13 pm
exactly the way I envisioned it.  :-+
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on October 07, 2019, 03:16:28 pm
If anyone wants to copy the version I built, you can get PCBs from here : https://oshpark.com/shared_projects/HrS1HLSE

I will probably revise that at some point (I'd like to move the daughterboard further along, making the USB connector stick out less) but don't know how long I'll take to get around to that. The electrical connections will stay the same so the software will still work.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: ebclr on October 07, 2019, 10:33:31 pm
Could you please point the connector specs or datasheet, or even where to buy
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on October 07, 2019, 11:05:27 pm
I used https://www.ebay.co.uk/itm/391507935311 (https://www.ebay.co.uk/itm/391507935311) part '24 way plug EB67E PCB mount' but from Digikey I think it's https://www.digikey.com/product-detail/en/norcomp-inc/111-024-113L001/1024PMA-ND/955147 (https://www.digikey.com/product-detail/en/norcomp-inc/111-024-113L001/1024PMA-ND/955147)

There seem to be several 'pro micro' arduinos around. I used the cheap common one from ebay, 5V version (there is also a 3v3 version) eg https://www.ebay.co.uk/itm/264238513729 (https://www.ebay.co.uk/itm/264238513729) (that link is a UK stockist - if you get it direct from China they cost a bit less).

The PCB should be assembled with the arduino on the silkscreened side. Pin 1 on the PCB is indicated by having a square pad instead of an oval one - this should be the pin marked TXD on the arduino. The connector goes on the side with no silkscreen : again, pin 1 has a square pad.

You need to assemble it in a specific order or you can't get to the pins to solder them.

1 : solder the 12-way header pin strips to the silkscreen side, short end in the pcb, long end sticking out
2 : solder the connector on the side with no silkscreen
3 : clip the surplus length of connector pin off short (so they don't touch the back of the arduino board).
4 : fit the arduino over the long ends of the header pins, with the USB connector upwards and at the 'AR488' end of the board
5 : solder the pins and clip them short

you should probably then

6 : put some hot-melt glue over the ends of the header pins where they're close to the metal connector shell (danger of shorts)
7 : cover the rest of the arduino to prevent shorts and damage
8 : strengthen the USB connector with epoxy

You could also build it with a female connector but then you'll have to assemble it as a mirror image - connector on the silkscreened side and arduino upside-down (USB connector trapped between arduino pcb and ar488 pcb)
 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on October 12, 2019, 10:09:44 pm
It's finished!  :-)

I got my enclosures today and my first AR488 GPIB-USB interface is completed.  This one is for AR488 FW development and to operate a stack  of 2x 34401As.  It will later move to the 2x 3478As when I build the 44421A 20 channel switch for monitoring voltage references.

Next task is to add functionality to AR488 to read the 328P  internal temperature sensor.

Have Fun!
Reg

BTW the enclosure is 100x60x25 mm and under $1 from Hong Kong.  I bought 5 from US stock, but just ordered 20x more from HK.  It's a very convenient form factor for lots of things.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on October 13, 2019, 02:19:47 am
Looks great, Reg. That case fits quite nicely!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on October 13, 2019, 03:17:02 am
I was a bit skittish about it, but it turned out to be a great fit.  Basically, it's roughly the size of a 100 mm cigarette package.  That's a handy size.  I *think* I might even get a Mega 256 in one with a bit pf PCB trimming.  I bought 20 for $0.884 each with tax.  It will take a while for them to get here, but at that price it's well worth having a bunch on hand.

Most of the projects I've managed to finish are about this size  and consisted of $1-2 of electronics in $4-5 of enclosure.  So having a bunch of <$1 enclosures on hand is very attractive.  I'm sure I'll build more things  if a packaged version is the same cost as the breadboard version.  I've got 2" copper foil tape to line them if needed.  I've got a bin full of dead bug devices.  And a fair number are worthy of some connectors and a power jack in an <$1 box.  Connector labels and a schematic on the back.  Might not use it often, but it's a real pain trying to figure out what they are if they are just in a Jim Williams' style  bowl of stuff.

I've got stuff I built 30 years ago, but did not package because of the cost.  Now I have no idea what they are and am reluctant to reverse engineer my own work.  I wish to hell I had at least put a tag on them.  But I didn't expect to not do any electronics for 20+ years.

Have Fun!
Reg
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on October 13, 2019, 03:53:49 am
Ah, curious how the Mega will turn out. I have an open-frame acrylic case, but a fully enclosed one would better.

As for project enclosures, I actually bought some old, dead HP gear just for repurposing their cases. :-+
Title: Re: AR488 Arduino-based GPIB adapter
Post by: ebclr on October 13, 2019, 05:52:18 am
This box fits perfect for this

(https://ae01.alicdn.com/kf/H19e317674568486b90a703f935ef818bt.jpg)

https://pt.aliexpress.com/item/4000137043277.html?spm=a2g0o.cart.0.0.3e523c00kfgSjD&mp=1



Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on October 13, 2019, 11:06:34 am

As for project enclosures, I actually bought some old, dead HP gear just for repurposing their cases. :-+

The horror ! You shouldn't have told us that :). You're going to get lynched in the TEA thread now ..

I hope it's really useless stuff like (imho) bit error rate testers and the like. I generally find that old equipment I buy for parts gets mended instead. It's too tempting to just have a go at it.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on October 13, 2019, 05:15:21 pm
This box fits perfect for this

(https://ae01.alicdn.com/kf/H19e317674568486b90a703f935ef818bt.jpg)

https://pt.aliexpress.com/item/4000137043277.html?spm=a2g0o.cart.0.0.3e523c00kfgSjD&mp=1

Thanks, I haven't seen that one before.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on October 13, 2019, 05:18:05 pm

As for project enclosures, I actually bought some old, dead HP gear just for repurposing their cases. :-+

The horror ! You shouldn't have told us that :). You're going to get lynched in the TEA thread now ..

I hope it's really useless stuff like (imho) bit error rate testers and the like. I generally find that old equipment I buy for parts gets mended instead. It's too tempting to just have a go at it.

Have no fear. I wouldn't do that to something useful and fixable. ;) A secondary benefit is that it'll then match my other HP gear.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on October 13, 2019, 07:45:44 pm
Thanks for the box link.  I'm going to get some.

I've actually bought old HP gear just for the enclosure.  In particular, a 37203A GPIB extender to house an Arduino Mega driving an HP 44421A 20 channel multiplexer card to connect to a 34401A.  Major problem with the 44421A is getting the PCB edge connectors.  I really want a few more of the 37203A as I have a bunch of 44421A cards.

I'd *love* to have a pickup truck load of dead HP gear just for the enclosures.  Absolutely perfect for experimental HF radio and T&M projects.  Unfortunately, shipping cost makes getting stuff here expensive. And I don't want to drive 1000 miles to an auction on the chance I'd get a load.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on October 13, 2019, 10:08:07 pm
It's finished!  :-)

I got my enclosures today and my first AR488 GPIB-USB interface is completed.  This one is for AR488 FW development and to operate a stack  of 2x 34401As.  It will later move to the 2x 3478As when I build the 44421A 20 channel switch for monitoring voltage references.

Reg, that's a really neat professional looking result!


This box fits perfect for this

https://ae01.alicdn.com/kf/H19e317674568486b90a703f935ef818bt.jpg

https://pt.aliexpress.com/item/4000137043277.html?spm=a2g0o.cart.0.0.3e523c00kfgSjD&mp=1

And that's certainly better looking than those clear acrylic cases that mine are in!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on October 13, 2019, 11:07:34 pm
Ahh..   Thanks, but  I didn't show the USB cutout.  It's not as good a fit as it should have been.  I should have marked it out more carefully.  But I was impatient.  But not so OCD as to do it over.  This time ;-)

Still, it's a complete 2 device GPIB-USB interface for about $15.  The nice part of using the ribbon cable is if  you just connect a stack of devices with GPIB via USB to a Beagle or Pi with WiFi or ethernet to a PC, the cabling is short and neat.  The Uno can just sit on top of the stack or a little doubles sided tape will hold  it to the underside of the shelf.  You could easily do 4-6 34401A size devices on a shelf with a single AR488.

I'm *very* pleased with the enclosures.  At $0.89/each it's the best deal on an enclosure I've ever gotten.  The lid snaps on, so no visible screws unless you want them.  There are 4 posts for holding a PCB you could attach the cover with if you felt the need. but it's held on quite well as is.

BTW My sister gave me some plain finish, Altoid size tins and I found  I can fit my nanoVNA inside one with the crappy switches replaced with better ones on the RHS of the front panel and the SMA connectors sticking out the LHS of the tin.  Close the lid and the screen and switches are protected from mechanical damage.

But right now, priority is sorting and binning the mess around here so I can find things.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Alfons on October 18, 2019, 08:08:34 pm
I was already looking for a GPIP adapter to erase the errorlog of my newly purchased TEK TDS744A. This ran over, because the device ran for years with defective Attenuators and always generated new errors. I repaired the Attenuators. Then came across the AR488 thread and found, that I have everything here to build the part. Within an hour I finished it, programmed the Arduino Mega and I was able to establish contact with the TDS744A. I was very surprised how easy it was. Entered a few commands and already the errorlog of the TDS744A was empty. Great!!!! Thanks to Emanuele (and Helpers) for this great project.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on October 19, 2019, 01:07:55 pm
I was already looking for a GPIP adapter to erase the errorlog of my newly purchased TEK TDS744A. This ran over, because the device ran for years with defective Attenuators and always generated new errors. I repaired the Attenuators. Then came across the AR488 thread and found, that I have everything here to build the part. Within an hour I finished it, programmed the Arduino Mega and I was able to establish contact with the TDS744A. I was very surprised how easy it was. Entered a few commands and already the errorlog of the TDS744A was empty. Great!!!! Thanks to Emanuele (and Helpers) for this great project.

Thank you for relating your experience and your success with the Arduino Mega.
I'm glad that this project was helpful to you.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on October 21, 2019, 12:13:22 pm
I have just uploaded an update (0.47.51). After the re-structure of the code-base it was necessary to review and complete Device Mode which now works both with interrupts enabled and without using in-loop checking of pin status. In addition, the ++lon command has now been implemented and will print out any direct commands (e.g. SCPI) sent to instruments as well as the data/readings returned from instruments. I have been toying with the idea of providing the facility to optionally print out the GPIB commands as hex bytes. For the present it is just ++lon 0 to disable and ++lon 1 to enable as per Prologix.

I will next endeavour to complete the code for the ESP8266 module and then move on the the ESP32.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Alfons on October 21, 2019, 05:42:26 pm
I made a small adapter. Coincidentally, I had some of the 24-pin centronix plug lying around here. These are the ones with metal housings that are also available well and cheaply. The one for crimping you hardly get and then they are also expensive, the shipping takes ...

To fix the plug, I had to come up with something, because it can not be fixed without the metal case. So I designed two panels and printed them out. The plug then comes as a sandwich between these panels and holds bombproof. In addition, a small box for the Arduino Nano and finished the part. The box could have been a little smaller. If you want the files, I can still post them.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on October 21, 2019, 09:08:55 pm
To fix the plug, I had to come up with something, because it can not be fixed without the metal case. So I designed two panels and printed them out. The plug then comes as a sandwich between these panels and holds bombproof. In addition, a small box for the Arduino Nano and finished the part. The box could have been a little smaller. If you want the files, I can still post them.

That's an interesting solution to this particular problem of not having the metal components that house the plug and the versatility of the 3D printer is demonstrated once more. One day eventually I will get around to buying one.....


 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: jimmc on October 22, 2019, 01:58:01 pm
If wires are used with a PCB mount plug, the Hammond 1551HGY enclosure is a good fit for the nano.
(There's a couple of pics in this old post https://www.eevblog.com/forum/testgear/gpib-interface-(ieee488)/msg1148751/#msg1148751 (https://www.eevblog.com/forum/testgear/gpib-interface-(ieee488)/msg1148751/#msg1148751).

Jim
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on October 25, 2019, 01:31:00 pm
Version 0.47.53 has just been uploaded and fixes a problem with the ++lon command. A new ++ton command has also been added to configure the interface in talk-only mode.

The ++lon and ++ton modes are not addressed modes and so do not require a GPIB address, therefore the set GPIB address is simply ignored. Moreover, when in either of these modes, devices are not controlled by the CIC, although in ++lon mode, the device will receive any data being sent from any talker on the bus, including any other addressed device or controller. Since only ONE talker can exist on the bus at a time, there can only be one device in "talk-only" mode on the bus, however multiple "listen-only" devices can be present and all will receive the data sent by the talker.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on October 27, 2019, 04:53:20 pm
I will next endeavour to complete the code for the ESP8266 module and then move on the the ESP32.

Inspired by the suggestion of running the AR488 sketch directly on the ESP32, when I looked at the board earlier in the year, I had only considered the number of available GPIO pins, which appeared to be sufficient for this purpose. The NodeMCU board could be powered directly from USB and hence 5v so it seemed a reasonable proposition.

However, it transpires from a further review of the ESP32 datasheet, that the ESP32 module, like the ESP8266, is a 3.3v device and hence works with 2.3v - 3.3v signals on its GPIO pins. The datasheet does not appear to specify the maximum current that can be handled by the GPIO pins, but under "Electrical Characteristics" in the "Absolute Maximum Ratings" table it does state that the "Maximum Drive Capability" is just 12mA. It would therefore seem that there may be insufficient current to drive the GPIB bus directly and even then, level shifting would be required on all 16 pins. If the level shifters could also be used to increase the available drive current then I suppose this might still be viable? The ESP32 should still be able to function as an add-on board connected via serial to any Arduino board that has spare Tx/Rx pins, but is it still a suitable candidate to drive the GPIB bus via its own GPIO pins? Does anyone have any thoughts on this?

In light of the above and depending on feedback, I might change priorities and look first at supporting additional layouts on the Mega 2560 including the double row end connector, and the ESP32/ESP8266 as add-on boards.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Kleinstein on October 27, 2019, 06:26:27 pm
A 3.3 V chip with 5 V tolerant pins would actually be a good choice for the inputs, as this would give a good threshold level - a weak point when using an AVR at 5 V.  However it also needs outputs that can sink quite some current. 12 mA would be a little on the low side for more instruments. It may still work with 2 instruments - not all instruments have the same pull ups and actual threshold level.

AFAIK there are a few pins that work as input and output. So with extra drivers one would likely need extra pins in and out for these unless one uses special bidirectional transceivers.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on October 27, 2019, 09:18:59 pm
Macboy pointed out upthread that the correct GPIB bus drive (at least for low speed - there is a high speed option that uses totem pole drive) is actually a 3v3 / 2k thevenin equivalent source (a divider made from 3k1 and 6k2 resistors) with open collector drive.  So it might be OK, though you'd either have to add the resistor networks or rely on the others on the bus. You could add transistors if necessary but that gets complicated with the direction switching. Maybe the popular fet-based i2c level switching circuit would work.

For a wifi interface the desire to run multiple instruments seems even less important. Personally I'm not that fond of wifi for instrumentation or control - its OK for something that can handle a bit of stutter and retry but I wouldn't want it on something that's supposed to be reliable and consistent. Even though my testgear is a couple of feet away from my router.

I think the blue pill board has the same problem, but that's got a mixture of 3v3 and 5v capable pins. there may be enough 5v pins to work.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: macboy on October 29, 2019, 02:12:07 pm
Thanks, artag, I remembered pointing out the 3.3 V signal level somewhere, but couldn't remember if it was this thread or another.  In combination with appropriate clamping to protect the MCU inputs, this makes a workable solution. The GPIB bus' nominal TTL logic levels of <0.8 V for LO and >2.0 V for HI are actually much more closely compatible with 3.3 V CMOS thresholds than with 5 V CMOS thresholds, which is an important point made in my previous post (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2244399/?topicseen#msg2244399).

Another option is bidirectional level shifters, like those used for I2C, as that is also an open-collector bus. These are commonly and cheaply available built up on little PCBs, sold as an Arduino module (like so many other things) for prototyping, or just build them on your PCB if you are rolling one. These use one NMOS and two resistors per data line, in an interesting configuration (https://lmgtfy.com/?q=i2c+level+shifter+schematic&s=g) which uses the conductive mode of the NMOS in one direction, and its body diode in the other. Using these may introduce speed and/or current limits (consider pull-up R strength). Certainly not suggested for > 1 GPIB device.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on October 30, 2019, 01:25:04 am
GPIB was *implemented* with 5 V TTL.  So it is *completely* compatible with 5 V TTL.

The  HP 37203A HP-IB Extender I bought for the case is full of 7400 series logic chips. 3.3 V logic did not even exist when HP-IB was designed and went to market.

Logic high for 5 V TTL is about 3.3 V.  Read the first chapter of Don Lancaster's "TTL Cookbook".
Title: Re: AR488 Arduino-based GPIB adapter
Post by: oPossum on October 30, 2019, 01:34:30 am
The  HP 37203A HP-IB Extender I bought for the case is full of 7400 series logic chips.

...and four MC3446 GPIB bus transceivers. The GPIB bus itself is not TTL. You will find 75160/75161/75162 chips in most instruments with GPIB.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: macboy on October 30, 2019, 02:38:10 am
GPIB was *implemented* with 5 V TTL.  So it is *completely* compatible with 5 V TTL.

The  HP 37203A HP-IB Extender I bought for the case is full of 7400 series logic chips. 3.3 V logic did not even exist when HP-IB was designed and went to market.

Logic high for 5 V TTL is about 3.3 V.  Read the first chapter of Don Lancaster's "TTL Cookbook".

Re-read what I said... more compatible with 3.3V CMOS than 5 V CMOS.

Logic high on a TTL input is not 3.3 V but 2.0 V and above. Low is 0.8 V and below. In between is undefined.  Arduino (Atmega328P) inputs are not TTL, they are CMOS, and the levels are not fully compatible at a given Vdd. At 5 V, CMOS will interpret 2.1 V as low, and TTL (GPIB) as high.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mimmus78 on November 17, 2019, 06:28:24 pm
I have the first character problem with an ILX LTD-5910.

I'm using current version that is: AR488 GPIB controller, ver. 0.47.53, 25/10/2019

This device is a TEC temperature controller, if I read the current temperature I get always a 3 at begging of the string so that the "20.3" string become "30.3" and only very few times it read the right value.

If I read calibration string I get "�LX CALDATE 7-5-89" while it should be "ILX CALDATE 7-5-89".

Tested LTD-5910 with another GPIB controller and it was reading ok.

Any help?

MORE DETAILS 1: no code changes, just uncommented the board type that is an arduino mega, wired as per doc - only one device on the bus
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mimmus78 on November 17, 2019, 10:40:49 pm
Anyway thanks for making it. I had it "working" in minutes ... thanks for the good documentation too.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on November 18, 2019, 03:11:42 am
Maybe to help others you could write your solution / code change ??
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mimmus78 on November 18, 2019, 09:30:13 am
Maybe to help others you could write your solution / code change ??

No solution yet, I'm checking in with the author and sending him some logs ...
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mimmus78 on November 19, 2019, 07:56:00 pm
Log story short, it seems the problem was due to rise time of data lines in my setup or most probably the delay is caused by the GPIB interface of instrument itself. Adding some delay (100us) from the moment pull-up is enabled and the read of digital pins is done itself seems to solve the problem. More details on project GitHub.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on November 19, 2019, 08:06:45 pm
100us is an awful long time given that the instrument is supposed to assert DAV when the data is there to be read. I'd be interested to see some logic analyser traces of the bus, if that's possible.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on November 20, 2019, 08:16:02 pm
My IDC headers and cable connectors *finally* arrived. I'm busy with other stuff right now, mostly in the house cleaning department which has been long neglected.

Here are a couple of photos for an Uno version.  The connectors are not soldered yet.  I just wanted to see how the clearances are with a 90 degree 2x12 header on the Uno side of a board.  It looks as if there is plenty of room.  With a custom shield it will be very easy to make GPIB cables to the exact lengths needed using ribbon cable and IDC connectors and produce a nice professional looking unit.

The cables can be made as a custom fit and if they need to be extended later an extension cable made up with a Centronics female to attach on to the end of the first cable.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mimmus78 on November 21, 2019, 08:31:46 am
100us is an awful long time given that the instrument is supposed to assert DAV when the data is there to be read. I'd be interested to see some logic analyser traces of the bus, if that's possible.
The instrument don't check if data pins reached desired logical level ... I'll try to scope some offending pin and check also what's happening as soon as I have few minutes.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on November 21, 2019, 09:30:34 am
It's possible the code should set the data lines to pullup when it prepares for data by asserting NDAC. Then they'd have longer to reach their value. However, it does, I think set them to input then : so the bus terminators (should be on every device) should have already done that.

Maybe the ILX LTD-5910 is also a non-conforming interface and doesn't have any. Do you have any other instruments you could put on the same bus ?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mimmus78 on November 21, 2019, 10:29:16 am
It's possible the code should set the data lines to pullup when it prepares for data by asserting NDAC. Then they'd have longer to reach their value. However, it does, I think set them to input then : so the bus terminators (should be on every device) should have already done that.

Maybe the ILX LTD-5910 is also a non-conforming interface and doesn't have any. Do you have any other instruments you could put on the same bus ?

I proposed a similar solution to the OP on his GitHub few hours ago, just setting pull-up at the same time of NRFD is asserted ... assuming NRFD and data lines have the same propagation time this should work and will also avoid to add any delay. I don't know GPIB protocol so in deep to understand if this can be done or can cause some problems elsewhere (waiting the author response).

Yes my ILX LTD-5910 is a bicth acting weirdly from time to time when it shares the same GPIB bus. I built this controller to separate him from the other bus ...

Anyway I think that making him working with AR488 can improve compatibility of AR488 with other instruments too (if this can be done without adding strange delays).

EDIT: tested this solution and is working. More details on projects GitHub.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: ogdento on November 22, 2019, 06:11:07 am
Don't mean to derail the current conversation, but just wanted to thank everybody involved in the evolution of this adapter.  I wired it up and it instantly worked with my old HP3478 and PM2534 meters... fantastic!

I still have to get it working with a Keithley 197 and a couple of Agilent supplies, but I'm really quite pleased with this.  I plan to build more using some revision of artag's layout, 3-d print some housings, and use one per gpib device (since I don't have any gpib cables).

Really great work, and thanks again!

-Tom
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on November 23, 2019, 06:28:46 pm
FYI

I hand wired one using an Uno, ribbon cable and 2 IDC Centronics connectors to handle a stacked pair of 34401As.  That's a less expensive way to control multiple instruments.  It cuts the cost from $15/device to $10 + $5/device.  So if you have fewer than 10-12 devices it saves you $10/device.  Not a lot, but if you have a full bus you can get an extra 3478A with the savings.

I finally got the parts after a long wait to make up a version with a 2x12 right angle header.  Once I've verified that, the plan is to layout a PCB for  Arduino shields that use IDC ribbon cable to hook everything up.  With the connectors placed at the exact distances needed, it avoids a big mass of cables behind the instruments.

However, I just bought 4 guitars, so I'll be distracted for a while.  Two arrive Tuesday and Wednesday.  The last was a Martin D-28 in near new condition for reviving my folk music repertoire. It's not yet shipped.  I've been focused on jazz and blues improv so long I've forgotten almost all the tunes I used to play.  But a D-28 should be sufficient inducement to stir up old memories of "Just Like a Woman" and the other stuff I've forgotten.

Have Fun!
Reg
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on November 27, 2019, 05:37:20 pm
I proposed a similar solution to the OP on his GitHub few hours ago, just setting pull-up at the same time of NRFD is asserted ... assuming NRFD and data lines have the same propagation time this should work and will also avoid to add any delay. I don't know GPIB protocol so in deep to understand if this can be done or can cause some problems elsewhere (waiting the author response).

.....

EDIT: tested this solution and is working. More details on projects GitHub.

The feedback from mimmus78 has been very helpful and the proposed solution proved to be a good idea. I also had the thought that setting the state of the data bus before every character being sent was unnecessary and would only consume additional CPU cycles, so in the test version the setting of the data bus to input_pullup was done only once before the read loop begins. Testing along with a review of LA traces seems to show no other adverse effects, so the proposed solution to this particular 1st character read problem will be implemented in the next update. Thank you to mimmus78 for reporting the issue and to all concerned for their ideas.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on November 27, 2019, 08:01:50 pm
Along the same lines, it would also be possible to set the pins in input pullup mode with output values set to zero (assuming that doesn't turn them into input pulldowns - it might) and switch them into output mode for any that need to be pulled low. This emulates an open collector drive. It's both more correct electrically for GPIB and will also execute faster (only one port direction register write instead of a direction and a data register).

However the weak input pullups - although hopefully strengthened by the other terminators on the bus - might be too light and result in too slow a rising transition.
 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: jimmc on November 27, 2019, 10:38:40 pm
Along the same lines, it would also be possible to set the pins in input pullup mode with output values set to zero (assuming that doesn't turn them into input pulldowns - it might) and switch them into output mode for any that need to be pulled low. This emulates an open collector drive. It's both more correct electrically for GPIB and will also execute faster (only one port direction register write instead of a direction and a data register).

However the weak input pullups - although hopefully strengthened by the other terminators on the bus - might be too light and result in too slow a rising transition.

As you say the original GPIB specification called for open collector drivers and I had  Emanuele's  original design working with this modification.
It would work without enabling the pullups but I don't like the idea of floating inputs (no pulldowns) when nothing is connected so I used a two step method...

Asserted   (Low state)   digitalWrite(xx, LOW); pinMode(xx, OUTPUT) (This way round to ensure output never 'glitches' to +5v)
Unasserted (High state)  pinMode(xxx, INPUT_PULLUP)

Jim
 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on November 30, 2019, 02:40:19 pm
@artag,

Here is the header layout on the Uno side of the shield.  Pin 1 is on the top edge of the IDC header.  This will only work with an SMD Uno, but that has a higher source rating than the DIP version, so it is preferable anyway.

Have Fun!
Reg
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on December 03, 2019, 03:56:43 pm
I have uploaded an update (0.47.59) which has two bug fixes:

- data bus settling time issue reported by mimmus78
- EOI detection not working (possibly crept in during architecture change between 0.46.xx and 0.47.xx)

Both of these have now been fixed.

In addition, two further Mega 2560 layouts have been added that make use of either row of the end connector. At present, only one layout can be used at a time.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: ogdento on December 04, 2019, 05:58:13 pm
Hey WavyDipole, did the EOI problem come to you from lmester?  I think that's why his hp3478a program was failing for me, so if it's related I'll grab it!
Thanks,
Tom
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on December 07, 2019, 08:09:04 pm
Tom, yes the EOI problem was reported to me by Luke. Please let me know how you get on with it. You will probably need the latest version of Luke Mester's software.

Just a note for everyone else. If you have an older Nano with an old bootloader, then the ++rst command may crash the board. The result will be rapidly flashing LEDs and the board will have to be power cycled. The reason for this is that the older bootloader does not deal with the watchdog properly and ends up going into a restart loop. This was fixed in later versions of the bootloader, so the solution is to simply update the bootloader. This can be done from within the IDE, but will require an AVR programmer or another Arduino board to act as a programmer. There are a number of online resources dealing with using an Arduino board to program another Arduino board.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: ogdento on December 11, 2019, 08:53:01 pm
Hey thanks for the update - your latest firmware worked great with the latest code from Luke
Title: Re: AR488 Arduino-based GPIB adapter
Post by: pigrew on December 13, 2019, 07:18:42 pm
I'm thinking about writing a VXI-11 wrapper software for this project, so that GPIB devices could be used through the standard VISA API. However, I have a few questions about the computer side of the driver that I'm hoping someone can answer:


(For those interested, my VXI-11 server is on github (https://github.com/pigrew/pyvxi11aio))

Thanks,

Nathan
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on December 18, 2019, 01:53:44 pm
Nathan, thank you for your interest in the AR488 project. I will try to answer at least a couple of your questions:

Is there a way to receive a status code back after a read or write? It seems like there's no way with the ProLogix commands to know if a write failed, or when the write completes?

An instrument replies with its status code to a serial poll (++spoll). On the Prologix this returns a decimal number representing the status byte. The meaning of the bits does vary somewhat with each instrument maker. However, it seems that you may be looking for a status code from the interface itself to indicate transmission failure or successful completion. In that case, the Prologix commands do not appear to support this, the ++status command being used only to set the status byte in device mode. However, if I can better understand your requirements, then perhaps such a feature could be added.

What's the maximum message length? To have longer messages, can I disable EOI/terminators and send multiple shorter messages?

The interface has a serial capture buffer size of 128 bytes. Since the last byte must be a NULL character, the maximum message length is 127 bytes. Terminator characters including CR and LF can be 'escaped' by preceding them with ESC (0x2B) - see the 'Transmission of data' section of the manual. This would allow such characters to be treated as data when being sent to the instrument. Messages longer than 127 bytes to be sent directly to the instrument by splitting them up into shorter messages, which can then be followed by a suitable terminator and/or the EOI signal. The CR/LF sent to the serial port to signify the end of the line is not passed to the instrument. The termination character sent to the instrument is governed by the setting of ++eos.

If you would like to discuss addition of features to the AR488 firmware, then please feel free to PM me.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: macboy on December 18, 2019, 03:16:53 pm
I'm thinking about writing a VXI-11 wrapper software for this project, so that GPIB devices could be used through the standard VISA API. However, I have a few questions about the computer side of the driver that I'm hoping someone can answer:

  • Is the Arduino Micro the only MCU that can perform flow control so that the MCU's buffers are not overrun (e.g., during large binary transfers)? The Uno seems to have no flow control, so data could be lost if the host sends too quickly?
...

The Micro can use flow control capability because the USB-UART is implemented within the AVR chip itself. On the UNO, Nano, etc., a separate USB to UART chip is used. If you can connect the flow control lines from that converter to the Arduino microcontroller, then the Arudino can monitor/manipulate those lines to implement flow control. This only requires adding a few lines of code to the appropriate HardwareSerial.* files. I have done this on a cheap UNO clone. That clone uses a CH340 UART chip, and the flow control pins are in fact brought out to a separate (unpopulated) 4-pin header on the board (look at the board here (https://www.electrodragon.com/product/edarduino-uno-c-arduino-compatible-r3-board-ch340/), note the solder pads "X1" near the IC near the USB connector). If you only want to prevent the host from overflowing the Arduino Rx buffer, then you only need to use the CTS pin, and use one GPIO on the Arduino. To also allow the PC to stop the Arduino from sending more data, you also need the RTS and another GPIO pin (and to write the associated code, which should be easy).
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on December 18, 2019, 03:33:17 pm
Note that on the micro, the flow control works at the USB level : it does not emulate serial-port hardware flow control.

The Prologix has an actual ftdi chip and manipulates the RTS/CTS pins as described by macboy.

I had thought of emulating the Prologix using the 32u4's USB UART emulation. But I'm not sure it's worthwhile : it's not just a matter of flipping some bits, as the CDC Uart normally used by devices with onchip USB doesn't support CTS. It would be necessary to replace the CDC driver with one that emulates the FTDI or the CH340 and then manipulates the RTS/CTS pins in that emulation.

I'd hope that it's possible to use some of these drivers (either CDC or the hardware USB parts like CH340) to send a continuous stream of data to the GPIB rather than be limited by the buffer. But I haven't looked to see if that's feasible yet. It would only be worthwhile if GPIB devices with large transfers (such as scopes and other screen-based instruments) have to send all the data in one block.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 04, 2020, 04:17:10 pm
I have just uploaded the next update, version 0.48.03. This now adds support for the SN75160 and SN75161 GPIB transceiver chips. Two GPIO pins are required to drive the TE control pins on the transceivers and the DC pin on the SN75161, although this can be reduced to one by coupling direction control (DC) pin on the SN75161 to REN, which already provides the required state change between controller and device modes.

There is currently one known issue. With the SN75160 and SN75161 chips placed between the Arduino and the GPIB bus, the ++lon command seems to work a little erratically. The command still works, but seems to miss some characters. This will require further investigation.

With the SN75160 and SN75161 chips in place, an interface can now have the full 48mA current handling available and provide tri-state outputs so that the interface will not cause problems on the GPIB bus when the interface is powered down. I have only tested on a breadboard and with two Arduinos and a DMM, but using these transceiver chips might even allow STM32 "blue pill" boards to be used. Of course, some kind of daughterboard will need to be devised in order to make use of them, but I am sure that suitable shields can be designed for any supported MCU board. I might even have a go at designing one myself....

Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on January 04, 2020, 07:08:15 pm
That's really cool, WD. I suppose it'd be possible to make a shield with footprints for several popular uC boards. Really great evolution of this solution.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on January 18, 2020, 03:22:49 pm
Hi,

I have wired up an Arduino ProMicro and flashed firmware "AR488 GPIB controller, ver. 0.47.60, 05/12/2019".
I can basically talk to my GPIB instruments but I'm having a problem with acquiring screen copies from my HP8593E.

I use the following control sequence to make the HP send back the plot data:

++auto 1
++eos 0
++mode 1
++addr 21
++eoi 1
PLOT 550,279,9750,7479;

I also have an original recent Prologix adapter and the sequence works well with that.
The Prologix receives about 3000 bytes of plot data and sends it to the COM port in a single string.

With the AR488 only about 1100bytes of data are sent back after the PLOT command.
I can get the reminder of the data by firing several ++read commands, but that shouldn't be necessary as I'm in auto-read mode.
Also increasing the read timeout ofthe AR488 to 30s doesn't change anything.

Could this be a buffer overrun problem inside the AR488 firmware or am I doing something wrong?

Best regards,
Tom


Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on January 21, 2020, 04:24:47 pm
In case it is of interest to anyone:

I have solved the problem. The HPGL string sent back by the HP8593E contains a linefeed character in the middle.
The AR488 firmware stops reading as soon as it detects a linefeed.
I have changed the break-criterion in the firmware to look for CR+LF and now it works flawlessly.

Do the code authors read this thread?

Best regards,
Tom
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on January 21, 2020, 05:09:55 pm
Yes, WaveyDipole is a regular.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on January 22, 2020, 11:08:57 am
Thanks for debugging this. I don't think WaveyDipole has an instrument that transfers data in large pages making it difficult to test (though he does seem to be acquiring additional stuff).

I guess this needs an additional option in the eoi/eot area ? Does the prologix always look for CRLF or is it switchable ?

Is the LF in the returned string there just because it's binary ? Could a CRLF occur under some circumstances ?

If it's a binary transfer you should probably be looking to terminate it with EOI rather than some data pattern, if that's possible.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on January 22, 2020, 01:23:32 pm
The transfer from the HP8593 is pure ASCII, just HPGL commands. So, it is quite a surprise that there is a LF in the middle of the string.
I will check if it issues an EOI at the end of transmission. I'll hook up a logic analyzer in the next few days.

Btw, has anybody considered transfering the code to an ESP8266 like a NodeMCU? The wifi interface would come for free.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 22, 2020, 05:26:14 pm
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?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on January 22, 2020, 06:17:57 pm
I have an ancient HP 27209 ISA-bus card with a TMS9914 and TI buffers on it. The 75160 is a 20 pin 0.3" DIP and the 75162 is a 22 pin 0.4" DIP. Both are marked with both TI logo and an HP part number and are sure to be genuine parts.
 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 22, 2020, 08:22:48 pm
Thanks. That at least confirms that the SN75162 does exist in 0.4" DIP 22 pin format.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 22, 2020, 08:46:05 pm
It has just been reported to me that there is an issue in the latest firmware regarding the SerialEvent interrupt that affects the firmware in 32u4 boards only. Uno, Nano and Mega 2560 boards are not affected. This is because SerialEvent is apparently NOT supported on Arduino 32u4 boards. I found it difficult to locate documentation that would confirm this, but it does seem to be mentioned here, although only within the code example comments:

https://www.arduino.cc/en/Tutorial/SerialEvent (https://www.arduino.cc/en/Tutorial/SerialEvent)

I expect that this is due to the implementation of CDC serial ports on 32u4 boards. In the latest firmware (0.48.03) a detection routine was added to AR488_Config.h to automatically invoke SerialEvent on AVR boards, but to avoid doing so on non-AVR boards or where a custom pin layout is being used. The result is that on a 32u4 based board with unmodified 0.48.03 firmware, the serial port does not respond to input.

To workaround this problem, look for a section in AR488_Config.h that looks like this:

Code: [Select]
#if defined (__AVR__) && not defined (AR_SW_SERIAL)
  // Use serial interrupt handler
  #define USE_SERIALEVENT
#endif

When compiling for a 32u4 board only, the line '#define USE_SERIALEVENT' needs to be commented out:

Code: [Select]
//  #define USE_SERIALEVENT

This will prevent the firmware from trying to use the SerialEvent handler. Checking for incoming characters at the serial port will then be handled within each iteration of the void loop() function instead. It should be pointed out that when SerialEvent is not used, handling of input to the serial port is somewhat slower because the interface has to wait for any existing process to complete and exit to the next iteration of the main loop before it can accept more characters. Use of the interrupt allows characters to be accepted even while other processes were still ongoing and therefore speeds things up a bit. This may need to be taken into account when writing scripts (e.g. Python) or other programs that communicate with the interface. Having said that, if you have already been successfully using firmware 0.47.xx, then commenting out the above line in AR488_Config.h should be all that is required.

Use of SerialEvent was dropped in version 0.47.xx but was re-introduced in version 0.48.xx. The problem affects 32u4 boards only i.e. the Leonardo and Micro. It does not affect the Nano, Uno or Mega 2560 boards. It affects firmware version 0.48.03 only. Firmware version 0.47.xx is not affected.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on January 22, 2020, 08:57:56 pm
Yes, I mentioned this in the original 32u4 patch which also handled it on the top of loop(). It looks as though it got lost in the transition to not use it and then use it again. It did work on at least one of the combined releases but I haven't tested all of them.

I don't think SerialEvent  calls the handler in interrupt context. An interrupt handler does capture the incoming data but the event handler is called in foreground context between iterations of loop() and possibly in delay() and some other time-consuming library calls.

I think it's actually pretty useless as it stands (especially as it's not supported on the 32u4 for no very good reason) and should be considered as only a style thing for code that's written that way. For compatibility it has no particular processing speed advantages as long as loop() executes quickly. Maybe one day it could be handled with a separate task but that's not going to happen on an AVR.


Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 22, 2020, 09:05:46 pm
Thanks for debugging this. I don't think WaveyDipole has an instrument that transfers data in large pages making it difficult to test (though he does seem to be acquiring additional stuff).

My instrumentation is indeed limited. I will have a look at the manual and see what the HP3314A is capable of putting out. I have only used it a handful of times and from what I remember with it being a signal generator, it mostly accepts remote control commands. I don't have anything with a GPIB port that outputs frames of data like an SA. I could possibly simulate with an AR488 in device mode though.

Yes, I mentioned this in the original 32u4 patch which also handled it on the top of loop(). It looks as though it got lost in the transition to not use it and then use it again. It did work on at least one of the combined releases but I haven't tested all of them.

That may have been what prompted me to remove it, although....

I think it's actually pretty useless as it stands (especially as it's not supported on the 32u4 for no very good reason) and should be considered as only a style thing for code that's written that way. For compatibility it has no particular processing speed advantages as long as loop() executes quickly. Maybe one day it could be handled with a separate task but that's not going to happen on an AVR.

I also came across a number of similar comments (about SerialEvent being pointless) which gave added reason for removing it in the combined 0.47.xx version, one benefit of which would have been to make it easier to maintain compatibility. However, someone then reported some real world delays when 0.47.xx firmware was being used in contrast to version 0.46.32 which does use SerialEvent. Re-introducing SerialEvent returned things to previous performance levels which is why it has been re-introduced into 0.48.xx, but with an attempt to confine its use only to those boards that actually support it. However, I omitted to make allowance for the 32u4 which does not support it, something I intend to put right in the next release. Quite where we go with it after that I'm not yet sure, although I do have a couple of ideas in mind.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on January 23, 2020, 06:57:42 am
As promised here are two logs of plot requests from an HP and a Tektronix spectrum analyzer with an original Prologix V6 adapter.
The requests were performed with the KE5FX plotter emulator software.
Indeed, in the communication there are lots of characters < 0x20 sent by the instrument, particularly some LF.

Btw, my AR488 code modification that waits for CR+LF works with both instruments.

And, btw, I have been in touch with KE5FX. He has promised to update his GPIB software package to accept the original AR488 version string and handle the device like a Prologix V6.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 23, 2020, 09:45:58 am
Thank you for sharing this information. It would seem from the output of the HP8593E instrument, that an LF sometimes appears in the string within the LB<string>ETX construct, usually immediately after the initial characters 'LB'. In hex this starts with 4C 42, then 0A and possibly some further character and finally ends with 03. The characters LB are a mnemonic for the LABEL command. Quite why there would be an LF inside a label I'm not sure, but perhaps this is used for formatting or positioning the label. From the provided output, evidently the Tek 496P does not seem to do this so I assume that the problem did not occur with the Tek? Both instruments terminate the data stream with a CR+LF (0D 0A) and assuming that all instruments as a rule terminate their data stream with an 0D 0A, then looking for CR+LF would perhaps be an appropriate way to handle it. However, looking at the manual for one of my instruments, it seems that The terminator can be set to one of:

0 - CR+LF (0D 0A)
1 - ETX (03)
2 - CR+LF+ETX (0D 0A 03)
3 - EOI (signal only)
4 - CR+LF+EOI (OD 0A + EOI signal)
5 - ETX+EOI (03 + EOI signal)
6 - CR+LF+ETX+EOI (0D 0A 03 + EOI signal)
7 - CR (0D)
8 - SPACE (20)

Perhaps not all instruments will have all of these options and I'm not sure in what circumstances some of them would be used, but it would seem that this may not be as straightforward as it seems. However I expect that 0D 0A is likely to be used by default for most part, perhaps optionally in conjunction with the EOI signal. In any case, I will give it some more thought.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 24, 2020, 02:43:59 pm
I have just uploaded the next update, version 0.48.07. This avoids invoking SerialEvent when a 32u4 MCU is detected and also fixes the data transfer problem reported by tom_iphi when using the HP8593. An additional custom ++eor command (as opposed to ++eos) has been implemented that allows selection of an alternative termination sequence for data coming from the instrument as follows:

0 - CR + LF
1 - CR
2 - LF
3 - None
4 - LF + CR (Keithley)
5 - ETX (Schlumberger Solatron)
6 - CR + LF + ETX (Schlumberger Solatron)
7 - EOI signal

The first four options match those of the ++eos command. The remainder have been added based on possible termination sequences available on instruments that I have to hand. One of the manuals also had SPACE as a terminator option, although I have never seen that used in practice. By default, option 0 (CR+LF) is used.

I would be interested in feedback from Tom if he could test with the default setting on the HP8593?

The sharp eyed will also notice some code has been added to support the SN75162 chip, but although this appears work for most part, on my breadboard test layout it fails ++spoll and struggles with ++lon so should be considered experimental for now. The manual has been updated with the details of the ++eor command, but details of the SN75162 chip operation are yet to be added.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on January 26, 2020, 08:22:45 am
Many thanks for the update!
The default settings work fine with my HP8593E.  :-+

Could you possibly add a simple serial number or id function like ++id or ++serial, where the adapter answers with a predefined/hardcoded identifier string like "HP8593E"?
The idea is to have one personalized adapter per instrument instead of heavy GPIB cabeling. This would also solve the "one instrument on bus in switched off state" problem.
The downside will be many com ports on the PC side. The identifier string would help tell them apart.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on January 26, 2020, 02:01:03 pm
Tom,

That already exists.  Read the ++setvstr and ++ver command descriptions.

IDC cable works well for making short GPIB cables.  I've not evaluated performance other than basic function though.  The ribbon works very nicely if you put one AR488 per instrument stack. Add a Pi or Beagle with a USB hub and you can read everything via ethernet from the PC.

There is at least one Chinese OEM selling single instrument interfaces, though I don't know what FW they use.


@artag designed a Uno shield that connects to a 24 pin IDC header:

https://oshpark.com/shared_projects/h67uh7OO

I've been too busy with other stuff to actually order boards as I want to get them from China and never having ordered a PCB I'm sure the first time will not be quick.  I'll have to learn what I'm doing and how to view the board files, etc.

There is also a design by @vindoline for an AR488 based GPIB-USB adapter:

https://github.com/Twilight-Logic/AR488

which is what I used for logging data from the USA Cal club round 2 PX and FX references.  However, if I had not had a standard GPIB cable I could not have connected it to my 34401As because of interference from the power cord connector.

There is at least one other bespoke board design farther back in this thread.

Have Fun!
Reg
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 27, 2020, 06:03:53 pm
Many thanks for the update!
The default settings work fine with my HP8593E.  :-+

Glad to hear that works.  :)

Could you possibly add a simple serial number or id function like ++id or ++serial, where the adapter answers with a predefined/hardcoded identifier string like "HP8593E"?
The idea is to have one personalized adapter per instrument instead of heavy GPIB cabeling. This would also solve the "one instrument on bus in switched off state" problem.
The downside will be many com ports on the PC side. The identifier string would help tell them apart.

Funnily enough I was contemplating adding something like an ++id command to return a response in reply to the *idn? sequence. I figured that something like that might be useful in the case of older instruments that do not respond to an ID request. The string would be of limited length, perhaps 20-30 characters. Any feedback on this idea would be appreciated.

The original idea for ++setvstr in conjunction with ++ver, was to set a custom string in response to the ++ver command so that EZGPIB, KE5FX and other GPIB programs can get the expected reply string they are "looking for" (e.g. "GPIB-USB") in order to identify a Prologix interface, however this feature could also be used to provide a means to identify the connected instrument.

BTW, the vindoline adapter design details are here:
https://github.com/vindoline/AR488-USB-GPIB (https://github.com/vindoline/AR488-USB-GPIB)

Regarding the number of com ports, perhaps something like this (or similar) with a suitable wall wart might help?
https://www.ebay.co.uk/itm/4-7-Ports-Powered-USB-3-0-HUB-Splitter-Box-5Gbps-Super-Speed-AC-Power-Adapter/383340983670 (https://www.ebay.co.uk/itm/4-7-Ports-Powered-USB-3-0-HUB-Splitter-Box-5Gbps-Super-Speed-AC-Power-Adapter/383340983670)

I would have thought that USB3.0 should provide more than enough throughput capability?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on January 27, 2020, 08:25:59 pm
Quote
Funnily enough I was contemplating adding something like an ++id command to return a response in reply to the *id? sequence. I figured that something like that might be useful in the case of older instruments that do not respond to an ID request. The string would be of limited length, perhaps 20-30 characters.

That would certainly be very useful for instruments that do not understand the *IDN? command. Btw, the HP8593E is of that kind. It only responds to ID?.
And my good old HP8672A signal generator doesn't even return any identifier. This box does GPIB without any microprocessor!!!
I think 32 characters would be more than sufficient. Functionality wise it would be cool if the string could be saved in the EEPROM, thus non-volatile but changeable, e.g.

++id my Instrument
  saves the string "my instrument" to some EEPROM location
++id
  clears the EEPROM location

If the EEPROM location contains a valid string of length >0 then that string is returned upon *IDN? query, else the query is put forward to the instrument via GPIB.

Still, it would be terribly nice if I could assign a fixed individual serial number string to each adapter, hard programmed in flash.
Something like ++serial should simply return that string.

Quote
The original idea for ++setvstr in conjunction with ++ver, was to set a custom string in response to the ++ver command so that EZGPIB, KE5FX and other GPIB programs can get the expected reply string they are "looking for" (e.g. "GPIB-USB") in order to identify a Prologix interface, however this feature could also be used to provide a means to identify the connected instrument.

Not quite. The modified ++ver-string is volatile. After power down and back up, it is replaced by the original AR488... string, so no good for permanent identification of the hardware.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 27, 2020, 09:36:37 pm
Sorry, yes meant *idn? (or *IDN?). Have edited my previous post.

After ++setvstr you have to do a ++savecfg. That saves the adapter configuration in EEPROM.

In keeping with other Prologix commands, one might expect ++id to return the currently set ID string, although naturally, *idn? would do that anyway, in which case the exception perhaps makes sense. However, one could also do something like ++id # or similar to delete. I will have a think about that.

Since these strings (ver, id and serial) are not likely to be changed very often, I could set it up so that they are saved independently as you suggest. What do others think?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on January 27, 2020, 10:16:04 pm
I would like to support something like this at the USB level in the 32u4 version (so it appears in dmesg and lsusb listings) , though that's not trivial as the current USB driver doesn't support custom names.

If I did that, should it hang off the proposed ++id idea or should it be yet another level of naming ?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on January 28, 2020, 08:02:08 am
@WaveyDipole

Quote
After ++setvstr you have to do a ++savecfg. That saves the adapter configuration in EEPROM.

Cool, many thanks for the hint!

Quote
In keeping with other Prologix commands, one might expect ++id to return the currently set ID string, although naturally, *idn? would do that anyway, in which case the exception perhaps makes sense. However, one could also do something like ++id # or similar to delete.

Either way would be fine!

Quote
Since these strings (ver, id and serial) are not likely to be changed very often, I could set it up so that they are saved independently as you suggest.

Indeed, having all those strings in the EEPROM would be more flexible than in flash. Reconfiguration would then require no source code change.

@artag

Quote
I would like to support something like this at the USB level in the 32u4 version

You mean something that would appear as a "friendly name" of the corresponding COM port? Right now, it appears as "Arduino Leonardo".
I am not very familiar with the Arduino IDE environment. I assume, the USB endpoint is defined somewhere in the bootloader and it would have to be changed there.
An alternative would be to set up a second USB CDC endpoint, but I have no idea how this would be done in Arduino without interfering with the bootloader...

Btw, where would the bootloader source code be found and how does it get included into each sketch being uploaded?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on January 28, 2020, 01:54:47 pm

Quote
I would like to support something like this at the USB level in the 32u4 version

You mean something that would appear as a "friendly name" of the corresponding COM port? Right now, it appears as "Arduino Leonardo".
I am not very familiar with the Arduino IDE environment. I assume, the USB endpoint is defined somewhere in the bootloader and it would have to be changed there.
An alternative would be to set up a second USB CDC endpoint, but I have no idea how this would be done in Arduino without interfering with the bootloader...

Btw, where would the bootloader source code be found and how does it get included into each sketch being uploaded?

Possibly. I think it might be buried somewhere in the device management stuff in Windows. I don't use it much. It's a bit more accessible in Linux.

The bootloader is separate from the runtime code, as it's possible to replace the serial device with something else (such as a keyboard). The bootloader is installed on the Arduino and left there for subsequent code changes - it isn't replaced when you program it. However, sources can be found in
<arduino root>/hardware/arduino/avr/bootloaders/.  Runtime USB drivers are in <arduino root>/hardware/arduino/avr/cores/arduino/. I think the PluggableUSB is the right area but haven't really looked into it yet.


Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on January 28, 2020, 03:47:06 pm
I have just hooked up an ESP8266 configured as wifi-UART bridge to the Leonardo AR488 and it works great! See picture.
The ESP8266 presents itself as a TCP socket server linking directly to its UART.
The KE5FX software can directly connect to a TCP socket server. Thus, I can read screenshots from my HP8593E wirelessly now via wifi and the KE5FX 7470A plotter emulator software.
Cool stuff!

I have used a very rudimentary ESP8266 code from here:
https://github.com/roboremo/ESP8266-WiFi-UART-Bridge (https://github.com/roboremo/ESP8266-WiFi-UART-Bridge)
Not very comfortable as it can only be configured by changing the source code and you have to find out the dynamically assigned IP address somehow.
I'm not very experienced with ESP8266 programming.
So, a proof of concept! But that's the way I want to talk with my instruments eventually!  :)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Gerhard_dk4xp on January 28, 2020, 09:42:26 pm
As promised here are two logs of plot requests from an HP and a Tektronix spectrum analyzer with an original Prologix V6 adapter.
The requests were performed with the KE5FX plotter emulator software.
Indeed, in the communication there are lots of characters < 0x20 sent by the instrument, particularly some LF.
Btw, my AR488 code modification that waits for CR+LF works with both instruments.

For me, it seems that the spectrum analyzers send their screen data as a binary data block.
That would require the use of the EOI line AFAIR. That the CRLF works would be more a
consequence of the fact that CRLF is 256 times more improbable than CR alone.

Disclaimer: My 488 experience dates from 4MHz Z80 times. I still have some TMS9914
and yes, one of the two bus transceivers was 0.4". Those skinny long 0.3" DILs came
many years later.


(Hi, Tom! I'm no more in Bollingen since several years. We've met there once
in the early VNWA days. :-)   )

 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Gerhard_dk4xp on January 28, 2020, 10:15:27 pm
Sorry, yes meant *idn? (or *IDN?). Have edited my previous post.

After ++setvstr you have to do a ++savecfg. That saves the adapter configuration in EEPROM.

In keeping with other Prologix commands, one might expect ++id to return the currently set ID string, although naturally, *idn? would do that anyway, in which case the exception perhaps makes sense. However, one could also do something like ++id # or similar to delete. I will have a think about that.

Since these strings (ver, id and serial) are not likely to be changed very often, I could set it up so that they are saved independently as you suggest. What do others think?

++id and *idn? are not the same thing.  ++id asks the dongle, *idn? asks the currently selected talker.

Last week I had a 488 blast from the past when my Agilent 89441A acted weird under remote control.
It has both the 488 and LAN options and I operated it via LAN flawlessly for several years. I used to open
port 5025 on 192.168.x.y and then could simply talk GPIB strings.The connection
got shaky now and then, and finally it ceased working at all.
I had bought a Prologix USB dongle as a fallback solution and could achieve some communication,
but I never got it really stable. Sometimes I got nothing at all and then answers that belonged to
a previous query. My problems seemed to be centered around the ++eot command and I
could never understand what a timeout really does apart of (maybe?) happening.

I got the TCP/IP working again, so I'm no longer under pressure to finish the GPIB problem.
It turned out that one is supposed to do an (empty) fseek() when the direction of the socket
is reversed. It worked 5 years without, but the new Linux kernels/C libraries seem to be more picky.

Cheers, Gerhard





Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 29, 2020, 03:51:57 pm
I have used a very rudimentary ESP8266 code from here:
https://github.com/roboremo/ESP8266-WiFi-UART-Bridge (https://github.com/roboremo/ESP8266-WiFi-UART-Bridge)
Not very comfortable as it can only be configured by changing the source code and you have to find out the dynamically assigned IP address somehow.
I'm not very experienced with ESP8266 programming.
So, a proof of concept! But that's the way I want to talk with my instruments eventually!  :)

Thanks for sharing your proof of concept experiment. I can't see the numbers on the TO-220 device, but I presume that since the Pro Micro has no on-board 3.3V regulator, that you had to use an external regulator? Do the 4 resistors form a pair of dividers to convert the serial TTL level signal on the Arduino to 3.3V level for the ESP8266? I have used the resistor divider technique to shift the TX signal level down to 3.3V as well, but I then came across these for level shifting:

https://www.ebay.co.uk/itm/5Set-4Channel-Bi-Directional-Logic-Level-Shifter-Converter-3-3V-5V-SP-es/392511885681 (https://www.ebay.co.uk/itm/5Set-4Channel-Bi-Directional-Logic-Level-Shifter-Converter-3-3V-5V-SP-es/392511885681)

Cheap enough and they have the advantage of shifting the 3.3V signal transmitted from the ESP8266 back up to 5V for the Arduino. For Bluetooth I needed 3 channels so this little board with 4 channels came in handy.

I have for some time been working on my own version of the TCP to UART concept and given your interest in the ESP8266, was thinking that this would be an opportune time to share this work-in-progress version of the sketch. You can set either a static or DHCP IP address and also configure WiFi via a simple web based interface. You can use the programmed ESP8266 as a stand-alone WiFi AP or connect it to an existing WiFi network. You can choose which port to use for both the web interface and the bridge terminal. It works for most part but is not quite complete yet. For example, saving to EEPROM is not yet implemented and there is no proper security. I have tested using Firefox and Chrome/Chromium, but not yet on Internet Explorer/Edge or Safari. I would be interested in any observations you or anyone else may have. If you have a chance to try it, then let me know what you think.

Note: Attachent now removed.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on January 29, 2020, 08:04:03 pm
@ WaveyDipole

Quote
I can't see the numbers on the TO-220 device, but I presume that since the Pro Micro has no on-board 3.3V regulator, that you had to use an external regulator?

Indeed, it is a LF33 3,3V regulator for the ESP8266.

Quote
Do the 4 resistors form a pair of dividers to convert the serial TTL level signal on the Arduino to 3.3V level for the ESP8266?

Not quite. Two of them are pull-up resistors as two of the ESP8266 inputs need to be pulled up, e.g. the reset input.
The other two are 470 Ohms serial resistors in the RX and TX UART lines. These are indeed for overvoltage protection of the 3,3V ESP driven by the 5V Arduino.
They just do current limitation. Voltage limitation is achieved by the input clamping diodes inside the ESP chip. As I never know, which line is actually the 5V line that needs the limitor resistor, I simply add a resistor to each line to be on the safe side. It won't do any harm if it is not needed. It is the simplest way of level adaption. Btw, it is safe to drive a 5V input with 3,3V as the switching threshold is 2,5V, giving 0,8V of margin which I consider as sufficient.

Quote
I have for some time been working on my own version of the TCP to UART concept...

This sounds like a very comfortable solution. I would be very interested to give it a try. Where can I find the code?

And another thing:
May I propose a small update to the Mega32U4 config code:

Code: [Select]
/*** MEGA 32U4 based boards (Micro, Leonardo) ***/
#elif __AVR_ATmega32U4__
  /*** Board/layout selection ***/
  #define AR488_MEGA32U4_MICRO
  /*** Serial ports ***/
  // Comment out if using RXI, TXO pins
  #define AR_CDC_SERIAL
  // The Mega 32u4 default port is a virtual USB CDC port named 'Serial'
    #ifdef AR_CDC_SERIAL
      #define AR_SERIAL_PORT Serial
    #else
      #define AR_HW_SERIAL
      #define AR_SERIAL_PORT Serial1
    #endif

The added preprocessor code simplifies switching between CDC and HW serial, so acutally commenting out the indicated line will suffice to switch.


@ Gerhard_dk4xp

Hi Gerhard, nice to hear from you again.
I hope, the Jalapenos grow well on your new balcony.

Best regards,
Tom

Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on January 29, 2020, 08:05:13 pm
@ WaveyDipole

Ah, found the ESP code attached to your post.  |O
Many thanks!  :)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on January 29, 2020, 09:49:11 pm
I have just run a test with AR488-wifi, so far without GPIB adapter.
I could flash the code but I did get a strange error message after flashing was complete:
Quote
esptool.py v2.8
Serial port COM5
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: bc:dd:c2:47:40:6b
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 1MB
Compressed 318336 bytes to 223301...

Writing at 0x00000000... (7 %)
Writing at 0x00004000... (14 %)
Writing at 0x00008000... (21 %)
Writing at 0x0000c000... (28 %)
Writing at 0x00010000... (35 %)
Writing at 0x00014000... (42 %)
Writing at 0x00018000... (50 %)
Writing at 0x0001c000... (57 %)
Writing at 0x00020000... (64 %)
Writing at 0x00024000... (71 %)
Writing at 0x00028000... (78 %)
Writing at 0x0002c000... (85 %)
Writing at 0x00030000... (92 %)
Writing at 0x00034000... (100 %)
Wrote 318336 bytes (223301 compressed) at 0x00000000 in 23.7 seconds (effective 107.4 kbit/s)...
Traceback (most recent call last):
  File "C:\Users\baier\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3/tools/upload.py", line 65, in <module>
    esptool.main(cmdline)
  File "C:/Users/baier/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 2938, in main
    operation_func(esp, args)
  File "C:/Users/baier/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 2398, in write_flash
    res = esp.flash_md5sum(address, uncsize)
  File "C:/Users/baier/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 104, in inner
    return func(*args, **kwargs)
  File "C:/Users/baier/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 691, in flash_md5sum
    timeout=timeout)
  File "C:/Users/baier/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 369, in check_command
    val, data = self.command(op, data, chk, timeout=timeout)
  File "C:/Users/baier/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 347, in command
    p = self.read()
  File "C:/Users/baier/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 292, in read
    return next(self._slip_reader)
  File "C:/Users/baier/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 2045, in slip_reader
    raise FatalError("Timed out waiting for packet %s" % waiting_for)
esptool.FatalError: Timed out waiting for packet header
esptool.FatalError: Timed out waiting for packet header
What does this want to tell me?

I'm not sure I fully understand what should work already and what shouldn't work yet.
I could connect in AP mode. The configuration pages are extremely nice!  :-+
When this is fully functional, it is definitely going to be my favorite!  :)
I could only connect to port 80, but not to port 8488. I'm using YAT as TCP client.
I could not send anything over from YAT to the UART monitored with the Arduino serial monitor.
Is the bridge function already working?
I could not switch to station mode. The chip continued to stay in AP mode.
When I toggled switches, went to another tab and returned, then the switch settings were in default position again.So, it seems changes are not accepted yet.

Any hints are welcome.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 29, 2020, 10:20:48 pm
I would like to support something like this at the USB level in the 32u4 version (so it appears in dmesg and lsusb listings) , though that's not trivial as the current USB driver doesn't support custom names.

If I did that, should it hang off the proposed ++id idea or should it be yet another level of naming ?

Looks like this can be done by programming the FTDI firmware with a program called FT_Prog (formerly Mprog):

https://forum.arduino.cc/index.php?topic=50607.0

I haven't found anything equivalent for the CH340 clones, but I did find some references to programming this on the Teensy 3.0:

https://forum.pjrc.com/threads/23523-Change-device-name
https://forum.pjrc.com/threads/23796-How-to-change-Teensy-3-0-PRODUCT_NAME

I have not come across any information regarding programming this for the Arduino CDC yet, but if the current USB driver doesn't support custom names then that probably explains why. In any case it seems that such a change would need to be programmed into UART firmware or at compile time so implementing it into a runtime command may not be feasible. It is an interesting idea though and I will keep an eye on developments.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 30, 2020, 12:37:30 am
I have just run a test with AR488-wifi, so far without GPIB adapter.
I could flash the code but I did get a strange error message after flashing was complete:
Quote
esptool.py v2.8
Serial port COM5
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: bc:dd:c2:47:40:6b
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 1MB
Compressed 318336 bytes to 223301...

Writing at 0x00000000... (7 %)
Writing at 0x00004000... (14 %)
Writing at 0x00008000... (21 %)
Writing at 0x0000c000... (28 %)
Writing at 0x00010000... (35 %)
Writing at 0x00014000... (42 %)
Writing at 0x00018000... (50 %)
Writing at 0x0001c000... (57 %)
Writing at 0x00020000... (64 %)
Writing at 0x00024000... (71 %)
Writing at 0x00028000... (78 %)
Writing at 0x0002c000... (85 %)
Writing at 0x00030000... (92 %)
Writing at 0x00034000... (100 %)
Wrote 318336 bytes (223301 compressed) at 0x00000000 in 23.7 seconds (effective 107.4 kbit/s)...
Traceback (most recent call last):
  File "C:\Users\baier\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3/tools/upload.py", line 65, in <module>
    esptool.main(cmdline)
  File "C:/Users/baier/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 2938, in main
    operation_func(esp, args)
  File "C:/Users/baier/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 2398, in write_flash
    res = esp.flash_md5sum(address, uncsize)
  File "C:/Users/baier/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 104, in inner
    return func(*args, **kwargs)
  File "C:/Users/baier/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 691, in flash_md5sum
    timeout=timeout)
  File "C:/Users/baier/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 369, in check_command
    val, data = self.command(op, data, chk, timeout=timeout)
  File "C:/Users/baier/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 347, in command
    p = self.read()
  File "C:/Users/baier/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 292, in read
    return next(self._slip_reader)
  File "C:/Users/baier/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 2045, in slip_reader
    raise FatalError("Timed out waiting for packet %s" % waiting_for)
esptool.FatalError: Timed out waiting for packet header
esptool.FatalError: Timed out waiting for packet header
What does this want to tell me?

I'm not sure I fully understand what should work already and what shouldn't work yet.
I could connect in AP mode. The configuration pages are extremely nice!  :-+
When this is fully functional, it is definitely going to be my favorite!  :)
I could only connect to port 80, but not to port 8488. I'm using YAT as TCP client.
I could not send anything over from YAT to the UART monitored with the Arduino serial monitor.
Is the bridge function already working?
I could not switch to station mode. The chip continued to stay in AP mode.
When I toggled switches, went to another tab and returned, then the switch settings were in default position again.So, it seems changes are not accepted yet.

Any hints are welcome.

That looks like the write did not complete for some reason. One thing I noticed is that your esptool.py version is later than mine - I have version 2.6 vs your 2.8 - so I presume you are using a later version of the IDE than me. I was using version 1.8.9 of the IDE, 2.5.2 of the ESP8266 library and I'm working on Linux Mint 19. Being curious about this problem, I updated the ESP8266 module library to version 2.6.3 and this invokes esptool.py version 2.8 - but it was now broken! I don't even get any percentage of upload, just similar error messages to the ones you are getting and the final one:

Code: [Select]
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header

I thought that I had messed up my NodeMCU module, but I tried reverting the library back to version 2.5.2 which fortunately is quite easy to do in Board Manager, and found that the sketch uploaded just fine again. I then checked version 2.6.0 which comes with esptool.py version 2.7 and this gave the same errors, so I think there is a problem with the later version of esptool.py. I reverted back to 2.5.2 and uploaded again and am relieved to find that my NodeMCU ESP8266 is still working OK!

The switches and the pass-through should have been working. Pass-though is initially disabled but can be enabled with the slide switch and then clicking Apply. I will check the switching between station and AP mode. Although it had worked when tested previously, I guess it is possible that some change may have broken it.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on January 30, 2020, 08:39:45 am
I have hooked up the GPIB adapter to the ESP and changes made in the AR488 tab appear to go into the adapter and are being reported back correctly.

A manual function there to enter a string and send it to the adapter and see the answer would be handy for trouble-shooting.

And one more suggestion: It would be useful if you could check a GPIO pin upon power up and depending on its level force the device into AP mode. One could then add a little push-button to the hardware to use this function.

Quote
Pass-though is initially disabled but can be enabled with the slide switch and then clicking Apply.

I assume this is the "GPIB Pass" switch on the General tab. I can switch it on, but there seems to be no effect. Leaving the tab with the switch in ON state and returning back will show the switch in OFF state again.

Quote
I was using version 1.8.9 of the IDE, 2.5.2 of the ESP8266 library

I'm using Arduino 1.8.10 on Win10, ESP library 2.6.3.
I will revert to ESP library 2.5.2 and report my findings
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on January 30, 2020, 08:55:35 am
I have downgraded to ESP library 2.5.2.
The upload log looks very different now, lots of hex code, I just include the end:

Quote
    e72c44891aed2416 55398a91cdbea4a0 | .,D...$.U9......
    703642490fb0860d f0bc0d4f96963568 | p6BI.......O..5h
    1dac81a9610df396 b286831ed6f0ff16 | ....a...........
    3007c807cab900e5 0280722540f12740 | 0.........r%@.'@
    f118a0f80cd0392b dee0331d4f000088 | ......9+..3.O...
    4baf88c0                          | K...
TRACE +1.839 Read 1 bytes: c0
TRACE +0.000 Read 8 bytes: 0111020000000000
TRACE +0.010 Read 1 bytes: 00
TRACE +0.000 Read 2 bytes: 00c0
TRACE +0.000 Received full packet: 01110200000000000000

Wrote 324640 bytes (225952 compressed) at 0x00000000 in 25.5 seconds (effective 101.9 kbit/s)...
TRACE +0.000 command op=0x13 data len=16 wait_response=1 timeout=3.000 data=0000000020f404000000000000000000
TRACE +0.000 Write 26 bytes:
    c000131000000000 000000000020f404 | ............. ..
    0000000000000000 00c0             | ..........
TRACE +1.729 Read 1 bytes: c0
TRACE +0.000 Read 8 bytes: 0113120000000000
TRACE +0.380 Read 1 bytes: 42
TRACE +0.000 Read 18 bytes:
    afae3076ff198867 57751062f1424e00 | ..0v...gWu.b.BN.
    00c0                              | ..
TRACE +0.000 Received full packet:
    0113120000000000 42afae3076ff1988 | ........B..0v...
    6757751062f1424e 0000             | gWu.b.BN..
Hash of data verified.

Leaving...
TRACE +0.009 command op=0x02 data len=16 wait_response=1 timeout=3.000 data=00000000000000000040000000000000
TRACE +0.000 Write 26 bytes:
    c000021000000000 0000000000000000 | ................
    0000400000000000 00c0             | ..@.......
TRACE +0.000 Read 1 bytes: c0
TRACE +0.000 Read 11 bytes: 01020200000000000000c0
TRACE +0.000 Received full packet: 01020200000000000000
TRACE +0.000 command op=0x12 data len=4 wait_response=1 timeout=3.000 data=01000000
TRACE +0.000 Write 14 bytes: c0001204000000000001000000c0
TRACE +0.010 Read 1 bytes: c0
TRACE +0.000 Read 11 bytes: 01120200000000000000c0
TRACE +0.000 Received full packet: 01120200000000000000
Hard resetting via RTS pin...

Looks like the upload was successful. But no change to functionality.
Changes on tabs General and wifi do not take effect.

Please let me know if I can do further tests at this point.

Best regards
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 30, 2020, 04:08:43 pm
I have downgraded to ESP library 2.5.2.
The upload log looks very different now, lots of hex code, I just include the end:

....

Looks like the upload was successful. But no change to functionality.
Changes on tabs General and wifi do not take effect.

Please let me know if I can do further tests at this point.

Best regards

Since you got to the 'Hard resetting via RTS pin...' bit, this looks like the upload process did indeed complete successfully. It seems that we both have problems with the later versions of the library. That is interesting to note and it appears that an issue has been logged on the esptool.py Github project page. I have added my own observations to this issue:

https://github.com/espressif/esptool/issues/509

Regarding the hex data in the output, this will be because you have verbose mode on. Go to File | Preferences and find 'Show verbose during:'. Now have a look at the compilation and upload options. Unless you need them on for debugging, these can be turned off. The output will then be much shorter:

Code: [Select]
Sketch uses 320212 bytes (64%) of program storage space. Maximum is 499696 bytes.
Global variables use 51956 bytes (63%) of dynamic memory, leaving 29964 bytes for local variables. Maximum is 81920 bytes.
esptool.py v2.6
2.6
esptool.py v2.6
Serial port /dev/ttyUSB2
Connecting....
Chip is ESP8266EX
Features: WiFi
MAC: cc:50:e3:55:db:52
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Flash params set to 0x0340
Compressed 324368 bytes to 225898...

Writing at 0x00000000... (7 %)
Writing at 0x00004000... (14 %)
Writing at 0x00008000... (21 %)
Writing at 0x0000c000... (28 %)
Writing at 0x00010000... (35 %)
Writing at 0x00014000... (42 %)
Writing at 0x00018000... (50 %)
Writing at 0x0001c000... (57 %)
Writing at 0x00020000... (64 %)
Writing at 0x00024000... (71 %)
Writing at 0x00028000... (78 %)
Writing at 0x0002c000... (85 %)
Writing at 0x00030000... (92 %)
Writing at 0x00034000... (100 %)
Wrote 324368 bytes (225898 compressed) at 0x00000000 in 19.9 seconds (effective 130.2 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

You can, of course, turn them on as and when needed.

Regarding the functionality of the WiFi module, I am perplexed, but I will investigate. Might I ask what browser and version thereof you are using please and whether this is on Windows, Mac, iOS, Linux or Android? Also can I confirm that you do have JavaScript (not Java) enabled in the browser?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on January 30, 2020, 05:05:49 pm
Quote
Regarding the hex data in the output, this will be because you have verbose mode on.

Ah, yes, thanks for the hint! I remember having switched it on a while back when debugging a program.

Quote
Might I ask what browser and version thereof you are using please and whether this is on Windows, Mac, iOS, Linux or Android? Also can I confirm that you do have JavaScript (not Java) enabled in the browser?

I'm working on a Windows 10 Professional x64 system. My browser is Firefox 72.0.2 (64-Bit), but changing as I have activated auto-update, so always the latest version. And yes, javascript.enabled is set to true in my FireFox. I'd have assumed so as the AR488 tab does react properly.
I do have Microsoft Edge installed, too, but I usually don't use it.

I also have a virtual Ubuntu running if you think this may make any difference.

P.S. I have just tested on Microsoft Edge. Exactly the same behavior as on FireFox.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 31, 2020, 01:53:38 pm
Thanks for taking the trouble to provide the requested information. I thought that JavaScript was probably working as you would probably have had more difficulties than were reported, but just wanted to be sure. I will hopefully get some testing done over the next few days. In the meantime, I have discovered that esptool.py version 2.7, 2.8, as well as 3.0 downloaded from their GIT work fine when called manually from the command line. It is first necessary to export the compiled binary (Sketch | Export Compiled Binary in the IDE), place the exported file in the same directory as esptool.py and then on my Linux machine I just needed to do:

Code: [Select]
./esptool.py --port /dev/ttyUSB2 write_flash 0x000000 mybinary.bin

On a Windows machine you would probably need to do something like:

Code: [Select]
python esptool.py --port /dev/ttyUSB2 write_flash 0x000000 mybinary.bin

I'm not sure why it fails when run inside the Arduino IDE, but I have raised the question on the Arduino forum.

If you decide to try this on Ubuntu, then disable the modemmananger service. It may have been enabled by default and probes serial ports for the presence of a serial modem. Unfortunately, it also interferes with uploads, causing them to fail. In the rare event these days that someone may have a serial modem connected to a serial port on their PC then it might be useful, but otherwise this service is unlikely to be needed and can be safely disabled.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 31, 2020, 04:40:35 pm
I have uploaded version 0.48.08 which now includes updated support for auto-configuration of the Bluetooth HC05 module as well as tom_lphi's suggested amendment to the 32u4 configuration section in AR488_Config.h. Thanks tom.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 01, 2020, 04:15:06 pm
I have just run a test with AR488-wifi, so far without GPIB adapter.
I could flash the code but I did get a strange error message after flashing was complete:

Tom, the folks at the ESP8266 GitHub suggested to delete (or rename) the arduino15 directory and install the ESP8266 library from scratch.

On Windows this will be in User -> AppData\Local\Arduino15

On Linux is was in ~/.arduino15

After this, IDE preferences are lost, the AVR libraries will need updating and the ESP8266 library can be re-installed from scratch. Not ideal and the re-install will take a few minutes, but after I did that on my computer, the upload completed without any errors.

UPDATE: a further test showed that is sufficient to delete /.arduino15/packages/esp8266. At least that way, you don't loose preferences and your other boards.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on February 01, 2020, 08:36:02 pm
Quote
I have uploaded version 0.48.08 which now includes updated support for auto-configuration of the Bluetooth HC05 module

Many thanks! I may find some time tomorrow afternoon to test (if I find aHC-05 in my junk box).
Btw, do I find current connection info for the HC-05 to the Leonardo in the package Bluetooth document?

Quote
UPDATE: a further test showed that is sufficient to delete /.arduino15/packages/esp8266.

I have just done this and reinstalled ESP8266 2.6.3 package from scratch.
I still get the same error message at the end of the upload process:

Quote
esptool.FatalError: Timed out waiting for packet header
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on February 02, 2020, 03:17:31 pm
Quote
I have uploaded version 0.48.08

I have tested the new version and normal operation modes work well with my Leonardo, both CDC and hardware serial.
As I have no HC-05 (on order, will probably arrive by end of coming week), I have hooked up a USB to serial converter.
In BT mode, I can see that your are firing out AT commands. The HC-06 doesn't understand these as it doesn't like CR+LF terminators.

Btw, where should I connect the BT control pin to my Leonardo? As far as I can see, all port lines are occupied by GPIB. There are only two free board pins, which are RST and RAW. I assume RST goes to the reset pin. Can this be reconfigured as port line / GPIO? What is the RAW pin?

Best regards.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on February 02, 2020, 03:35:33 pm
I don't see any gain in using a Leonardo for a bluetooth version (except, of course, it might be what you have to hand). The advantage of the Leonardo is that you have native USB, so to ignore that and connect serially to a bluetooth device seems a waste.

RAW is unregulated input (6-10V in) and can't be a digital pin. Reset doesn't appear to be configurable on the 32u4. The only spare pins seem to be those driving the RX and TX Leds and you'd have to wire them out yourself and modify the arduino library to make those available as outputs, though merely setting them to input mode (and wiring) can make them available as inputs.

If you want a bluetooth GPIB adapter, I'd think an ESP32 or https://www.amazon.co.uk/Keywish-Bluetooth-ATmega328P-Micro-Controller-Compatible/dp/B07QPFDDPY/ref=sr_1_1?keywords=Keywish&qid=1580657669&s=computers&search-type=ss&sr=1-1 (https://www.amazon.co.uk/Keywish-Bluetooth-ATmega328P-Micro-Controller-Compatible/dp/B07QPFDDPY/ref=sr_1_1?keywords=Keywish&qid=1580657669&s=computers&search-type=ss&sr=1-1) would be good.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on February 02, 2020, 06:23:42 pm
Thanks for the info on Leonardo pins.

Quote
I don't see any gain in using a Leonardo for a bluetooth version

Well, ultimately I want wifi and not Bluetooth. I just wanted to test the new firmware.
But anyway, there is a big advantage of using a Leonardo and hooking up a Bluetooth or wifi module to the hardware UART.
You can reconfigure it any time to work via native USB without having to change the hardware. You just throw a software switch and reflash via USB.

Taking this further: It shouldn't be too hard to make the firmware work simultaneously with both interfaces, i.e. accepting incoming messages from both channels CDC USB and hardware UART and sending outgoing messages to both simultaneously. In this case, reconfiguration would be unnecessary altogether.

But cool, an Arduino with integrated Bluetooth. I haven't seen that before.

Btw, another thing:
I found this extremely nice design on the web:
https://sigrok.org/wiki/File:Ar488-artag-pcb-top.png (https://sigrok.org/wiki/File:Ar488-artag-pcb-top.png)
Do you happen to be the designer? If so, would you share the design files?

Best regards.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on February 03, 2020, 02:47:21 pm
There's a link further back in the thread - https://eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2728010/#msg2728010

Some related PCBs here :

https://oshpark.com/profiles/artag

(the v3 board does the same thing but the cable exits in the other direction. However I haven't had these made yet so they're not completely guaranteed to work).

You can download gerbers from the oshpark link and have them made somewhere else if you want, but if you want to modify it just ask me for the kicad sources.
 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 03, 2020, 03:32:18 pm
Btw, do I find current connection info for the HC-05 to the Leonardo in the package Bluetooth document?

Btw, where should I connect the BT control pin to my Leonardo? As far as I can see, all port lines are occupied by GPIB. There are only two free board pins, which are RST and RAW. I assume RST goes to the reset pin. Can this be reconfigured as port line / GPIO? What is the RAW pin?

Best regards.

I haven't worked with the Leonardo yet and don't have one of those to hand, so there is no info in the supplement yet, but from what I can see looking at the image of a Leonardo board, it has a layout that is very similar to the Uno and has the same pin numbering. The Uno layout has two pins spare (6 and 13) and I used pin 6 in my tests early on. The more recent tests were done on the Mega 2560. I am curious which layout you used for the Leonardo? The Micro Pro has rather different pin numbering so some modifications would be necessary to allow the current Micro Pro 32u4 layout to work on the Leonardo. I would be happy to add a Leonardo layout that matches the Uno one to the sketch but would need to study the datasheet in more detail. Would you be willing to test it?

Quote
UPDATE: a further test showed that is sufficient to delete /.arduino15/packages/esp8266.

I have just done this and reinstalled ESP8266 2.6.3 package from scratch.
I still get the same error message at the end of the upload process:

Quote
esptool.FatalError: Timed out waiting for packet header

Curious that this is still happening. The issue I logged with the ESP8266 library developers is here:

https://github.com/esp8266/Arduino/issues/7050

Perhaps you could add your comments and output containing the errors to that issue or log a new one yourself? Since I am using a NodeMCU development breakout board, whereas you seem to be working with a generic ESP8266 module the cause may be related, or it may be different. They should be able to help with resolving this.

Quote
I don't see any gain in using a Leonardo for a bluetooth version

Well, ultimately I want wifi and not Bluetooth. I just wanted to test the new firmware.

Agreed WiFi is likely to be more useful. Bluetooth wasn't that difficult to work with so it didn't take too long to add something back in the 0.46.xx versions. The change in Architecture in 0.47.xx meant that I had to temporarily remove it, but now it has been adapted and tested, I have added it back in for what its worth. I appreciate that not everyone wants wireless signals around their instruments so it has been included in a way that is optional and disabled by default so can be just ignored if not required.

WiFi is much more complex and I have been working on that for some time. The fundamentals are there but it clearly needs more work and testing which I intend to crack on with now that I have got other outstanding bits out of the way.

Taking this further: It shouldn't be too hard to make the firmware work simultaneously with both interfaces, i.e. accepting incoming messages from both channels CDC USB and hardware UART and sending outgoing messages to both simultaneously. In this case, reconfiguration would be unnecessary altogether.

Yes it can be done and I have put together some code that can do that for hardware ports but not got as far as including CDC or SoftwareSerial ports yet. I wasn't sure how much value this would be to this project, although I had thought that such a capability might  be useful for diagnostics.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on February 04, 2020, 06:41:29 am
@artag

Quote
but if you want to modify it just ask me for the kicad sources

Yes, please. I want to add a second PCB stack for a wifi chip and I would like to avoid re-inventing board outlines and the connector footprints.
I'm glad you are using KiCAD, too. KiCAD files of ar488promicro would be highly appreciated. Thank you very much!

@WaveyDipole

Quote
The Uno layout has two pins spare (6 and 13) and I used pin 6 in my tests early on.

Indeed, the Uno has spare ports. The Leonardo Pro Micro has exactly 16 port lines (+2 serial hardware lines), so the HC-05 will not work on the Pro Micro as no spare line for the control pin.

Quote
The Micro Pro has rather different pin numbering so some modifications would be necessary to allow the current Micro Pro 32u4 layout to work on the Leonardo.

This may be a misunderstanding. For me, the Pro Micro and the Leonardo are the same board. I only have an At32U4 Pro Micro board here which is detected as Leonardo by the Arduino IDE. So, I assumed this is synonymous.
I do also have an Uno board, so I may still test the HC-05. But I haven't currently wired it up to a GPIB connector.

Quote
    Taking this further: It shouldn't be too hard to make the firmware work simultaneously with both interfaces, i.e. accepting incoming messages from both channels CDC USB and hardware UART and sending outgoing messages to both simultaneously. In this case, reconfiguration would be unnecessary altogether.


Yes it can be done and I have put together some code that can do that for hardware ports but not got as far as including CDC or SoftwareSerial ports yet. I wasn't sure how much value this would be to this project, although I had thought that such a capability might  be useful for diagnostics.

I think this is not only usefull for diagnostics, but also for the final combined wifi+USB product, taken that the data throughput will not suffer too much. But maybe I'm a special case.

I will look again into the ESP upload issue and try to file my finds.

Best regards.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 04, 2020, 01:06:24 pm
@WaveyDipole

Quote
The Uno layout has two pins spare (6 and 13) and I used pin 6 in my tests early on.

Indeed, the Uno has spare ports. The Leonardo Pro Micro has exactly 16 port lines (+2 serial hardware lines), so the HC-05 will not work on the Pro Micro as no spare line for the control pin.

Quote
The Micro Pro has rather different pin numbering so some modifications would be necessary to allow the current Micro Pro 32u4 layout to work on the Leonardo.

This may be a misunderstanding. For me, the Pro Micro and the Leonardo are the same board. I only have an At32U4 Pro Micro board here which is detected as Leonardo by the Arduino IDE. So, I assumed this is synonymous.
I do also have an Uno board, so I may still test the HC-05. But I haven't currently wired it up to a GPIB connector.

Sorry, yes I think there does seem to be some confusion over terminology. I assumed the term Leonardo to apply to the larger Uno-like board. However, doing a bit of Googling, I see that the term is applied by some outlets and sources to the Pro Micro. Nevertheless, thanks for the clarification. Indeed the small form factor Micro Pro board does not have any spare pins so the Bluetooth module would need to be configured manually or have some push switch or something to apply 3.3v to the enable pin on the HC05 for 60 seconds or so until the LED blinks once then 3 times. Then it is configured and theoretically only needs to be done once or if it looses its config. probably just as easy to configure it manually.

BTW, made spent a few hours and made some progress on the WiFi code yesterday. My apologies, but it looks like two of the Apply buttons were not working, i.e those General Settings and WiFi, so the settings were not getting applied. There were other things to tidy up as well. I still have one functional thing to sort and then I will post it again.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 04, 2020, 11:20:41 pm
tom_iphi, I think I have sorted the remaining functional issue. Still plenty of work to do on it but hopefully this version will work OK.

EDIT:
Attachment removed. Latest version here:
https://github.com/Twilight-Logic/AR488/tree/master/src/AR488-ESP8266-addon
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on February 05, 2020, 01:54:20 pm
Many thanks for the wifi firmware update!
I could only do a quick test.
GPIB pass through works nicely, now.

I still cannot switch it to client mode. If I do, the AP mode is switched off but reactivated quickly again.
And I'm also having an issue of frequent disconnects, when the ESP module is hooked to the AR488. But this may be rather an issue of my hardware that with the firmware.
In the programming adapter I obtain stable AP connection.

Btw, I'm using this combo of ESP-01 and USB-to-serial programming adapter:
https://www.amazon.de/AZDelivery-ESP8266-ESP-01-USB-Adapter-Arduino/dp/B078J7LDLY (https://www.amazon.de/AZDelivery-ESP8266-ESP-01-USB-Adapter-Arduino/dp/B078J7LDLY)

Best regard.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 06, 2020, 05:45:40 pm
GPIB pass through works nicely, now.

Good to hear that.

I still cannot switch it to client mode. If I do, the AP mode is switched off but reactivated quickly again.
And I'm also having an issue of frequent disconnects, when the ESP module is hooked to the AR488.

Could I ask whether it actually connects to your WiFi network with a live IP address?

The sketch is designed to fall back to AP mode in the event that it cannot connect successfully to a WiFi network as a client. This is so that it leaves the ESP8266 in an accessible state although it does take a couple of minutes to get there as the WiFi stack has to go through two restarts. If it connects successfully, then it should be possible to reach the status page via its new IP address and the connection should be stable. I tested with mine connected to the house WiFi for over an hour today and could still access it.

Currently, each time that the ESP8266 module is power cycled or reset it will revert to the default default AP mode SSID and IP address. This is because at present, nothing is being saved to EEPROM yet. Sorting that is next on my list.

I also discovered that there have been reports of this happening because the module is going to sleep to save power although I'm not sure how long it takes to kick in. I have found a means of disabling it which I have done in the attached.

Finally, if its crashing for some reason or something is causing a reset then it will revert to default settings.

You can enable debugging in the Arduino IDE. In tools under the ESP8266 board options set the debug port and debug level. You then have to recompile and upload. After that, in serial monitor it will show some event numbers which might provide a clue (or not). I have found the meaning of the WiFi ones here:

https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/src/ESP8266WiFiType.h#L51 (https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/src/ESP8266WiFiType.h#L51)

I will have to have a search for the others. You may have to disconnect from the Arduino for this.

Btw, I'm using this combo of ESP-01 and USB-to-serial programming adapter:
https://www.amazon.de/AZDelivery-ESP8266-ESP-01-USB-Adapter-Arduino/dp/B078J7LDLY (https://www.amazon.de/AZDelivery-ESP8266-ESP-01-USB-Adapter-Arduino/dp/B078J7LDLY)

Not used one of those but see no reason why an ESP-01 shouldn't work.

EDIT:
Attachment removed. Latest version here:
https://github.com/Twilight-Logic/AR488/tree/master/src/AR488-ESP8266-addon (https://github.com/Twilight-Logic/AR488/tree/master/src/AR488-ESP8266-addon)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on February 06, 2020, 07:59:20 pm
Hi, I have just tried your new firmware version with the debug switches on.
Funny thing: As soon as I activated the debug switches, the upload errors disappeared.
But I'm afraid still no connection to my home AP.
Also, I fear I cannot read anything from the debug log.
I attach it in hope that you may learn something from this.

Btw, my password is quite long. In fact it is longer than the input field. Is there a limit on the length of the password?
I assume, WPA2 should be no problem as the simple bridge code I initially used, did connect to my home AP.

And just to be sure I do not make a stupid mistake:
I switch wifi mode to client.
I activate DHCP for automatic IP address assignment.
I enter the SSID of my home AP into the ESSID field.
I enter the password of my home IP into the Password field.
I hit the Apply button.
That's where the log starts.
The log ends, when the ESP falls back to AP mode.

Best regards.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on February 06, 2020, 08:11:59 pm
P.S.

I attach the simple code that does connect to my home IP for reference.

Also:
The simple code never shows an upload error, neither with nor without debugging activated.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 07, 2020, 12:42:39 am
Hi, I have just tried your new firmware version with the debug switches on.
Funny thing: As soon as I activated the debug switches, the upload errors disappeared.

Strange. It does change the compile options, but shouldn't make a difference as regards the success of the upload. Which board profile are you using? I upload using "Generic ESP8266 Module".

But I'm afraid still no connection to my home AP.
Also, I fear I cannot read anything from the debug log.
I attach it in hope that you may learn something from this.

Thanks for the log. I will have a look at it and analyse tomorrow.

Btw, my password is quite long. In fact it is longer than the input field. Is there a limit on the length of the password?
I assume, WPA2 should be no problem as the simple bridge code I initially used, did connect to my home AP.

If your password is longer than 19 characters that could indeed be the problem. The password length in my code is 20 characters (minus one for the NULL terminator). I see the bridge code handles things differently. Thanks for attaching that example BTW.

And just to be sure I do not make a stupid mistake:
I switch wifi mode to client.
I activate DHCP for automatic IP address assignment.
I enter the SSID of my home AP into the ESSID field.
I enter the password of my home IP into the Password field.
I hit the Apply button.
That's where the log starts.
The log ends, when the ESP falls back to AP mode.

Your process looks spot on.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on February 07, 2020, 06:21:16 am
Quote
Which board profile are you using? I upload using "Generic ESP8266 Module".
This is what I use, too.

Quote
If your password is longer than 19 characters that could be the problem. The password length in my code is 20 characters (minus one for the NULL terminator).
Then, we have found the reason. My password is longer than the limit. Can this be changed? Are you short in non-volatile memory?

Best regards.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 07, 2020, 11:48:16 am
In the bridge code you place your password between quotes in the code and it is assigned to a constant. The amount of memory required for the constant will be calculated and allocated at compile time. In this case however, the password is being captured from the web page and we don't know how long it is until it has been submitted so we allocate a sensible amount of space. I discovered that the maximum number of characters allowed for the SSID on the ESP8266 is 31. I suspect it will be the same for the password although I couldn't find anything to confirm that. I have therefore extended the limit to 31 characters.

Lets just say that non-volatile memory is not in abundance but there may be another way around this which I need to explore.

EDIT:
Attachment removed. Latest version here:
Latest version here: https://github.com/Twilight-Logic/AR488/tree/master/src/AR488-ESP8266-addon
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on February 07, 2020, 12:15:18 pm
Many thanks, 31 will do for me. I will try to test tonight when back home.

Best regard.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on February 07, 2020, 09:28:17 pm
Success! The little beast is connected to my home network now.
Many thanks for the new version!

One find:
I did fire it up with DHCP activated and apparently, an IP address was automatically assigned.
When I then entered the wifi configuration tab via my home network, the DHCP switch was in off state again, but the gateway and netmask input fields were greyed out.

And after power cycling the ESP, it is back in AP mode. I believe you mentioned that this is still work in progress, right?

Best regards.

P.S.

I have just tested static IP without DCHP. This works nicely, too.  :-+
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on February 08, 2020, 08:08:07 am
Many thanks for the PCB links!

Quote
but if you want to modify it just ask me for the kicad sources

Yes, please. I want to add a second PCB stack for a wifi chip and I would like to avoid re-inventing board outlines and the connector footprints.
I'm glad you are using KiCAD, too. KiCAD files of ar488promicro would be highly appreciated. Thank you very much!

Best regards.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 08, 2020, 09:35:13 pm
Success! The little beast is connected to my home network now.
Many thanks for the new version!

Thanks for the feedback. Seems we are making progress here and the password getting truncated was the problem.

One find:
I did fire it up with DHCP activated and apparently, an IP address was automatically assigned.
When I then entered the wifi configuration tab via my home network, the DHCP switch was in off state again, but the gateway and netmask input fields were greyed out.

Yes, sorry about that and it is a problem that I am aware of. When you submit the form, the config is passed to the WiFi server, but the submit action causes the WiFi config page to reload and it ends up reverting back to the default AP setup. Getting it to reflect the correct state of the WiFi controls is also one of the bits of work on my to-do list.

And after power cycling the ESP, it is back in AP mode. I believe you mentioned that this is still work in progress, right?

Yes, still very much a work in progress. Hoping to get al least some of the work mentioned above done this coming week.

I have just tested static IP without DCHP. This works nicely, too.  :-+

Again, thanks for the report.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on February 13, 2020, 12:24:11 pm
For the records:

I have solved the ESP8266 connectivity problem when hooked up to the AR488 adapter:
My LF33 3.3V voltage regulator was oscillating. The output blocking cap was broken, fixed now.
The problem had nothing to do with the ESP firmware, which works great.

And I have found a way to power the AR488+ESP8266 combo directly from my HP8593E spectrum analyzer.
It has an external keyboard PS2 socket, which provides 5V power.  :)
Best regards.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: grizewald on February 16, 2020, 02:22:47 pm
I wanted to get some logging going with my Solartron 7061 and this project looked like just the ticket.

I have a MEGA 2560 card running the code and it talks to both my 7150+ and 7061 meters when using it from a terminal emulator with no problem.

One thing I wanted to do, over and above logging a voltage over time was to add environmental data - as in temperature, humidity and pressure. I have a small device which measures these parameters and transmits the results every minute to a local MQTT broker so as to make the data available for different purposes.

So I wrote some shell script to set up the AR488 with the measurement parameters. Once the measurement is set up, I set ++auto 3 and do a ++read. Then I enter a loop which just reads the incoming results from the serial port. There is another bit of shell script running in the background which queries the MQTT server once every minute and writes the current temperature, humidity and pressure out to a file.

All the loop does is combine the data from the AR488 with the data from the MQTT server, creates a timestamp and appends the resulting line to a CSV file. So far so good.

The problem I'm experiencing with the 7061 is that after about 15 results have come in (each measurement takes 8 seconds), the 7061 suddenly displays "21 I/P BUFFER OVERFLOW" on the display and stops delivering results.

Has anyone any idea why this might happen? I'm not sending anything to the AR488 at this point, I'm just reading the auto-fetched measurements.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on February 16, 2020, 02:46:42 pm
Hi grizewald,
sounds like your meter is measuring faster than it gets rid of the data via GPIB.
Eventually, the internal buffer fills up and flows over.
It would be safer to trigger single measurements via GPIB when they are needed.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: grizewald on February 16, 2020, 02:57:36 pm
The error message was "I/P buffer overflow", so it was the input (I/P) buffer rather than the output buffer. However, I seem to have fixed the problem! At the start of the script, I set up the serial port with:

stty -F $PORT 115200 raw

The fix was to change that to:

stty -F $PORT 115200 raw -echo

Somehow, the incoming data was being echoed back to the output. Turning local echo off has stopped that and I've now logged over 150 readings and it's still running just fine.

I'm probably mad trying to handle serial I/O in shell script, but I thought it would be an interesting challenge. And it sure was!  :-DD
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on February 16, 2020, 03:55:38 pm
When I had the USA Cal Club Round 2 kit, I wrote an awk script to read a temperature and humidity sensor attached to an Arduino, the system time and a pair of 34401As using AR488 to log data on a Linux box.

It was rather more messy than I liked, but it it was quick to implement.  It did have issues with latency.

Have fun!
Reg
Title: Re: AR488 Arduino-based GPIB adapter
Post by: grizewald on February 16, 2020, 04:35:24 pm
It only took the weekend to get my script up and running. Most of that time went on battling with the fact that you can't let the serial port get closed as that resets the Arduino the next time the port is opened.

I ended up having the script start separate processes for reading and writing to the serial port. They use named pipes as their input or output to communicate with the main process. The code that handles reading environmental data from the MQTT broker is also created as a separate process and as my sensor only updates the broker once every minute, the reader sleeps for a minute between fetching the new values.

It's quite nice to be able to integrate the various data sources into one output file. I reckon doing it as a shell script was actually easier than writing C code to deal with a Linux serial port.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: grizewald on February 16, 2020, 04:37:06 pm
Now I just have to work out how to plot all that data!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: grizewald on February 16, 2020, 06:45:09 pm
I'd forgotten how much I liked gnuplot!

(https://filedn.com/lEDSGUXnO7mp9lWR3BbARrR/7061/g.png)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 16, 2020, 09:34:23 pm
For the records:

I have solved the ESP8266 connectivity problem when hooked up to the AR488 adapter:
My LF33 3.3V voltage regulator was oscillating. The output blocking cap was broken, fixed now.
The problem had nothing to do with the ESP firmware, which works great.

Again, thanks for the report.

And I have found a way to power the AR488+ESP8266 combo directly from my HP8593E spectrum analyzer.
It has an external keyboard PS2 socket, which provides 5V power.  :)
Best regards.

An interesting solution to provide power! A quick look suggests that the PS/2 port should be able to supply about 275mA, so enough to supply one Arduino and one ESP8266.

I have had a rough time with my health but still managed to do quite a bit of work on refining and testing the ESP8266 sketch. I have completed the configuration storage functions, fixed a couple of glitches with the status of controls and a few other bits. For now I am using EEPROM functions but was contemplating moving to using spiffs. One drawback is that it would require the user to perform additional steps to set up the IDE, but it would make it somewhat easier to maintain the code.

Steps still to be completed include SSL, authentication and review of functions on the Admin tab.

I have uploaded the current version to the AR488 Git here:
https://github.com/Twilight-Logic/AR488/tree/master/src/AR488-ESP8266-addon

It only took the weekend to get my script up and running. Most of that time went on battling with the fact that you can't let the serial port get closed as that resets the Arduino the next time the port is opened.

It is possible to prevent the reset as detailed here:
https://playground.arduino.cc/Main/DisablingAutoResetOnSerialConnection/

Also on the Mega2560 it is possible to use one of the other serial ports connected to one of those FT232RL modules.

Not seen GNUplot before. Will have to have a look at that. Thanks for the picture.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: grizewald on February 17, 2020, 06:09:44 am
It only took the weekend to get my script up and running. Most of that time went on battling with the fact that you can't let the serial port get closed as that resets the Arduino the next time the port is opened.

It is possible to prevent the reset as detailed here:
https://playground.arduino.cc/Main/DisablingAutoResetOnSerialConnection/

Also on the Mega2560 it is possible to use one of the other serial ports connected to one of those FT232RL modules.

Not seen GNUplot before. Will have to have a look at that. Thanks for the picture.

Thank you for the excellent project!

I hadn't actually looked at whether it was possible to disable the auto-reset function. Using a different serial port to talk to the Mega is a nice idea as well, but would mean more cables between the Mega and the computer of course.

Gnuplot is super simple and very flexible. My script produces a log which looks like this:

Code: [Select]
2020-02-16 15:35:38,24.17,40.30,983.74,+1.0183911
2020-02-16 15:35:46,24.17,40.30,983.74,+1.0183908
2020-02-16 15:35:54,24.17,40.30,983.74,+1.0183906
2020-02-16 15:36:02,24.17,40.30,983.74,+1.0183907
2020-02-16 15:36:10,24.17,40.30,983.74,+1.0183908
2020-02-16 15:36:18,24.17,40.30,983.74,+1.0183909
2020-02-16 15:36:26,24.17,40.30,983.74,+1.0183906

Date/time, temperature, humidity, pressure, voltage

The gnuplot file which creates the graph is as simple as:

Code: [Select]
set lmargin screen 0.2
set datafile separator ","
set terminal png size 1800,800
set multiplot
set title "7061 Weston Cell Readings"
set xlabel "Time"
set xdata time
set timefmt "%Y-%m-%d %H:%M:%S"
set format x "%H:%M"
set key off
set grid
set ylabel "Temperature" offset 7,0 textcolor rgb "red"
set format y "%10.1f"
plot "WestonLog.csv" using 1:2 with lines lw 2 lt rgb "red"
set ytics offset -8,0
set ylabel "Humidity" offset -1,0 textcolor rgb "green"
set format y "%10.1f"
plot "WestonLog.csv" using 1:3 with lines lw 2 lt rgb "green"
set ytics offset -16, 0
set format y "%5.1f"
set ylabel "Pressure" offset -14,0 textcolor rgb "blue"
plot "WestonLog.csv" using 1:4 with lines lw 2 lt rgb "blue"
set ytics offset -24, 0
set format y "%10.7f"
set ylabel "Voltage" offset -21,0 textcolor rgb "violet"
plot "WestonLog.csv" using 1:5 with lines lw 2 lt rgb "violet"
unset multiplot

It's also very fast. My log has now grown to 6,500 lines and it takes only 0.1 seconds to produce the graph on my old Thinkpad X220 laptop.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on February 17, 2020, 03:36:30 pm
Quote
I have uploaded the current version to the AR488 Git here:
https://github.com/Twilight-Logic/AR488/tree/master/src/AR488-ESP8266-addon

Many thanks for the new version. I have just tested it and it works great. Now, the system is really usable as the wifi settings are being memorized. :)

Quote
For now I am using EEPROM functions but was contemplating moving to using spiffs.

As said I am completely happy with the firmware as is, but if you decide to move to spiffs, I will happily test.

Thanks again for your great work!
Best regards.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: james_s on March 06, 2020, 10:13:25 pm
So I've gotten this firmware working nicely to dump plots from my 8594E into the 7470A plotter emulator, it works beautifully with no problems at all.

Then I tried with a TDS410A scope just for fun and spent quite some time banging my head against the wall. This scope does not appear to support requesting plots from the instrument the way the 8594E does, and pressing Hardcopy on the scope just sits there waiting, until that is I send a ++read command, then it will happily start dumping data. Somebody in another thread happened to do something very similar in parallel and noted that the read command on the PC side asserts one or more lines on the bus and that causes the scope to start printing. Is this something that can be fixed in the arduino firmware or would it require changes to the plotter emulator? The TDS400 series scopes have to be set to talk-only in order to use the GPIB port for hardcopy. Once you get it to start sending the data, the 7470A emulator can receive and render it without difficulty.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bingo600 on March 07, 2020, 09:26:40 am
So I've gotten this firmware working nicely to dump plots from my 8594E into the 7470A plotter emulator, it works beautifully with no problems at all.

Care to share the 8594E script & settings ?

/Bingo
Title: Re: AR488 Arduino-based GPIB adapter
Post by: james_s on March 07, 2020, 11:11:57 pm
Care to share the 8594E script & settings ?

/Bingo


There is no script or settings per se, I simply loaded up the 7470A program and selected "Request plot from supported device at address 14". The 8594E is set to talk/listen on address 14 and when I select that it triggers a capture and renders it in the emulator program, simple as that.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: james_s on March 08, 2020, 05:05:14 am
After someone else mentioned it, I'm wondering if the not yet implemented ++lon command is the issue here. According to documentation I found that's "Listen Only" which certainly sounds like what I need.

*edit: So I looked in the code and realized that ++lon is implemented, I don't know why I had it in my head that it was not. I played around with the 7470A plotter emulator and found that if I select request plot from device then it will assert NDAC and then the scope will start sending the plot however the emulator then interprets that data as the instrument name. If I put the plotter emulator in listen mode then NDAC never asserts and the scope never sends the data.

I have not yet tried to intercept the serial data and see what commands are being sent to the interface.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 11, 2020, 01:34:38 pm
*edit: So I looked in the code and realized that ++lon is implemented, I don't know why I had it in my head that it was not.

The ++lon command was not implemented when the firmware was first released but was eventually added to firmware version 0.47.51.

I played around with the 7470A plotter emulator and found that if I select request plot from device then it will assert NDAC and then the scope will start sending the plot however the emulator then interprets that data as the instrument name.

I don't have any experience with the TDS410, but looking at the Programmer manual that I found at the link below, I wonder whether the HARDCopy:FORMat command would allow setting a format that the 7470A plotter emulator will understand? (HARDCopy:HPGl perhaps?)

http://w140.com/tekwiki/wiki/TDS410 (http://w140.com/tekwiki/wiki/TDS410)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: james_s on March 11, 2020, 04:09:28 pm
The hardcopy format is correct, the scope sends HPGL and the plotter emulator renders it just fine. The problem is that the line that tells the scope to start sending does not assert when the plotter emulator is set to listen on all addresses. The TDS400 series only support hardcopy in talk-only mode and do not address a plotter at a specific address.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 12, 2020, 01:25:22 pm
The hardcopy format is correct, the scope sends HPGL and the plotter emulator renders it just fine. The problem is that the line that tells the scope to start sending does not assert when the plotter emulator is set to listen on all addresses. The TDS400 series only support hardcopy in talk-only mode and do not address a plotter at a specific address.

Thanks for confirming that. If you are using talk-only mode, then the receiving interface would need to be in listen-only mode (++mode 0, ++lon 1)? In which case the interface will sit in listening mode with NRFD and NDAC asserted indicating that it is ready to receive data. When characters are transmitted from the instrument in talk-only mode via the GPIB bus it will receive them using the usual three-way handshake process. There is no signal as such to tell the instrument to start sending.

I had a look at what the KE5FX 7470A program is sending to the serial port:

Plotter addressable at 5:

Quote
++ver
AT488 GPIB-USB version 4.99

++auto
Unrecognized command

++eos 0
++mode 0
++addr 5
++eoi 1

No assigned plotter address:

Quote
++ver
AT488 GPIB-USB version 4.99

++auto
0

++auto 1
++eos 0
++mode 0
++eoi 1

What is interesting is that, in neither case does the software request a '++read'. In the 'Plotter addressable at 5' instance, the instrument gets addressed (++addr 5) so it is possible that it might automatically send data back to the controller address.

However, in the 'No assigned plotter address' instance, since the instrument is in talk-only mode so cannot be addressed, but the interface is not being set into listen-only (++lon) mode. It is being set into device mode (++mode 0) with ++auto 1 and there appears to be nothing here to trigger the sending of data from the instrument. In device mode without ++lon, the interface will sit idle until addressed by the controller. It does not expect to be communicated with by another device. Maybe the Prologix implementation is different in this respect and receives data from an instrument even when the interface is placed in device mode in a similar fashion to ++lon mode, but then why have a ++lon mode?

I am not sure whether my implementation needs to be adjusted, or whether the HP7470A plotter program needs to handle this differently, but I am willing to work with the author of the KE5FX suite of programs to resolve this.

Incidentally, I noted also that I seem to be randomly getting an 'Unrecognized command' after the '++auto' command is sent. I am not sure why at present but probably down to timing. I will need to investigate this further.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 12, 2020, 06:41:50 pm
@WaveyDipole

Hi,

I have noticed that you have uploaded new AR488 ESP8266 firmwares.
I have played with them today but was having problems.
The last firmware that works for me is 0.04.06 which is the one that I tested and reported about in February.
I have found a version 0.04.10 packed within a recently downloaded AR488 package.
I have also found 0.04.11 indicated here https://github.com/Twilight-Logic/AR488/blob/master/src/AR488-ESP8266-addon/AR488-ESP8266-addon.ino (https://github.com/Twilight-Logic/AR488/blob/master/src/AR488-ESP8266-addon/AR488-ESP8266-addon.ino), but the source code says it is version 0.04.10!?
Anyway, I could neither connect to 0.04.10 nor 0.04.11 in AP mode until I un-commented the line
Code: [Select]
#define DISABLE_SSL.
Then I could connect but I couldn't switch to client mode, it wouldn't connect.
Any idea what I am doing wrong?

Btw, meanwhile I got some pcbs made, see attachment. And one more strange find. Remember the odd upload error which I always saw when uploading to my ESP-01? When uploading to my new homemade ESP12F board, the error won't occur. This is absolutely repeatable.

Best regards
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 12, 2020, 08:26:13 pm
I have also found 0.04.11 indicated here https://github.com/Twilight-Logic/AR488/blob/master/src/AR488-ESP8266-addon/AR488-ESP8266-addon.ino, (https://github.com/Twilight-Logic/AR488/blob/master/src/AR488-ESP8266-addon/AR488-ESP8266-addon.ino,) but the source code says it is version 0.04.10!?

My apologies, it was an omission on my part with the upload which I have now corrected. Version 0.04.11 is now available.

Anyway, I could neither connect to 0.04.10 nor 0.04.11 in AP mode until I un-commented the line
Code: [Select]
#define DISABLE_SSL.
Then I could connect but I couldn't switch to client mode, it wouldn't connect.
Any idea what I am doing wrong?

Apologies if this seems a silly question, but are you using the https:// prefix rather than http:// to connect? The sketch will use SSL (https) by default unless '#define DISABLE_SSL' is uncommented. Please note that when using SSL, the browser will show a security warning because the included SSL certificate is not CA approved. It is necessary to click the 'Ok to proceed at own risk' link at which point the browser should allow you to connect. One further point to note is that after adding SSL, I found that occasionally Firefox would block the CSS formatting and JavaScript and you end up with a plain text on a plain white page. I'm not sure why this occurred, but Chromium rendered the pages with no issues. I have not had the opportunity to test with Internet Explorer/Edge yet.

I am not sure why there is a problem switching to client mode when '#define DISABLE_SSL' is uncommented as this only disables the SSL layer so that the pages are presented in plain text. Disabling SSL should not affect the underlying functionality. Please let me know whether this also happens with version 0.04.11. In the meantime I will also test it again myself in case I had missed something or adding https has somehow broken something.

Btw, meanwhile I got some pcbs made, see attachment.

Thanks for the photo. That's an interesting setup with the ESP8266 "piggy backed" onto Artag's Pro Micro arrangement.

My next step in the WiFi side of things will be to migrate the code to the ESP32. This module appears to have sufficient GPIO pins to drive the GPIB bus directly so theoretically a separate Arduino board would not be required. Migration of code and testing is needed to confirm that though.

And one more strange find. Remember the odd upload error which I always saw when uploading to my ESP-01? When uploading to my new homemade ESP12F board, the error won't occur. This is absolutely repeatable.

Best regards

Strange. Mine has been working OK since I deleted and did a fresh install of the ESP8266 library, but I only have the one ESP8266 board.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 12, 2020, 08:55:17 pm
Many thanks for your feedback.
I will download and play with 0.04.11 this weekend.

Quote
Apologies if this seems a silly question, but are you using the https:// prefix rather than http:// to connect?

Hmmm, I always enter the plain IP address into the browser like 192.168.4.88. Should it read https://192.168.4.88 for SSL?
I always thought the browser would automatically detect SSL sites and switch to SSL.

Best regards.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 13, 2020, 04:22:56 pm
Yes, as per your example, you would need to enter https://192.168.4.88 (https://192.168.4.88), otherwise it will go to http://192.168.4.88 (http://192.168.4.88). By default, HTTPS connects to TCP port 443 and HTTP connects to TCP port 80.  If you were to change the port to a custom one, for example to 8443, then you would have to append the port number as well, for example, https://192.168.4.88:8443 (https://192.168.4.88:8443), or without SSL, it would be http://192.168.4.88:8080 (http://192.168.4.88:8080), which would connect without SSL to TCP port 8080.

There are mechanisms that websites use to either re-direct from http to https, or to cause the browser to "remember" the last used port and protocol for a given site. The latter is something I might experiment with, but in any case the browser would need to be instructed to go to the correct port with the appropriate protocol (http or https) at least once.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 13, 2020, 06:20:39 pm
Many thanks for the explanation!
Ok, I have understood how to use SSL with a web browser.
Will SSL also affect pass-through traffic? Will I need special encryption software for my TCP client?

Best regards.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 14, 2020, 08:37:05 am
No. I have not implemented SSL on the pass-through port, only on the web admin port. I imagine that SSL could optionally be added to the pass-through port and connecting to the port would then require the use of an Secure Shell (SSH) enabled client. However, the ESP8266 does not have sufficient resources to handle more than one encrypted session so I have no plans at this time to enable SSL to the pass-through port. Besides, it might make things difficult for those using Python scripts or other programs without such support.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 14, 2020, 02:38:20 pm
Hi, I have tested ESP firmware 0.04.11 now successfully, many thanks for the update!

A few finds:
-Pass through works fine, indeed unencrypted, which is fine with me.
-When changing the http port number only, the apply button remains greyed out.
-The admin functions appear not to be implemented yet, right?
-web traffic is always encrypted. There is no online means to switch encryption off right? Only by setting the firmware switch and recompiling can this be done.
-My impression is that with encryption in place switching between tabs on the web page takes noticibly longer, am I just imagining this?

And maybe you can help me on a problem with my new adapter boards:
-I can program my Arduino Pro Micro directly via CDC Serial with the Arduino IDE just fine.
-I can also program the ESP8266 using a CH340C USB to Serial converter with the Arduino IDE.
Now, I would like to program the ESP8266 inside the application, i.e. use the ProMicro as a USB to serial converter and thus replace the CH340 board. I have a simple bridge code for the ProMicro which connects the CDC to the hardware serial, and the ESP does talk to the ProMicro, but the Arduino IDE won't upload the ESP through the ProMicro. Any idea why this doesn't work? Does programming the ESP involve switching baud rates? Of course, the ProMicro hardware serial is on a fixed baud rate. Do you know of any ProMicro code that lets it emulate a CH340 or FTDI USB to serial converter?

Best regards.

P.S.
Regarding my latter problem there appears to be a problem of the Arduino IDE talking through the CDC port of the ProMicro to the ESP. I have just written a com port redirector software which on one end connects to the ProMicro, while at the other end connects to a com0com virtual port pair. If I now connect the Arduino IDE, it DOES program the ESP. The data now is routed the following way:
Arduino IDE => COM0COM pair => my port redirector software => ProMicro => ESP8266.
Funny, that the long way works but the direct way connecting the IDE to the ProMicro does not.
It seems to be linked to the CDC handshake emulation.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DefinitelyNotLarryEllison on March 14, 2020, 07:51:01 pm
WaveyDipole - is the ESP32 code available anywhere? I searched through the AR488 github repo but I can't find it. I understand if you feel it's too early to put that out there; OTOH, if it was available as a fork via github you might get other people collaborating on the code side of things. However, I also see that the repo has ~130 contributors, and I'm not even sure if you're the ultimate owner of that project.

I may be in the minority, but I'd much rather have a few network cables going to my instruments than using wifi, so I'm wondering if you have any thoughts on using an ethernet shield rather than wifi. It seems like this wouldn't work with an Uno because the ethernet shields use so many pins -- I'm assuming one would need to use a Mega and move all the "GPIB Stuff" to the higher-numbered pins that it supports. It's something I've thought about trying to do, but I was wondering if you had already had any thoughts on this.

Oh, and by the way... thank you for all your time making this awesome project! It's amazing to me that you've put so much effort into it.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 14, 2020, 07:51:52 pm
Hi, I have tested ESP firmware 0.04.11 now successfully, many thanks for the update!

Was hoping to have done that today but I ran out of time so thanks for posting your observations.

-The admin functions appear not to be implemented yet, right?

Correct. The password function is, for the present, superfluous, but the reboot function should work. Factory reset should also work, but with all the recent changes I will have to check this. It was my intent to go back to this page one the authentication functions were added.

-web traffic is always encrypted. There is no online means to switch encryption off right? Only by setting the firmware switch and recompiling can this be done.

Also correct. By default the sketch will use SSL and there is no way to turn this off at runtime, but it can be disabled by adding (or un-comenting) the #define DISABLE_SSL switch. I have so far been unable to find a convenient way to switch between SSL and cleartext mode at runtime (as originally envisaged) and from what I have been given to understand, this is not likely to be achievable with the currently available WiFi libraries.

-My impression is that with encryption in place switching between tabs on the web page takes noticibly longer, am I just imagining this?

No, you are not imagining things. The fact that one can run a webserver with encryption in just a few 10's of kb's of memory is quite amazing, but it does impose an substantial overhead on the MCU with the result that loading of web pages is slower.

And maybe you can help me on a problem with my new adapter boards:
-I can program my Arduino Pro Micro directly via CDC Serial with the Arduino IDE just fine.
-I can also program the ESP8266 using a CH340C USB to Serial converter with the Arduino IDE.
Now, I would like to program the ESP8266 inside the application, i.e. use the ProMicro as a USB to serial converter and thus replace the CH340 board. I have a simple bridge code for the ProMicro which connects the CDC to the hardware serial, and the ESP does talk to the ProMicro, but the Arduino IDE won't upload the ESP through the ProMicro.

Taking your questions one by one:

Any idea why this doesn't work?

Well, you don't state what steps you are taking to upload or any upload error messages, so its difficult to advise. If you are using the standard USB upload method then I could perhaps hazard a guess that when you upload from the IDE, the process checks the identity of the board (e.g. by checking how the fuses are set as well as other factors) and whether it matches the target that the bytecode is compiled for, so it "sees" an Arduino board rather than an ESP and so refuses to upload. However, this is only speculation.

The data now is routed the following way:
Arduino IDE => COM0COM pair => my port redirector software => ProMicro => ESP8266.
Funny, that the long way works but the direct way connecting the IDE to the ProMicro does not.
It seems to be linked to the CDC handshake emulation.

Again, you don't provide any code or indication of how your port re-director works, but my speculation would be that due to the extra layers (i.e. com0com and port redirector software) the IDE now has no idea that it is still connected to an Arduino and just "sees" the final piece of hardware, that is the ESP8266. This is only guesswork though.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 14, 2020, 08:03:20 pm
WaveyDipole - is the ESP32 code available anywhere? I searched through the AR488 github repo but I can't find it. I understand if you feel it's too early to put that out there; OTOH, if it was available as a fork via github you might get other people collaborating on the code side of things. However, I also see that the repo has ~130 contributors, and I'm not even sure if you're the ultimate owner of that project.

I am the owner of the AR488 project. It was derived from (with permission) from an original work by Emmanuelle Girlando. I haven't started work on the ESP32 conversion yet so nothing available at present. At present, health issues and other family matters have to take priority, but I do want to get around to it in due course.

I may be in the minority, but I'd much rather have a few network cables going to my instruments than using wifi, so I'm wondering if you have any thoughts on using an ethernet shield rather than wifi. It seems like this wouldn't work with an Uno because the ethernet shields use so many pins -- I'm assuming one would need to use a Mega and move all the "GPIB Stuff" to the higher-numbered pins that it supports. It's something I've thought about trying to do, but I was wondering if you had already had any thoughts on this.

Someone did previously express the thought that they did not like the idea of WiFi floating around sensitive instruments so this has come up before. I have considered the possibility of adding Ethernet, but as you say, it will have to work with a Mega. I don't have an Ethernet shield yet, but I do intend to get one and have a play with it.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 15, 2020, 02:13:25 pm
Quote
Well, you don't state what steps you are taking to upload or any upload error messages, so its difficult to advise.

I upload the same way as with a USB-to-serial converter. The error message is "no such port or nothing connected".
With the logic analyzer on the ESP side, I see that the IDE does send data and that the ESP answers, but the answer apparently doesn't make it through the ProMicro back to the IDE.

Interesting find: If I use a terminal program like YAT, it cannot read data from the CDC port if flow control NONE is selected. I have to select some RTS/CTS flow control to read data. I believe this is the problem inside the Arduino IDE.

Quote
Again, you don't provide any code or indication of how your port re-director works

Quite simple. The program opens two com ports and passes any character that comes from one port directly to the other.
As described above, I do use hardware flow control setting on the ProMicro side and NONE on the IDE side. I belive that this is why it works this way but not the simple way.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: james_s on March 15, 2020, 08:06:29 pm
The hardcopy format is correct, the scope sends HPGL and the plotter emulator renders it just fine. The problem is that the line that tells the scope to start sending does not assert when the plotter emulator is set to listen on all addresses. The TDS400 series only support hardcopy in talk-only mode and do not address a plotter at a specific address.

Thanks for confirming that. If you are using talk-only mode, then the receiving interface would need to be in listen-only mode (++mode 0, ++lon 1)? In which case the interface will sit in listening mode with NRFD and NDAC asserted indicating that it is ready to receive data. When characters are transmitted from the instrument in talk-only mode via the GPIB bus it will receive them using the usual three-way handshake process. There is no signal as such to tell the instrument to start sending.

I had a look at what the KE5FX 7470A program is sending to the serial port:

Plotter addressable at 5:

Quote
++ver
AT488 GPIB-USB version 4.99

++auto
Unrecognized command

++eos 0
++mode 0
++addr 5
++eoi 1

No assigned plotter address:

Quote
++ver
AT488 GPIB-USB version 4.99

++auto
0

++auto 1
++eos 0
++mode 0
++eoi 1

What is interesting is that, in neither case does the software request a '++read'. In the 'Plotter addressable at 5' instance, the instrument gets addressed (++addr 5) so it is possible that it might automatically send data back to the controller address.

However, in the 'No assigned plotter address' instance, since the instrument is in talk-only mode so cannot be addressed, but the interface is not being set into listen-only (++lon) mode. It is being set into device mode (++mode 0) with ++auto 1 and there appears to be nothing here to trigger the sending of data from the instrument. In device mode without ++lon, the interface will sit idle until addressed by the controller. It does not expect to be communicated with by another device. Maybe the Prologix implementation is different in this respect and receives data from an instrument even when the interface is placed in device mode in a similar fashion to ++lon mode, but then why have a ++lon mode?

I am not sure whether my implementation needs to be adjusted, or whether the HP7470A plotter program needs to handle this differently, but I am willing to work with the author of the KE5FX suite of programs to resolve this.

Incidentally, I noted also that I seem to be randomly getting an 'Unrecognized command' after the '++auto' command is sent. I am not sure why at present but probably down to timing. I will need to investigate this further.


I wish I knew more but unfortunately I'm fairly new to GPIB and I've never used a real Prologix interface. Does *anyone* actually have one of those? Maybe the lon mode is a legacy thing or something that is used by some software or by the old style ISA/PCI interface cards? I have no idea.

Do you want to try contacting the author of the plotter emulator or would you like me to? I'm more than happy to assist in any way I can, I can test whatever you need with my TDS410A. If we can find anyone who has a real Prologix interface that would make it possible to determine exactly how that works. I suppose another option is to try to pool together several people to buy one for testing purposes, I don't think they're hugely expensive, with 5-10 people it would be a small investment to make the open source interface top notch.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 16, 2020, 06:51:20 am
I do have a Prologix interface, but I do not have a Tektronix scope to test it with.
I have found that the Prologix behaves exactly as described in the manual.
I can do simple tests if you tell me what.
Best regards.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 16, 2020, 02:53:23 pm
Do you want to try contacting the author of the plotter emulator or would you like me to? I'm more than happy to assist in any way I can, I can test whatever you need with my TDS410A. If we can find anyone who has a real Prologix interface that would make it possible to determine exactly how that works. I suppose another option is to try to pool together several people to buy one for testing purposes, I don't think they're hugely expensive, with 5-10 people it would be a small investment to make the open source interface top notch.

Thank you for your willingness to assist and make this "open source interface top notch"! I have sent the John Miles an e-mail with a couple of questions and inviting him to pop by this thread. A comparison with a real Prologix interface to understand its behavior under these circumstances might be useful, but it still doesn't get around the fact that the Tek scope, expecting the plotter to be connected directly to the back of the scope, puts the instrument into talk-only mode which is not an addressed mode. By contrast, the HP8594 expects you to configure a plotter GPIB address and I presume that you can just select 'Plotter addressable at' in the 7470 program and select the GPIB address that matches that configured on the instrument and then Acquire to receive the plot.

From the software side, the 7470A program puts the interface into device mode, which is still an addressed mode. When using "Plotter addressable at.." this would also set the interface address to correspond to the selected GPIB address by sending a ++addr command, which it does. However, since the TDS420 does not have the option to address the interface and is communicating using a non-addressed mode, the interface address becomes irrelevant. In the case of the TDS420, no plot can be sent because the interface, not having been addressed, is not ready to listen. I would be surprised if this were to work even on a real Prologix but I would be interested to hear whether it does or not.

I did expect that when I selected "No assigned plotter address (listen-only)" that this would put the interface into device mode and then select listen-only (LON) mode which would place the interface into non-addressed active listening mode. However, from the serial output capture, that does not seem to be the case. I am hoping that the 7470 program author can shed some light on this.

You could try placing the interface in LON mode manually with:

++mode 0
++lon 1

prior to launching and using the 7470A program. There is a possibility it may time out, but I would be interested to know what happens.

I do have a Prologix interface, but I do not have a Tektronix scope to test it with.
I have found that the Prologix behaves exactly as described in the manual.
I can do simple tests if you tell me what.
Best regards.

Tom, do you have another instrument that can be placed into talk-only mode to send plots?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: KE5FX on March 16, 2020, 07:03:55 pm
I have sent the John Miles an e-mail with a couple of questions and inviting him to pop by this thread.

I replied, but will cc: below as well since others have expressed some interest.  TL,DR: unfortunately I have no insight into either of the questions that have come up (LON mode or the TDS 4xx series).  :(

Quote
Hi, John --

I won't be able to check it out for a week or two, the way things are looking as of today (Monday).   I'm also unable to put much time into support for third-party adapters (meaning other than Prologix/NI488.2 devices), just because there are so many of them.  However, that being said, the truth is that I know very little about the GPIB physical and signaling layers since I've never had to deal with them.  Abdul at Prologix would be better-positioned to address a question like that, but then he probably doesn't want to encourage the competition. :) 

I will say that yes, that's exactly how device mode works in my understanding -- the instrument takes on the role of bus master/controller.  In some cases, the instrument needs to know the adapter's address in order to talk to the emulated 'plotter', and will not work with the adapter configured for listen-only mode.  In other cases, the instrument requires that the adapter is in listen-only mode, without an address of its own.  This has never made any sense to me either, but empirically that's how it seems to work. 

Re: the TDS400 series, sorry, no knowledge of those at all.

(Don't forget that the full source code is there in your installation directory, no need to pore over serial dumps to see what it's doing.)

-- john, KE5FX
Title: Re: AR488 Arduino-based GPIB adapter
Post by: james_s on March 17, 2020, 03:52:52 am
I won't be able to check it out for a week or two, the way things are looking as of today (Monday).   I'm also unable to put much time into support for third-party adapters (meaning other than Prologix/NI488.2 devices), just because there are so many of them.  However, that being said, the truth is that I know very little about the GPIB physical and signaling layers since I've never had to deal with them.  Abdul at Prologix would be better-positioned to address a question like that, but then he probably doesn't want to encourage the competition. :) 

I will say that yes, that's exactly how device mode works in my understanding -- the instrument takes on the role of bus master/controller.  In some cases, the instrument needs to know the adapter's address in order to talk to the emulated 'plotter', and will not work with the adapter configured for listen-only mode.  In other cases, the instrument requires that the adapter is in listen-only mode, without an address of its own.  This has never made any sense to me either, but empirically that's how it seems to work. 

Re: the TDS400 series, sorry, no knowledge of those at all.

(Don't forget that the full source code is there in your installation directory, no need to pore over serial dumps to see what it's doing.)

-- john, KE5FX

Well not being much of a software developer the code is a bit hard for me to follow though I did at least take a look. Now that we've got everyone in the same (virtual) place including someone with a real Prologix adapter it seems there is at least hope of figuring this out. What I know at this point is this: If you press Hardcopy on the TDS420 scope and then execute a ++read on the interface the scope spits out a hardcopy in HPGL that can be rendered in the plotter.

I wonder if the best place to start is to connect a real Prologix interface to the plotter emulator and set it to listen for a plot and see if it asserts the line(s) necessary to tell the scope to start sending.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 17, 2020, 09:55:49 am
Hi,

Quote
I wonder if the best place to start is to connect a real Prologix interface to the plotter emulator and set it to listen for a plot and see if it asserts the line(s) necessary to tell the scope to start sending.

I have an HP8593E SA here, that can send device initiated plots.
I have just hooked up my original Prologix adapter, fired up the 7470.exe, set it up to be a plotter at address 5, told the SA that the plotter address is 5, pressed the w-key in 7470.exe to let it wait for device initiated plots, finally pressed the COPY key on the SA. Doesn't work. The SA brings up an error message "Invalid HPIB Adrs/Operation" and "SQR 140".
This is what's going on at the Prologix com port:
Code: [Select]
++ver
Prologix GPIB-USB Controller version 6.101
++auto
Unrecognized command
++eos 0
++mode 0
++addr 5
++eoi 1
???
Best regards.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: KE5FX on March 18, 2020, 06:22:34 am
Code: [Select]
++ver
Prologix GPIB-USB Controller version 6.101
++auto
Unrecognized command
++eos 0
++mode 0
++addr 5
++eoi 1
???
Best regards.
[/quote]

Hard to say what's up with that.  ++auto isn't an 'unrecognized command'.   Looks like the firmware is out of date (and not even mentioned in the release notes), so I'd try updating it first.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 18, 2020, 07:39:07 am
I don't think the "Unrecognized command" is due to an outdated firmware.
When I manually enter ++auto in the GPIB configurator software I do get an answer.
The command does exist in the firmware.
My firmware is 6.101, the latest is 6.107 of 2013.
I'll try the update tonight but I doubt that this will make a difference.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 18, 2020, 12:34:36 pm
I have updated my Prologix to firmware 6.107, see attached report.
Screencopy experiments at the end of the report. The successful screencopy was initiated by the7470.exe with Prologix in controller mode.
Have I done anything wrong?
Best regards.

P.S. Just found out that the Prologix answers ++auto with "unrecognized command" when in mode 0 = device mode. Still the same after firmware update.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 19, 2020, 12:57:48 pm
I have updated my Prologix to firmware 6.107, see attached report.
Screencopy experiments at the end of the report. The successful screencopy was initiated by the7470.exe with Prologix in controller mode.
Have I done anything wrong?

Tom, thank you for taking the time to post a detailed report of the steps you took. Can I ask whether the printer address on the HP8593 was still set to to 5 (Print Plot Config -> Prn Port Config Plot Port Config: HPIB;  PRINTER PLOTTER ADDRESS: 5; COPY: PLT) ? By default it is apparently set to 1. Just wondering whether it got reset after a power cycle or something?

Regarding the 'No assigned plotter address' mode, I wouldn't expect this to work, but if the interface happens to have been left in device mode with its address set to whatever is configured as the printer address on the 8593 (e.g. 5) , then it just might... In this mode ideally, the instrument needs to be placed into talk-only mode, but I don't see such an option in the manual.

If the printer address on the 8593 was definitely set to 5 and still no result, then there is another test we could do. Connect either the Prologix or Arduino interface to the 8593. Set the 8593 with printer address 5, and set the GPIB controller to address 5. Connect to the GPIB interface with a terminal and issue the following commands:

++mode 0
++addr 5

Now try pressing the Screencopy button. Do you get any data come through? Test the other interface to see whether you get the same response.

Next, (you will need to use the Arduino interface for this) enable DEBUG5 in AR488_Config.h and compile and upload the firmware. Do the same test as above, but capture the result. This should show some additional numeric information. If you could then upload the result in a file here, it will give us some idea what commands the instrument is sending.

P.S. Just found out that the Prologix answers ++auto with "unrecognized command" when in mode 0 = device mode. Still the same after firmware update.

Tom, that's a good spot and explains why the same was happening with my firmware. The Prologix manual confirms that the ++auto command is valid only in controller mode. If the adapter gets left in mode 0 after the previous operation, then we can expect such a response from the ++auto command. I think we can safely ignore this error as not relevant to the issue.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: KE5FX on March 19, 2020, 08:43:50 pm
I don't know if it's relevant with the 8593A, but all this talk of "printer addresses" makes me wonder if it's set up for plotter output or printer output.  You need to make sure it's set up for plotter output, if there's a choice.  There is some support for a couple of printer formats in 7470 but it's not well-tested (at least by me) and may not behave as expected.

The code always sets up ++auto 0 or ++auto 1 based on whether the application calls for device mode or controller mode, but it sends a ++auto query in both cases, as observed above.  Arguably I shouldn't be doing that if the adapter is being used in device mode.  I'll tweak the GPIB_connect() code to set up auto-read mode only if device_address is valid (i.e., if we're using controller mode).  Will also enable ++lon transmission for the listen-only case in device mode, on adapters where the firmware supports it.  The only problem is that I'm perilously short on time for regression testing right now...
Title: Re: AR488 Arduino-based GPIB adapter
Post by: james_s on March 19, 2020, 10:59:56 pm
Well I'm happy to do some regression testing on a build, I have a HP 8594E and a handful of Tek scopes, TDS300, TDS400, TDS700 and TDS3000, all with GPIB. Pretty sure the 3000 only supports printers but I know for sure the 400 supports plotters and the 8594E works perfectly to plot with the current software.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: texaspyro on March 20, 2020, 03:38:41 am
There is some support for a couple of printer formats in 7470 but it's not well-tested (at least by me) and may not behave as expected.

I wrote the code that 7470 currently uses for drawing.   The HPGL renderer works rather well.   I have compared its' abiilty to render HPGL drawings against around a dozen different HPGL renderers, most of which are rather crappy.  Only 7470 and the HPGLVIEW renderer from CERN seem to be at least mostly OK.  HPGL is not all that well defined and almost every HPGL device outputs stuff that does not meet the spec.  The 7470 code has a lot of special case tweaks for getting around the quirks generated by a lot of test equipment. 

There is also code for drawing PCL format printer output, but it is rather limited.  The PCL spec defines several different encoding/compression formats.   The 7470 PCL code only uses a couple of the more common / simple formats.  I have only really tested it with HP-165xx logic analyzers.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: james_s on March 20, 2020, 05:58:48 am
It does indeed work very well, and I appreciate this being created and released to the public. I can manually coerce the TDS410 into spitting out the HPGL which I can then save into a text file and load it up in the plotter emulator and it renders perfectly so the problem is just getting the emulator to convince the scope to start sending the data.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: KE5FX on March 20, 2020, 08:57:16 am
Well I'm happy to do some regression testing on a build, I have a HP 8594E and a handful of Tek scopes, TDS300, TDS400, TDS700 and TDS3000, all with GPIB. Pretty sure the 3000 only supports printers but I know for sure the 400 supports plotters and the 8594E works perfectly to plot with the current software.

Have at it (http://www.ke5fx.com/gpib/readme.htm) :)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 20, 2020, 09:35:24 am
I don't know if it's relevant with the 8593A, but all this talk of "printer addresses" makes me wonder if it's set up for plotter output or printer output.  You need to make sure it's set up for plotter output, if there's a choice.  There is some support for a couple of printer formats in 7470 but it's not well-tested (at least by me) and may not behave as expected.

Thanks for pointing this out. I have updated my post #396...

The code always sets up ++auto 0 or ++auto 1 based on whether the application calls for device mode or controller mode, but it sends a ++auto query in both cases, as observed above.  Arguably I shouldn't be doing that if the adapter is being used in device mode.  I'll tweak the GPIB_connect() code to set up auto-read mode only if device_address is valid (i.e., if we're using controller mode).  Will also enable ++lon transmission for the listen-only case in device mode, on adapters where the firmware supports it.  The only problem is that I'm perilously short on time for regression testing right now...

Thanks for being willing to do this.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 20, 2020, 09:48:07 am
James, just wondering whether you have been able to try my suggestion in post #389, i.e. placing the interface in LON mode manually prior to launching and using the 7470 program? You can do this with the following commands:

++mode 0
++lon 1

I would be interested to know whether that allows the TDS420 to communicate with the interface. If you first connect to the interface with a terminal, then you should see some output without having to enter a ++read command. If that works, then try and connect with the 7470 program with the 'No assigned plotter address'  option. There is a possibility that it may take a while or time out as entering commands while in LON mode is a bit slow, but I would be interested in whether it works in principle.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 20, 2020, 04:06:03 pm
Hi,

I have repeated the tests with the HP8593E and found that I previously made a stupid mistake. The plotter address was set to 5 but the instrument was configured for printer out. Now, having changed the instrument to plotter out I get encouraging results:

1. Original Prologix adapter + 7470.exe:
Instrument initiated plots work flawlessly now.

2. AR488 USB version 0.48.08 + 7470.exe:
Data is coming in in chunks, the plot builds up, but at the end of plotting 7470.exe crashes with error message "GPIB error, Read Error: 0x2 (communications error)".
On closing the error message window, 7470.exe closes also.
After this, the AR488 is no longer responding, it has to be power-cycled. So, the firmware seems to hang at the end of the received data.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 20, 2020, 04:25:55 pm
Have tried Debug5 on the AR488 side.
See attachnment. With a terminal this works repeatedly, no hang.
Hang only occurs with the 7470.exe.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 20, 2020, 04:26:42 pm
Hi,

I have repeated the tests with the HP8593E and found that I previously made a stupid mistake. The plotter address was set to 5 but the instrument was configured for printer out. Now, having changed the instrument to plotter out I get encouraging results:

1. Original Prologix adapter + 7470.exe:
Instrument initiated plots work flawlessly now.

2. AR488 USB version 0.48.08 + 7470.exe:
Data is coming in in chunks, the plot builds up, but at the end of plotting 7470.exe crashes with error message "GPIB error, Read Error: 0x2 (communications error)".
On closing the error message window, 7470.exe closes also.
After this, the AR488 is no longer responding, it has to be power-cycled. So, the firmware seems to hang at the end of the received data.

Thanks for the report and additional dump data which I will have a look at.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: james_s on March 20, 2020, 06:00:19 pm
James, just wondering whether you have been able to try my suggestion in post #389, i.e. placing the interface in LON mode manually prior to launching and using the 7470 program? You can do this with the following commands:

++mode 0
++lon 1

I would be interested to know whether that allows the TDS420 to communicate with the interface. If you first connect to the interface with a terminal, then you should see some output without having to enter a ++read command. If that works, then try and connect with the 7470 program with the 'No assigned plotter address'  option. There is a possibility that it may take a while or time out as entering commands while in LON mode is a bit slow, but I would be interested in whether it works in principle.

I have not, I've been busy with work this week but I should have a chance to do that this weekend.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: KE5FX on March 20, 2020, 08:53:13 pm
I have repeated the tests with the HP8593E and found that I previously made a stupid mistake. The plotter address was set to 5 but the instrument was configured for printer out. Now, having changed the instrument to plotter out I get encouraging results:

Not stupid at all, very common and easy to overlook (which is why I mentioned it!)  Been there, done that...

Quote
1. Original Prologix adapter + 7470.exe:
Instrument initiated plots work flawlessly now.

Host-requested plots should work as well, with the analyzer in addressable or talk/listen mode (typically at address 18).

Running the analyzer in addressable mode has the substantial advantage that you can use SSM as well as 7470.  In general, you want to use device-initiated plots only on instruments that don't have support for host-requested plots (or if your adapter supports only device mode.)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 21, 2020, 08:29:33 am
Hi John,
I have done host requested plots with 7470.exe for years. That's what I bought the Prologix for. This also works flawlessly with the AR488, except for the Bluetooth delay issue that we had discussed before. This thread just made me curious if device initiated plots work, too. And, yes, if you do it right it works. Prologix + 7470.exe works fine, but the AR488 crashes on that.
Best regards,
Tom
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 23, 2020, 10:21:23 pm
I have been working on setting up a test fixture to emulate a device sending a plot over GPIB. I have one interface on the GPIB bus in controller mode to act as the 'device' and a second in device mode to act as the receiver.  I have written a python script to read one of the plot files supplied with KE5FX GPIB tools and to send its data via the controller interface over GPIB to the one acting as receiver in device mode. The idea is to emulate an instrument initiated plot, presently using addressed mode as per the HP8519. Since we are sending binary data via serial, the python script takes care of escaping the necessary characters as well.  For now, I am observing the output on the receiving end with a terminal program rather then the 7470 program, but a couple of problems have come to light. Having first overcome some difficulty with the python script due to the way that Arduino resets itself when a connection is made to its serial port, I am now working on them and making some progress. I am therefore hopeful that the problem with the HP8591 device initiated plot will be resolved fairly soon.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 26, 2020, 12:03:35 pm
It seems that at the receiving end, these there are least these two issues:

1. The HP plot file contains CRLF sequences which are being interpreted as line terminators
2. In device mode there is currently no way of reading with EOI signal as terminator

Both of these factors mean that the plot data is being broken up by unexpected "terminators".  I have uploaded a test release which is an attempt to fix these tow issues here:

https://github.com/Twilight-Logic/AR488/blob/master/src/test/AR488.test.20200226.zip

There also seems to be a problem in using an Arduino as a test fixture to send the plot data which I suspect is related to the fact that there is no handshake control on boards with the CH340 chip. From the GPIB trace it would appear that chunks of data are missing when "large" volumes of data (presumably exceeding the 128 byte buffer size) are sent consecutively without pause, although what is actually getting sent over GPIB is being received on the receiving interface in device mode. This makes it rather difficult to test the transmission of the plot properly. Sending a plot directly from an instrument would avoid this particular problem so I am hoping that the linked version will now work for HP8591.

It would be appreciated if someone could test it for me.
I need to  get myself an instrument that can display plots! Its a shame that my PM3094 does not have GPIB.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: kc9qvl on March 28, 2020, 06:09:26 am
Got it working with a Fluke 8840a  :)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 28, 2020, 01:18:04 pm
Hi,
I have just tested the new version 0.48.10, unfortunately no improvement, rather the opposite.
I have used the HP8593E to send instrument initiated plots to the adapter configured as plotter on address 5 by 7470.exe.
While 0.48.08 does receive plot data which 7470.exe does display (but the adapter stalls at the end and no longer responds to commands), 0.48.10 does not receive any data from the instrument.
For reference I have logged com port traffic of 0.48.08 and a real Prologix on this test, see attachment.
This is all the traffic going on with 0.48.10:
Code: [Select]
++ver
Prologix GPIB-USB Controller version 6.100
++auto
0
++auto 1
++eos 0
++mode 0
++addr 5
++eoi 1
Best regards.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 28, 2020, 05:32:16 pm
Tom, thanks for trying. I was rather puzzled that you got no data at all when using version 0.48.10 as in my tests I was able to receive data with both versions but 0.48.10 did not crash. However, 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 support which will be a problem since, if I recall, you have a 32U4 board? If that is the case then I apologise. Have a look at the AR488_Config.h file and if necessary change the line:

#define SN7516X

to this:

//#define SN7516X

I also noticed realised that I hadn't set the Mega2560 layout option back to default, but that should not affect the 32U4. I have updated the AR488_Config.h and uploaded the ZIP archive again.

It is also possible (and probably likely) that my setup does not accurately replicate the operating conditions with a real instrument and that therefore some aspect of the transmission process has been overlooked. Its a bit tricky working "blind" like this so in that case, please bear with me. I did see a TDS420A on eBay for around 200GBP, but it looked rather battered. I can't afford or justify the HP8591 at this time but I will do my best to get this working if possible.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: grizewald on March 29, 2020, 10:37:39 am
Can someone help me to keep the remaining hair that I have? I'm having a problem with an Agilent 34401A which is rapidly leading to me tearing my remaining hair out.

I've been using my AR488 to great effect running logging from my Solartron 7061. Having recently acquired an Agilent branded 34401A, I wanted to experiment with logging voltage readings from that.

I have a shell script which I use to handle the communication to and from the AR488 and also fetch data about temperature and humidity to combine with the readings from the meter. This script has been working perfectly with the 7061. So, I read through the 34401A's manual and set the meter to read voltage via the SCPI commands. I issue the following commands:

"++addr 7"
"*RST"
"*CLS"
"CONF:VOLT:DC 10, MAX"
"VOLT:DC:NPLC 10"
"INP:IMP:AUTO ON"
"++auto 2"

I can then enter a loop and issue "READ?" commands and receive a result back for each READ?

So far, so good.

Then I change just one tiny thing:
"VOLT:DC:NPLC 10" -> "VOLT:DC:NPLC 100"

With 100 NPLC, READ? returns me nothing at all.

I'm obviously missing something about how the 34401A works, but I can't for the life of me figure out what it is. Has anyone else managed to get readings at 100 NPLC over the GPIB interface?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: grizewald on March 29, 2020, 11:05:47 am
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.

 |O
Title: Re: AR488 Arduino-based GPIB adapter
Post by: T3sl4co1l on March 29, 2020, 11:53:26 am
Heh, I noticed that with my TDS460 in plot (HPGL) mode -- it seems to take a few seconds to think, from time to time, and at first I had to issue repeated +read's to get everything.  Duh, it was just timing out. :)

Tim
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 29, 2020, 01:02:52 pm
Hi John,
Quote
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
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 29, 2020, 02:25:17 pm
Hi John,
I have played with my logic analyzer and indeed, you should be able to look at the traces.
I am running the Saleae Software "Logic 1.2.18", see here: https://www.saleae.com/de/downloads/ (https://www.saleae.com/de/downloads/).
Attached two traces for comparison, one with the original Prologix adapter, the other with the AR488 v0.48.10.
Both show an instrument initiated plot sequence.
This is what I did:
1. I put 7470.exe to listen to address 5.
2. I started capturing (no triggers used)
3. About 1 second after start of capture I pressed the copy button on my HP8593E.
So, both traces should include this communication between PC and adapter, but of course only show the GPIB bus side of it:
Code: [Select]
OP;
  250,279,10250,7479
PU;SP1;LT;;PU;PA80,7096;PD...
  ++auto 0
  ++loc
  ++ver
Prologix ...
Indented traffic is from PC to adapter.

Interesting first observation: After 7470 sends the OP-coordinates, the Prologix answers a lot quicker (few seconds) than the AR488 (about 10s) with the plot data. May there be a timeout in play?
Pin assignment is shown in the logged traces. Hope you can learn something from my data.
Best regards, Tom
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 29, 2020, 03:33:05 pm
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.

 |O

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,
Quote
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.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: grizewald on March 30, 2020, 09:30:06 am
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.

 |O

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.


Yeah, I'm a little puzzled by that as well.

I think I need to experiment with the ++eor command as I suspect that readings are being delayed until the ++read_tmo_ms timeout expires. My initial problem was caused by the default timeout being shorter than the reading time, so I set it very high to allow plenty of time for the result to arrive, hoping that when the reply arrived, it would be sent back immediately.

The meter's documentation says nothing about what characters it uses to signify the end of a transmission or whether it uses the EOI line for this.




Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 30, 2020, 11:02:53 am
I think I need to experiment with the ++eor command as I suspect that readings are being delayed until the ++read_tmo_ms timeout expires. My initial problem was caused by the default timeout being shorter than the reading time, so I set it very high to allow plenty of time for the result to arrive, hoping that when the reply arrived, it would be sent back immediately.

The read_tmo_ms parameter specifies how long to wait for data to arrive so it its timing out then nothing is arriving, but your suspicion could be correct if it is waiting for the preceding command to finish. Out of curiosity, have you allowed for a delay after "*rst" to allow time for the instrument to reboot?

The meter's documentation says nothing about what characters it uses to signify the end of a transmission or whether it uses the EOI line for this.

Having had a look through the manual myself I tend to agree. I also found very little information regarding this subject and no actual mention of EOI with reference to the signal line. I did find a section called "Output data formats" at the bottom of page 159 which seems to suggest that a combination of CR and NL are used depending on whether single or multiple results are returned but that was about all. Perhaps it is not neccessary with SCIP sequences so is not implemented? Maybe someone on the Keysight forum will be able to provide that answer.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 30, 2020, 11:24:08 am
Interesting first observation: After 7470 sends the OP-coordinates, the Prologix answers a lot quicker (few seconds) than the AR488 (about 10s) with the plot data. May there be a timeout in play?
Pin assignment is shown in the logged traces. Hope you can learn something from my data.
Best regards, Tom

Tom, I had a look at the traces this morning and thank you for providing them. As you point out, it is evident that the Prologix trace shows the plot data being sent within a couple of seconds whereas with the AR488 there is a gap of about 8 seconds. I did also note a couple of small differences, for example the Prologix trace has an additional EOI pulse just before the plot data begins. I'm not sure as to the reason for this at the moment nor can I be sure whether its being generated by the Prologix or the instrument, but I suspect the latter.

I noticed this response from Tim:

Heh, I noticed that with my TDS460 in plot (HPGL) mode -- it seems to take a few seconds to think, from time to time, and at first I had to issue repeated +read's to get everything.  Duh, it was just timing out. :)

Tim

Could I therefore ask whether that delay is consistent or just occasional?

I also did a test with the 32u4 and found that it worked fine. After setting an appropriate version string, there were no issues with the 7470 program being able to recognize the interface as I encountered with the Uno. Once the version string is set to something appropriate, the 7470 program recognizes it without a problem. The steps I used are as follows:


Finally, if the red banner appears again, press "Press any key to return to display mode". It times out after a while anyway.

Could I confirm that you are using the same procedure?

It could be that the instrument is doing something different to my test method which is not being accounted for so I plan to study the traces further and well as capture some traces from my test fixture for comparison.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: grizewald on March 30, 2020, 11:35:46 am

The read_tmo_ms parameter specifies how long to wait for data to arrive so it its timing out then nothing is arriving, but your suspicion could be correct if it is waiting for the preceding command to finish. Out of curiosity, have you allowed for a delay after "*rst" to allow time for the instrument to reboot?

Yes, there's a two second delay after sending the *RST command.

When the AR488 code is waiting for a reply, I assume it is looking for the character(s) or signal specified by ++eor to decide when to send the contents of the buffer back through the serial port. Is that correct? If so, then I'm assuming that the result is already received on the Arduino, but because the terminator hasn't been detected yet, the buffer won't be sent until either the terminator arrives, or the timeout expires.

I'm basing this guess on the fact that my readings appear to be spaced out in read_tmo_ms increments. If my guess is wrong, please let me know!

Finding anything specific about how the meter uses GPIB is virtually impossible as any search string with "34401A" in it returns acres of irrelevant results from vendor sites and online copies of the manuals.  |O Your suggestion of going to the Keysight forum and asking there is probably the best idea.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 30, 2020, 12:15:26 pm
Hi John,
Quote
Could I therefore ask whether that delay is consistent or just occasional?
It is consistent and happens every time, also loss of contact after having received the plot data happens every time.

Quote
    File => clear all visible plots
    GPIB => Plotter addressable at 5
    Acquire => Wait for device-initiated plot
    wait for the RED "Reading data from instrument..." banner to appear
    send the plot
    wait for the plot to appear
Yes, I am using exactly the same procedure.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 30, 2020, 12:17:25 pm
When the AR488 code is waiting for a reply, I assume it is looking for the character(s) or signal specified by ++eor to decide when to send the contents of the buffer back through the serial port. Is that correct? If so, then I'm assuming that the result is already received on the Arduino, but because the terminator hasn't been detected yet, the buffer won't be sent until either the terminator arrives, or the timeout expires.

I'm basing this guess on the fact that my readings appear to be spaced out in read_tmo_ms increments. If my guess is wrong, please let me know!

While receiving for a reply from GPIB, characters are not buffered. Characters are sent immediately to the serial port. Detection of the terminator is used only to identify the end of the transmission. Just having another look at "Output data formats" table on page 159 of the 34401 user manual, it would appear that transmission over IEEE488 is terminated with NL only. If the interface is looking for a CR+NL sequence, it won't find one and the timeout period will follow every reading, the result would be that responses to multiple "read?" commands will be spaced out by the timeout period as you describe. It might indeed be worth trying ++eor 2 so that the interface looks for NL only as a terminator.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 30, 2020, 12:44:56 pm
Hi John,
Quote
Could I therefore ask whether that delay is consistent or just occasional?
It is consistent and happens every time, also loss of contact after having received the plot data happens every time.

That is interesting and I will investigate this further. Could you confirm the ++read_tmo_ms values you have set on the Prologix vs the AR488?

Quote
    File => clear all visible plots
    GPIB => Plotter addressable at 5
    Acquire => Wait for device-initiated plot
    wait for the RED "Reading data from instrument..." banner to appear
    send the plot
    wait for the plot to appear
Yes, I am using exactly the same procedure.

Thanks for confirming that. Since you have a Prologix and this works, I wonder whether you could send a plot using the Prologix to the 7470 program and save the result to a file? Then attach the file here. My intention is to embed the file content (provided it is not too big) into the sketch and run the tests again. That way, I would be sending exactly the same data as your instrument.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 30, 2020, 12:49:06 pm
Quote
I wonder whether you could send a plot using the Prologix to the 7470 program and save the result to a file?

Yes, I can do. What exact data would you like? I can save the 7470.exe output to file. But I have noticed that this is not necessarily what the instrument sends.
The 7470.exe apparently corrects some oddities.

You already have two instrument output examples in the com port PDF logs that I have uploaded earlier, both in ASCII and hex format.
Good enough?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 30, 2020, 12:53:57 pm
Quote
I wonder whether you could send a plot using the Prologix to the 7470 program and save the result to a file?

Yes, I can do. What exact data would you like? I can save the 7470.exe output to file. But I have noticed that this is not necessarily what the instrument sends.
The 7470.exe apparently corrects some oddities.

You already have two instrument output examples in the com port PDF logs that I have uploaded earlier, both in ASCII and hex format.
Good enough?

Fair comment and yes, I could use the data from one of the PDF files as a starting point but the drawback is that it is not possible to determine whether and where any unusual or non-printable characters (e.g. CR, LF ESC and others) appear in the output. I also didn't realize that the 7470 program may be modifying the received data so saving a plot to a file might also inadvertently hide something. What software are you using to capture the serial port? I was thinking to obtain just a standard single plot from your 8591 instrument, but ideally an exact hex representation of the captured data. If your serial capture tool can do that it would be useful. However, I will first try one of the example plots in the KE5FX software directory.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: grizewald on March 30, 2020, 01:11:50 pm
While receiving for a reply from GPIB, characters are not buffered. Characters are sent immediately to the serial port. Detection of the terminator is used only to identify the end of the transmission. Just having another look at "Output data formats" table on page 159 of the 34401 user manual, it would appear that transmission over IEEE488 is terminated with NL only. If the interface is looking for a CR+NL sequence, it won't find one and the timeout period will follow every reading, the result would be that responses to multiple "read?" commands will be spaced out by the timeout period as you describe. It might indeed be worth trying ++eor 2 so that the interface looks for NL only as a terminator.

Thanks for that. I'm fairly sure that my read from the serial port in my script won't return a line to me until the line itself is terminated with a newline character, so I think I have enough clues to perform some experiments later on.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 30, 2020, 03:04:14 pm
Tom, I managed to encode one of the example plots (file 'HP 8591EM.plt') into the sketch. Had to write a small script to read the file and export the bytes to a hex representation of the data. I then copied and pasted the exported result directly into the sketch, compiled, uploaded and ran the test to send the data over GPIB. The 7470 program had no problem with reading the resulting plot (see the attached). It is possible, of course, to just load up the example file into 7470 program, but this was, in fact, sent from one AR488 to another over GPIB and captured from the receiving AR488 by the 7470 program.

I also realized that your PDF does actually contain the data in hex further below the text dump so I spent a little time manually extrapolating this into a file and formatting it so that it could be copied into and used by the sketch. As you can see in the second attachment, after doing this and sending your data over GPIB, the plot was successfully received.

It would appear then, that neither particular characters nor the size of the data is the issue. There must be some other factor.

Since I have observed with my own setup that USB hubs can cause problems, might I ask whether your 32u4 is connected via a USB hub? Have you tried connecting it directly into the PC? It seems unlikely given that the Prologix works, but just want to rule it out. BTW, are you still using the HC06 to wirelessly connect the Arduino to the PC, or is it directly connected via USB cable?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: grizewald on March 30, 2020, 03:29:39 pm
Thanks for the help Wavey.

I reset the adapter to defaults and then set:

++read_tmo_ms 5000
++eor 2
++eot_char 10
++eot_enable 1

in the setup part of my script.

I now have data coming back from the 34401A at full speed!

 :-+
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 30, 2020, 03:51:42 pm
Thanks for the help Wavey.

I reset the adapter to defaults and then set:

++read_tmo_ms 5000
++eor 2
++eot_char 10
++eot_enable 1

in the setup part of my script.

I now have data coming back from the 34401A at full speed!

 :-+

I don't think that ++eot_char and ++eot_enabled should have been necessary as the NL character present in the data stream from the instrument will be passed to serial anyway but I'm glad it worked. That seems to the the second scenario where the custom ++eor command appears to have helped. I will make a note that it may be useful for this instrument.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: grizewald on March 30, 2020, 04:21:20 pm
I don't think that ++eot_char and ++eot_enabled should have been necessary as the NL character present in the data stream from the instrument will be passed to serial anyway but I'm glad it worked. That seems to the the second scenario where the custom ++eor command appears to have helped. I will make a note that it may be useful for this instrument.

I agree that they probably are not needed, but I've always been a belt and braces guy when it comes to software development, so it's a habit that I don't try to get out of. :)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: serg-el on April 06, 2020, 09:46:38 pm
https://radiokot.ru/forum/viewtopic.php?p=3815540#p3815540 (https://radiokot.ru/forum/viewtopic.php?p=3815540#p3815540)

I remade this project a bit.

 Under ARDUINO UNO with ATmega328 installed.
 There are boards with already divorced pins A6, A7, but there are places where you need to solder to the legs of the microcircuit.

 Used the latest version of ver.  0.48.08, 27/01/2020.

 Added two LM35 temperature sensors.
 There is both hardware filtering and software filtering.


 ++ temp -> temperature 1
 ++ temp2 -> temperature 2

 To reduce interference, the LM35 is connected via an RC circuit of 10 kΩ, 0.1 μF.
 Software adjusted value.  Measured lower and higher by about 0.5 ° C compared to Pt1000.

(http://img.radiokot.ru/files/98285/thumbnail/25q4201qfg.jpg) (http://img.radiokot.ru/files/98285/25q4201qfg.jpg)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 07, 2020, 11:52:53 am
Thank you for posting that. That must have taken some delicate surgery!

This prompted me to have a look at the datasheet for the 328p and I discovered also that it has a built-in temperature sensor (section 24.8, p 256) via ADC8 so one could possibly also log the temperature of the chip if one wanted.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: 2N3055 on April 07, 2020, 12:31:13 pm
Thank you for posting that. That must have taken some delicate surgery!

This prompted me to have a look at the datasheet for the 328p and I discovered also that it has a built-in temperature sensor (section 24.8, p 256) via ADC8 so one could possibly also log the temperature of the chip if one wanted.
Built in temperature sensor is a joke, together with built in voltage reference...
You can use built in temp sensor to look at gross trends but not much more than that.
External temp sensors ar not that expensive..
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on April 07, 2020, 12:50:55 pm
Hi John,
Quote
Since I have observed with my own setup that USB hubs can cause problems, might I ask whether your 32u4 is connected via a USB hub? Have you tried connecting it directly into the PC? It seems unlikely given that the Prologix works, but just want to rule it out. BTW, are you still using the HC06 to wirelessly connect the Arduino to the PC, or is it directly connected via USB cable?

No, no hub here. Also no wireless connection. USB directly plugged into the notebook USB port.

And I made one more experiment:
To make sure the issue is not related to the USB CDC port, I switched over to using the Leonardo hardware serial port (RXO, TXI lines) instead and hooked it up to a CH340 USB to serial converter, also directly plugged into the PC.
The behavior is exactly the same as with CDC. Host initiated plots transfer just fine. Instrument initiated plots initially start with the already discussed delay of about 10s and when the transfer is complete, the AR488 no longer reacts to commands like ++ver and 7470.exe crashes. Disconnecting from the GPIB bus is not enough to recover communication, only a power cycle will do the job.
So, this appears to be not some kind of "dirt effect" but a real firmware problem.

Can you think of any more test I can do and any more data I can gather to help you fix this?
Anything to be learned from AR488 debug output? Is it possible to run in over the CDC USB port but log the debug output over the hardware port to keep the streams separated and avoid debug data to interfere with normal operation?

Best regards.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on April 07, 2020, 02:15:14 pm
Hi John,
I have started playing with your ESP8266 firmware again and I'm having troubles:
0.04.06 which does not have SSL yet works fine in both AP and Client mode.
0.04.11 with SSL works well in AP mode (have tested this before, now I know I have to enter https:// :-) ), but when I switch it to Client mode it won't connect to my home AP, but fall back to AP mode.
Any hints or any test I can do?
Best regards, Tom
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 10, 2020, 06:16:07 pm
Thank you for posting that. That must have taken some delicate surgery!

This prompted me to have a look at the datasheet for the 328p and I discovered also that it has a built-in temperature sensor (section 24.8, p 256) via ADC8 so one could possibly also log the temperature of the chip if one wanted.
Built in temperature sensor is a joke, together with built in voltage reference...
You can use built in temp sensor to look at gross trends but not much more than that.
External temp sensors ar not that expensive..

Thank for the perspective. I only noted from the datasheet that it was there but given how cheap the chip is didn't expect it to be particularly accurate or serving any practical purpose other than showing the temperature of the 328p chip.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 10, 2020, 07:02:41 pm
To make sure the issue is not related to the USB CDC port, I switched over to using the Leonardo hardware serial port (RXO, TXI lines) instead and hooked it up to a CH340 USB to serial converter, also directly plugged into the PC.
The behavior is exactly the same as with CDC. Host initiated plots transfer just fine. Instrument initiated plots initially start with the already discussed delay of about 10s and when the transfer is complete, the AR488 no longer reacts to commands like ++ver and 7470.exe crashes. Disconnecting from the GPIB bus is not enough to recover communication, only a power cycle will do the job.
So, this appears to be not some kind of "dirt effect" but a real firmware problem.

Can you think of any more test I can do and any more data I can gather to help you fix this?
Anything to be learned from AR488 debug output? Is it possible to run in over the CDC USB port but log the debug output over the hardware port to keep the streams separated and avoid debug data to interfere with normal operation?

Best regards.

Tom, thanks for confirming you are not using wireless of any kind. Your test was a good idea and shows that the problem is not the serial transmission method neither CDC nor UART. I have been back to those LA traces you provided and they don't show any interference on the GPIB bus wires. The trace is near identical to the Prologix. You also mentioned a few posts back that it seemed to work OK in terminal and you provided a terminal capture to show that.

Following on from that, I would like to confirm that you ran the Prologix GPIB Configurator (prologix.exe) supplied with the KE5FX tools and whether it detected the AR488 interface? Also, after successful detection, did you click the 'Update CONNECT.INI' button to save the detected settings (or else manually edited the file via 'Edit CONNECT.INI')? I think you said this worked OK with the Prologix so you may have done this at least once,  but since the Prologix and AR488 would present on different COM ports, the CONNECT.INI would need updating each time the interfaces are swapped or you wanted to switch between them. Apologies if you have already provided this info although I couldn't see it while scanning back through the discussion. I'm still not ruling out a firmware problem, but would like to eliminate the possibility that the 7470.exe program is not communicating with the intended serial port from the equation.

Is it possible to run in over the CDC USB port but log the debug output over the hardware port to keep the streams separated and avoid debug data to interfere with normal operation?

Not at present, but its an excellent idea and I will add this as a feature.

In the meantime, all debug levels as well as ++verbose must be turned off (debug by commenting out in the sketch) otherwise as you point out, they will interfere with the correct delivery of the plot.

Hi John,
I have started playing with your ESP8266 firmware again and I'm having troubles:
0.04.06 which does not have SSL yet works fine in both AP and Client mode.
0.04.11 with SSL works well in AP mode (have tested this before, now I know I have to enter https:// :-) ), but when I switch it to Client mode it won't connect to my home AP, but fall back to AP mode.
Any hints or any test I can do?
Best regards, Tom

This is curious since the code for connecting to and configuring WiFi is identical in both versions - it has not changed. The only difference in in the firmware is that the latter has SSL capability added to the webserver, but this should not impact being able to connect to a WiFi router.

I have a couple of suggestions:

1. In version 0.4.11, comment out the following section (lines 847 - 849):

Code: [Select]
#ifndef DISABLE_SSL
  configTime(3 * 3600, 0, "pool.ntp.org", "time.nist.gov");
#endif

2. If that does not make any difference, then compile with DEBUG_0 and DEBUG_1 enabled in the sketch as well as with enabling Debug in the Ardiono IDE (set Tools => Debug Port: to your serial port ) and set Debug Level to "wifi". Open the Serial Monitor which should generate some output including after you after you hit 'Apply' on the WiFi configuration page. Let me have a copy of that output.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on April 11, 2020, 08:19:13 am
Hi John,

Quote
Following on from that, I would like to confirm that you ran the Prologix GPIB Configurator (prologix.exe) supplied with the KE5FX tools and whether it detected the AR488 interface?


Yes, I did and it has worked as intended.

Quote
Also, after successful detection, did you click the 'Update CONNECT.INI' button to save the detected settings (or else manually edited the file via 'Edit CONNECT.INI')? I think you said this worked OK with the Prologix so you may have done this at least once,  but since the Prologix and AR488 would present on different COM ports, the CONNECT.INI would need updating each time the interfaces are swapped or you wanted to switch between them. Apologies if you have already provided this info although I couldn't see it while scanning back through the discussion. I'm still not ruling out a firmware problem, but would like to eliminate the possibility that the 7470.exe program is not communicating with the intended serial port from the equation.

I did update connect.ini. This is not the issue. 7470.exe DOES receive plot data from the AR488 and display it, but at the end of an instrument initiated plot, the AR488 apparently gets into an endless loop where it no longer responds to COM commands and thus 7470.exe terminates with an error message. By looking at debug messages it should be possible to find out in which part of the firmware code the AR488 gets stuck. What should I look out for?
Btw, is the AR488 com port interrupt driven or is it polled in the main loop?

Thanks for the hints on the ESP8266 firmware. Hope to try these out over the weekend.
Best regards,
Tom
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on April 11, 2020, 02:17:43 pm
Btw, is the AR488 com port interrupt driven or is it polled in the main loop?


For the hardware serial port I believe it has a small (16 byte) buffer which is filled by an interrupt handler. It has to be emptied by user code in the main loop.

This may (probably does) differ for the simulated uart over USB.
 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on April 12, 2020, 03:38:38 pm
Hi John,

Quote
1. In version 0.4.11, comment out the following section (lines 847 - 849):

This has indeed helped, many thanks. Now, I get a stable connection in client mode, both with dynamic and static IP.
Is the time server causing trouble by responding too slowly?
Maybe a software switch to disable this feature would be useful.

Best regards,
Tom
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 12, 2020, 07:50:51 pm
I did update connect.ini. This is not the issue. 7470.exe DOES receive plot data from the AR488 and display it, but at the end of an instrument initiated plot, the AR488 apparently gets into an endless loop where it no longer responds to COM commands and thus 7470.exe terminates with an error message. By looking at debug messages it should be possible to find out in which part of the firmware code the AR488 gets stuck. What should I look out for?
Btw, is the AR488 com port interrupt driven or is it polled in the main loop?

Thanks for confirming these aspects of the setup and for clarifying the extent of the problem. I had thought that the AR488 was not responding at all for an instrument initiated plot so my apologies for having mis-understood this. Since the plot data IS being received and displayed, the hang up at the end is most likely to be caused by the receive loop not terminating. The 32u4 does not support SerialEvent, so the serial port is polled in the main loop. Having access to the serial interrupt on some boards allows a number of characters to be moved to the command processing buffer in the background, but either way any GPIB transmission in progress must complete before further command processing can continue.

I would suggest enabling DEBUG7 and I would be looking at whether the loop stops as indicated by an 'After loop' output and the value of tranBrk. Theoretically, if an EOI has not been received, the loop should terminate after a timeout, but perhaps this is not happening.

Hi John,

Quote
1. In version 0.4.11, comment out the following section (lines 847 - 849):

This has indeed helped, many thanks. Now, I get a stable connection in client mode, both with dynamic and static IP.
Is the time server causing trouble by responding too slowly?
Maybe a software switch to disable this feature would be useful.

Best regards,
Tom

Thanks for confirming that. The time server seems to be crashing and causing the module to fallback to its designed failsafe mode, which is to revert back to AP mode with default settings. At this time, I am not sure what is making it crash, but I am going to implement NTP time using a different approach using time.h which is now provided with the ESP8266/ESP32 library. Time is only really relevant when the ESP8266 is operating in client mode, connected to a router with Internet access and using SSL. This is because SSL certificates are time sensitive. NTP may also be relevant if time stamped log data is required, in which case, I agree it might be worthwhile having the option to turn timestamps on and off for logging purposes and to configure the desired NTP server to connect with and even perhaps adding in an RTC as a time source.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on April 14, 2020, 07:38:02 am
Hi John,
Quote
I would suggest enabling DEBUG7 and I would be looking at whether the loop stops as indicated by an 'After loop' output and the value of tranBrk.
I have just tried this. The idea was to mimic what 7470.exe is doing manually via a terminal program.
Without debug settings this works.
With DEBUG7 activated the plot data never comes and the spectrum analyzer trows an error message.
All the same, serial communications locks up.
Here is the logged com port traffic:
Code: [Select]
++ver
Prologix GPIB-USB Controller version 6.100
++auto
0
++auto 1
++eos 0
++mode 0
++addr 5
++eoi 1
Start listen ->
TRNb: 0
rEOI: 0
ATN:  HIGH
4F 50 3B D A After loop:
TRNb: 0
ATN:  0
<- End listen.
250,279,10250,7479
++ver

Note that after me entering the plot coordinates "250,279,10250,7479" the instrument should send the plot data which it doesn't with DEBUG7.
No answer from the AR488 to my ++ver at the end.

Best regards,
Tom
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 16, 2020, 07:44:57 pm
Here is the logged com port traffic:
Code: [Select]
++ver
Prologix GPIB-USB Controller version 6.100
++auto
0
++auto 1
++eos 0
++mode 0
++addr 5
++eoi 1
Start listen ->
TRNb: 0
rEOI: 0
ATN:  HIGH
4F 50 3B D A After loop:
TRNb: 0
ATN:  0
<- End listen.
250,279,10250,7479
++ver

Note that after me entering the plot coordinates "250,279,10250,7479" the instrument should send the plot data which it doesn't with DEBUG7.
No answer from the AR488 to my ++ver at the end.

Best regards,
Tom

Tom, can I confirm the sequence please?

Looking at this it seems that the instrument first sends the sequence (hex =4F 50 3B D A; ascii = OP; CR LF) which is being received. I presume that the instrument sends this on pressing 'Hardcopy'?

You then send the co-ordinates, 250,279,10250,7479, emulating what the HP7470 program would respond with.

You then expect to receive the plot data in return?

Communication locks up at this point both with and without DEBUG7 turned on?

Is this correct?

If so, then what seems to be happening, is that the character sequence comprising the co-ordinates string is just sitting in the buffer. The subsequent ++ver command is then added to the buffer which is still waiting for the co-ordinates to be sent over GPIB to the instrument which is not happening, so requested actions are getting queued up. If my surmise is correct then hopefully the attached should work. Just replace the existing AR488.ino file. Keep all other files the same.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on April 17, 2020, 08:09:43 am
Hi John,
many thanks for the new version.
Congratulations, you were spot on!
Now, instrument initiated plots from my HP8593E work flawlessly!
And plot data is coming a lot quicker than before!   :-+
Many thanks again for your great work and best regards, Tom
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 17, 2020, 12:10:28 pm
Hi John,
many thanks for the new version.
Congratulations, you were spot on!
Now, instrument initiated plots from my HP8593E work flawlessly!
And plot data is coming a lot quicker than before!   :-+
Many thanks again for your great work and best regards, Tom

Thank you for the confirmation. I will get this fix added to the official release shortly.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: james_s on April 17, 2020, 04:57:31 pm
Nice, I must give this a try. Between work and the whole Covid mess I got sidetracked and have not had a chance to mess with this lately.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 18, 2020, 01:33:21 pm
Nice, I must give this a try. Between work and the whole Covid mess I got sidetracked and have not had a chance to mess with this lately.

James, your TDS-420, I think, will still require the interface to be set in LON mode with '++lon 1' before starting the 7470 program. I will be very interested to know how you get on with the update as and when you get a chance to try it.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 19, 2020, 09:18:03 am
Have just uploaded version 0.48.22, which now includes support for the Leonardo R3 board. The board itself has a near identical layout to the Uno and the sketch employs the same pinout. The board has a micro USB connector instead of the larger type of USB connector. It also has some advantages:
Cost-wise there seems little difference between Leonardo R3 and Uno. Given that it plays nicely with KE5FX tools it seemed worth the effort to provide support for it.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Tj138waterboy on April 19, 2020, 02:27:03 pm
Thanks for all the work you guys are putting into this project. Since this thread started with just a couple of the full size uno and mega boards and has now evolved into multiple variants of micro, mini, esp, rasberry, etc... is there a simple way of adding a document on the github or on 1st page of topic with maybe excel tables with which version arduino, wifi/bluetooth/ethernet support/ and maybe verified equipment that has been tested working. Bonus points for rounding up different pcb adapter links that have been used so there could be easier way to have someone like myself say well I have a few V3 nanos but want bluetooth connectivity to x multimeter and x o-scope. Would be cool to see what members have already tested sucessfully and would let those thinking about building up the ar488 see if a different version board would be a better option. If this sounds like it should be on a seperate forum topic please chime in.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 19, 2020, 06:10:12 pm
Thanks for all the work you guys are putting into this project. Since this thread started with just a couple of the full size uno and mega boards and has now evolved into multiple variants of micro, mini, esp, rasberry, etc... is there a simple way of adding a document on the github or on 1st page of topic with maybe excel tables with which version arduino, wifi/bluetooth/ethernet support/ and maybe verified equipment that has been tested working. Bonus points for rounding up different pcb adapter links that have been used so there could be easier way to have someone like myself say well I have a few V3 nanos but want bluetooth connectivity to x multimeter and x o-scope. Would be cool to see what members have already tested sucessfully and would let those thinking about building up the ar488 see if a different version board would be a better option. If this sounds like it should be on a seperate forum topic please chime in.

To summarise then:

MCUBoardSerial PortsLayouts
328pUno R3Single UART shared with USBLayout as per original project by Emanuelle Girlando
328pNanoUSB/Single UART shared with USBIdentical to Uno
32u4MicroUSB/CDC+1 UARTCompact layout by Artag, designed for his back-of-IEEE488-plug adapter board
32u4Leonardo R3USB/CDC+1 UARTIdentical to UNO
2560Mega 25604 x UART, Serial0 shared with USBD - default using pins to either side of board
E1 using first row of end connector
E2 - using second row of end connector
ESP32Various3 x UART, U0UXD/Serial0 shared with USBIn development

The 32u4 and mega 2560 boards will work with the ESP8266 WiFi add-on and the HC05 bluetooth module. The HC06 module can also be used but has to be programmed manually. Using these on the Uno or Nano is not advised as the only available serial UART is used by USB. One may run into problems having both connected at the same time. One could however, use SoftwareSerial at a speed of no more than 57600 baud..

Further work in planned for the ESP8266 and an ESP32 version is in development. Adding an Ethernet shield (to the Mega 2560) is also planned.

I am not aware of a version for the Raspberry Pi but would certainly be interested to know if such a thing exists and where you saw it? It certainly has plenty of GPIO pins but costs a little more.

Much of this information is already in the readme, however I can certainly add/convert in tabular form if it helps.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Tj138waterboy on April 19, 2020, 07:11:07 pm
That was very helpful, thanks. Had my hopes up to try my hand at building a adapter board for nano that includes temp/humidity sensor as well as bluetooth but now see that it will have issues more than likely, thanks for that info.
As far as the Ras-Pi info I see it hasn't been updated in years but probably best documented link is from from Xdevs https://xdevs.com/guide/ni_gpib_rpi/ (https://xdevs.com/guide/ni_gpib_rpi/)
Another good source for schematic and instruction http://elektronomikon.org/ (http://elektronomikon.org/)
There is also similar project that started as Pi then converted to arduino due to popularity and cost http://www.industrialberry.com/gpiberry-v1-1/ (http://www.industrialberry.com/gpiberry-v1-1/)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: james_s on April 20, 2020, 02:53:32 am
I haven't had a chance to try the TDS400 but I had to do something with a TDS700 already so I tried plotting from it. I can confirm that once I sent a ++lon and then loaded up the plotter emulator I was able to hit Hardcopy and it plots perfectly.

So do we know at this point whether the need to send ++lon is a bug in the GPIB interface or in the 7470A emulator? 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 20, 2020, 11:18:34 am
I haven't had a chance to try the TDS400 but I had to do something with a TDS700 already so I tried plotting from it. I can confirm that once I sent a ++lon and then loaded up the plotter emulator I was able to hit Hardcopy and it plots perfectly.

So do we know at this point whether the need to send ++lon is a bug in the GPIB interface or in the 7470A emulator?

Thanks. I am glad that you can now send a plot to the HP7470. This appears to confirm that ++lon is necessary for Hardcopy to work on a Tek then.

I'm not sure that the need to send ++lon should be characterised as a bug. It simply places the interface in the required operating mode. Looking at the manual, the TDS-700, like the TDS-400, operates in non-addressed or talk-only mode. In order to receive, the "plotter" would need to be in  the corresponding non-addressed listen-only mode. This is what the ++lon command does. This kind of direct point-to-point communication makes sense in a 1:1 scenario where you have a plotter connected directly to the back of an instrument with the instrument pushing data over the GPIB wires to the plotter.

However, if the interface is connected to a GPIB bus that connects multiple devices and just accepts all data, then it will end up passing all information being sent to and from those devices to USB. Addressed mode, where each interface is assigned a unique GPIB address allows the interface to accept only data that is intended for it, that is, when it has been addressed by a controller to listen. The HP 8591A spectrum analyser instrument operates in that mode and can therefore co-exist with other instruments on the bus.

Just how the Prologix operates in both circumstances is something I would like to establish. Whether that behaviour is "proper" or rather a pragmatic approach bearing in mind possible usage scenarios is also something I am curious about. If someone has a Prologix interface and some instrument, then it shouldn't be too difficult to establish this with the following tests:

- connect instrument to Prologix.
- configure the instrument with a plotter GPIB address.
- assign the Prologix a different GPIB address and place it in device mode
- connect to the Prologix with a terminal
- send a plot.

Is anything received? (there shouldn't be)

- connect instrument to Prologix.
- configure the instrument to use non-addressed (talk-only) mode (or use an instrument that employs this mode by default, e.g. Tektronix TDS-400 and later series)
- assign the Prologix a GPIB address and set it in device mode
- connect to the Prologix with a terminal
- send a plot.

Is anything received? (again, there shouldn't be)

In both cases we used Device mode but not ++lon. So finally, repeat the second example with instrument in talk-only mode, but additionally place the Prologix in ++lon mode. It should now receive.

I had been toying with the possibility of ordering a 164p chip (which the Prologix is based around) and flashing their firmware to it with an AVR programmer. The 40pin DIL version of the chip should fit the programmer I have for an AT16P. It does cost more than a complete Arduino board but still much cheaper than a Prologix. I might order one if that is the only option, but if anyone does have a Prologix and can perform these tests an post the results then it would be greatly appreciated.

Back in post #397, KE5FX mentioned he would be adding the option to send ++lon to an interface. No doubt he will let us know when that has been done.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 20, 2020, 11:35:43 am
Got it working with a Fluke 8840a  :)

Sorry for missing your earlier comment and thank you for posting your photos. Interesting to see different instruments being connected. Curious that you didn't use an IEEE488 connector but soldered directly to the board inside the instrument. Are you intending to mount this internally somehow? I haven't tried those Elegoo boards so its good to see that they do also work.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: james_s on April 20, 2020, 04:21:21 pm
I'm not sure that the need to send ++lon should be characterised as a bug. It simply places the interface in the required operating mode. Looking at the manual, the TDS-700, like the TDS-400, operates in non-addressed or talk-only mode. In order to receive, the "plotter" would need to be in  the corresponding non-addressed listen-only mode. This is what the ++lon command does. This kind of direct point-to-point communication makes sense in a 1:1 scenario where you have a plotter connected directly to the back of an instrument with the instrument pushing data over the GPIB wires to the plotter.

Well it's a bug in one part or another, Hardcopy works just fine IF you first load up another program and issue the required command. It's looking to me like it's a bug in the plotter emulator, it should be sending ++lon if you set it to non-addressed mode and then have it listen for a device initiated plot.

If the option to send ++lon is added then I believe that will fix it.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: kc9qvl on April 24, 2020, 02:06:19 am
Got it working with a Fluke 8840a  :)

Sorry for missing your earlier comment and thank you for posting your photos. Interesting to see different instruments being connected. Curious that you didn't use an IEEE488 connector but soldered directly to the board inside the instrument. Are you intending to mount this internally somehow? I haven't tried those Elegoo boards so its good to see that they do also work.

Remove gpib connector completely. Replace with a promicro on a small adapter board.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 24, 2020, 11:45:43 am
Curious. Why not just use Atrag's adapter?

https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2718346/#msg2718346 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2718346/#msg2718346)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 26, 2020, 08:26:51 am
Uploaded version 0.48.24. It is now possible to send debug messages to an alternative serial port e.g. Serial1 on 32u4 boards.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Dek on May 03, 2020, 09:52:52 am
Hi,

I built the interface, worked first time with a UNO - brilliant.
As I couldn't find any old /  low cost GPIB cables I used a short length cut from an old scart cable , over short lengths works fine maybe a useful tip for anyone else building the interface.

The interface is connected to my Solartron 7061 which performs logging using PuTTy or the arduino serial monitor
I am trying to read out the memory of the 7061. I can do this 1 memory location at a time but to do this automatically has exceeded my skill level :-)

For example:
Using the serial monitor (red is my typed command)
DU is the 7061 command to DUmp the memory contents
HIST is the memory location of the particular measurement being read back.

Hello from AR_SERIAL :-)
++Auto 2
++Read
-0.0000101     VDC   CHAN  0
DU
++Read
-0.0000129     VDC   CHAN  0 HIST 1
++Read
-0.0000133     VDC   CHAN  0 HIST 2
++Read
-0.0000134     VDC   CHAN  0 HIST 3
etc

Using this macro
#define MACRO_4 "\
++addr 1\n\
DU\
++auto 3\n\
++read\
returns -0.0000042     VDC   CHAN  0 HIST 3   and Bad Argument on the meter

and using this modified macro
#define MACRO_4 "\
++addr 1\n\
DU\
++auto 2\n\
++read\

returns -0.0000054     VDC   CHAN  0 HIST 2 

Possibly a timing issue,  but I'm now a bit stuck, any help greatly appreciated.
Dek


<edit>

If I reorder the macro to
++auto
DU
++Read
then it works  ;D ;D ;D
Also works if i enter the commands manually in that order via the serial monitor or PuTTy :-+


Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on May 04, 2020, 05:28:31 am
I have used the AR488 controller on Arduino Nano to talk to many different devices without any problem. But one recently stumped me. Its a Cryocon temperature controller that uses EOI but no EOS characters. I have set the program for ++eoi 1 and ++eos 3 and it still didn't work. The device would switch to remote and then go back to local with ++loc command, so it was getting something. I also verified that EOI line was indeed asserted during the transmission. Crycon worked just fine with NI controller and VISA. Not sure what the problem was, has anyone used an instrument with these settings? 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on May 04, 2020, 03:30:42 pm
The interface is connected to my Solartron 7061 which performs logging using PuTTy or the arduino serial monitor
I am trying to read out the memory of the 7061. I can do this 1 memory location at a time but to do this automatically has exceeded my skill level :-)

For example:
Using the serial monitor (red is my typed command)
DU is the 7061 command to DUmp the memory contents
HIST is the memory location of the particular measurement being read back.

Hello from AR_SERIAL :-)
++Auto 2
++Read
-0.0000101     VDC   CHAN  0
DU
++Read
-0.0000129     VDC   CHAN  0 HIST 1
++Read
-0.0000133     VDC   CHAN  0 HIST 2
++Read
-0.0000134     VDC   CHAN  0 HIST 3
etc

Using this macro
#define MACRO_4 "\
++addr 1\n\
DU\
++auto 3\n\
++read\
returns -0.0000042     VDC   CHAN  0 HIST 3   and Bad Argument on the meter

and using this modified macro
#define MACRO_4 "\
++addr 1\n\
DU\
++auto 2\n\
++read\

returns -0.0000054     VDC   CHAN  0 HIST 2 

Possibly a timing issue,  but I'm now a bit stuck, any help greatly appreciated.
Dek


<edit>

If I reorder the macro to
++auto
DU
++Read
then it works  ;D ;D ;D
Also works if i enter the commands manually in that order via the serial monitor or PuTTy :-+

My 7150 does not have the DU command so I can't test that specific command, but I do have a couple of observations. Firstly, could I ask which firmware version are you using please?

Quote
Hello from AR_SERIAL :-)

That is spurious and shouldn't be in the output. It must have been accidentally left in one of the versions. By all means find the relevant line in AR488.ino that is printing it and either remove it or comment it out.

In your macro, the DU command and the last ++read do not have a \n after it. Can you clarify whether this is a typo in the post or whether you have actually entered the macro in that way? You can get away without having a \n at the end of the macro, but it is essential that one exists as a delimiter at the end of on every other line. So your two macro's should read:

1st example:
Code: [Select]
#define MACRO_4 "\
++addr 1\n\
DU\n\
++auto 3\n\
++read\
"

2nd example:
Code: [Select]
#define MACRO_4 "\
++addr 1\n\
DU\n\
++auto 2\n\
++read\
"

When auto is set to 2, it looks for instrument commands terminated with a query '?' character, e.g. *idn? and automatically performs a ++read afterwards to return the query result. If a '?' is not present, then it just sends the character string and does nothing else. Setting auto to 2 would have no effect in this instance. This is different to ++auto 1 which will always try to return a result after any command string sent to the instrument.

How many memory locations are there and what result are you expecting to see?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on May 04, 2020, 04:26:44 pm
I have used the AR488 controller on Arduino Nano to talk to many different devices without any problem. But one recently stumped me. Its a Cryocon temperature controller that uses EOI but no EOS characters. I have set the program for ++eoi 1 and ++eos 3 and it still didn't work. The device would switch to remote and then go back to local with ++loc command, so it was getting something. I also verified that EOI line was indeed asserted during the transmission. Crycon worked just fine with NI controller and VISA. Not sure what the problem was, has anyone used an instrument with these settings?

Interesting since CryoCon seem to provide a Prologix Ethernet interface as an option. I note from their manual that the instrument uses the SCPI language with ; as terminator although this is optional. While the User Manual states that "the host must be configured to talk to the instrument using EOI and no EOS", the remote Programming Guide states that "if terminators are sent they are ignored" so one assumes that they shouldn't be an issue, but it is understandable that the User Manual recommends to eliminate them altogether with ++eos 3. Are you getting any output at all in response to e.g. *idn? or nothing at all? It seems that aside from setting the GPIB address, there is not much else to do here and the fact that it responds to ++loc would seem to indicate that the instrument is receiving addressed commands. If possible, a DEBUG7 output or a logic analyser trace might provide some useful information.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on May 04, 2020, 04:57:26 pm
I wasn't able to get any response from Cryocon beyond seeing the remote light go on and off. I played with various eos and also eor options to no effect. I checked with a scope that EOI line was going low. What I haven't done is to hook up a logic analyzer to several lines to look at relative timing. Perhaps the issue is the timing of the EOI line relative to the end of transmission. The instrument is now back in the lab working over NI interface. I was just debugging it at home. In general, AR488 is great at allowing one to work from home without installing the whole Labview suite.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: grizewald on May 16, 2020, 11:08:54 am
If anyone wants to copy the version I built, you can get PCBs from here : https://oshpark.com/shared_projects/HrS1HLSE

I will probably revise that at some point (I'd like to move the daughterboard further along, making the USB connector stick out less) but don't know how long I'll take to get around to that. The electrical connections will stay the same so the software will still work.

Many thanks for making your PCB design available on OSHPark. I ordered six PCBs and received eight so even after building one interface for each of my GPIB equipped instruments, I'll have a couple of spares on hand for when the next device arrives.

Putting everything on the plug and not having to deal with bulky, stiff GPIB cables is brilliant! Even better, I'll be able to connect all of the instruments to a powered USB hub and have everything available via one USB cable to my computer. Priceless.

I chose to bolt mine together for better rigidity. I did the first one with some screws from a old laptop's VGA port and needed to mount the Arduino fairly high on the pins to ensure I could connect to the USB connector. Hopefully, I'll have some button head UNC 4/40 1/4" screws on the way soon for the remaining adapters.

(https://filedn.com/lEDSGUXnO7mp9lWR3BbARrR/Electronics/IMG_20200516_125556.jpg)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: vindoline on May 19, 2020, 11:56:34 am
Those tiny adapters from artag are amazing! I have a question. If each instrument has its own adapter and they all connect to a USB hub instead of being on a GPIB cable bus, how do you address and use multiple instruments at once? I use python to talk to the one, master, AR488 and then the GPIB address to control specific instruments. I would love to swap out the GPIB cables for USB!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on May 19, 2020, 03:58:44 pm
You use the serial port to select the instrument. You can set all the GPIB addresses the same as there is only one on each bus.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: The Soulman on May 19, 2020, 04:37:16 pm
You use the serial port to select the instrument. You can set all the GPIB addresses the same as there is only one on each bus.

Side question, is it still possible to have multiple devices (with unique addresses) on the same gpib bus with one ar488?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on May 19, 2020, 05:04:54 pm
Side question, is it still possible to have multiple devices (with unique addresses) on the same gpib bus with one ar488?

Yes, it is, though you do have to send the ++addr command to address each one : if you only use one per instrument then it can be configured to always address that device, so it's as though it's connected to a USB serial port.

Rather than use the same address for each, I prefer to use the default address for that instrument. Most modern instruments have the address defined in non-volatile ram and a default value is set at manufacture.

The electrical specs don't fully meet the IEEE-488 requirements so it won't drive 16 instruments under worst case conditions. However it seems fine at 5 and may well manage more.

If you use Linux then the appropriate serial port can be addressed meaningfully through /dev/serial/by-path. I'm not sure if Windows' persistent COM port association will see them as different.

I would like to be able to set the ID (and hence the location in /dev/serial/by-id) to suit the attached instrument but the arduino lib used doesn't currently permit it. That might get fixed at some point.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on May 19, 2020, 05:14:21 pm

Well it's a bug in one part or another, Hardcopy works just fine IF you first load up another program and issue the required command. It's looking to me like it's a bug in the plotter emulator, it should be sending ++lon if you set it to non-addressed mode and then have it listen for a device initiated plot.

If the option to send ++lon is added then I believe that will fix it.

I agree with WaveyDipole - the plotter emulator needs to have its interface set to listen-only but on a real plotter that would be done with a DIP switch.

I haven't checked it recently but I think you can manually send ++lon and then save the ar488 config, causing it to reset into lon mode on every power up. Does this work ?
 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on May 23, 2020, 07:44:31 pm
Back on 18th March in post #397 KE5FX did say he would add that feature. On his website I can see that the toolset was updated on 20th March (v1980) and again on the 26th March (v1981). I downloaded it to have a look, but could not see the ++lon feature implemented it yet so we will have to wait until the next release I think.


Title: Re: AR488 Arduino-based GPIB adapter
Post by: serg-el on May 29, 2020, 12:04:23 pm
Incomprehensibility detected.
GPIB Toolkit  version 1.981 , released March 26, 2020.

When you start the HP 7470A Emulator ver 2.05, it sets the mode
++eos 0
++mode 0
++eoi 1

Next, when you press the key 'w' command is sent
++loc
in 'device' mode, it is naturally not supported :(

Where is the mistake?  :-//

Code: [Select]
00004349 2020-05-29 14:45:58,5908227 +127,2577056 IRP_MJ_CREATE - process 5936 () DOWN 0x00000000
00004350 2020-05-29 14:45:58,5961393 +0,0053166 IRP_MJ_CREATE UP 0x00000000
00004351 2020-05-29 14:45:58,5962220 +0,0000827 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR DOWN 0x00000000
00004352 2020-05-29 14:45:58,5962281 +0,0000061 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR UP 0x00000000
00004371 2020-05-29 14:45:58,5964757 +0,0000065 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE DOWN 0x00000000 00 c2 01 00 ....
00004372 2020-05-29 14:45:58,5964785 +0,0000028 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE UP 0x00000000
00004373 2020-05-29 14:45:58,5964838 +0,0000053 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR DOWN 0x00000000
00004374 2020-05-29 14:45:58,5964863 +0,0000025 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR UP 0x00000000
00004375 2020-05-29 14:45:58,5964910 +0,0000047 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL DOWN 0x00000000 00 00 08 ...
00004376 2020-05-29 14:45:58,5964941 +0,0000031 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL UP 0x00000000
00004377 2020-05-29 14:45:58,5964983 +0,0000042 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS DOWN 0x00000000 00 00 00 00 11 13 ......
00004378 2020-05-29 14:45:58,5965008 +0,0000025 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS UP 0x00000000
00004379 2020-05-29 14:45:58,5965050 +0,0000042 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW DOWN 0x00000000 09 00 00 00 80 00 00 80 36 43 00 00 36 43 00 00 ........6C..6C..
00004380 2020-05-29 14:45:58,5981180 +0,0016130 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW UP 0x00000000
00004381 2020-05-29 14:45:58,5981281 +0,0000101 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_TIMEOUTS DOWN 0x00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ....................
00004382 2020-05-29 14:45:58,5981309 +0,0000028 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_TIMEOUTS UP 0x00000000
00004401 2020-05-29 14:45:58,5982019 +0,0000062 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE DOWN 0x00000000 00 c2 01 00 ....
00004402 2020-05-29 14:45:58,5982046 +0,0000027 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE UP 0x00000000
00004403 2020-05-29 14:45:58,5982100 +0,0000054 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_RTS DOWN 0x00000000
00004404 2020-05-29 14:45:58,5982125 +0,0000025 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_RTS UP 0xc0000023
00004405 2020-05-29 14:45:58,5982197 +0,0000072 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR DOWN 0x00000000
00004406 2020-05-29 14:45:58,5982220 +0,0000023 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR UP 0x00000000
00004407 2020-05-29 14:45:58,5982267 +0,0000047 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL DOWN 0x00000000 00 00 08 ...
00004408 2020-05-29 14:45:58,5982295 +0,0000028 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL UP 0x00000000
00004409 2020-05-29 14:45:58,5982334 +0,0000039 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS DOWN 0x00000000 00 00 00 00 11 13 ......
00004410 2020-05-29 14:45:58,5982357 +0,0000023 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS UP 0x00000000
00004411 2020-05-29 14:45:58,5982396 +0,0000039 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW DOWN 0x00000000 01 00 00 00 40 00 00 80 36 43 00 00 36 43 00 00 ....@...6C..6C..
00004412 2020-05-29 14:45:58,6001203 +0,0018807 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW UP 0x00000000
00004413 2020-05-29 14:45:58,6809154 +0,0807951 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 76 65 72 0d 0a ++ver..
00004416 2020-05-29 14:45:58,7356431 +0,0000101 IRP_MJ_READ UP 0x00000000 41 A
00004418 2020-05-29 14:45:58,7356582 +0,0000028 IRP_MJ_READ UP 0x00000000 52 R
00004420 2020-05-29 14:45:58,7356654 +0,0000025 IRP_MJ_READ UP 0x00000000 34 4
00004422 2020-05-29 14:45:58,7356724 +0,0000025 IRP_MJ_READ UP 0x00000000 38 8
00004424 2020-05-29 14:45:58,7356791 +0,0000025 IRP_MJ_READ UP 0x00000000 38 8
00004426 2020-05-29 14:45:58,7356858 +0,0000025 IRP_MJ_READ UP 0x00000000 20
00004428 2020-05-29 14:45:58,7356925 +0,0000025 IRP_MJ_READ UP 0x00000000 47 G
00004430 2020-05-29 14:45:58,7356992 +0,0000025 IRP_MJ_READ UP 0x00000000 50 P
00004432 2020-05-29 14:45:58,7357062 +0,0000028 IRP_MJ_READ UP 0x00000000 49 I
00004434 2020-05-29 14:45:58,7357129 +0,0000028 IRP_MJ_READ UP 0x00000000 42 B
00004436 2020-05-29 14:45:58,7357193 +0,0000025 IRP_MJ_READ UP 0x00000000 2d -
00004438 2020-05-29 14:45:58,7357260 +0,0000025 IRP_MJ_READ UP 0x00000000 55 U
00004440 2020-05-29 14:45:58,7357420 +0,0000118 IRP_MJ_READ UP 0x00000000 53 S
00004442 2020-05-29 14:45:58,7357492 +0,0000028 IRP_MJ_READ UP 0x00000000 42 B
00004444 2020-05-29 14:45:58,7357568 +0,0000034 IRP_MJ_READ UP 0x00000000 20
00004446 2020-05-29 14:45:58,7357643 +0,0000028 IRP_MJ_READ UP 0x00000000 2c ,
00004448 2020-05-29 14:45:58,7357716 +0,0000028 IRP_MJ_READ UP 0x00000000 20
00004450 2020-05-29 14:45:58,7357794 +0,0000036 IRP_MJ_READ UP 0x00000000 76 v
00004452 2020-05-29 14:45:58,7357872 +0,0000031 IRP_MJ_READ UP 0x00000000 65 e
00004454 2020-05-29 14:45:58,7357950 +0,0000030 IRP_MJ_READ UP 0x00000000 72 r
00004456 2020-05-29 14:45:58,7358029 +0,0000031 IRP_MJ_READ UP 0x00000000 73 s
00004458 2020-05-29 14:45:58,7358096 +0,0000025 IRP_MJ_READ UP 0x00000000 69 i
00004460 2020-05-29 14:45:58,7358166 +0,0000026 IRP_MJ_READ UP 0x00000000 6f o
00004462 2020-05-29 14:45:58,7358233 +0,0000026 IRP_MJ_READ UP 0x00000000 6e n
00004464 2020-05-29 14:45:58,7358300 +0,0000026 IRP_MJ_READ UP 0x00000000 20
00004466 2020-05-29 14:45:58,7358367 +0,0000025 IRP_MJ_READ UP 0x00000000 35 5
00004468 2020-05-29 14:45:58,7358436 +0,0000027 IRP_MJ_READ UP 0x00000000 2e .
00004470 2020-05-29 14:45:58,7358504 +0,0000028 IRP_MJ_READ UP 0x00000000 30 0
00004472 2020-05-29 14:45:58,7358571 +0,0000026 IRP_MJ_READ UP 0x00000000 20
00004474 2020-05-29 14:45:58,7358638 +0,0000026 IRP_MJ_READ UP 0x00000000 23 #
00004476 2020-05-29 14:45:58,7358705 +0,0000025 IRP_MJ_READ UP 0x00000000 31 1
00004478 2020-05-29 14:45:58,7358772 +0,0000025 IRP_MJ_READ UP 0x00000000 20
00004480 2020-05-29 14:45:58,7358842 +0,0000028 IRP_MJ_READ UP 0x00000000 30 0
00004482 2020-05-29 14:45:58,7358909 +0,0000026 IRP_MJ_READ UP 0x00000000 2e .
00004484 2020-05-29 14:45:58,7358976 +0,0000025 IRP_MJ_READ UP 0x00000000 34 4
00004486 2020-05-29 14:45:58,7359043 +0,0000025 IRP_MJ_READ UP 0x00000000 38 8
00004488 2020-05-29 14:45:58,7359110 +0,0000025 IRP_MJ_READ UP 0x00000000 2e .
00004490 2020-05-29 14:45:58,7359180 +0,0000028 IRP_MJ_READ UP 0x00000000 32 2
00004492 2020-05-29 14:45:58,7359247 +0,0000025 IRP_MJ_READ UP 0x00000000 34 4
00004494 2020-05-29 14:45:58,7359314 +0,0000025 IRP_MJ_READ UP 0x00000000 0d .
00004496 2020-05-29 14:45:58,7359384 +0,0000028 IRP_MJ_READ UP 0x00000000 0a .
00004497 2020-05-29 14:45:58,7903279 +0,0543895 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 65 6f 73 20 30 0d 0a ++eos 0..
00004499 2020-05-29 14:45:58,8996860 +0,1084811 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 6d 6f 64 65 20 30 0d 0a ++mode 0..
00004502 2020-05-29 14:45:59,2043744 +0,2500027 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00004503 2020-05-29 14:45:59,2043867 +0,0000123 IRP_MJ_READ UP 0xc0000120
00004504 2020-05-29 14:45:59,2043948 +0,0000081 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00004505 2020-05-29 14:45:59,2590512 +0,0546564 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 65 6f 69 20 31 0d 0a ++eoi 1..
00004508 2020-05-29 14:46:00,3372438 +0,9975756 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00004509 2020-05-29 14:46:00,3372564 +0,0000126 IRP_MJ_READ UP 0xc0000120
00004510 2020-05-29 14:46:00,3372648 +0,0000084 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00004512 2020-05-29 14:46:01,3570307 +0,9979429 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00004513 2020-05-29 14:46:01,3570433 +0,0000126 IRP_MJ_READ UP 0xc0000120
00004514 2020-05-29 14:46:01,3570528 +0,0000095 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00004516 2020-05-29 14:46:02,3805158 +0,9980992 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00004517 2020-05-29 14:46:02,3805312 +0,0000154 IRP_MJ_READ UP 0xc0000120
00004518 2020-05-29 14:46:02,3805399 +0,0000087 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00004520 2020-05-29 14:46:03,4040105 +0,9978760 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00004521 2020-05-29 14:46:03,4040230 +0,0000125 IRP_MJ_READ UP 0xc0000120
00004522 2020-05-29 14:46:03,4040353 +0,0000123 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00004524 2020-05-29 14:46:04,4274981 +0,9975095 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00004525 2020-05-29 14:46:04,4275095 +0,0000114 IRP_MJ_READ UP 0xc0000120
00004526 2020-05-29 14:46:04,4275179 +0,0000084 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00004528 2020-05-29 14:46:05,4509938 +0,9980992 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00004529 2020-05-29 14:46:05,4510058 +0,0000120 IRP_MJ_READ UP 0xc0000120
00004530 2020-05-29 14:46:05,4510153 +0,0000095 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00004532 2020-05-29 14:46:06,4744719 +0,9959925 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00004533 2020-05-29 14:46:06,4744837 +0,0000118 IRP_MJ_READ UP 0xc0000120
00004534 2020-05-29 14:46:06,4744906 +0,0000069 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00004536 2020-05-29 14:46:07,4979735 +0,9975472 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00004537 2020-05-29 14:46:07,4979880 +0,0000145 IRP_MJ_READ UP 0xc0000120
00004538 2020-05-29 14:46:07,4979967 +0,0000087 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00004540 2020-05-29 14:46:08,5214514 +0,9979688 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00004541 2020-05-29 14:46:08,5214678 +0,0000164 IRP_MJ_READ UP 0xc0000120
00004542 2020-05-29 14:46:08,5214771 +0,0000093 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00004544 2020-05-29 14:46:09,5449443 +0,9979880 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00004545 2020-05-29 14:46:09,5449563 +0,0000120 IRP_MJ_READ UP 0xc0000120
00004546 2020-05-29 14:46:09,5449694 +0,0000131 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00004548 2020-05-29 14:46:10,5840674 +0,9931751 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00004549 2020-05-29 14:46:10,5840817 +0,0000143 IRP_MJ_READ UP 0xc0000120
00004550 2020-05-29 14:46:10,5840937 +0,0000120 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00004552 2020-05-29 14:46:11,6075447 +0,9981115 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00004553 2020-05-29 14:46:11,6075576 +0,0000129 IRP_MJ_READ UP 0xc0000120
00004554 2020-05-29 14:46:11,6075684 +0,0000108 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00004556 2020-05-29 14:46:12,1153852 +0,4997333 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00004557 2020-05-29 14:46:12,1154101 +0,0000249 IRP_MJ_READ UP 0xc0000120
00004558 2020-05-29 14:46:12,1154224 +0,0000123 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00004559 2020-05-29 14:46:12,1700698 +0,0546474 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 6c 6f 63 0d 0a ++loc..
00004562 2020-05-29 14:46:12,2247743 +0,0000129 IRP_MJ_READ UP 0x00000000 55 U
00004564 2020-05-29 14:46:12,2247849 +0,0000025 IRP_MJ_READ UP 0x00000000 6e n
00004566 2020-05-29 14:46:12,2247921 +0,0000025 IRP_MJ_READ UP 0x00000000 72 r
00004568 2020-05-29 14:46:12,2247989 +0,0000026 IRP_MJ_READ UP 0x00000000 65 e
00004570 2020-05-29 14:46:12,2248056 +0,0000026 IRP_MJ_READ UP 0x00000000 63 c
00004572 2020-05-29 14:46:12,2248125 +0,0000025 IRP_MJ_READ UP 0x00000000 6f o
00004574 2020-05-29 14:46:12,2248195 +0,0000028 IRP_MJ_READ UP 0x00000000 67 g
00004576 2020-05-29 14:46:12,2248262 +0,0000025 IRP_MJ_READ UP 0x00000000 6e n
00004578 2020-05-29 14:46:12,2248329 +0,0000025 IRP_MJ_READ UP 0x00000000 69 i
00004580 2020-05-29 14:46:12,2248396 +0,0000025 IRP_MJ_READ UP 0x00000000 7a z
00004582 2020-05-29 14:46:12,2248466 +0,0000028 IRP_MJ_READ UP 0x00000000 65 e
00004584 2020-05-29 14:46:12,2248533 +0,0000028 IRP_MJ_READ UP 0x00000000 64 d
00004586 2020-05-29 14:46:12,2248600 +0,0000028 IRP_MJ_READ UP 0x00000000 20
00004588 2020-05-29 14:46:12,2248667 +0,0000025 IRP_MJ_READ UP 0x00000000 63 c
00004590 2020-05-29 14:46:12,2248734 +0,0000025 IRP_MJ_READ UP 0x00000000 6f o
00004592 2020-05-29 14:46:12,2248801 +0,0000025 IRP_MJ_READ UP 0x00000000 6d m
00004594 2020-05-29 14:46:12,2248869 +0,0000026 IRP_MJ_READ UP 0x00000000 6d m
00004596 2020-05-29 14:46:12,2248936 +0,0000026 IRP_MJ_READ UP 0x00000000 61 a
00004598 2020-05-29 14:46:12,2249003 +0,0000026 IRP_MJ_READ UP 0x00000000 6e n
00004600 2020-05-29 14:46:12,2249072 +0,0000027 IRP_MJ_READ UP 0x00000000 64 d
00004602 2020-05-29 14:46:12,2249139 +0,0000027 IRP_MJ_READ UP 0x00000000 0d .
00004604 2020-05-29 14:46:12,2249207 +0,0000026 IRP_MJ_READ UP 0x00000000 0a .
00004606 2020-05-29 14:46:12,4747722 +0,2498474 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00004607 2020-05-29 14:46:12,4747910 +0,0000188 IRP_MJ_READ UP 0xc0000120
00004608 2020-05-29 14:46:12,4747993 +0,0000083 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00004610 2020-05-29 14:46:12,9747897 +0,4999728 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00004611 2020-05-29 14:46:12,9748012 +0,0000115 IRP_MJ_READ UP 0xc0000120
00004612 2020-05-29 14:46:12,9748104 +0,0000092 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00004613 2020-05-29 14:46:12,9748238 +0,0000134 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_CLR_DTR DOWN 0x00000000
00004614 2020-05-29 14:46:12,9754549 +0,0006311 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_CLR_DTR UP 0x00000000
00004615 2020-05-29 14:46:12,9754694 +0,0000145 IRP_MJ_CLOSE DOWN 0x00000000
00004616 2020-05-29 14:46:12,9774188 +0,0019494 IRP_MJ_CLOSE UP 0x00000000
00004617 2020-05-29 14:47:37,6668899 +84,6975801 IRP_MJ_CREATE - process 2568 (putty.exe) DOWN 0x00000000
00004618 2020-05-29 14:47:37,6723356 +0,0054457 IRP_MJ_CREATE UP 0x00000000
00004635 2020-05-29 14:47:37,6724541 +0,0000062 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE DOWN 0x00000000 00 c2 01 00 ....
00004636 2020-05-29 14:47:37,6724571 +0,0000030 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE UP 0x00000000
00004637 2020-05-29 14:47:37,6724700 +0,0000129 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_RTS DOWN 0x00000000
00004638 2020-05-29 14:47:37,6724728 +0,0000028 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_RTS UP 0x00000000
00004639 2020-05-29 14:47:37,6724781 +0,0000053 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR DOWN 0x00000000
00004640 2020-05-29 14:47:37,6724806 +0,0000025 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR UP 0x00000000
00004641 2020-05-29 14:47:37,6724848 +0,0000042 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL DOWN 0x00000000 00 00 08 ...
00004642 2020-05-29 14:47:37,6724881 +0,0000033 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL UP 0x00000000
00004643 2020-05-29 14:47:37,6724923 +0,0000042 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS DOWN 0x00000000 00 00 00 00 11 13 ......
00004644 2020-05-29 14:47:37,6724948 +0,0000025 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS UP 0x00000000
00004645 2020-05-29 14:47:37,6724990 +0,0000042 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW DOWN 0x00000000 01 00 00 00 40 00 00 00 6c 86 00 00 9b 21 00 00 ....@...l....!..
00004646 2020-05-29 14:47:37,6743420 +0,0018430 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW UP 0x00000000
00004647 2020-05-29 14:47:37,6743496 +0,0000076 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_TIMEOUTS DOWN 0x00000000 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ....................
00004648 2020-05-29 14:47:37,6743526 +0,0000030 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_TIMEOUTS UP 0x00000000
00004650 2020-05-29 14:47:42,2104258 +4,5358159 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 6c 6f 63 ++loc
00004652 2020-05-29 14:47:42,2114119 +0,0000388 IRP_MJ_WRITE DOWN 0x00000000 0d .
00004654 2020-05-29 14:47:42,2153306 +0,0029895 IRP_MJ_READ UP 0x00000000 55 U
00004656 2020-05-29 14:47:42,2153717 +0,0000065 IRP_MJ_READ UP 0x00000000 6e n
00004658 2020-05-29 14:47:42,2153923 +0,0000030 IRP_MJ_READ UP 0x00000000 72 r
00004660 2020-05-29 14:47:42,2154122 +0,0000028 IRP_MJ_READ UP 0x00000000 65 e
00004662 2020-05-29 14:47:42,2154314 +0,0000027 IRP_MJ_READ UP 0x00000000 63 c
00004664 2020-05-29 14:47:42,2154504 +0,0000025 IRP_MJ_READ UP 0x00000000 6f o
00004666 2020-05-29 14:47:42,2154694 +0,0000028 IRP_MJ_READ UP 0x00000000 67 g
00004668 2020-05-29 14:47:42,2154887 +0,0000028 IRP_MJ_READ UP 0x00000000 6e n
00004670 2020-05-29 14:47:42,2155074 +0,0000025 IRP_MJ_READ UP 0x00000000 69 i
00004672 2020-05-29 14:47:42,2155262 +0,0000026 IRP_MJ_READ UP 0x00000000 7a z
00004674 2020-05-29 14:47:42,2155454 +0,0000028 IRP_MJ_READ UP 0x00000000 65 e
00004676 2020-05-29 14:47:42,2155644 +0,0000025 IRP_MJ_READ UP 0x00000000 64 d
00004678 2020-05-29 14:47:42,2155834 +0,0000028 IRP_MJ_READ UP 0x00000000 20
00004680 2020-05-29 14:47:42,2156024 +0,0000028 IRP_MJ_READ UP 0x00000000 63 c
00004682 2020-05-29 14:47:42,2156217 +0,0000028 IRP_MJ_READ UP 0x00000000 6f o
00004684 2020-05-29 14:47:42,2156404 +0,0000025 IRP_MJ_READ UP 0x00000000 6d m
00004686 2020-05-29 14:47:42,2156594 +0,0000025 IRP_MJ_READ UP 0x00000000 6d m
00004688 2020-05-29 14:47:42,2156784 +0,0000028 IRP_MJ_READ UP 0x00000000 61 a
00004690 2020-05-29 14:47:42,2156971 +0,0000028 IRP_MJ_READ UP 0x00000000 6e n
00004692 2020-05-29 14:47:42,2157158 +0,0000028 IRP_MJ_READ UP 0x00000000 64 d
00004694 2020-05-29 14:47:42,2157346 +0,0000026 IRP_MJ_READ UP 0x00000000 0d .
00004696 2020-05-29 14:47:42,2157538 +0,0000028 IRP_MJ_READ UP 0x00000000 0a .
00004698 2020-05-29 14:47:49,1101189 +6,8943489 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 6d 6f 64 65 ++mode
00004700 2020-05-29 14:47:49,1104187 +0,0000422 IRP_MJ_WRITE DOWN 0x00000000 0d .
00004702 2020-05-29 14:47:49,1133322 +0,0019905 IRP_MJ_READ UP 0x00000000 30 0
00004704 2020-05-29 14:47:49,1133729 +0,0000067 IRP_MJ_READ UP 0x00000000 0d .
00004706 2020-05-29 14:47:49,1133942 +0,0000031 IRP_MJ_READ UP 0x00000000 0a .
00004708 2020-05-29 14:47:53,5701226 +4,4567119 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 6d 6f 64 65 20 31 ++mode 1
00004710 2020-05-29 14:47:53,5704246 +0,0000413 IRP_MJ_WRITE DOWN 0x00000000 0d .
00004712 2020-05-29 14:47:57,8221312 +4,2507878 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 6c 6f 63 ++loc
00004714 2020-05-29 14:47:57,8224304 +0,0000391 IRP_MJ_WRITE DOWN 0x00000000 0d .

Title: Re: AR488 Arduino-based GPIB adapter
Post by: KE5FX on May 30, 2020, 04:13:58 am
Back on 18th March in post #397 KE5FX did say he would add that feature. On his website I can see that the toolset was updated on 20th March (v1980) and again on the 26th March (v1981). I downloaded it to have a look, but could not see the ++lon feature implemented it yet so we will have to wait until the next release I think.

Actually it got added but I don't seem to have remembered to document it in connect.ini.  Run the GPIB configurator, select 'Edit CONNECT.INI', and add the following line, and see if that helps?

Code: [Select]
enable_LON 1
(It should actually default to 1 if that line isn't present.)

Incomprehensibility detected.
GPIB Toolkit  version 1.981 , released March 26, 2020.

When you start the HP 7470A Emulator ver 2.05, it sets the mode
++eos 0
++mode 0
++eoi 1

Next, when you press the key 'w' command is sent
++loc
in 'device' mode, it is naturally not supported :(

Where is the mistake?  :-//

It won't send anything at all until you hit 'w',  and then ++loc will be transmitted when the 'w' operation finishes (meaning a plot arrives or you hit a key to stop waiting.)  In principle it shouldn't send ++loc in this case, but Prologix adapters in device mode will ignore it, and all others should as well.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: xardomain on May 30, 2020, 07:33:35 pm
Ok,
decided to start with Artag version.
1) got PCB, GPIB connectors and Arduino micro pro from these places:
    - PCB https://oshpark.com/shared_projects/HrS1HLSE (https://oshpark.com/shared_projects/HrS1HLSE)
    - GPIB EB67E connectors https://www.ebay.it/itm/Centronics-Plugs-Sockets-PCB-PCB-R-Angle-IDC-Panel-Mount-14-50-Way-EB0067/391507935311?ssPageName=STRK%3AMEBIDX%3AIT&var=660671677952&_trksid=p2057872.m2749.l2649 (https://www.ebay.it/itm/Centronics-Plugs-Sockets-PCB-PCB-R-Angle-IDC-Panel-Mount-14-50-Way-EB0067/391507935311?ssPageName=STRK%3AMEBIDX%3AIT&var=660671677952&_trksid=p2057872.m2749.l2649)
    - Arduino micro pro compatible https://www.amazon.it/gp/product/B07FQBQ4Z6/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1 (https://www.amazon.it/gp/product/B07FQBQ4Z6/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1)

2) I have doubts about how to modifiy the config.h for the Micro Pro whatever I bought, either how to define the specific micro and what serial type I have to configure. I have attached a picture, with on the left the original config.h and on the right my mods. Could anybody please validate/correct it?

3) beside a USB cable there is should not be anything else needed, maybe a 3d printed enclosure,  right?

TIA.

Giuseppe Marullo
IW2JWW - JN45RQ
Title: Re: AR488 Arduino-based GPIB adapter
Post by: xardomain on May 31, 2020, 12:21:09 am
Apparently problem solved.
Cannot test further, but it seems that the Micro got detected by KE5FX GPIB configurator.
Waiting for PCB and connector to arrive.

Thanks.

Giuseppe Marullo
IW2JWW - JN45RQ
Title: Re: AR488 Arduino-based GPIB adapter
Post by: softfoot on June 06, 2020, 12:43:10 pm

Very interesting project !! I ws particulaly intrigued by the tiny PCB mounted on the back of the connector.

Sadly, I have a rather complex 488 setup and a simple setup like that may not work. Has anyone made a pcb that has the SN75160 and SN75161 chips fitted that will support the software used here ??

Is there a schematic for this using an Uno/Mega ??

Best regards,
David
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on June 08, 2020, 10:18:27 pm
There is a schematic for using an Uno in the manual and photos of an example by me of a handwired version using ribbon cable earlier in the thread:

https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2735644/#msg2735644 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2735644/#msg2735644)

UPS just delivered the Uno shields @artag designed which I ordered from JLCPCB that map the Uno pins to a 24 pin header so you can use IDC ribbon cable and connectors to make custom cables to fit particular stacks of equipment without a lot of excess cable and fiddling.

You can get the Gerbers here:

https://oshpark.com/profiles/artag (https://oshpark.com/profiles/artag)

I bought 5 of the Uno boards and 5 of the GPIB bus sniffer boards.

I'll try to get an example of the Uno shield assembled the next day or two.

BTW  The SMD Uno boards will source 200 mA total whereas the DIP ones will only source 100 mA.  Both will sink 200 mA and  source/sink 40 mA per pin.  Not quite a full 16 device GPIB, but good enough.

Have Fun!
Reg
Title: Re: AR488 Arduino-based GPIB adapter
Post by: softfoot on June 08, 2020, 11:03:16 pm
Yes I found the diagrams in the manual - should have looked there in the first place ;-)

I've just got the same people to spin an Uno shield with 75160/1 support. I'll post the outcome when they arrive.

Dave
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on June 08, 2020, 11:49:43 pm
Cool! 

I plan to use an AR488 per rack, so the limited capacity is not an issue for me.  I'll probably use a Pi with wired ethernet to control the AR488s for all the racks.

Reg
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Joern on June 16, 2020, 10:16:22 am
Hi
I just came across your project. Where can I find the documentation?
Can you also use your AR488 interface with the Keysight GPIB-VISA drivers? Or do I have to work with the Prologix driver?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on June 16, 2020, 12:25:31 pm
The manual is on the github repository:

https://github.com/Twilight-Logic/AR488

I hope to solder up the Uno shield version here:

https://oshpark.com/profiles/artag

in the next day or two and  post pictures.

There is another  adapter design by @vindoline which is shown earlier in the thread.

It uses an extended Prologix command set which makes it very easy to control an instrument with the programming language of your choice just by reading and writing the USB serial port.

Have Fun!
Reg
Title: Re: AR488 Arduino-based GPIB adapter
Post by: ogdento on June 19, 2020, 09:24:57 pm
I finally built three adapters using artag's v3 board... they work awesome.  When I soldered them I held the connector and the arduino out a little bit (didn't push the parts all the way down onto the board etc) so I could more easily fit/fab a 3d case and further limit any potential for shorts.

The only problem I had was all of the boards came with the 32u4 pin 21 smaller than all the others... had to drill it out with a pcb bit for the header to fit.
[attach=1]

Here's the final assembly...
[attach=2]
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on June 20, 2020, 11:23:37 am
Thanks, you're right - I will correct it.

Oddly, I didn't have a problem assembling it using the header pins supplied with a generic Chinese board. If extra pressure was needed to overcome that, I didn't notice.

However, if the pins you used were slightly larger it would be a nuisance.
 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: PixieDust on June 21, 2020, 02:44:56 am
Does anyone foresee any issues using jumper cables on the Uno side of things?

https://www.sainsmart.com/products/65pcs-dupont-jumper-wire-cable-of-different-length-color-for-arduino-mega2560-r3 (https://www.sainsmart.com/products/65pcs-dupont-jumper-wire-cable-of-different-length-color-for-arduino-mega2560-r3)

Breadboards aren't great for high frequency stuff I hear, this is a similar solution to a breadboard?

I'll obviously solder the other end to the GPIB connector, but it's the Uno side I'm worried about.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: iXod on June 21, 2020, 03:28:14 pm
I see this project & thread has been going for some time (over a year), but I have a basic question.

What are the advantages to building this GPIB-USB controller rather than buying a Prologix unit? Or is that the wrong question to ask? Is the answer “Just because we can”? (c;

Interesting to see the development and creative contributions to the group effort here.

Thanks.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: softfoot on June 21, 2020, 04:04:22 pm

For me cost was a large factor, plus it's an interesting and useful project.
Dave
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rhb on June 21, 2020, 09:08:31 pm
@PixieDust  The Uno side is tedious to do by hand which is why I asked @artag to layout an Uno shield.  The weather has been very mild here so I've been working in my shop which at the moment has no HVAC.  I've got @artag's Uno shields sitting waiting for me to solder up connectors and test.  I'm trying to straighten up the chaos in my house and lab, but I should be able to test the board in the next day or two.

You can find my hand wired version earlier in the thread.  It's a serious pain to wire. I had to redo several wires because I got confused about where they went and connected them to the wrong pins.

@IXod  There are two reasons:

An Uno based controller is ~$5 for the Uno and shield plus $5 per device for cable and GPIB connector.  That's a lot cheaper than a Prologix.

The source code is available, so you can fix bugs and add features.  I plan to add a temperature and humidity sensor to the Uno and commands to read that.  That hasn't happened yet because WaveyDipole  got rather busy making changes and I got busy with other stuff, so I decided I'd wait until things settled down a bit.

Have Fun!
Reg
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on June 22, 2020, 08:46:46 am
One prologix isn't too expensive. But I see this is best fitted as one per instrument (the prologix USB doesn't have proper buffers either) and that would cost a lot more.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: xardomain on June 26, 2020, 03:28:26 pm
Ok,
everything arrived for building 3 interfaces with the Arduino micro clones, now the question:

- is there a detailed photo about the GPIB connector's orientation against the PCB? I see the square for pin1 of the Arduino micro correctly oriented in the upper left, but the square pint 1 for the connector apparently does not match (lower right, looking the PCB from above, GPIB facing down).

If I turn 180 degrees the GPIB it seems correctly oriented (pin 1 of the GPIB connected to pin4 of the Arduino micro), according to schematic.

I have the ar488promicro of https://oshpark.com/profiles/artag

Included a couple of phots, could anybody confirm this is the right orientation?

Thanks.

Giuseppe Marullo
IW2JWW - JN45RQ

Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on June 26, 2020, 05:22:36 pm
The square pad correctly shows pin 1 of the connector. There are two designs for the 32u4 board, the first has pin 1 at opposite ends (the layout was easier) and the later one, marked v3 on the silkscreen, has them at the same end.

Putting them at the same end was not for neatness : it's because if it's that way round, the USB cable exits from the board in the same direction as common GPIB cables. Sometimes, instruments have more space that way.

Both pcbs are the same circuit and both can be used with the same software if you don't care how the cable is routed. It sounds as though you have the earlier one and you should take the square pin 1 marker as correct for both pcb and socket.

The board should be assembled with the socket first, pushing the connector through from the unscreened side so the pins show on the silkscreened side. In fact this is the only way you can assemble it with pin 1 in the square pad. Then solder them. Once the arduino is in place you can't reach the pins.

Then fit the arduino, on header pins. The silkscreen writing should be upright and visible, the arduino with the components on top and the connector pointing upwards so TX0 goes to the square pin.  As ogdento notes, pin 21 will be a bit tight.

See also https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2728612/#msg2728612 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg2728612/#msg2728612)

I'm not sure why you think GPIB pin 1 should connect to arduino pin 4. Pin 4 is ground. GPIB pin 1 connects to arduino pin 6 (D3). Maybe you're comparing it with one of the other layouts ?

Many of the pin assignments differ between modules because the module pins themselves are different. The 32u4 version tries to assign them to maximise software efficiency. Make sure you select the correct board type in the arduino IDE as explained by WaveyDipole !
 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: xardomain on June 26, 2020, 07:47:13 pm
Artag,
many thanks for your explanation. forget about the pin1-pin4, I have included another photo, is it the correct way to solder the GPIB connector?
I have the first attempt at a 3d enclosure, at this moment it is very basic(see photo), I hope to improve it.

Thanks in advance.

Giuseppe Marullo
IW2JWW - JN45RQ
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on June 26, 2020, 08:06:32 pm
Artag,
many thanks for your explanation. forget about the pin1-pin4, I have included another photo, is it the correct way to solder the GPIB connector?

Yes, that's correct. Ogdento also mentioned leaving the connector fairly high on the pins to give space for a rim on a casing - that could be worth considering. Perhaps even a 2-part casing where the first part is trapped under the connector and the second part clips or slides onto it.

Be careful of the USB wire - most micro boards use surface-mount connectors that aren't very strongly fixed to the board. Strain relief for the plug / cable would be helpful.
 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: softfoot on June 28, 2020, 03:38:17 pm
Hi, I am running AR488 on an UNO with a shield carrying a 75160/1 and it seems to work OK into my TEK744A on address 7. I am issuing commands via a terminal emulator att 115200baud. eg if I issue the following :-
  ++mode 1
  ++addr 7
  ++auto 1
  *idn?
it correctly prints the scope's ID string.

However, I cannot get the HP7470A emulator to work with the 744A ... the emulator displays a red banner saying receiving data but when I press the hardcopy button on the scope the count stays at 0.

The scope s set for GPIB, address 7, "hardcopy only" mode and the emulator is set for "listen-only" and "wait for device initiated print".

What am I doing wrong?    |O

TIA
Dave
Title: Re: AR488 Arduino-based GPIB adapter
Post by: KE5FX on June 29, 2020, 08:51:40 am
Hi, I am running AR488 on an UNO with a shield carrying a 75160/1 and it seems to work OK into my TEK744A on address 7. I am issuing commands via a terminal emulator att 115200baud. eg if I issue the following :-
  ++mode 1
  ++addr 7
  ++auto 1
  *idn?
it correctly prints the scope's ID string.

However, I cannot get the HP7470A emulator to work with the 744A ... the emulator displays a red banner saying receiving data but when I press the hardcopy button on the scope the count stays at 0.

The scope s set for GPIB, address 7, "hardcopy only" mode and the emulator is set for "listen-only" and "wait for device initiated print".

What am I doing wrong?    |O

TIA
Dave

The usual problem is failure to select HPGL as the output format.  Either that, or it is expecting to address a 7470 plotter that isn't in listen-only mode (usually address 5 is the expected default).   

However, I'd suggest using host-requested plotting on those scopes.  For host-requested plotting with 7470.EXE:

Result:

(http://www.ke5fx.com/capture7.png)

Or simply run TDSBMP.BAT, which will also require Talk/Listen mode:


(http://www.ke5fx.com/testbmp.png)


(http://www.ke5fx.com/test7.gif)

Notice that TDSBMP.BAT has set the scope back up for color .BMP output, so if you want to switch back to 7470.EXE, you will have to remember to put it back to HPGL.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: softfoot on June 29, 2020, 11:14:32 am
Thanks for the reply ... I am doing exactly what you did with 7470.exe but with the AR488 in mode 0 it does nothing when I press HARDCOPY on the scope.

I can cause the scope to dump the screen in plotter mode in talk/listen mode via a terminal prog with :
  ++mode 1
  ++auto 1
  ++addr 7               // My scope is on
  ++read_tmo_ms 15000
  hardcopy start

I can also dump the screen in talk only mode with :
  ++mode 0
  ++addr 5
  ++lon 1

and then pressing hardcopy on the scope.

But nothing seems to work with the emulator.

I'll try the bat file later today.

***UPDATE*** I tried TDSBMP.BAT -- it didn't work -- it just sat there "waiting for transmission to start". 
Does it make assumptions about the AR488's settings ??

As far as I can tell the AR488 is working OK since I can access the scope and dump the screen via a terminal emulator.
Not a great day :-(

Regards,
Dave
 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: KE5FX on June 29, 2020, 12:26:06 pm
As far as I can tell the AR488 is working OK since I can access the scope and dump the screen via a terminal emulator.
Not a great day :-(

No clue on the AR488 specifically, I'm afraid -- I grabbed those two screenshots with the Prologix dongle that I normally keep on the back of my TDS 694C. 

No assumptions are made about the Prologix adapter's settings, all of the programs configure it to do what they need.  Can you talk to the scope using the terminal command line in the GPIB configurator app (prologix.exe)?  It should look like this (hint: try 'Restore factory default settings' first, then select Controller mode and enter 3 in the Configuration area before trying to send the *IDN? query):

(http://www.ke5fx.com/pro7.png)

If you issue a query command from the DOS prompt, as shown below, does that do anything?

(http://www.ke5fx.com/query.png)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on June 29, 2020, 12:55:58 pm
It sounds as though some setup used for the prologix doesn't work quite the same on the ar488.

Could you capture the traffic between the PC and the interface using something like https://docs.microsoft.com/en-us/sysinternals/downloads/portmon (https://docs.microsoft.com/en-us/sysinternals/downloads/portmon) so we can see where it gets stuck ?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: serg-el on June 29, 2020, 02:56:41 pm
Code: [Select]
00001347 2020-06-29 17:36:42,9660941 +13,6866627 IRP_MJ_CREATE - process 44368 (7470.exe) DOWN 0x00000000
00001348 2020-06-29 17:36:42,9812575 +0,0151634 IRP_MJ_CREATE UP 0x00000000
00001349 2020-06-29 17:36:42,9813058 +0,0000483 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR DOWN 0x00000000
00001350 2020-06-29 17:36:42,9822685 +0,0009627 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR UP 0x00000000
00001369 2020-06-29 17:36:42,9824903 +0,0000061 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE DOWN 0x00000000 00 c2 01 00 ....
00001370 2020-06-29 17:36:42,9832625 +0,0007722 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE UP 0x00000000
00001371 2020-06-29 17:36:42,9832874 +0,0000249 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR DOWN 0x00000000
00001372 2020-06-29 17:36:42,9842758 +0,0009884 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR UP 0x00000000
00001373 2020-06-29 17:36:42,9843017 +0,0000259 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL DOWN 0x00000000 00 00 08 ...
00001374 2020-06-29 17:36:42,9852619 +0,0009602 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL UP 0x00000000
00001375 2020-06-29 17:36:42,9852725 +0,0000106 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS DOWN 0x00000000 00 00 00 00 11 13 ......
00001376 2020-06-29 17:36:42,9852770 +0,0000045 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS UP 0x00000000
00001377 2020-06-29 17:36:42,9852815 +0,0000045 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW DOWN 0x00000000 09 00 00 00 80 00 00 00 00 04 00 00 00 04 00 00 ................
00001378 2020-06-29 17:36:42,9872577 +0,0019762 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW UP 0x00000000
00001379 2020-06-29 17:36:42,9872801 +0,0000224 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_TIMEOUTS DOWN 0x00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ....................
00001380 2020-06-29 17:36:42,9872840 +0,0000039 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_TIMEOUTS UP 0x00000000
00001399 2020-06-29 17:36:42,9873597 +0,0000062 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE DOWN 0x00000000 00 c2 01 00 ....
00001400 2020-06-29 17:36:42,9882528 +0,0008931 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE UP 0x00000000
00001401 2020-06-29 17:36:42,9882603 +0,0000075 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_RTS DOWN 0x00000000
00001402 2020-06-29 17:36:42,9882634 +0,0000031 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_RTS UP 0xc000000d
00001403 2020-06-29 17:36:42,9882710 +0,0000076 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR DOWN 0x00000000
00001404 2020-06-29 17:36:42,9892532 +0,0009822 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR UP 0x00000000
00001405 2020-06-29 17:36:42,9892596 +0,0000064 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL DOWN 0x00000000 00 00 08 ...
00001406 2020-06-29 17:36:42,9902721 +0,0010125 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL UP 0x00000000
00001407 2020-06-29 17:36:42,9902779 +0,0000058 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS DOWN 0x00000000 00 00 00 00 11 13 ......
00001408 2020-06-29 17:36:42,9902810 +0,0000031 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS UP 0x00000000
00001409 2020-06-29 17:36:42,9902849 +0,0000039 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW DOWN 0x00000000 01 00 00 00 40 00 00 00 00 04 00 00 00 04 00 00 ....@...........
00001410 2020-06-29 17:36:42,9922502 +0,0019653 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW UP 0x00000000
00001411 2020-06-29 17:36:43,0682197 +0,0759695 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 76 65 72 0d 0a ++ver..
00001414 2020-06-29 17:36:43,1199939 +0,0000154 IRP_MJ_READ UP 0x00000000 41 A
00001416 2020-06-29 17:36:43,1200042 +0,0000034 IRP_MJ_READ UP 0x00000000 52 R
00001418 2020-06-29 17:36:43,1200115 +0,0000031 IRP_MJ_READ UP 0x00000000 34 4
00001420 2020-06-29 17:36:43,1200184 +0,0000028 IRP_MJ_READ UP 0x00000000 38 8
00001422 2020-06-29 17:36:43,1200254 +0,0000031 IRP_MJ_READ UP 0x00000000 38 8
00001424 2020-06-29 17:36:43,1200324 +0,0000031 IRP_MJ_READ UP 0x00000000 20
00001426 2020-06-29 17:36:43,1200394 +0,0000031 IRP_MJ_READ UP 0x00000000 47 G
00001428 2020-06-29 17:36:43,1200467 +0,0000031 IRP_MJ_READ UP 0x00000000 50 P
00001430 2020-06-29 17:36:43,1200536 +0,0000030 IRP_MJ_READ UP 0x00000000 49 I
00001432 2020-06-29 17:36:43,1200606 +0,0000031 IRP_MJ_READ UP 0x00000000 42 B
00001434 2020-06-29 17:36:43,1200676 +0,0000031 IRP_MJ_READ UP 0x00000000 2d -
00001436 2020-06-29 17:36:43,1200746 +0,0000034 IRP_MJ_READ UP 0x00000000 55 U
00001438 2020-06-29 17:36:43,1200816 +0,0000031 IRP_MJ_READ UP 0x00000000 53 S
00001440 2020-06-29 17:36:43,1200886 +0,0000031 IRP_MJ_READ UP 0x00000000 42 B
00001442 2020-06-29 17:36:43,1200955 +0,0000030 IRP_MJ_READ UP 0x00000000 20
00001444 2020-06-29 17:36:43,1201025 +0,0000030 IRP_MJ_READ UP 0x00000000 2c ,
00001446 2020-06-29 17:36:43,1201092 +0,0000028 IRP_MJ_READ UP 0x00000000 20
00001448 2020-06-29 17:36:43,1201162 +0,0000031 IRP_MJ_READ UP 0x00000000 76 v
00001450 2020-06-29 17:36:43,1201235 +0,0000034 IRP_MJ_READ UP 0x00000000 65 e
00001452 2020-06-29 17:36:43,1201302 +0,0000031 IRP_MJ_READ UP 0x00000000 72 r
00001454 2020-06-29 17:36:43,1201372 +0,0000031 IRP_MJ_READ UP 0x00000000 73 s
00001456 2020-06-29 17:36:43,1201441 +0,0000030 IRP_MJ_READ UP 0x00000000 69 i
00001458 2020-06-29 17:36:43,1201511 +0,0000030 IRP_MJ_READ UP 0x00000000 6f o
00001460 2020-06-29 17:36:43,1201581 +0,0000031 IRP_MJ_READ UP 0x00000000 6e n
00001462 2020-06-29 17:36:43,1201648 +0,0000028 IRP_MJ_READ UP 0x00000000 20
00001464 2020-06-29 17:36:43,1201721 +0,0000031 IRP_MJ_READ UP 0x00000000 35 5
00001466 2020-06-29 17:36:43,1201788 +0,0000031 IRP_MJ_READ UP 0x00000000 2e .
00001468 2020-06-29 17:36:43,1201858 +0,0000031 IRP_MJ_READ UP 0x00000000 30 0
00001470 2020-06-29 17:36:43,1201928 +0,0000031 IRP_MJ_READ UP 0x00000000 20
00001472 2020-06-29 17:36:43,1201997 +0,0000030 IRP_MJ_READ UP 0x00000000 23 #
00001474 2020-06-29 17:36:43,1202064 +0,0000030 IRP_MJ_READ UP 0x00000000 31 1
00001476 2020-06-29 17:36:43,1202134 +0,0000030 IRP_MJ_READ UP 0x00000000 20
00001478 2020-06-29 17:36:43,1202204 +0,0000031 IRP_MJ_READ UP 0x00000000 30 0
00001480 2020-06-29 17:36:43,1202274 +0,0000031 IRP_MJ_READ UP 0x00000000 2e .
00001482 2020-06-29 17:36:43,1202344 +0,0000031 IRP_MJ_READ UP 0x00000000 34 4
00001484 2020-06-29 17:36:43,1202414 +0,0000031 IRP_MJ_READ UP 0x00000000 38 8
00001486 2020-06-29 17:36:43,1202484 +0,0000031 IRP_MJ_READ UP 0x00000000 2e .
00001488 2020-06-29 17:36:43,1202553 +0,0000030 IRP_MJ_READ UP 0x00000000 32 2
00001490 2020-06-29 17:36:43,1202852 +0,0000260 IRP_MJ_READ UP 0x00000000 34 4
00001492 2020-06-29 17:36:43,1202944 +0,0000033 IRP_MJ_READ UP 0x00000000 0d .
00001494 2020-06-29 17:36:43,1203017 +0,0000033 IRP_MJ_READ UP 0x00000000 0a .
00001495 2020-06-29 17:36:43,1707564 +0,0504547 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 65 6f 73 20 30 0d 0a ++eos 0..
00001497 2020-06-29 17:36:43,2723221 +0,1010410 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 6d 6f 64 65 20 30 0d 0a ++mode 0..
00001500 2020-06-29 17:36:43,8241127 +0,5000256 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00001501 2020-06-29 17:36:43,8241283 +0,0000156 IRP_MJ_READ UP 0xc0000120
00001502 2020-06-29 17:36:43,8241389 +0,0000106 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00001503 2020-06-29 17:36:43,8748945 +0,0507556 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 65 6f 69 20 31 0d 0a ++eoi 1..
00001506 2020-06-29 17:36:45,4491980 +1,4997987 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00001507 2020-06-29 17:36:45,4492159 +0,0000179 IRP_MJ_READ UP 0xc0000120
00001508 2020-06-29 17:36:45,4492304 +0,0000145 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00001510 2020-06-29 17:36:46,9716613 +1,4996070 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00001511 2020-06-29 17:36:46,9716795 +0,0000182 IRP_MJ_READ UP 0xc0000120
00001512 2020-06-29 17:36:46,9716949 +0,0000154 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00001514 2020-06-29 17:36:47,4775493 +0,4998092 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00001515 2020-06-29 17:36:47,4775652 +0,0000159 IRP_MJ_READ UP 0xc0000120
00001516 2020-06-29 17:36:47,4775792 +0,0000140 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00001518 2020-06-29 17:36:47,9775637 +0,4999546 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00001519 2020-06-29 17:36:47,9775799 +0,0000162 IRP_MJ_READ UP 0xc0000120
00001520 2020-06-29 17:36:47,9775938 +0,0000139 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00001521 2020-06-29 17:36:47,9776081 +0,0000143 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_CLR_DTR DOWN 0x00000000
00001522 2020-06-29 17:36:47,9782219 +0,0006138 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_CLR_DTR UP 0x00000000
00001523 2020-06-29 17:36:47,9782358 +0,0000139 IRP_MJ_CLOSE DOWN 0x00000000
00001524 2020-06-29 17:36:48,0820387 +0,1038029 IRP_MJ_CLOSE UP 0x00000000


Code: [Select]
;----------------------------------------------------------------------
;If you have a Prologix GPIB-USB or other serial interface, you can
;modify the interface_settings line below to specify the interface's COM port and
;communications settings for use with the KE5FX GPIB Toolkit utilities.
;
;TCP/IP devices including the Prologix GPIB-LAN adapter can be supported by
;specifing their IP address or DNS name
;
;National Instruments GPIB interfaces other than GPIB0 may also be supported
;by editing interface_settings accordingly
;
;Examples:
;
;  interface_settings  GPIB1
;  interface_settings  com3:baud=115200 parity=N data=8 stop=1
;  interface_settings  ke5fx.dyndns.org
;  interface_settings  192.168.1.103:1234
;
;To configure CONNECT.INI for use with your Prologix adapter, you can also use
;the PROLOGIX.EXE configurator included with the GPIB Toolkit distribution. 
;
;NOTE: If you have an older Prologix board with DIP switches, you will need
;to set is_Prologix to 0 (below), since it cannot be automatically configured
;by the GPIB Toolkit applications.  In case of difficulty, you can also
;download the legacy version of the GPIB Toolkit from the following link:
;[url]http://www.ke5fx.com/gpib/setup148.exe[/url]
;----------------------------------------------------------------------

interface_settings  COM7:baud=115200 parity=N data=8 stop=1

;----------------------------------------------------------------------
;Fields below have no effect if National Instruments adapter is in use
;----------------------------------------------------------------------

;
;The is_Prologix flag should be set to 0 if you are using a non-Prologix
;serial or TCP/IP interface, such as a different adapter brand, or a direct RS-232
;cable connection to your instrument.  Setting is_Prologix to 0 will prevent
;the Toolkit applications from transmitting Prologix-specific commands
;that will not be understood by the adapter or instrument in use
;

is_Prologix    1

;
;Some older Prologix boards may need a delay after writes to avoid
;buffer-overflow problems.  Use 0 milliseconds for no delay
;

write_delay_ms       100

;
;Prologix controllers can reset the device to local operation when the
;GPIB connection is closed, but since most GPIB Toolkit applications use the
;Prologix adapter in auto-read mode (++auto 1), the final ++loc command has
;the effect of addressing the instrument to talk.  This can cause error
;messages or connection problems with some equipment.  You can avoid
;this behavior by setting reset_to_local to 0 to avoid transmitting
;an ++loc command altogether, or by setting restore_auto_read to 0 to
;force the Toolkit applications to leave auto-read disabled when they exit
;
;force_auto_read defaults to 1, as required by a number of older GPIB Toolkit
;applications.  If you receive warning messages such as "Addressed to talk with
;nothing to say" when using the command line tools, you may be able to eliminate
;them by setting force_auto_read to 0.  Otherwise this parameter should be left
;at its default value
;
;restore_auto_read defaults to 0.  If set to 1, the Toolkit applications
;will restore the previous ++auto state at shutdown time.  This may be
;necessary if you are running other applications that expect auto-read mode
;to be enabled
;

enable_LON 1

reset_to_local       0
force_auto_read      1
restore_auto_read    0


Unfortunately does not work.
Only when submitting a forced command ++LON 1  works.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: serg-el on June 30, 2020, 08:38:42 am
Code: [Select]
00000000 2020-06-30 11:23:58,6139211 PnP Event: Connect DOWN 0x00000000 5c 00 3f 00 3f 00 5c 00 46 00 54 00 44 00 49 00 42 00 55 00 … \.?.?.\.F.T.D.I.B.U.…
00000001 2020-06-30 11:24:04,9676053 +6,3536842 IRP_MJ_CREATE - process 63440 () DOWN 0x00000000
00000002 2020-06-30 11:24:04,9942149 +0,0266096 IRP_MJ_CREATE UP 0x00000000
00000003 2020-06-30 11:24:04,9942800 +0,0000651 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR DOWN 0x00000000
00000004 2020-06-30 11:24:04,9952214 +0,0009414 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR UP 0x00000000
00000023 2020-06-30 11:24:04,9954435 +0,0000061 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE DOWN 0x00000000 00 c2 01 00 ....
00000024 2020-06-30 11:24:04,9962129 +0,0007694 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE UP 0x00000000
00000025 2020-06-30 11:24:04,9962199 +0,0000070 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR DOWN 0x00000000
00000026 2020-06-30 11:24:04,9972091 +0,0009892 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR UP 0x00000000
00000027 2020-06-30 11:24:04,9972153 +0,0000062 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL DOWN 0x00000000 00 00 08 ...
00000028 2020-06-30 11:24:04,9982126 +0,0009973 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL UP 0x00000000
00000029 2020-06-30 11:24:04,9982173 +0,0000047 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS DOWN 0x00000000 00 00 00 00 11 13 ......
00000030 2020-06-30 11:24:04,9982198 +0,0000025 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS UP 0x00000000
00000031 2020-06-30 11:24:04,9982240 +0,0000042 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW DOWN 0x00000000 09 00 00 00 80 00 00 00 00 04 00 00 00 04 00 00 ................
00000032 2020-06-30 11:24:05,0002204 +0,0019964 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW UP 0x00000000
00000033 2020-06-30 11:24:05,0002659 +0,0000455 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_TIMEOUTS DOWN 0x00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ....................
00000034 2020-06-30 11:24:05,0002737 +0,0000078 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_TIMEOUTS UP 0x00000000
00000053 2020-06-30 11:24:05,0003531 +0,0000059 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE DOWN 0x00000000 00 c2 01 00 ....
00000054 2020-06-30 11:24:05,0012158 +0,0008627 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE UP 0x00000000
00000055 2020-06-30 11:24:05,0012250 +0,0000092 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR DOWN 0x00000000
00000056 2020-06-30 11:24:05,0022237 +0,0009987 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR UP 0x00000000
00000057 2020-06-30 11:24:05,0022519 +0,0000282 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL DOWN 0x00000000 00 00 08 ...
00000058 2020-06-30 11:24:05,0032104 +0,0009585 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL UP 0x00000000
00000059 2020-06-30 11:24:05,0032169 +0,0000065 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS DOWN 0x00000000 00 00 00 00 11 13 ......
00000060 2020-06-30 11:24:05,0032208 +0,0000039 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS UP 0x00000000
00000061 2020-06-30 11:24:05,0032250 +0,0000042 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW DOWN 0x00000000 09 00 00 00 80 00 00 00 00 04 00 00 00 04 00 00 ................
00000062 2020-06-30 11:24:05,0042256 +0,0010006 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW UP 0x00000000
00000063 2020-06-30 11:24:05,0042516 +0,0000260 IRP_MJ_WRITE DOWN 0x00000000 2b 2b ++
00000066 2020-06-30 11:24:05,3062506 +0,2011814 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000067 2020-06-30 11:24:05,3062674 +0,0000168 IRP_MJ_READ UP 0xc0000120
00000068 2020-06-30 11:24:05,3062772 +0,0000098 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000069 2020-06-30 11:24:05,3063012 +0,0000240 IRP_MJ_WRITE DOWN 0x00000000 76 65 72 0d 0a ver..
00000072 2020-06-30 11:24:05,4682304 +0,1609668 IRP_MJ_READ UP 0x00000000 41 A
00000074 2020-06-30 11:24:05,4682729 +0,0000154 IRP_MJ_READ UP 0x00000000 52 R
00000076 2020-06-30 11:24:05,4682818 +0,0000030 IRP_MJ_READ UP 0x00000000 34 4
00000078 2020-06-30 11:24:05,4682888 +0,0000031 IRP_MJ_READ UP 0x00000000 38 8
00000080 2020-06-30 11:24:05,4682958 +0,0000028 IRP_MJ_READ UP 0x00000000 38 8
00000082 2020-06-30 11:24:05,4683028 +0,0000031 IRP_MJ_READ UP 0x00000000 20
00000084 2020-06-30 11:24:05,4683100 +0,0000030 IRP_MJ_READ UP 0x00000000 47 G
00000086 2020-06-30 11:24:05,4683170 +0,0000030 IRP_MJ_READ UP 0x00000000 50 P
00000088 2020-06-30 11:24:05,4683237 +0,0000028 IRP_MJ_READ UP 0x00000000 49 I
00000090 2020-06-30 11:24:05,4683307 +0,0000028 IRP_MJ_READ UP 0x00000000 42 B
00000092 2020-06-30 11:24:05,4683480 +0,0000030 IRP_MJ_READ UP 0x00000000 2d -
00000094 2020-06-30 11:24:05,4683559 +0,0000031 IRP_MJ_READ UP 0x00000000 55 U
00000096 2020-06-30 11:24:05,4683637 +0,0000031 IRP_MJ_READ UP 0x00000000 53 S
00000098 2020-06-30 11:24:05,4683718 +0,0000042 IRP_MJ_READ UP 0x00000000 42 B
00000100 2020-06-30 11:24:05,4683788 +0,0000031 IRP_MJ_READ UP 0x00000000 20
00000102 2020-06-30 11:24:05,4683858 +0,0000031 IRP_MJ_READ UP 0x00000000 2c ,
00000104 2020-06-30 11:24:05,4683927 +0,0000030 IRP_MJ_READ UP 0x00000000 20
00000106 2020-06-30 11:24:05,4683997 +0,0000031 IRP_MJ_READ UP 0x00000000 76 v
00000108 2020-06-30 11:24:05,4684064 +0,0000030 IRP_MJ_READ UP 0x00000000 65 e
00000110 2020-06-30 11:24:05,4684134 +0,0000031 IRP_MJ_READ UP 0x00000000 72 r
00000112 2020-06-30 11:24:05,4684204 +0,0000031 IRP_MJ_READ UP 0x00000000 73 s
00000114 2020-06-30 11:24:05,4684271 +0,0000028 IRP_MJ_READ UP 0x00000000 69 i
00000116 2020-06-30 11:24:05,4684341 +0,0000031 IRP_MJ_READ UP 0x00000000 6f o
00000118 2020-06-30 11:24:05,4684411 +0,0000031 IRP_MJ_READ UP 0x00000000 6e n
00000120 2020-06-30 11:24:05,4684478 +0,0000028 IRP_MJ_READ UP 0x00000000 20
00000122 2020-06-30 11:24:05,4684548 +0,0000031 IRP_MJ_READ UP 0x00000000 35 5
00000124 2020-06-30 11:24:05,4684617 +0,0000030 IRP_MJ_READ UP 0x00000000 2e .
00000126 2020-06-30 11:24:05,4684684 +0,0000030 IRP_MJ_READ UP 0x00000000 30 0
00000128 2020-06-30 11:24:05,4684751 +0,0000027 IRP_MJ_READ UP 0x00000000 20
00000130 2020-06-30 11:24:05,4684824 +0,0000031 IRP_MJ_READ UP 0x00000000 23 #
00000132 2020-06-30 11:24:05,4684891 +0,0000031 IRP_MJ_READ UP 0x00000000 31 1
00000134 2020-06-30 11:24:05,4684961 +0,0000028 IRP_MJ_READ UP 0x00000000 20
00000136 2020-06-30 11:24:05,4685034 +0,0000031 IRP_MJ_READ UP 0x00000000 30 0
00000138 2020-06-30 11:24:05,4685101 +0,0000031 IRP_MJ_READ UP 0x00000000 2e .
00000140 2020-06-30 11:24:05,4685171 +0,0000031 IRP_MJ_READ UP 0x00000000 34 4
00000142 2020-06-30 11:24:05,4685252 +0,0000042 IRP_MJ_READ UP 0x00000000 38 8
00000144 2020-06-30 11:24:05,4685319 +0,0000028 IRP_MJ_READ UP 0x00000000 2e .
00000146 2020-06-30 11:24:05,4685388 +0,0000030 IRP_MJ_READ UP 0x00000000 32 2
00000148 2020-06-30 11:24:05,4685458 +0,0000030 IRP_MJ_READ UP 0x00000000 34 4
00000150 2020-06-30 11:24:05,4685528 +0,0000031 IRP_MJ_READ UP 0x00000000 0d .
00000152 2020-06-30 11:24:05,4685598 +0,0000031 IRP_MJ_READ UP 0x00000000 0a .
00000153 2020-06-30 11:24:05,4690140 +0,0004542 IRP_MJ_WRITE DOWN 0x00000000 2b 2b ++
00000156 2020-06-30 11:24:05,5943529 +0,1006109 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000157 2020-06-30 11:24:05,5943677 +0,0000148 IRP_MJ_READ UP 0xc0000120
00000158 2020-06-30 11:24:05,5943761 +0,0000084 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000159 2020-06-30 11:24:05,5944015 +0,0000254 IRP_MJ_WRITE DOWN 0x00000000 6d 6f 64 65 0d 0a mode..
00000162 2020-06-30 11:24:06,1021956 +0,5069560 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000163 2020-06-30 11:24:06,1022132 +0,0000176 IRP_MJ_READ UP 0xc0000120
00000164 2020-06-30 11:24:06,1022216 +0,0000084 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000165 2020-06-30 11:24:06,1024828 +0,0002612 IRP_MJ_WRITE DOWN 0x00000000 2b 2b ++
00000168 2020-06-30 11:24:06,2291545 +0,1005913 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000169 2020-06-30 11:24:06,2291704 +0,0000159 IRP_MJ_READ UP 0xc0000120
00000170 2020-06-30 11:24:06,2291794 +0,0000090 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000171 2020-06-30 11:24:06,2292062 +0,0000268 IRP_MJ_WRITE DOWN 0x00000000 61 64 64 72 0d 0a addr..
00000174 2020-06-30 11:24:06,6682581 +0,4379981 IRP_MJ_READ UP 0x00000000 55 U
00000176 2020-06-30 11:24:06,6683005 +0,0000159 IRP_MJ_READ UP 0x00000000 6e n
00000178 2020-06-30 11:24:06,6683092 +0,0000031 IRP_MJ_READ UP 0x00000000 72 r
00000180 2020-06-30 11:24:06,6683162 +0,0000028 IRP_MJ_READ UP 0x00000000 65 e
00000182 2020-06-30 11:24:06,6683235 +0,0000034 IRP_MJ_READ UP 0x00000000 63 c
00000184 2020-06-30 11:24:06,6683304 +0,0000033 IRP_MJ_READ UP 0x00000000 6f o
00000186 2020-06-30 11:24:06,6683383 +0,0000040 IRP_MJ_READ UP 0x00000000 67 g
00000188 2020-06-30 11:24:06,6683452 +0,0000030 IRP_MJ_READ UP 0x00000000 6e n
00000190 2020-06-30 11:24:06,6683519 +0,0000027 IRP_MJ_READ UP 0x00000000 69 i
00000192 2020-06-30 11:24:06,6683589 +0,0000030 IRP_MJ_READ UP 0x00000000 7a z
00000194 2020-06-30 11:24:06,6683659 +0,0000031 IRP_MJ_READ UP 0x00000000 65 e
00000196 2020-06-30 11:24:06,6683729 +0,0000031 IRP_MJ_READ UP 0x00000000 64 d
00000198 2020-06-30 11:24:06,6683796 +0,0000028 IRP_MJ_READ UP 0x00000000 20
00000200 2020-06-30 11:24:06,6683866 +0,0000028 IRP_MJ_READ UP 0x00000000 63 c
00000202 2020-06-30 11:24:06,6683936 +0,0000031 IRP_MJ_READ UP 0x00000000 6f o
00000204 2020-06-30 11:24:06,6684006 +0,0000031 IRP_MJ_READ UP 0x00000000 6d m
00000206 2020-06-30 11:24:06,6684073 +0,0000031 IRP_MJ_READ UP 0x00000000 6d m
00000208 2020-06-30 11:24:06,6684142 +0,0000030 IRP_MJ_READ UP 0x00000000 61 a
00000210 2020-06-30 11:24:06,6684212 +0,0000030 IRP_MJ_READ UP 0x00000000 6e n
00000212 2020-06-30 11:24:06,6684279 +0,0000028 IRP_MJ_READ UP 0x00000000 64 d
00000214 2020-06-30 11:24:06,6684349 +0,0000031 IRP_MJ_READ UP 0x00000000 0d .
00000216 2020-06-30 11:24:06,6684419 +0,0000031 IRP_MJ_READ UP 0x00000000 0a .
00000217 2020-06-30 11:24:06,6686305 +0,0001886 IRP_MJ_WRITE DOWN 0x00000000 2b 2b ++
00000220 2020-06-30 11:24:06,8951987 +0,2011667 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000221 2020-06-30 11:24:06,8952143 +0,0000156 IRP_MJ_READ UP 0xc0000120
00000222 2020-06-30 11:24:06,8952232 +0,0000089 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000223 2020-06-30 11:24:06,8952464 +0,0000232 IRP_MJ_WRITE DOWN 0x00000000 65 6f 69 0d 0a eoi..
00000226 2020-06-30 11:24:07,4040181 +0,5077791 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000227 2020-06-30 11:24:07,4040326 +0,0000145 IRP_MJ_READ UP 0xc0000120
00000228 2020-06-30 11:24:07,4040415 +0,0000089 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000229 2020-06-30 11:24:07,4040773 +0,0000358 IRP_MJ_WRITE DOWN 0x00000000 2b 2b ++
00000232 2020-06-30 11:24:07,5299994 +0,1005778 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000233 2020-06-30 11:24:07,5300143 +0,0000149 IRP_MJ_READ UP 0xc0000120
00000234 2020-06-30 11:24:07,5300226 +0,0000083 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000235 2020-06-30 11:24:07,5300481 +0,0000255 IRP_MJ_WRITE DOWN 0x00000000 65 6f 74 5f 65 6e 61 62 6c 65 0d 0a eot_enable..
00000238 2020-06-30 11:24:07,8682483 +0,3369948 IRP_MJ_READ UP 0x00000000 55 U
00000240 2020-06-30 11:24:07,8683000 +0,0000162 IRP_MJ_READ UP 0x00000000 6e n
00000242 2020-06-30 11:24:07,8683089 +0,0000030 IRP_MJ_READ UP 0x00000000 72 r
00000244 2020-06-30 11:24:07,8683159 +0,0000028 IRP_MJ_READ UP 0x00000000 65 e
00000246 2020-06-30 11:24:07,8683240 +0,0000039 IRP_MJ_READ UP 0x00000000 63 c
00000248 2020-06-30 11:24:07,8683310 +0,0000031 IRP_MJ_READ UP 0x00000000 6f o
00000250 2020-06-30 11:24:07,8683383 +0,0000031 IRP_MJ_READ UP 0x00000000 67 g
00000252 2020-06-30 11:24:07,8683450 +0,0000028 IRP_MJ_READ UP 0x00000000 6e n
00000254 2020-06-30 11:24:07,8683519 +0,0000030 IRP_MJ_READ UP 0x00000000 69 i
00000256 2020-06-30 11:24:07,8683587 +0,0000028 IRP_MJ_READ UP 0x00000000 7a z
00000258 2020-06-30 11:24:07,8683656 +0,0000030 IRP_MJ_READ UP 0x00000000 65 e
00000260 2020-06-30 11:24:07,8683726 +0,0000031 IRP_MJ_READ UP 0x00000000 64 d
00000262 2020-06-30 11:24:07,8683796 +0,0000031 IRP_MJ_READ UP 0x00000000 20
00000264 2020-06-30 11:24:07,8683863 +0,0000028 IRP_MJ_READ UP 0x00000000 63 c
00000266 2020-06-30 11:24:07,8683933 +0,0000031 IRP_MJ_READ UP 0x00000000 6f o
00000268 2020-06-30 11:24:07,8684003 +0,0000031 IRP_MJ_READ UP 0x00000000 6d m
00000270 2020-06-30 11:24:07,8684073 +0,0000031 IRP_MJ_READ UP 0x00000000 6d m
00000272 2020-06-30 11:24:07,8684140 +0,0000028 IRP_MJ_READ UP 0x00000000 61 a
00000274 2020-06-30 11:24:07,8684210 +0,0000031 IRP_MJ_READ UP 0x00000000 6e n
00000276 2020-06-30 11:24:07,8684279 +0,0000030 IRP_MJ_READ UP 0x00000000 64 d
00000278 2020-06-30 11:24:07,8684346 +0,0000028 IRP_MJ_READ UP 0x00000000 0d .
00000280 2020-06-30 11:24:07,8684422 +0,0000034 IRP_MJ_READ UP 0x00000000 0a .
00000281 2020-06-30 11:24:07,8684852 +0,0000430 IRP_MJ_WRITE DOWN 0x00000000 2b 2b ++
00000284 2020-06-30 11:24:08,0954587 +0,2012021 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000285 2020-06-30 11:24:08,0954738 +0,0000151 IRP_MJ_READ UP 0xc0000120
00000286 2020-06-30 11:24:08,0954814 +0,0000076 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000287 2020-06-30 11:24:08,0955076 +0,0000262 IRP_MJ_WRITE DOWN 0x00000000 65 6f 74 5f 63 68 61 72 0d 0a eot_char..
00000290 2020-06-30 11:24:08,6033049 +0,5070726 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000291 2020-06-30 11:24:08,6033188 +0,0000139 IRP_MJ_READ UP 0xc0000120
00000292 2020-06-30 11:24:08,6033300 +0,0000112 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000293 2020-06-30 11:24:08,6034758 +0,0001458 IRP_MJ_WRITE DOWN 0x00000000 2b 2b ++
00000296 2020-06-30 11:24:08,7302584 +0,1005935 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000297 2020-06-30 11:24:08,7302732 +0,0000148 IRP_MJ_READ UP 0xc0000120
00000298 2020-06-30 11:24:08,7302819 +0,0000087 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000299 2020-06-30 11:24:08,7303062 +0,0000243 IRP_MJ_WRITE DOWN 0x00000000 65 6f 73 0d 0a eos..
00000302 2020-06-30 11:24:09,0682564 +0,3370051 IRP_MJ_READ UP 0x00000000 55 U
00000304 2020-06-30 11:24:09,0683036 +0,0000165 IRP_MJ_READ UP 0x00000000 6e n
00000306 2020-06-30 11:24:09,0683123 +0,0000031 IRP_MJ_READ UP 0x00000000 72 r
00000308 2020-06-30 11:24:09,0683193 +0,0000028 IRP_MJ_READ UP 0x00000000 65 e
00000310 2020-06-30 11:24:09,0683262 +0,0000030 IRP_MJ_READ UP 0x00000000 63 c
00000312 2020-06-30 11:24:09,0683332 +0,0000030 IRP_MJ_READ UP 0x00000000 6f o
00000314 2020-06-30 11:24:09,0683399 +0,0000028 IRP_MJ_READ UP 0x00000000 67 g
00000316 2020-06-30 11:24:09,0683469 +0,0000031 IRP_MJ_READ UP 0x00000000 6e n
00000318 2020-06-30 11:24:09,0683536 +0,0000030 IRP_MJ_READ UP 0x00000000 69 i
00000320 2020-06-30 11:24:09,0683603 +0,0000028 IRP_MJ_READ UP 0x00000000 7a z
00000322 2020-06-30 11:24:09,0683670 +0,0000028 IRP_MJ_READ UP 0x00000000 65 e
00000324 2020-06-30 11:24:09,0683740 +0,0000031 IRP_MJ_READ UP 0x00000000 64 d
00000326 2020-06-30 11:24:09,0683810 +0,0000031 IRP_MJ_READ UP 0x00000000 20
00000328 2020-06-30 11:24:09,0683877 +0,0000028 IRP_MJ_READ UP 0x00000000 63 c
00000330 2020-06-30 11:24:09,0683950 +0,0000031 IRP_MJ_READ UP 0x00000000 6f o
00000332 2020-06-30 11:24:09,0684017 +0,0000031 IRP_MJ_READ UP 0x00000000 6d m
00000334 2020-06-30 11:24:09,0684084 +0,0000031 IRP_MJ_READ UP 0x00000000 6d m
00000336 2020-06-30 11:24:09,0684154 +0,0000031 IRP_MJ_READ UP 0x00000000 61 a
00000338 2020-06-30 11:24:09,0684221 +0,0000031 IRP_MJ_READ UP 0x00000000 6e n
00000340 2020-06-30 11:24:09,0684288 +0,0000031 IRP_MJ_READ UP 0x00000000 64 d
00000342 2020-06-30 11:24:09,0684355 +0,0000028 IRP_MJ_READ UP 0x00000000 0d .
00000344 2020-06-30 11:24:09,0684425 +0,0000031 IRP_MJ_READ UP 0x00000000 0a .
00000346 2020-06-30 11:24:09,1218777 +0,0501471 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000347 2020-06-30 11:24:09,1218926 +0,0000149 IRP_MJ_READ UP 0xc0000120

00000696 2020-06-30 11:24:18,6048263 +0,0000084 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000698 2020-06-30 11:24:18,7093139 +0,0507744 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000699 2020-06-30 11:24:18,7093292 +0,0000153 IRP_MJ_READ UP 0xc0000120
00000700 2020-06-30 11:24:18,7093401 +0,0000109 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000702 2020-06-30 11:24:18,8646174 +0,1003457 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000703 2020-06-30 11:24:18,8646333 +0,0000159 IRP_MJ_READ UP 0xc0000120
00000704 2020-06-30 11:24:18,8646428 +0,0000095 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000705 2020-06-30 11:24:18,8646800 +0,0000372 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 6c 6f 6e 20 31 0d 0a ++lon 1..
00000708 2020-06-30 11:24:19,0159612 +0,0507866 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000709 2020-06-30 11:24:19,0159771 +0,0000159 IRP_MJ_READ UP 0xc0000120
00000710 2020-06-30 11:24:19,0159866 +0,0000095 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000711 2020-06-30 11:24:19,0160104 +0,0000238 IRP_MJ_WRITE DOWN 0x00000000 2b 2b ++
00000714 2020-06-30 11:24:19,1419409 +0,1006111 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000715 2020-06-30 11:24:19,1419560 +0,0000151 IRP_MJ_READ UP 0xc0000120
00000716 2020-06-30 11:24:19,1419652 +0,0000092 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000717 2020-06-30 11:24:19,1419895 +0,0000243 IRP_MJ_WRITE DOWN 0x00000000 6d 6f 64 65 0d 0a mode..
00000720 2020-06-30 11:24:19,6498122 +0,5075729 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000721 2020-06-30 11:24:19,6498278 +0,0000156 IRP_MJ_READ UP 0xc0000120
00000722 2020-06-30 11:24:19,6498373 +0,0000095 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000723 2020-06-30 11:24:19,6498711 +0,0000338 IRP_MJ_WRITE DOWN 0x00000000 2b 2b ++
00000726 2020-06-30 11:24:19,7757642 +0,1005949 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000727 2020-06-30 11:24:19,7757793 +0,0000151 IRP_MJ_READ UP 0xc0000120
00000728 2020-06-30 11:24:19,7757879 +0,0000086 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000729 2020-06-30 11:24:19,7758145 +0,0000266 IRP_MJ_WRITE DOWN 0x00000000 61 64 64 72 0d 0a addr..
00000732 2020-06-30 11:24:20,2836003 +0,5073643 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000733 2020-06-30 11:24:20,2836159 +0,0000156 IRP_MJ_READ UP 0xc0000120
00000734 2020-06-30 11:24:20,2836234 +0,0000075 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000735 2020-06-30 11:24:20,2837570 +0,0001336 IRP_MJ_WRITE DOWN 0x00000000 2b 2b ++
00000738 2020-06-30 11:24:20,5101810 +0,2011753 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000739 2020-06-30 11:24:20,5102006 +0,0000196 IRP_MJ_READ UP 0xc0000120
00000740 2020-06-30 11:24:20,5102123 +0,0000117 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000741 2020-06-30 11:24:20,5102411 +0,0000288 IRP_MJ_WRITE DOWN 0x00000000 65 6f 69 0d 0a eoi..
00000744 2020-06-30 11:24:21,0190041 +0,5077534 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000745 2020-06-30 11:24:21,0190203 +0,0000162 IRP_MJ_READ UP 0xc0000120
00000746 2020-06-30 11:24:21,0190300 +0,0000097 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000747 2020-06-30 11:24:21,0190675 +0,0000375 IRP_MJ_WRITE DOWN 0x00000000 2b 2b ++
00000750 2020-06-30 11:24:21,1459498 +0,1005720 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000751 2020-06-30 11:24:21,1459649 +0,0000151 IRP_MJ_READ UP 0xc0000120
00000752 2020-06-30 11:24:21,1459727 +0,0000078 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000753 2020-06-30 11:24:21,1459973 +0,0000246 IRP_MJ_WRITE DOWN 0x00000000 65 6f 74 5f 65 6e 61 62 6c 65 0d 0a eot_enable..
00000756 2020-06-30 11:24:21,6538197 +0,5075763 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000757 2020-06-30 11:24:21,6538356 +0,0000159 IRP_MJ_READ UP 0xc0000120
00000758 2020-06-30 11:24:21,6538448 +0,0000092 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000759 2020-06-30 11:24:21,6538842 +0,0000394 IRP_MJ_WRITE DOWN 0x00000000 2b 2b ++
00000762 2020-06-30 11:24:21,7797734 +0,1006069 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000763 2020-06-30 11:24:21,7797887 +0,0000153 IRP_MJ_READ UP 0xc0000120
00000764 2020-06-30 11:24:21,7797974 +0,0000087 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000765 2020-06-30 11:24:21,7798228 +0,0000254 IRP_MJ_WRITE DOWN 0x00000000 65 6f 74 5f 63 68 61 72 0d 0a eot_char..
00000768 2020-06-30 11:24:22,2652588 +0,4850186 IRP_MJ_READ UP 0x00000000 55 U
00000770 2020-06-30 11:24:22,2653105 +0,0000162 IRP_MJ_READ UP 0x00000000 6e n
00000772 2020-06-30 11:24:22,2653194 +0,0000030 IRP_MJ_READ UP 0x00000000 72 r
00000774 2020-06-30 11:24:22,2653264 +0,0000028 IRP_MJ_READ UP 0x00000000 65 e
00000776 2020-06-30 11:24:22,2653348 +0,0000045 IRP_MJ_READ UP 0x00000000 63 c
00000778 2020-06-30 11:24:22,2653418 +0,0000031 IRP_MJ_READ UP 0x00000000 6f o
00000780 2020-06-30 11:24:22,2653485 +0,0000031 IRP_MJ_READ UP 0x00000000 67 g
00000782 2020-06-30 11:24:22,2653555 +0,0000031 IRP_MJ_READ UP 0x00000000 6e n
00000784 2020-06-30 11:24:22,2653622 +0,0000031 IRP_MJ_READ UP 0x00000000 69 i
00000786 2020-06-30 11:24:22,2653689 +0,0000028 IRP_MJ_READ UP 0x00000000 7a z
00000788 2020-06-30 11:24:22,2653759 +0,0000031 IRP_MJ_READ UP 0x00000000 65 e
00000790 2020-06-30 11:24:22,2653831 +0,0000030 IRP_MJ_READ UP 0x00000000 64 d
00000792 2020-06-30 11:24:22,2653901 +0,0000031 IRP_MJ_READ UP 0x00000000 20
00000794 2020-06-30 11:24:22,2653968 +0,0000028 IRP_MJ_READ UP 0x00000000 63 c
00000796 2020-06-30 11:24:22,2654038 +0,0000031 IRP_MJ_READ UP 0x00000000 6f o
00000798 2020-06-30 11:24:22,2654105 +0,0000031 IRP_MJ_READ UP 0x00000000 6d m
00000800 2020-06-30 11:24:22,2654172 +0,0000031 IRP_MJ_READ UP 0x00000000 6d m
00000802 2020-06-30 11:24:22,2654239 +0,0000028 IRP_MJ_READ UP 0x00000000 61 a
00000804 2020-06-30 11:24:22,2654309 +0,0000031 IRP_MJ_READ UP 0x00000000 6e n
00000806 2020-06-30 11:24:22,2654379 +0,0000031 IRP_MJ_READ UP 0x00000000 64 d
00000808 2020-06-30 11:24:22,2654446 +0,0000031 IRP_MJ_READ UP 0x00000000 0d .
00000810 2020-06-30 11:24:22,2654516 +0,0000031 IRP_MJ_READ UP 0x00000000 0a .
00000811 2020-06-30 11:24:22,2655854 +0,0001338 IRP_MJ_WRITE DOWN 0x00000000 2b 2b ++
00000814 2020-06-30 11:24:22,3921397 +0,1006242 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000815 2020-06-30 11:24:22,3921554 +0,0000157 IRP_MJ_READ UP 0xc0000120
00000816 2020-06-30 11:24:22,3921627 +0,0000073 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000817 2020-06-30 11:24:22,3921872 +0,0000245 IRP_MJ_WRITE DOWN 0x00000000 65 6f 73 0d 0a eos..
00000820 2020-06-30 11:24:22,9009371 +0,5076830 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000821 2020-06-30 11:24:22,9009550 +0,0000179 IRP_MJ_READ UP 0xc0000120
00000822 2020-06-30 11:24:22,9009656 +0,0000106 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000824 2020-06-30 11:24:32,0078468 +0,0000195 IRP_MJ_READ UP 0x00000000 30 0
00000826 2020-06-30 11:24:32,0078603 +0,0000040 IRP_MJ_READ UP 0x00000000 0d .
00000828 2020-06-30 11:24:32,0078689 +0,0000033 IRP_MJ_READ UP 0x00000000 0a .
00000830 2020-06-30 11:24:32,2626538 +0,2537903 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000831 2020-06-30 11:24:32,2626689 +0,0000151 IRP_MJ_READ UP 0xc0000120
00000832 2020-06-30 11:24:32,2626764 +0,0000075 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000834 2020-06-30 11:24:32,3134150 +0,0503150 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000835 2020-06-30 11:24:32,3134318 +0,0000168 IRP_MJ_READ UP 0xc0000120

00000960 2020-06-30 11:24:35,6622364 +0,0000089 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000962 2020-06-30 11:24:35,7667478 +0,0507908 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000963 2020-06-30 11:24:35,7667629 +0,0000151 IRP_MJ_READ UP 0xc0000120
00000964 2020-06-30 11:24:35,7667735 +0,0000106 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000966 2020-06-30 11:24:35,8819515 +0,0507291 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000967 2020-06-30 11:24:35,8819669 +0,0000154 IRP_MJ_READ UP 0xc0000120
00000968 2020-06-30 11:24:35,8819755 +0,0000086 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000970 2020-06-30 11:24:35,9874258 +0,0504734 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00000971 2020-06-30 11:24:35,9874406 +0,0000148 IRP_MJ_READ UP 0xc0000120
00000972 2020-06-30 11:24:35,9874482 +0,0000076 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00000973 2020-06-30 11:24:36,0196539 +0,0322057 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_CLR_DTR DOWN 0x00000000
00000974 2020-06-30 11:24:36,0202015 +0,0005476 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_CLR_DTR UP 0x00000000
00000975 2020-06-30 11:24:36,0202339 +0,0000324 IRP_MJ_CLOSE DOWN 0x00000000
00000976 2020-06-30 11:24:36,1378109 +0,1175770 IRP_MJ_CLOSE UP 0x00000000
00000977 2020-06-30 11:24:47,0349609 +10,8971500 IRP_MJ_CREATE - process 36256 () DOWN 0x00000000
00000978 2020-06-30 11:24:47,0551640 +0,0202031 IRP_MJ_CREATE UP 0x00000000
00000979 2020-06-30 11:24:47,0552193 +0,0000553 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR DOWN 0x00000000
00000980 2020-06-30 11:24:47,0561591 +0,0009398 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR UP 0x00000000
00000999 2020-06-30 11:24:47,0563877 +0,0000059 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE DOWN 0x00000000 00 c2 01 00 ....
00001000 2020-06-30 11:24:47,0571590 +0,0007713 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE UP 0x00000000
00001001 2020-06-30 11:24:47,0571665 +0,0000075 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR DOWN 0x00000000
00001002 2020-06-30 11:24:47,0581616 +0,0009951 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR UP 0x00000000
00001003 2020-06-30 11:24:47,0581678 +0,0000062 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL DOWN 0x00000000 00 00 08 ...
00001004 2020-06-30 11:24:47,0591576 +0,0009898 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL UP 0x00000000
00001005 2020-06-30 11:24:47,0591623 +0,0000047 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS DOWN 0x00000000 00 00 00 00 11 13 ......
00001006 2020-06-30 11:24:47,0591654 +0,0000031 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS UP 0x00000000
00001007 2020-06-30 11:24:47,0591696 +0,0000042 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW DOWN 0x00000000 09 00 00 00 80 00 00 00 00 04 00 00 00 04 00 00 ................
00001008 2020-06-30 11:24:47,0601582 +0,0009886 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW UP 0x00000000
00001009 2020-06-30 11:24:47,0601661 +0,0000079 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_TIMEOUTS DOWN 0x00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ....................
00001010 2020-06-30 11:24:47,0601689 +0,0000028 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_TIMEOUTS UP 0x00000000
00001029 2020-06-30 11:24:47,0602365 +0,0000056 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE DOWN 0x00000000 00 c2 01 00 ....
00001030 2020-06-30 11:24:47,0611662 +0,0009297 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE UP 0x00000000
00001031 2020-06-30 11:24:47,0611729 +0,0000067 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_RTS DOWN 0x00000000
00001032 2020-06-30 11:24:47,0611757 +0,0000028 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_RTS UP 0xc000000d
00001033 2020-06-30 11:24:47,0611824 +0,0000067 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR DOWN 0x00000000
00001034 2020-06-30 11:24:47,0621585 +0,0009761 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR UP 0x00000000
00001035 2020-06-30 11:24:47,0621641 +0,0000056 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL DOWN 0x00000000 00 00 08 ...
00001036 2020-06-30 11:24:47,0631583 +0,0009942 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL UP 0x00000000
00001037 2020-06-30 11:24:47,0631634 +0,0000051 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS DOWN 0x00000000 00 00 00 00 11 13 ......
00001038 2020-06-30 11:24:47,0631656 +0,0000022 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS UP 0x00000000
00001039 2020-06-30 11:24:47,0631695 +0,0000039 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW DOWN 0x00000000 01 00 00 00 40 00 00 00 00 04 00 00 00 04 00 00 ....@...........
00001040 2020-06-30 11:24:47,0651823 +0,0020128 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW UP 0x00000000
00001041 2020-06-30 11:24:47,0905596 +0,0253773 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 76 65 72 0d 0a ++ver..
00001044 2020-06-30 11:24:47,4491767 +0,3579639 IRP_MJ_READ UP 0x00000000 41 A
00001046 2020-06-30 11:24:47,4492460 +0,0000148 IRP_MJ_READ UP 0x00000000 52 R
00001048 2020-06-30 11:24:47,4492546 +0,0000030 IRP_MJ_READ UP 0x00000000 34 4
00001050 2020-06-30 11:24:47,4652092 +0,0159504 IRP_MJ_READ UP 0x00000000 38 8
00001052 2020-06-30 11:24:47,4652421 +0,0000100 IRP_MJ_READ UP 0x00000000 38 8
00001054 2020-06-30 11:24:47,4652508 +0,0000034 IRP_MJ_READ UP 0x00000000 20
00001056 2020-06-30 11:24:47,4652581 +0,0000031 IRP_MJ_READ UP 0x00000000 47 G
00001058 2020-06-30 11:24:47,4652650 +0,0000030 IRP_MJ_READ UP 0x00000000 50 P
00001060 2020-06-30 11:24:47,4652720 +0,0000030 IRP_MJ_READ UP 0x00000000 49 I
00001062 2020-06-30 11:24:47,4652787 +0,0000028 IRP_MJ_READ UP 0x00000000 42 B
00001064 2020-06-30 11:24:47,4652854 +0,0000028 IRP_MJ_READ UP 0x00000000 2d -
00001066 2020-06-30 11:24:47,4652930 +0,0000031 IRP_MJ_READ UP 0x00000000 55 U
00001068 2020-06-30 11:24:47,4653000 +0,0000031 IRP_MJ_READ UP 0x00000000 53 S
00001070 2020-06-30 11:24:47,4653067 +0,0000031 IRP_MJ_READ UP 0x00000000 42 B
00001072 2020-06-30 11:24:47,4653136 +0,0000030 IRP_MJ_READ UP 0x00000000 20
00001074 2020-06-30 11:24:47,4653206 +0,0000030 IRP_MJ_READ UP 0x00000000 2c ,
00001076 2020-06-30 11:24:47,4653273 +0,0000030 IRP_MJ_READ UP 0x00000000 20
00001078 2020-06-30 11:24:47,4653340 +0,0000028 IRP_MJ_READ UP 0x00000000 76 v
00001080 2020-06-30 11:24:47,4653410 +0,0000028 IRP_MJ_READ UP 0x00000000 65 e
00001082 2020-06-30 11:24:47,4653477 +0,0000028 IRP_MJ_READ UP 0x00000000 72 r
00001084 2020-06-30 11:24:47,4653547 +0,0000031 IRP_MJ_READ UP 0x00000000 73 s
00001086 2020-06-30 11:24:47,4653614 +0,0000028 IRP_MJ_READ UP 0x00000000 69 i
00001088 2020-06-30 11:24:47,4653684 +0,0000031 IRP_MJ_READ UP 0x00000000 6f o
00001090 2020-06-30 11:24:47,4653751 +0,0000028 IRP_MJ_READ UP 0x00000000 6e n
00001092 2020-06-30 11:24:47,4653821 +0,0000031 IRP_MJ_READ UP 0x00000000 20
00001094 2020-06-30 11:24:47,4653888 +0,0000028 IRP_MJ_READ UP 0x00000000 35 5
00001096 2020-06-30 11:24:47,4653955 +0,0000028 IRP_MJ_READ UP 0x00000000 2e .
00001098 2020-06-30 11:24:47,4654022 +0,0000028 IRP_MJ_READ UP 0x00000000 30 0
00001100 2020-06-30 11:24:47,4654092 +0,0000028 IRP_MJ_READ UP 0x00000000 20
00001102 2020-06-30 11:24:47,4654159 +0,0000028 IRP_MJ_READ UP 0x00000000 23 #
00001104 2020-06-30 11:24:47,4654226 +0,0000028 IRP_MJ_READ UP 0x00000000 31 1
00001106 2020-06-30 11:24:47,4654296 +0,0000028 IRP_MJ_READ UP 0x00000000 20
00001108 2020-06-30 11:24:47,4654363 +0,0000028 IRP_MJ_READ UP 0x00000000 30 0
00001110 2020-06-30 11:24:47,4654433 +0,0000031 IRP_MJ_READ UP 0x00000000 2e .
00001112 2020-06-30 11:24:47,4654500 +0,0000028 IRP_MJ_READ UP 0x00000000 34 4
00001114 2020-06-30 11:24:47,4654567 +0,0000028 IRP_MJ_READ UP 0x00000000 38 8
00001116 2020-06-30 11:24:47,4654637 +0,0000031 IRP_MJ_READ UP 0x00000000 2e .
00001118 2020-06-30 11:24:47,4654704 +0,0000031 IRP_MJ_READ UP 0x00000000 32 2
00001120 2020-06-30 11:24:47,4654771 +0,0000028 IRP_MJ_READ UP 0x00000000 34 4
00001122 2020-06-30 11:24:47,4654841 +0,0000031 IRP_MJ_READ UP 0x00000000 0d .
00001124 2020-06-30 11:24:47,4654908 +0,0000031 IRP_MJ_READ UP 0x00000000 0a .
00001125 2020-06-30 11:24:47,4655229 +0,0000321 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 65 6f 73 20 30 0d 0a ++eos 0..
00001127 2020-06-30 11:24:47,4661847 +0,0000176 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 6d 6f 64 65 20 30 0d 0a ++mode 0..
00001130 2020-06-30 11:24:47,9666078 +0,4994339 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00001131 2020-06-30 11:24:47,9666240 +0,0000162 IRP_MJ_READ UP 0xc0000120
00001132 2020-06-30 11:24:47,9666327 +0,0000087 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00001133 2020-06-30 11:24:47,9666533 +0,0000206 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 65 6f 69 20 31 0d 0a ++eoi 1..
00001136 2020-06-30 11:24:49,4998585 +1,4992626 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00001137 2020-06-30 11:24:49,4998736 +0,0000151 IRP_MJ_READ UP 0xc0000120
00001138 2020-06-30 11:24:49,4998820 +0,0000084 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00001140 2020-06-30 11:24:51,0331420 +1,4992582 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00001141 2020-06-30 11:24:51,0331573 +0,0000153 IRP_MJ_READ UP 0xc0000120
00001142 2020-06-30 11:24:51,0331665 +0,0000092 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00001144 2020-06-30 11:24:52,5654465 +1,4993171 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00001145 2020-06-30 11:24:52,5654624 +0,0000159 IRP_MJ_READ UP 0xc0000120
00001146 2020-06-30 11:24:52,5654719 +0,0000095 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00001148 2020-06-30 11:24:54,0987330 +1,4994344 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00001149 2020-06-30 11:24:54,0987495 +0,0000165 IRP_MJ_READ UP 0xc0000120
00001150 2020-06-30 11:24:54,0987601 +0,0000106 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00001152 2020-06-30 11:24:55,6310755 +1,4994048 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00001153 2020-06-30 11:24:55,6310923 +0,0000168 IRP_MJ_READ UP 0xc0000120
00001154 2020-06-30 11:24:55,6311009 +0,0000086 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00001156 2020-06-30 11:24:57,1633454 +1,4991978 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00001157 2020-06-30 11:24:57,1633616 +0,0000162 IRP_MJ_READ UP 0xc0000120
00001158 2020-06-30 11:24:57,1633711 +0,0000095 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00001160 2020-06-30 11:24:58,6921962 +1,4994642 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00001161 2020-06-30 11:24:58,6922121 +0,0000159 IRP_MJ_READ UP 0xc0000120
00001162 2020-06-30 11:24:58,6922211 +0,0000090 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00001164 2020-06-30 11:25:00,2244633 +1,4992671 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00001165 2020-06-30 11:25:00,2244798 +0,0000165 IRP_MJ_READ UP 0xc0000120
00001166 2020-06-30 11:25:00,2244895 +0,0000097 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00001168 2020-06-30 11:25:01,7577456 +1,4998026 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00001169 2020-06-30 11:25:01,7577615 +0,0000159 IRP_MJ_READ UP 0xc0000120
00001170 2020-06-30 11:25:01,7577707 +0,0000092 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00001172 2020-06-30 11:25:03,2597119 +1,4689532 IRP_MJ_READ UP 0x00000000 49 I
00001174 2020-06-30 11:25:03,2928390 +0,0000268 IRP_MJ_READ UP 0x00000000 4e N
00001176 2020-06-30 11:25:03,2928538 +0,0000064 IRP_MJ_READ UP 0x00000000 3b ;
00001178 2020-06-30 11:25:03,2928616 +0,0000036 IRP_MJ_READ UP 0x00000000 53 S
00001180 2020-06-30 11:25:03,2928686 +0,0000030 IRP_MJ_READ UP 0x00000000 50 P
00001182 2020-06-30 11:25:03,2928753 +0,0000030 IRP_MJ_READ UP 0x00000000 3b ;
00001184 2020-06-30 11:25:03,2928823 +0,0000028 IRP_MJ_READ UP 0x00000000 53 S
00001186 2020-06-30 11:25:03,2928893 +0,0000028 IRP_MJ_READ UP 0x00000000 43 C
00001188 2020-06-30 11:25:03,2928980 +0,0000028 IRP_MJ_READ UP 0x00000000 30 0
00001190 2020-06-30 11:25:03,2929047 +0,0000028 IRP_MJ_READ UP 0x00000000 2c ,
00001192 2020-06-30 11:25:03,2929116 +0,0000027 IRP_MJ_READ UP 0x00000000 36 6
00001194 2020-06-30 11:25:03,2929189 +0,0000031 IRP_MJ_READ UP 0x00000000 34 4
00001196 2020-06-30 11:25:03,2929259 +0,0000031 IRP_MJ_READ UP 0x00000000 30 0
00001198 2020-06-30 11:25:03,2929326 +0,0000028 IRP_MJ_READ UP 0x00000000 2c ,
00001200 2020-06-30 11:25:03,2929396 +0,0000028 IRP_MJ_READ UP 0x00000000 30 0
00001202 2020-06-30 11:25:03,2929466 +0,0000028 IRP_MJ_READ UP 0x00000000 2c ,
00001204 2020-06-30 11:25:03,2929600 +0,0000031 IRP_MJ_READ UP 0x00000000 34 4
00001206 2020-06-30 11:25:03,2929670 +0,0000028 IRP_MJ_READ UP 0x00000000 38 8

00051410 2020-06-30 11:25:08,1596891 +0,0000030 IRP_MJ_READ UP 0x00000000 50 P
00051412 2020-06-30 11:25:08,1596961 +0,0000031 IRP_MJ_READ UP 0x00000000 41 A
00051414 2020-06-30 11:25:08,1597031 +0,0000031 IRP_MJ_READ UP 0x00000000 33 3
00051416 2020-06-30 11:25:08,1597101 +0,0000031 IRP_MJ_READ UP 0x00000000 39 9
00051418 2020-06-30 11:25:08,1597171 +0,0000031 IRP_MJ_READ UP 0x00000000 37 7
00051420 2020-06-30 11:25:08,1597240 +0,0000030 IRP_MJ_READ UP 0x00000000 2c ,
00051422 2020-06-30 11:25:08,1597310 +0,0000030 IRP_MJ_READ UP 0x00000000 34 4
00051424 2020-06-30 11:25:08,1597380 +0,0000031 IRP_MJ_READ UP 0x00000000 35 5
00051426 2020-06-30 11:25:08,1597450 +0,0000031 IRP_MJ_READ UP 0x00000000 30 0
00051428 2020-06-30 11:25:08,1597520 +0,0000028 IRP_MJ_READ UP 0x00000000 3b ;
00051430 2020-06-30 11:25:08,1597592 +0,0000030 IRP_MJ_READ UP 0x00000000 50 P
00051432 2020-06-30 11:25:08,1597662 +0,0000030 IRP_MJ_READ UP 0x00000000 55 U
00051434 2020-06-30 11:25:08,1597732 +0,0000031 IRP_MJ_READ UP 0x00000000 3b ;
00051436 2020-06-30 11:25:08,1597802 +0,0000028 IRP_MJ_READ UP 0x00000000 50 P
00051438 2020-06-30 11:25:08,1597875 +0,0000031 IRP_MJ_READ UP 0x00000000 41 A
00051440 2020-06-30 11:25:08,1597944 +0,0000030 IRP_MJ_READ UP 0x00000000 30 0
00051442 2020-06-30 11:25:08,1598014 +0,0000030 IRP_MJ_READ UP 0x00000000 2c ,
00051444 2020-06-30 11:25:08,1598084 +0,0000031 IRP_MJ_READ UP 0x00000000 30 0
00051446 2020-06-30 11:25:08,1598154 +0,0000031 IRP_MJ_READ UP 0x00000000 3b ;
00051448 2020-06-30 11:25:08,1598224 +0,0000028 IRP_MJ_READ UP 0x00000000 53 S
00051450 2020-06-30 11:25:08,1598336 +0,0000031 IRP_MJ_READ UP 0x00000000 50 P
00051452 2020-06-30 11:25:08,1598414 +0,0000037 IRP_MJ_READ UP 0x00000000 30 0
00051454 2020-06-30 11:25:08,1598486 +0,0000030 IRP_MJ_READ UP 0x00000000 3b ;
00051456 2020-06-30 11:25:08,6595094 +0,4996568 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00051457 2020-06-30 11:25:08,6595264 +0,0000170 IRP_MJ_READ UP 0xc0000120
00051458 2020-06-30 11:25:08,6595351 +0,0000087 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00051460 2020-06-30 11:25:10,1654480 +1,5000926 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00051461 2020-06-30 11:25:10,1654639 +0,0000159 IRP_MJ_READ UP 0xc0000120
00051462 2020-06-30 11:25:10,1654728 +0,0000089 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00051463 2020-06-30 11:25:10,1655307 +0,0000579 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 6c 6f 63 0d 0a ++loc..
00051466 2020-06-30 11:25:10,4197040 +0,2530148 IRP_MJ_READ UP 0x00000000 55 U
00051468 2020-06-30 11:25:10,4197602 +0,0000154 IRP_MJ_READ UP 0x00000000 6e n
00051470 2020-06-30 11:25:10,4197697 +0,0000037 IRP_MJ_READ UP 0x00000000 72 r
00051472 2020-06-30 11:25:10,4197769 +0,0000030 IRP_MJ_READ UP 0x00000000 65 e
00051474 2020-06-30 11:25:10,4197842 +0,0000031 IRP_MJ_READ UP 0x00000000 63 c
00051476 2020-06-30 11:25:10,4197915 +0,0000031 IRP_MJ_READ UP 0x00000000 6f o
00051478 2020-06-30 11:25:10,4197984 +0,0000030 IRP_MJ_READ UP 0x00000000 67 g
00051480 2020-06-30 11:25:10,4198057 +0,0000031 IRP_MJ_READ UP 0x00000000 6e n
00051482 2020-06-30 11:25:10,4198127 +0,0000031 IRP_MJ_READ UP 0x00000000 69 i
00051484 2020-06-30 11:25:10,4198200 +0,0000031 IRP_MJ_READ UP 0x00000000 7a z
00051486 2020-06-30 11:25:10,4198269 +0,0000030 IRP_MJ_READ UP 0x00000000 65 e
00051488 2020-06-30 11:25:10,4198336 +0,0000028 IRP_MJ_READ UP 0x00000000 64 d
00051490 2020-06-30 11:25:10,4198412 +0,0000034 IRP_MJ_READ UP 0x00000000 20
00051492 2020-06-30 11:25:10,4198484 +0,0000033 IRP_MJ_READ UP 0x00000000 63 c
00051494 2020-06-30 11:25:10,4198554 +0,0000030 IRP_MJ_READ UP 0x00000000 6f o
00051496 2020-06-30 11:25:10,4198627 +0,0000034 IRP_MJ_READ UP 0x00000000 6d m
00051498 2020-06-30 11:25:10,4198697 +0,0000031 IRP_MJ_READ UP 0x00000000 6d m
00051500 2020-06-30 11:25:10,4198767 +0,0000028 IRP_MJ_READ UP 0x00000000 61 a
00051502 2020-06-30 11:25:10,4198836 +0,0000027 IRP_MJ_READ UP 0x00000000 6e n
00051504 2020-06-30 11:25:10,4198909 +0,0000031 IRP_MJ_READ UP 0x00000000 64 d
00051506 2020-06-30 11:25:10,4198982 +0,0000034 IRP_MJ_READ UP 0x00000000 0d .
00051508 2020-06-30 11:25:10,4199052 +0,0000031 IRP_MJ_READ UP 0x00000000 0a .
00051510 2020-06-30 11:25:10,6693790 +0,2494696 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00051511 2020-06-30 11:25:10,6693944 +0,0000154 IRP_MJ_READ UP 0xc0000120
00051512 2020-06-30 11:25:10,6694031 +0,0000087 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00051514 2020-06-30 11:25:11,1693750 +0,4999524 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00051515 2020-06-30 11:25:11,1693904 +0,0000154 IRP_MJ_READ UP 0xc0000120
00051516 2020-06-30 11:25:11,1693985 +0,0000081 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00051517 2020-06-30 11:25:11,1694135 +0,0000150 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_CLR_DTR DOWN 0x00000000
00051518 2020-06-30 11:25:11,1696798 +0,0002663 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_CLR_DTR UP 0x00000000
00051519 2020-06-30 11:25:11,1696926 +0,0000128 IRP_MJ_CLOSE DOWN 0x00000000
00051520 2020-06-30 11:25:11,2738539 +0,1041613 IRP_MJ_CLOSE UP 0x00000000
00051521 2020-06-30 11:25:11,3456136 +0,0717597 IRP_MJ_CREATE - process 36256 () DOWN 0x00000000
00051522 2020-06-30 11:25:11,3686676 +0,0230540 IRP_MJ_CREATE UP 0x00000000
00051523 2020-06-30 11:25:11,3687054 +0,0000378 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR DOWN 0x00000000
00051524 2020-06-30 11:25:11,3696706 +0,0009652 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR UP 0x00000000
00051543 2020-06-30 11:25:11,3698544 +0,0000062 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE DOWN 0x00000000 00 c2 01 00 ....
00051544 2020-06-30 11:25:11,3706629 +0,0008085 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE UP 0x00000000
00051545 2020-06-30 11:25:11,3706704 +0,0000075 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR DOWN 0x00000000
00051546 2020-06-30 11:25:11,3716641 +0,0009937 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR UP 0x00000000
00051547 2020-06-30 11:25:11,3716705 +0,0000064 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL DOWN 0x00000000 00 00 08 ...
00051548 2020-06-30 11:25:11,3726941 +0,0010236 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL UP 0x00000000
00051549 2020-06-30 11:25:11,3727003 +0,0000062 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS DOWN 0x00000000 00 00 00 00 11 13 ......
00051550 2020-06-30 11:25:11,3727034 +0,0000031 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS UP 0x00000000
00051551 2020-06-30 11:25:11,3727075 +0,0000041 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW DOWN 0x00000000 09 00 00 00 80 00 00 00 00 04 00 00 00 04 00 00 ................
00051552 2020-06-30 11:25:11,3746623 +0,0019548 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW UP 0x00000000
00051553 2020-06-30 11:25:11,3746706 +0,0000083 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_TIMEOUTS DOWN 0x00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ....................
00051554 2020-06-30 11:25:11,3746737 +0,0000031 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_TIMEOUTS UP 0x00000000
00051573 2020-06-30 11:25:11,3747424 +0,0000055 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE DOWN 0x00000000 00 c2 01 00 ....
00051574 2020-06-30 11:25:11,3756618 +0,0009194 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_BAUD_RATE UP 0x00000000
00051575 2020-06-30 11:25:11,3756685 +0,0000067 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_RTS DOWN 0x00000000
00051576 2020-06-30 11:25:11,3756713 +0,0000028 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_RTS UP 0xc000000d
00051577 2020-06-30 11:25:11,3756780 +0,0000067 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR DOWN 0x00000000
00051578 2020-06-30 11:25:11,3766639 +0,0009859 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_DTR UP 0x00000000
00051579 2020-06-30 11:25:11,3766701 +0,0000062 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL DOWN 0x00000000 00 00 08 ...
00051580 2020-06-30 11:25:11,3776615 +0,0009914 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_LINE_CONTROL UP 0x00000000
00051581 2020-06-30 11:25:11,3776666 +0,0000051 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS DOWN 0x00000000 00 00 00 00 11 13 ......
00051582 2020-06-30 11:25:11,3776691 +0,0000025 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_CHARS UP 0x00000000
00051583 2020-06-30 11:25:11,3776735 +0,0000044 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW DOWN 0x00000000 01 00 00 00 40 00 00 00 00 04 00 00 00 04 00 00 ....@...........
00051584 2020-06-30 11:25:11,3796637 +0,0019902 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_SET_HANDFLOW UP 0x00000000
00051585 2020-06-30 11:25:11,4047401 +0,0250764 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 76 65 72 0d 0a ++ver..
00051588 2020-06-30 11:25:11,6187145 +0,2130000 IRP_MJ_READ UP 0x00000000 41 A
00051590 2020-06-30 11:25:11,6187679 +0,0000168 IRP_MJ_READ UP 0x00000000 52 R
00051592 2020-06-30 11:25:11,6187776 +0,0000036 IRP_MJ_READ UP 0x00000000 34 4
00051594 2020-06-30 11:25:11,6187846 +0,0000030 IRP_MJ_READ UP 0x00000000 38 8
00051596 2020-06-30 11:25:11,6187916 +0,0000031 IRP_MJ_READ UP 0x00000000 38 8
00051598 2020-06-30 11:25:11,6187986 +0,0000031 IRP_MJ_READ UP 0x00000000 20
00051600 2020-06-30 11:25:11,6188053 +0,0000028 IRP_MJ_READ UP 0x00000000 47 G
00051602 2020-06-30 11:25:11,6188123 +0,0000031 IRP_MJ_READ UP 0x00000000 50 P
00051604 2020-06-30 11:25:11,6188190 +0,0000031 IRP_MJ_READ UP 0x00000000 49 I
00051606 2020-06-30 11:25:11,6188257 +0,0000031 IRP_MJ_READ UP 0x00000000 42 B
00051608 2020-06-30 11:25:11,6188327 +0,0000031 IRP_MJ_READ UP 0x00000000 2d -
00051610 2020-06-30 11:25:11,6188397 +0,0000031 IRP_MJ_READ UP 0x00000000 55 U
00051612 2020-06-30 11:25:11,6188475 +0,0000039 IRP_MJ_READ UP 0x00000000 53 S
00051614 2020-06-30 11:25:11,6188550 +0,0000039 IRP_MJ_READ UP 0x00000000 42 B
00051616 2020-06-30 11:25:11,6188617 +0,0000030 IRP_MJ_READ UP 0x00000000 20
00051618 2020-06-30 11:25:11,6188696 +0,0000031 IRP_MJ_READ UP 0x00000000 2c ,
00051620 2020-06-30 11:25:11,6188779 +0,0000044 IRP_MJ_READ UP 0x00000000 20
00051622 2020-06-30 11:25:11,6188846 +0,0000030 IRP_MJ_READ UP 0x00000000 76 v
00051624 2020-06-30 11:25:11,6188916 +0,0000030 IRP_MJ_READ UP 0x00000000 65 e
00051626 2020-06-30 11:25:11,6188983 +0,0000030 IRP_MJ_READ UP 0x00000000 72 r
00051628 2020-06-30 11:25:11,6189050 +0,0000030 IRP_MJ_READ UP 0x00000000 73 s
00051630 2020-06-30 11:25:11,6189120 +0,0000031 IRP_MJ_READ UP 0x00000000 69 i
00051632 2020-06-30 11:25:11,6189187 +0,0000031 IRP_MJ_READ UP 0x00000000 6f o
00051634 2020-06-30 11:25:11,6189257 +0,0000031 IRP_MJ_READ UP 0x00000000 6e n
00051636 2020-06-30 11:25:11,6189324 +0,0000031 IRP_MJ_READ UP 0x00000000 20
00051638 2020-06-30 11:25:11,6189394 +0,0000031 IRP_MJ_READ UP 0x00000000 35 5
00051640 2020-06-30 11:25:11,6189461 +0,0000031 IRP_MJ_READ UP 0x00000000 2e .
00051642 2020-06-30 11:25:11,6189528 +0,0000031 IRP_MJ_READ UP 0x00000000 30 0
00051644 2020-06-30 11:25:11,6189598 +0,0000031 IRP_MJ_READ UP 0x00000000 20
00051646 2020-06-30 11:25:11,6189665 +0,0000031 IRP_MJ_READ UP 0x00000000 23 #
00051648 2020-06-30 11:25:11,6189735 +0,0000031 IRP_MJ_READ UP 0x00000000 31 1
00051650 2020-06-30 11:25:11,6189802 +0,0000031 IRP_MJ_READ UP 0x00000000 20
00051652 2020-06-30 11:25:11,6189869 +0,0000031 IRP_MJ_READ UP 0x00000000 30 0
00051654 2020-06-30 11:25:11,6189936 +0,0000028 IRP_MJ_READ UP 0x00000000 2e .
00051656 2020-06-30 11:25:11,6190006 +0,0000031 IRP_MJ_READ UP 0x00000000 34 4
00051658 2020-06-30 11:25:11,6190073 +0,0000031 IRP_MJ_READ UP 0x00000000 38 8
00051660 2020-06-30 11:25:11,6190143 +0,0000028 IRP_MJ_READ UP 0x00000000 2e .
00051662 2020-06-30 11:25:11,6190212 +0,0000030 IRP_MJ_READ UP 0x00000000 32 2
00051664 2020-06-30 11:25:11,6190280 +0,0000031 IRP_MJ_READ UP 0x00000000 34 4
00051666 2020-06-30 11:25:11,6190347 +0,0000028 IRP_MJ_READ UP 0x00000000 0d .
00051668 2020-06-30 11:25:11,6190416 +0,0000030 IRP_MJ_READ UP 0x00000000 0a .
00051669 2020-06-30 11:25:11,6190738 +0,0000322 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 65 6f 73 20 30 0d 0a ++eos 0..
00051671 2020-06-30 11:25:11,6196976 +0,0000168 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 6d 6f 64 65 20 30 0d 0a ++mode 0..
00051674 2020-06-30 11:25:12,1205987 +0,4998714 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00051675 2020-06-30 11:25:12,1206154 +0,0000167 IRP_MJ_READ UP 0xc0000120
00051676 2020-06-30 11:25:12,1206269 +0,0000115 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00051677 2020-06-30 11:25:12,1206506 +0,0000237 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 65 6f 69 20 31 0d 0a ++eoi 1..
00051680 2020-06-30 11:25:13,6655995 +1,4993760 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00051681 2020-06-30 11:25:13,6656163 +0,0000168 IRP_MJ_READ UP 0xc0000120
00051682 2020-06-30 11:25:13,6656249 +0,0000086 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00051684 2020-06-30 11:25:15,1989184 +1,4998808 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00051685 2020-06-30 11:25:15,1989352 +0,0000168 IRP_MJ_READ UP 0xc0000120
00051686 2020-06-30 11:25:15,1989455 +0,0000103 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00051688 2020-06-30 11:25:15,7057686 +0,4997750 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00051689 2020-06-30 11:25:15,7057848 +0,0000162 IRP_MJ_READ UP 0xc0000120
00051690 2020-06-30 11:25:15,7058002 +0,0000154 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00051691 2020-06-30 11:25:15,7058393 +0,0000391 IRP_MJ_WRITE DOWN 0x00000000 2b 2b 6c 6f 63 0d 0a ++loc..
00051694 2020-06-30 11:25:16,2067842 +0,5000356 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE DOWN 0x00000000 02 00 00 00 ....
00051695 2020-06-30 11:25:16,2067999 +0,0000157 IRP_MJ_READ UP 0xc0000120
00051696 2020-06-30 11:25:16,2068091 +0,0000092 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_PURGE UP 0x00000000
00051697 2020-06-30 11:25:16,2068239 +0,0000148 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_CLR_DTR DOWN 0x00000000
00051698 2020-06-30 11:25:16,2076877 +0,0008638 IRP_MJ_DEVICECONTROL: IOCTL_SERIAL_CLR_DTR UP 0x00000000
00051699 2020-06-30 11:25:16,2077058 +0,0000181 IRP_MJ_CLOSE DOWN 0x00000000
00051700 2020-06-30 11:25:16,3122482 +0,1045424 IRP_MJ_CLOSE UP 0x00000000


The latest version of the program also does not work.
Only with forced transfer from GPIB Configurator to ++ lon 1 mode does image capture work.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mmcgraw74 on July 04, 2020, 01:05:56 am
I just found your github site and this eevblog.

I have a use case for secondary GPIB addressing - Tektronix 4051/4052/4054 computers used secondary addressing for commands to the devices like external tape, floppy, and hard drives.  Here is a list of their primary and secondary addresses from the 4050 BASIC booklet on bitsavers:

[attachimg=1]

I have a 4052 and 4054 and have been thinking they need a GPIB Tape Drive emulator using an SD card - as the 3M DC300 cartridges are hard to find and the drive belts have deteriorated in 40 years. 

I think your Device mode GPIB would be able to work as the external Tape Drive (example using GPIB primary address 1), if I can modify your program to get the secondary addresses (tape commands like TLIST, MARK, FIND, OLD, etc) to work.

I have a working Tektronix 4924 GPIB tape drive to model the exact sequences expected for each of the secondary address commands from the 4050 computer.  Since the SD card is capable of storing all the hundreds of programs I have recovered over the last 20 years, I would likely have to add a special directory command that I would send to the drive as a GPIB secondary address binary write, that I would put in a menu system as each tape only used file numbers 1-99.

Does your code allow you to analyze traffic on the GPIB bus?

Monty
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on July 04, 2020, 12:42:32 pm
I just came across your project. Where can I find the documentation?
Can you also use your AR488 interface with the Keysight GPIB-VISA drivers? Or do I have to work with the Prologix driver?

Documentation is in the main project repository:
https://github.com/Twilight-Logic/AR488/raw/master/AR488-manual.pdf

The interface is designed to use the Prologix protocol with some additions. The GPIB-VISA driver would need to support the Prologix protocol over serial/USB.

Sorry for the delayed response.

I just found your github site and this eevblog.

I have a use case for secondary GPIB addressing - Tektronix 4051/4052/4054 computers used secondary addressing for commands to the devices like external tape, floppy, and hard drives.  Here is a list of their primary and secondary addresses from the 4050 BASIC booklet on bitsavers:

(Attachment Link)

I have a 4052 and 4054 and have been thinking they need a GPIB Tape Drive emulator using an SD card - as the 3M DC300 cartridges are hard to find and the drive belts have deteriorated in 40 years. 

I think your Device mode GPIB would be able to work as the external Tape Drive (example using GPIB primary address 1), if I can modify your program to get the secondary addresses (tape commands like TLIST, MARK, FIND, OLD, etc) to work.

I will be happy to work with you on that. Could you provide me with a link to the manual where you got that information please? I downloaded three different Tek 4055 manuals but they didn't seem to contain this table.

Does your code allow you to analyze traffic on the GPIB bus?

Not specifically, although I have been toying with the idea of writing a separate analyser. Setting DEBUG5 and DEBUG7 will print hex bytes for the data received for device mode and controller mode respectively. DEBUG5 will include GPIB command data in the bytes printed. Logic analyzers like Saleae Logic will show a trace so you can see the signals on the wires, but I have been using the Sigrok Protocol Decoder GPIB to monitor the bus as it includes a GPIB decoder to show the characters being transmitted.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on July 04, 2020, 01:31:36 pm
It won't send anything at all until you hit 'w',  and then ++loc will be transmitted when the 'w' operation finishes (meaning a plot arrives or you hit a key to stop waiting.)  In principle it shouldn't send ++loc in this case, but Prologix adapters in device mode will ignore it, and all others should as well.

The latest version of the program also does not work.
Only with forced transfer from GPIB Configurator to ++ lon 1 mode does image capture work.

The ++loc command releases remote control over an instrument and returns its control panel to a state where it can be operated "locally". Since device mode does not control instruments the ++loc command is irrelevant in this mode as are a number of other Controller mode commands. The Prologix usually ignores invalid commands and just responds with "Unrecognized command". The AR488 was programmed to behave exactly the same. However, perhaps someone with a Prologix GPIB-USB adapter could confirm whether the same happens when a ++loc in issued device mode? Is the "Unrecognized command" response causing a problem? If so then there is perhaps a case for suppressing responses to invalid commands in Device mode.

However, in serg-el's first output there is something else amiss as the "Unrecognized command" output appears in response to just about every command.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mmcgraw74 on July 04, 2020, 03:19:33 pm
Here is the github link for an entire folder of documentation for Tektronix 4050 computers:
http://www.bitsavers.org/pdf/tektronix/405x/ (http://www.bitsavers.org/pdf/tektronix/405x/)

The manual pages I posted above were from this file:
http://www.bitsavers.org/pdf/tektronix/405x/070-2142-02_Tek_4050_Series_Basic_Reference_Jun83.pdf (http://www.bitsavers.org/pdf/tektronix/405x/070-2142-02_Tek_4050_Series_Basic_Reference_Jun83.pdf)
booklet pages 38-40 (pdf scan pages 41-43)

details on the Tektronix 4051 GPIB implementation is in this doc - including some 6800 source for the 4924 tape drive!
http://www.bitsavers.org/pdf/tektronix/405x/070-2270-00_4051_GPIB_HW_Supp_Jul81.pdf (http://www.bitsavers.org/pdf/tektronix/405x/070-2270-00_4051_GPIB_HW_Supp_Jul81.pdf)

another doc in that folder details how to use the Tek 4050 computers as GPIB controllers for Tektronix TM5000 series GPIB instruments (including secondary addressing):
http://www.bitsavers.org/pdf/tektronix/405x/070-3985-00_GPIB_Programming_Guide_Oct1981.pdf (http://www.bitsavers.org/pdf/tektronix/405x/070-3985-00_GPIB_Programming_Guide_Oct1981.pdf)

and finally - here is a post in my thread on a potential GPIB Flash Drive for the Tektronix computers on vcfed.  This post has a link to the Tektronix 4924 service manual which included details on the GPIB secondary addressing used with the 4050 computers:
http://www.vcfed.org/forum/showthread.php?64018-Tektronix-405x-GPIB-Flash-Drive&p=582351#post582351 (http://www.vcfed.org/forum/showthread.php?64018-Tektronix-405x-GPIB-Flash-Drive&p=582351#post582351)

Currently - I have an Arduino NANO board with an SD shield and hardwired connections to a GPIB cable.  I started this from Emanuele Girlando's Arduino GPIB sketch, but got lost trying to adapt his program for Device Mode.

I also just yesterday assembled an Arduino MEGA with Adafruit Datalogging SD card shield and a GPIB shield from this github project:
https://github.com/Tek-User/Tektronix-GPIB-Download (https://github.com/Tek-User/Tektronix-GPIB-Download)

I will need to change your Config.h file to support his pinout - which seems like something in between your E1 and E2 as it only uses PA0-7 and PC0-7.



Title: Re: AR488 Arduino-based GPIB adapter
Post by: mmcgraw74 on July 05, 2020, 02:54:29 pm
I created a new github repository for my Tektronix GPIB Flash Drive project:
https://github.com/mmcgraw74/Tektronix-4050-GPIB-Flash-Drive

I hope to be making progress soon based on the AR488 GPIB Adapter!

I edited a CUSTOM board based on the GPIB adapter from the TekUser GPIB project and successfully compiled the AR488 with the CUSTOM board, but haven't tested that it works yet.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on July 06, 2020, 03:03:41 pm
Thanks for the links to the Tek 4050 documentation. For this and additional sources I have used my understanding to amend AR488.ino to allow configuration of and send a secondary address alongside the primary one.

You can set the secondary address as described in the Prologix documentaion:

Quote from: from Prologix Manual
SYNTAX: ++addr [<PAD> [<SAD>]]
   where PAD (Primary Address) is a decimal value between 0 and 30.
   where SAD (Secondary Address) is a decimal value between 96 and 126. SAD is optional.

   MODES AVAILABLE: CONTROLLER, DEVICE

   EXAMPLES:
      ++addr 5      – Set primary address to 5
      ++addr         – Query current address
      ++addr 9 96      – Set primary address to 9 and secondary address to 0

From what I see, some references quote secondary addresses from 1-30 while others quote the actual MSA sent (addr + 0x60) ranging from 96-127, so I have set it up so either can be entered. Secondary address values in the range 1-30 are automatically converted to MSA addresses in the range 96-127 and will be displayed as such. So, for example:-

++addr 3 10, will set primary address 3 and MSA 106.
++addr 3 99, will set primary address 3 and MSA 99.

Since I have no device that supports secondary addressing I am unable to test, however, the modified experimental sketch has been uploaded here so that you can access it for testing purposes:

https://github.com/Twilight-Logic/AR488/tree/master/src/test

With regards to the layout, yes, you should be able to use the Custom Layout option on AR488_Config.h to define the pin layout however, there will be no interrupt driven event handling. Since there are no PCINTs on those pins there is no possibility of adding interrupt driven support either, although if you get the layout working I can certainly add to AR488_Layouts as a supported layout.

I am very much interested to know how you get on with this, particularly with the secondary addressing. Any feedback will be appreciated. Thank you for your interest in the AR488 project.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mmcgraw74 on July 06, 2020, 03:31:29 pm
WaveyDipole,

Thank you!

I will try your test program and report back.

Monty
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on July 06, 2020, 06:42:03 pm
I should have mentioned perhaps, that the work so far enables (I hope) secondary addresses to be used with the interface in Controller mode. From what I see described on your Tektronix-4050-Flash-Drive page, the interface will also need to be updated to recognize primary+secondary address combinations in Device mode. I can certainly start work on adding a bare bones mechanism to identify a secondary address received from the GPIB bus and call a specific handler. The handler can then be expended to identify the command and do something with it. I will have a think about how to implement this over the next couple of days.

I must admit I was not aware that Tektronix had made a computer, although I am aware that other then HP, Commodore had implemented a GPIB interface on the PET. They connected storage devices, printers and plotters as well so must work in a similar way so your project may be valid for both platforms. I guess as is the case for test equipment, the Tek computer achieved greater popularity in the USA?

I still have some reading to do in the Tek documents and might also look at the PET equivalent.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on July 07, 2020, 12:41:43 am
There was a Tektronix 8560 computer at a place I worked at some years ago, though it was no longer in use.

It was a Unix ('TNIX') system configured as a cross-development system. Probably competitive with the better known HP64000 and the Intel MDS. From the interesting collection of manuals on the bitsaver site mmcgraw74 links to it appears to be based on PDP11/23 hardware.
I still have a couple of manuals from it.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mmcgraw74 on July 07, 2020, 01:48:54 am
WaveyDipole,

Yes - in order to make an emulator of the Tektronix 4924 GPIB tape drive, I will need the device mode to decode the primary address of the device to understand whether it is being addressed as talker or listener and decode the secondary address to understand the command.

Here is my first cut at a description of the tape emulator device commands:

Code: [Select]
/* 
   Tektronix 4924 Tape Emulator device Commands
   
   Principle of operation:
   - Listen for 4924 GPIB primary address plus secondary address
   - Primary address (My Primary Address - MPA) indicates whether 4924 is talker or listener
   - Secondary address (My Secondary Address - MSA) = command
   

   Device Listen commands (assuming Emulator is GPIB device number 5)
   
   MPA MSA Action Data?  4050 BASIC statement
   
   37 12 Print Y       - PRINT  @5: <variable(s)>
   37 15 Print Y - WRITE  @5: <binary>
   37 1 Print Y - SAVE @5: <binary program in memory>
   37 27 Find Y - FIND   @5: <file#>
   37 28 Mark Y - MARK   @5: <# files,size in bytes>
   37 7 Kill Y - KILL   @5: <file#>
   37 29      Secret N - SECRET @5: <mark current file header with Secret flag>
   37 2 Close N - PRINT@5,2: <close current file>
   37 0 StatIN Y - PRINT@5,0: <w,x,y,z> send tape drive environment parameters
   37 9 CD Y - PRINT@5,9: <change directory to path$> **new cmd for EMULATOR**


   Device Talk commands (assuming Emulator is GPIB device number 5)

   69 13 Input Y       - INPUT  @5: <variable(s)>
   69 14 Input Y - READ   @5: <binary variable(s)>
   69 4 Input Y - OLD    @5: <binary program>
   69 0 StatOUT Y  - INPUT@5,0: <w,x,y,z> get tape drive environment parameters
   69   9       Header  Y - INPUT@5,9: <return current file header string>
   69 6 Type Y - TYPE   @5: <return type of next data in file>
   69 19 Tlist Y - TLIST  @5: <return header info for every file>
   69 30 Error Y - INPUT@5,30: <return error code and clear SRQ>
   
   
   
*/
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mmcgraw74 on July 07, 2020, 02:01:18 am
WaveyDipole,

Yes, I believe the PET used similar syntax to the Tektronix BASIC for GPIB device access.

The Tektronix 4051 computer was introduced in 1975 with a 6800 CPU, 32KB of BASIC ROM and 32KB of DRAM with integrated 1024x768 vector graphics using the same 12" Tektronix direct view storage tube as their 4010 terminal.

Here is a photo of a Tektronix 4051 with a Tektronix 4924 GPIB tape drive and cable:

(http://www.vcfed.org/forum/attachment.php?attachmentid=61868&d=1594087176)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: PixieDust on July 18, 2020, 12:11:44 pm
What are the chances of EMI in an UNO setup? The manual says twisted and shielded, but I bought some el cheapo wires from ebay:

https://www.ebay.com/itm/40PCS-20cm-2-54MM-FF-FM-MM-Dupont-wire-jumper-cables-male-to-female-For-Arduino/312724733910?hash=item48cfd8bfd6:g:05sAAOSwlbZdSZ6E (https://www.ebay.com/itm/40PCS-20cm-2-54MM-FF-FM-MM-Dupont-wire-jumper-cables-male-to-female-For-Arduino/312724733910?hash=item48cfd8bfd6:g:05sAAOSwlbZdSZ6E)

the best I'll be able to do would be twisted pairs. Or should I go ahead and buy some shielded twisted pair cables as well? I started reading the manual after I bought the wires.

It's a bit wierd having twisted pairs of signal and ground wires given that the ground pin and the signal wires are on separate sides of the UNO, so there's still quite a lot of untwisted wire going on.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on July 18, 2020, 12:23:37 pm
It may well be a bit noisy, but for short wires I don't think it's worth twisting them together - as you say, the grounds on the Arduino aren't well placed and the Arduino itself is probably quite noisy too.

Your best bet if you have a problem is probably to put the circuit board close to the instrument it's controlling and shield the whole thing - Arduino and wiring - in a metal box connected to the chassis.

 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: PixieDust on July 19, 2020, 03:48:56 am
I had a think about it and I think I'll just buy some aluminium shielding tape and use that to shield the wires. All I'm trying to do is download the calibration data. I'm not going to use the setup in some demanding RF environment.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: james_s on July 19, 2020, 05:35:50 am
WaveyDipole,

Yes, I believe the PET used similar syntax to the Tektronix BASIC for GPIB device access.

The Tektronix 4051 computer was introduced in 1975 with a 6800 CPU, 32KB of BASIC ROM and 32KB of DRAM with integrated 1024x768 vector graphics using the same 12" Tektronix direct view storage tube as their 4010 terminal.

That thing looks amazing. Imagine how incredible that would have been in 1975 to have that sleek space age looking thing with 1024x768 vector graphics. Even more than a decade later it would have been impressive and that was during an era when computer tech was evolving at crazy speed.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mmcgraw74 on July 19, 2020, 01:11:39 pm
Tektronix customers for the 4050 series included Rockwell on designing the Space Shuttle.  Those customers begged for more performance and higher resolution, so Tektronix in 1979 introduced their 4052 and 4054 computers (2nd and 3rd in the 4050 series).

The 4052 and 4054 included a custom bit-slice 16-bit data and 128KB address space CPU including double-precision floating point opcodes with 72KB of BASIC ROM and 64KB of DRAM that ran about 10x faster than the original 4051.  The 4052 was the same size and chassis as the 4051, but the 4054 had a 19" DVST screen with 4096x3072 resolution vector graphics (borrowed from the Tektronix 4014 graphics terminal).!

In early 1980's Tektronix introduced the final pair of models in the series - the 4052A and 4054A, changing from ROMs with patch ROMs to EPROMs for the firmware and replacing their discrete GPIB software implementation with a TI 9914 GPIB controller for higher GPIB performance.  I have a 4052 and a 4054A in my vintage computer collection - both are working, and I have been recovering 40 year old DC-300 program tapes and posting the programs on my github repository for Tektronix 4050 computers: https://github.com/mmcgraw74/Tektronix-4051-4052-4054-Program-Files

Here are both my computers running a Byte magazine hidden line program - photo taken in 2000.
The 4054 has amazing resolution - certainly leading the market in 1979!

(http://www.vcfed.org/forum/attachment.php?attachmentid=62118&d=1595164156)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mmcgraw74 on July 19, 2020, 01:26:53 pm
That photo didn't do Tektronix 4054 or 4052 graphics justice.

Here is a photo I took last year, scaled down to web resolution, of my program to demo a fast drawing ROM Pack that is 100x faster than the 4051 in drawing vectors :)

The jaggies in the lines are an artifact of scaling down the image from my iphone7s.  All the lines on the screen are straight vectors.
The 4054 has such high resolution, all text is drawn in vectors too - like my program listing for the entire demo program.

(http://www.vcfed.org/forum/attachment.php?attachmentid=62119&d=1595164972)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mmcgraw74 on July 19, 2020, 01:32:26 pm
You can watch this demo and see the drawing speed in my video:

https://www.youtube.com/watch?v=o3j73DzQwWo

I don't mean to spam this thread, now back to AR488 Arduino-based GPIB adapter discussion...
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on July 19, 2020, 02:06:42 pm
To bring it somewhat back on topic :

I assume there is an internal connection between computer and graphics terminal  - it's not a GPIB connection. But can you configure it that way, so that the vectors are written over GPIB ? We know the AR488 doesn't go as fast as GPIB permits but I'm interested to see what sort of throughput you get when it's passing vectors rather than pixels (which would surely be painfully slow).

 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mmcgraw74 on July 19, 2020, 02:27:38 pm
Artag,

The 4050 computers are self-contained, not computer+terminal, and the vector graphics boards are on the 6800 or bit-slice CPU bus, along with the GPIB interface logic, tape drive and keyboard interfaces.

For the 4054, the 4x increase in horizontal and vertical resolution drove the design to use vectors even for text.
For the 4052 and original 4051, the text was done in dot-matrix style, plotting one dot at a time using the assembly code in the BASIC ROM.

You can watch my video link above to see the speed of the lines and text.

I will be experimenting with GPIB graphics to the 4052 & 4054 from my 4041 computer which has a 68000 CPU and is able to change its GPIB controller function to device mode to allow two 4041 to communicate over GPIB.  I plan to put the 4041 in device mode and have a program on the 4052 getting graphics vectors from the 4041.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mmcgraw74 on July 19, 2020, 02:31:42 pm
artag,

My use case for the AR488 is to emulate the 4924 GPIB tape drive with the Arduino board using SD Flash for file storage.

All the 4050 computers support the 4924 GPIB tape drive commands in the BASIC ROM, so the tape emulator would allow all these computers to use the emulator instead of having to find DC300 and fix the aging DC300 tapes.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on July 29, 2020, 09:29:30 pm
mmcgraw74, sorry its taken me a while to get back to you as I have had a lot going on including two bereavements, health issues and an amateur radio course, not to mention the Leicester lockdown. However, I have been giving this some thought in the background.

The more I think about it, the more it seems that the requirement for a GPIB controller differ considerably from the requirements for  the 4924 tape drive emulator. Yes, it needs to communicate over GPIB, but it does not require controller features nor the complete Prologix command set. Furthermore, data received from GPIB does not need to be sent/received over USB (virtual COM port) but to an SD Flash card. It will need to have a primary GPIB address and also the means to accept secondary addresses as commands. These secondary addresses, when received, will need to be mapped to a specific emulator command handlers. As a device, there is no requirement to conform to the Prologix command syntax at all, although it could do if desired.

What I think is needed is a stripped down version of the AR488 code with the device mode handling only, but with the necessary addressing functionality. On this are then built the secondary address handlers and SD Flash handling routines.

As a starting point it would be useful to determine the exact command sequences that the Tek 4050 is sending to the tape drive and I presume this is why you asked about the analysis features? Once we know what is being sent and therefore what to expect at the receiving end, it should be possible to construct the appropriate handlers to process the request.

I am still willing to help and I will begin creating two separate project directories for: a) an analysis tool; and b) project to tailor the AR488 for the 4924 emulator. If you now have the means to capture the GPIB traffic between the Tek 4050 and the 4924 tape drive then some captures would be very helpful. I can give you my e-mail address if you want so you can send me them offline.

Thank you for your patience and sorry for the delay in responding.

Incidentally, you mentioned this project:
https://github.com/Tek-User/Tektronix-GPIB-Download

I am curious as to why you are not using his code? Does it not provide all the functionality you require?


BTW, on another topic, I had wondered whether there is any advantage to creating an MQTT enabled version of the AR488? This would use MQTT to configure and control the adapter rather than the Prologix command set and would work over Ethernet and WiFi. Any thoughts?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mmcgraw74 on July 30, 2020, 01:16:15 pm
WaveyDipole,

I agree with your analysis that a fork of your AR488 code to support a GPIB Device with GPIB commands might be advisable, my software skills are quite rusty and looking at your code - I didn't think I had the skills to do the modifications.

In terms of GPIB bus analysis - I don't think that is necessary, as the Tektronix 4924 Service Manual has very detailed descriptions of the controller to tape drive commands including GPIB cycle by cycle transactions in Appendix B starting on pdf page 192 through page 200:

http://bitsavers.org/pdf/tektronix/405x/4924/070-2131-00_Tektronix_4924_Digital_Cartridge_Tape_Drive_Service_Manual_Feb1982.pdf

The 4924 Tape drive was introduced before the 4050 series computers, so there are several of the commands not used by the 4050 computers.  I captured a list of those commands in my "code" list in post #512 in this thread.

As for the Tektronix-GPIB-Download project, this project provides one device function - screen print graphics from a Tektronix DSO are converted to an SVG graphics file and saved on a SD Flash card.  The DSO (and all the later Tektronix GPIB products) does not use secondary addressing, in fact no commands at all - the Arduino just waits for a GPIB SRQ sent from the DSO when you press the print button on the DSO.

Then I found your project, which supports command parsing (although the commands are from the PC over USB to serial on the Arduino).

I would really appreciate your help as I am not experienced in writing c-code, my coding was in 8-bit assembler and BASIC back in the day.

I'm not familiar with MQTT, but I'm not sure it would apply to this use case.  The Tektronix 4050 computers provided BASIC in ROM which included some of the BASIC commands mapped into GPIB secondary addressing - such as tape reads and writes.  Since I can't change those controller commands, and indeed want to use them as they are already built into the controller and directly support the 4924 tape drive and all the BASIC programs I have captured and posted use those commands - I think it restricts the device to only need to parse and support those commands.

In addition - I don't think Ethernet or WiFi are needed by the tape emulator device, as I just plan to transfer the programs I have recovered directly to the flash drive from my PC - organized into FAT folders for each tape.  The only 'new' command I would want the tape emulator to support is a change directory command - that I would add to the BASIC Menu program that would allow the user to select a particular 'tape' and file.

That "CD" command in my list of supported commands was designed for the Tektronix 4907 8-inch floppy drive system which included hierarchical file storage.  I don't need to support any of the other 4907 commands - and I plan to use the PRINT@5,9: BASIC command to send the "CD" to the tape emulator with the file path as a string variable as the only 'new' command in the set of commands needed for interacting with the tape files.

Since this 'fork' of your AR488 may not be very useful to the other folks, maybe you can start a new thread?

I stand ready to help!

Title: Re: AR488 Arduino-based GPIB adapter
Post by: mmcgraw74 on July 30, 2020, 01:29:31 pm
WaveyDipole,

I have a working Tektronix logic analyzer and GPIB Bus Preprocessor that is untested, but just needs a ribbon cable (I have the right connectors), that I should be able to use to capture GPIB bus transactions. 

I used a 6800 preprocessor module to debug DRAM parity issues with my 4907 Floppy Drive, so I believe I can get the GPIB Preprocessor working too.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: mmcgraw74 on July 30, 2020, 01:50:15 pm
Sorry, I have an HP 16500 logic analyzer and HP GPIB preprocessor module, not Tektronix.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on August 01, 2020, 01:53:52 pm
Sorry, my reference to MQTT (and hance Ethernet and WiFi) was not specific to your project but to the AR488 interface in general.

8in tape drives! That's going back a bit. Saw one at Uni when I was there but it was an obsolete bit of kit in a store room. Not sure what they used it with.

That you for that link. It does indeed contain very detailed information and is something I can work with and on that basis I can start a new project directory and start work on cutting down the code to what is required. I am uncertain as to parsin basic commands. As I understand it these will be issued from the Tek 4050 which will then translate these into GPIB commands and byte sequences to be sent over the GPIB. The tape device will need to read these from the GPIB bus and do something with them emulating the tape drive. What will be required is some means to provide the "tape drive" with a GPIB address so that the Tek 4050 can "talk" to it.

As requested, I have started a new discussion here:
https://www.eevblog.com/forum/projects/tektronix-4924-tape-drive-emulator/msg3168024/#msg3168024 (https://www.eevblog.com/forum/projects/tektronix-4924-tape-drive-emulator/msg3168024/#msg3168024)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: PixieDust on August 02, 2020, 06:29:05 am
I had a think about it and I think I'll just buy some aluminium shielding tape and use that to shield the wires. All I'm trying to do is download the calibration data. I'm not going to use the setup in some demanding RF environment.

I ended up buying some of this aluminium adhesive tape, but after doing some more reading, I'm starting to think it won't work. From what I'm reading if an EMI enclosure has any holes, then EMI can seep out through those. Using the aluminium tape means there's going to be heaps of holes, so shielding will be ineffective. Plus, I realised that you also need to ground the shield and aluminium isn't the best metal for soldering, so the whole thing is starting to look very complicated and probably quite useless. I'll see what cables I have that I don't mind cutting up that have shielding in them. I think that would be a better solution than creating the monstrosity that I had envisaged.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on August 02, 2020, 07:40:04 am
BTW, on another topic, I had wondered whether there is any advantage to creating an MQTT enabled version of the AR488? This would use MQTT to configure and control the adapter rather than the Prologix command set and would work over Ethernet and WiFi. Any thoughts?

I'm not sure what specific advantages would be gained from having an MQTT enabled AR488. Might that imply that you could then control your lab's lights and GPIB instruments via Home Assistant? ^-^
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on August 02, 2020, 03:29:29 pm
That could essentially be the case. The underlying messaging technology behind Home Assistant and HiveMQ is MQTT. I came across this while working with the ESP8266 and ESP32 as well as Ethernet shields and researching the performance problems particularly on WiFi devices. It seems that because HTTPS is quite heavy on resources on an IoT device, MQTT is the recommended as a lighter alternative solution. It then occurred to me that Prologix commands could also be replaced with MQTT messages. There is one drawback in that MQTT does not work over serial so it would only work with TCP/IP connected devices although I don't see why it couldn't via some form of serial gateway, but that's another topic.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: bitseeker on August 04, 2020, 03:53:32 am
And there are also the other home automation comm protocols such as Zigbee and Zwave.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: PixieDust on August 16, 2020, 08:03:13 am
Found some shielded cables. Job done. But at least I can understand why these cables cost so much. Much more work than I anticipated. Soldering all the shielding to a common ground was especially messy as you can see!

EDIT: D/L the calibration data for my HP3478A, but it looks wierd. Is there some special software that I need to read it? Notepad shows me this:
Quote
O@@@BADBECEMML@@@@BACLMLLLH@@@@@BBEDALNEIIIIIDBE@COKE@@@@@@BEMDDNC@@@@@@@@@@@OO@@@@ICCLEDDMG@@@@C@ALNNLLG@@@@@EALAOCMJ@@@@@AALNCLMD@@@@@@ALNNMLI@@@@@@@EEO@NF@@@@@AALMAEMN@@@@@@@EEDAO@@@@AEADNLMOKN@@@@AFDNNMALJ@@@@@@@@@@@OO@@@@ICDOMMOKG@@@@@@@@@@@OO@@@@@@@@

That doesn't look like anything I've ever seen before that would suggest that the data has integrity. From memory, other peoples calibration data looked different/legible.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Miti on August 16, 2020, 11:16:08 am
Looks right to me. Take a look here
https://www.eevblog.com/forum/testgear/free-hp3478a-multimeter-control-program/ (https://www.eevblog.com/forum/testgear/free-hp3478a-multimeter-control-program/)

And here

https://www.eevblog.com/forum/repair/hp-3478a-how-to-readwrite-cal-sram/ (https://www.eevblog.com/forum/repair/hp-3478a-how-to-readwrite-cal-sram/)

And here
https://www.eevblog.com/forum/projects/project-extending-hp3478a-functionality/ (https://www.eevblog.com/forum/projects/project-extending-hp3478a-functionality/)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: PixieDust on August 16, 2020, 12:14:49 pm
https://www.eevblog.com/forum/repair/hp-3478a-how-to-readwrite-cal-sram/

Thanks! Thought I saw calibration data examples somewhere, thanks for the link. I agree, looks like everything worked. I was expecting hexadecimal values.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: eliocor on August 20, 2020, 11:58:32 pm
I'm using an "artag" interface with a modified ++ver string which contains the string: "Xxxxxxxxx GPIB-USB Controller version 6.101". *
I know the communication is OK: using the 'GPIB Configurator' from "KE5FX GPIB Toolkit" I'm able to read and write to my 34410A.
Unluckily the patched version of EZGPIB is unable to identify the AR488 interface: the debugging window reports the following text (COM30 is the AR488 interface):

 see attachment, please.....

  (https://www.eevblog.com/forum/data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArMAAAGsCAYAAADOjy/IAAAgAElEQVR4nO3dS4wdxd338dm8et8Fitgg5CyQorwEJfiV4AFnMTxcHALmYoPNJcEQY4fLeBTsByfeZZF4EUYhYeFFErEAMkqEFLEjUiw5YcEikaLISI5YIpHlsEEaASs29S7GZ3ympy7/f9266vT3I5Xi6UtVdXX36R99+nSWTp8+bVzlvvvuM2fOnHGUI+a2PXvMjftPeJa5utyePXvMbUdm006Y/TduTduz5zZzZLbsif3mxh3LecqR28yePTea/Sd2Tj+x/8addR65bdD2lT7duN+ccK0z1+cb958wL7/8snn55ZfN4f/aY/bs+S/z6P/8jzl9+rQ5deqU+cHd/9fs2bPH3HroR2Z1ddWsrKyYx++93Rw+fNjceeed5qWXXmq6nDlzZvt/KRQKhUKhUEqU1LyysrJizpw5Y276f3eYx44fN88995x58cUXzcmTJ83S6dOnDQAAANAbwiwAAAC6RZgFAABAtwizAAAA6BZhFgAAAN0izAIAAKBb0WH2008/Ne+884559dVXzerqqnn66afNuXPnzJtvvmk+/vjjAl0FAAAAdooKs3/5y1/M6uqqef75580rr7xi3njjDfPWW2+Zs2fPmoMHD5oDBw6YV1991XzxxReFug0AAABEhNk//OEPZnV11bz11ltmY2PDfPbZZ+aTTz4xH3/8sfnwww/N+++/b37+85+bu+66yxw/ftx8/vnnBbsPAACAKVOF2dkd2X/84x/myy+/3BVk//nPf5r33nvPvPvuu+ZXv/qV2bdvn/nJT35SeBMAAAAWz9LSkqi0ZmlpyVy6dMk5/9KlS1n7LQ6zn376qVldXTW/+c1vzJdffmn+85//mL///e/mb3/7m/nzn/9s/vSnP5nf//735re//a359a9/bc6dO2eOHj1q9u7da/71r385ar1gVgY7ZPn8R4JuXzArS8tGtGiUK/1auWCd+9H5ZbNUtH0AADB1ksDXYpi9dOmS+V//+/9YA61vXixxmH3nnXfM888/bzY2NsylS5fMs88+a86ePWuOHTtmTp48aX74wx+au+66yywvL5v9+/ebAwcOmOPHj5tbb73VrK6uOmodhlJ/iHSvl9tW/cvLtjZmAZwwCwAAyuk1zBpjD60lgqwxijD76quvmldeecV89tln5ne/+525dOmS+fDDD80vf/nL7UcLlpeXzb59+8yxY8fMuXPnzNmzZ83+/fvNDTfc4KjVEko/Om+Wl1aMP87WCbMrK8u77xRfWDFLKyuF2wcAAFPXc5g1Zmd4LRVkjVGE2dXVVfPGG2+YTz75xPz1r3/dfkb23Llz5t133zVvv/222bdvn7nlllvMk08+ac6ePWtWVlbMnXfeafbs2eOo1RZKPzLnl5fM9s3Zj86b5e3HEGYh98p6F67Ouxo6bXd75/7+aH6d845QOlvnglnZEaw/MueXZ9PtdV7t49Z2zB6f2Noe2zRjLqzMPWoxf1fa11dxmwAAoEe9h1ljrgbaUkHWGEWYffrpp81bb72168dezz33nHn77bfN66+/bm655Razd+9ec/DgQbOysmKOHj1qbr/9dnPdddc5ag2F2cH8CytXQuuVr/qXz5uPjLkS7GbL+cLs1nqzkOd+9vXqOhdWBsF6+bz5aFedlj5eWNn9uIRtmnM8fH1VtAkAALr8MRVhVkYcZmePDQzfWvDMM8+Y119/3bz22mtm79695qabbjL33nuvOXr0qDl48KC5+eabzbXXXuuo1RVmr0zbcfdx/s7l7vWuhk5PmN0Oo7723etY23D18cr0HY8p2KZtdX5ufUFfNW0CAIAu9R5mm3vM4M033zRPPPGEef/9982PfvQj8+Mf/9j84he/MKdOnTKvvfaaOXfunLnpppvM17/+dXPHHXeYgwcPmrvvvttcf/31Znl52VFr4JlZ5/Ozw/U8d3NTw+wsXF+YX3cYLN3P+G7dUd35lf+OaTvWHwR5b5jVtQkAAPrSc5ht8gdgH3/8sTlw4MCutxasra1t37W9+eabzQ033GC++c1vmn379plvfOMb5pprrjF//OMfHbXa32ZwNYRt/b37TuNg+q5AOFfHhZXB1/O6xwyu1uF6LtfVx6s+Or/7h2Tb0y6seB6X8D1moG8TAAD0o9cw2+yruYwx5mc/+5m56667zD333GMef/xx89Of/nQ7yK6srJhHHnnE7N2713zta18zX/3qV80111xjvv3tb3tqHL5n1hIsh1+pzz1msLKybP+x0/zX9sM3D8zNC/8AbLsT5vzy/J1Q3w/ArvRxx6MDV9a1TZv/0dbyillZFvZV2iYAAOhSj8/5GtPw/2mCMcZ88cUX5vjx4+aOO+4wL7zwwo4gO3tG9u677zbf+ta3zFe+8hVz/fXXm3//+9/ZOpud6DVgjeiprwAAAJWowqwxxnz++efmxRdfNHv37jW33nqr2b9/v7nzzjvN7bffbm6++WZz/fXXb9+RbTrImiuvxNrxXGq7euorAABALeowO/Pee++Z1dVVc8MNN5g9e/aY6667zlx77bVmeXnZ84zs2Ha+h7Xtr+J76isAAMA4osMsAAAAMDbCLAAAALpFmAUAAEC3CLMAAADoFmEWAAAA3SLMAgAAoFuEWQAAAHSLMAsAAIBuEWYBAADQLcIsAAAAukWYBQAAQLcIswAAAOgWYRYAAADdkofZy+vm9OnTV8q6ubw10ayfXjMXNwr30lw269ttb5X1y5mb2Lho1rJsS0JfZ2O8dtFs2P4GAADADrIwu3HRrG0H2K2/L142pm6YnWvn8vpcoG7NoK/DsfOuNx98h38DAABgSBZmL6877g6OFGartRsjtq89bSMAAEAbhI8ZbN0lXNuVrK4ErssXzdqVr9R3LLNxdfr81+2X14d3IAd3MnfdjrTcmZ0P1zvamb8LumEurlm+7rcuP2tja50dXZhvz9mWp6/blbkC685HE9YuXhz8vRHs9/r6mjl9en1XbwAAABaZ4gdgV4Ph8Kvwnc94zoesYYC8EuTmA97ldbO2trYd2DYurjlC89xzqDuT5q7wuLX+Vn+dAXzX8nPTdwTQ+fDtWtfT1x2B13f3NXRn1tdv23YCAAAsPv3bDK7cHbSGu/m/Lc+KbofCjYtm7UoAvrx+5c7u2kWzYTbMxTXbV+ueegd3f7fDrutZVdfyu4LlXCi33pW1BWvLmOz4YVlCmBX1GwAAYFqiXs21cXHNEaSEYXY7tM6C4oa5uLZuLs+F3J12trPj7q03tCqmO9oQteWpZ3aHOBj+RWFW8FgDAADAhAh/AHZxVzjb9dX81oKDcDZ8zOBqGNu4uLbr8YL1ddvX9sN67e3sXs/3mIHg8YONi2Ztbd2srw0fEwh9pe+7Mzt4HvfyujmtesxA0G8AAIAJUf0AbPdX65qvxgeBa/heV+97XncHto2La44fZQ37F/oBmOvr+ivPCA8fI3C25Rir4TbNv693fV3xzKy03wAAANPB/wMYAAAAuiUKszt+dDRXAAAAgDFxZxYAAADdIswCAACgW9th9rPPPqNQKBQKhUKhULoq22F2c3OTQqFQKBQKhULpqvCYAQAAAEZDmAUAAEC3CLMAAADoFmEWAAAA3SLMAgAAoFuEWQAAAHSLMAsAAIBu+YLqiRMnCLMAAABoly/IzgphFgAAAE0KBdlQoCXMAgAAYDShO7KhQEuYBQAAwGhcYTY0jTALAACA0Ul/9EWYBQAAQHN4NRcAAAC6RZgFAABAt7KH2aWlpV2lFZr+jN3v1sYuB9uxUWIba4xdyfpd4yMZP9/81PEfriNtI1f7w760bBHPXwBoVdYw6/rwbulDvaW+uPTQx1i2bSsVaHsUGh/p+GnORW2g1fRNskztfdXzf+gAAHarEmZbQh/HRZh1k/S5xzCbs/0cCLMAsFg++OCD6BIVZrVfk7rmzf+trd+1rq0N2zzp+qlf5Urrd/U95qtOyfjH1j1bzzUtx/71tSNZP7T/pPsmtKymz6FlphRmc5+fofna80tbv6Z9yXwAmKKsYdaY8MXAxveBHLpozS8jqT+1T771Uy/UKX2S9jG1L6l1Sy7GKftXOy1Uf459ISUNgyXDvLaP2rCVK4zFnJ+SdSXTQ23E7vOY41PbHgAsouxh1mZ4J0N698MXdnztSPoSW5dv/ZbCbCxJGElpK2YfxUwfK8zO5uUKirH/8RAzVtLzU9KOa5na54h2n4a2X9Jf6bGh3bfS/gHA1FQPs5LlYqZJ6rctQ5j1r0eYHS/M2qaXDLMx9S5amE1pO6Z+bZgFAOxW5ZnZUJjVhomUsFMyzM7+Tr1rQpgdJ8zO/i3Zf6X2RWrgCS1XMszGhvExw6y2/77ltPVo208N4QCwqKo+MxszfzZNsm5oGVu9vmVi1rf1RyPX9qUEacn42/4uuW3SZVLn29qTrp86Pq42QtNj+pfrGKndfq7xL3V+xczXtCEdv5j9CgC9qvKYwZRxUekb+w8AgLYRZjNLveuFcbH/AADoC2EWAAAA3SLMAgAAoFtFwmzoBxSlaOof8yvk0l9la34klNpGTbl+wCRtp6Qa50HMD7Bq/IBsVlfLeMwEAPpR5G0GQ8MLYkmtX4BC45O7fu3fMW3UVHr8StZZQ8z5pxnTWuPvM/XPEADATlXeMztvyheiMfpGmM3XTutizz/CbN36AQB5jRZmpe9h1L5nMfRYg+/r0fnpmv7lfLRB+jWvpj7N39r+pfY/pn3XNEn90n3nm649Pn1j4Fo3tKymz6FlaobZ3OdfaL72+NPWr2lfMh8AoDdKmB1eYGz/Hq4jmS+tL1SXpj7thTxmvq0PkjGR9DfmYhoTAH19iw1DklA0X39qQIs5PnOMlZTm/CsV5lP7Kjk2Sh9/sWOe4/MLAKA3+mMGrjsntgumpv4cwdHWP2k9mjY1fZKGWVedrYTZWDHHWMz0scLsbF5MUPTdBZS0K+lf6jmgrV87pr7PD2l/pftGO7bS/gEAdJoLs5p1XctILhCEWVmfYvuZu03NuoRZ9/RFD7MpbcfUn/vzCwCgt7m5mVSS32YguRiEgpurjlBgkEz33e3KFThits+1TurfEoRZ93Tp8VFqrFIDV2i51sKs5vMjtJy2Hm37qSEcAGCXPcwas/uCbptu+9u2riZM+pbXrO/r31DshTx1+4Z9dNURaj9n36X9T/kPgdi2pcukzre1J10/5vhztSkZf8m6of2X2rfY7S91/MXM17SROn4AgN2KhNkp4WIEH44PAADKIswqcVcFPhwfAADURZgFAABAtwizAAAA6FbWMJvjByIljd2fsdtfNIwnAACo/mquHFLqGzv8jN3+omE8AQCYNsJsZWO3v2gYTwAApq16mI15z+SwrpRHGHx1S+ov+Z7N1PmhsUvtn+QxktT+8Z5OAACgUSTM+sKMjSuw+ObHkvbJNl/af2l9w2mh+iXta7cv1Ddb/aX6F7P9hFkAAKatyp3Z0DxtWM35mEHKndEc7c9Pc935lM6XbJ+2b8PpKf0P9U+y/dI+AwCAaSDMCoOaqy5tX2LubEr64lqmhTuz0v7FbD9hFgCAaes+zKaGSU2Y7eUxg5x9C9Wfs388ZgAAALSKvmfWJvQVtKSO+WU1fF/bu/owmxbTR1/7rvVT5ku2L6aPNfsXUz+BFgCA6cp+ZxaLjeAIAABaQpiFGHdCAQBAawizAAAA6BZhFgAAAN0qEman8lV07HZqfgCX8iO5XP3NZez2tXrrr9aibx8AYBqK3Zlt+SKZs28xb1RwTXO9psr3aiptH8beL2O3rxX7HysljXn8AgDQGsJsxbpSl83R77H3y9jtaxFmAQBoW7HHDOb/dziv9ntMfevn7p9PS2FWuv2h+TF3pkvvf9/21e5fb/UDANCbqmHWdeH0hV/N/Pm/hyFH0w9N+zXD7Gx6jjAp7ZNk2VwhPcf+126ftG/S9jXLDaePUT9hFgDQu+xhNnThDYUw7V0n190nH01QHN7tk9alaXfMZVPuDMYIhdnQ+If2v/ZYkPZN2r6vzZjjS9rP2PoJswCA3hUJs9I7h9r5qRf70PyY9VoMqJplQ+Obsv8k7c9Pi91vvmVyh9nYeiTrj1E/YRYA0Luqd2ZDF+HU+aF2Qn2KaT9nmIuZpu1DSpgt0f78tBz7f4wwKx3TEsd37eMXAIDWZA2ztq81bXdXQ1/Rxs7PcVc4pv2YQOtbVzpP23bM/plNy91+6f3v2r7UPkq3P+fxVbp+Ai0AoGfFXs0FAAAAlEaYBQAAQLcIswAAAOgWYRYAAADdGvXVXKn48YodP+zZwhgAALD4sr/NwKZ0oO1NzfHocXxymvr2AwCw6KqE2ZJi2wyt12sAJ8zuNPXtBwBg0VUPs5J3eA7/LV1fIzbMSt7h6fo7tL5tvnb7UsNs7ve8utZ19U06vqWPDwAA0Ieqz8xKHkPwreMKLzFy3ZkNhUdNn3M8ppESZkPtS/efb53Q/FCfah0fAACgD1XeZjC8m6YJvDnDSqh9af9Cdw9D/estzIbm5wyzKeNLmAUAYHqqh9mQWmElJrhJphFm48Ns6vgSZgEAmJ6qbzPQhCHJPF+dITXCrO3Oom2ZUJ/GDrO1HjMgzAIAAK3q75mVfoVv+9u1fkxgSbkLaeunbZnhv13L+OqP3bYc68buv9m/bdN8823125atcXwAAIA+VHnMAAAAACiBMAsAAIBuEWYBAADQLcIsAAAAulX9B2A58eOevrH/AABAqqqv5iqBMNQ39h8AAEhRJcyWVPM9s8iPcQYAACmqh1nNe0pLvYdV0tdQ27a/pdsX2sZQv1LfAxt6P65rvq1+2zzftvEOWAAAkFPVZ2YljyH41nGFoxixd2ZtAS5mHcl62j5Jx9e3Tmh+qE+19h8AAIAxld5mYLuTKQ28OcNQqP0c/Qutr+2zZr0aYVa7bYRZAABQUvUwG1IrDMUGw/l5sSG11zArGX/CLAAAqKnq2ww0YUsyz1dnSM0wW/rObK3HDAizAACgNdXfMxv6Ct/1tb9v/ZhAlBJmffOl25fS79Txne+/bbxd823125atsf8AAACM4f8BDAAAAB0jzAIAAKBbhFkAAAB0izALAACAbmV/m0ErP+6p0S4/XgIAABhXkbcZDC1y4FvkbQMAAGgdYTbRIm8bAABA66qH2ZT3pGrn2/oR8x5UTfshkrqH/5a2n7p9rvVd2wEAADC2ImHWF5Zshi/fj50fmmabntq/1FDnC7Ta/rnq06wf6gMAAEBLit6ZldzVHN4J9AmtP1zWVYfr75j+pd6Z9fXH9bfkjqmtz9LxI7wCAIBeVA+zPqnzpcu6wmlM+6l90obZ4TzX8q4wG9tPAACAFhV/Zra1xwx89ZV+zCA1zGrvNmu3L7QcAABAa4q9Z3bG9bfvK+6S8+eXc03X1q8NtK7HF2zTteM3rE+zfZrtIvACAIAWZL8zCwAAANRCmAUAAEC3CLMAAADoFmEWAAAA3Sr2A7DYH0jlNGbbPpK3M0h/oKX5AVzOH6/Z/s7Vfmh8pH1FXrXO7Rrnbcn6Wz1/h+20rNXP7pYs+hj1tn2a/va0Xb0o/mou17RaWjxoQm8b8E2LWSd2Wcn6ob5JlnHV2eK+m7pa53ev+7718zeHnv9DowU5ty+mrp72X4vHgq9PLfY3t1a3sUqYHVNr/TFG/x7Y0DKth1lt+4TZdhFm3Xo4f3PoKQy1aOyw19P+a/FYIMy2uY1Fw6zrgzf0NZrkb9ct/ZSv4UrXL2k/ZplFC7MpfPtFsn819dvGIuX4GU4LLSNdPyff/pO0Lz1/fNMl+0A6Rq51Q8tq+hxapvb5m3J+hPZd6vGprV/TvmS+T+r5Lem/tA+x21d6/MbcP6H1JftPW79tvq/+0HblOD5jxzfH+TmmImHWN5A2wwH1rWPbAb76Y08Gaf0xbfjaliwjOaBKnCy2elM/7EqdEKHtDy0X207q8eMbX+m+zr2NtrolF6xh+5pjVXMu++qPOT8ky2nqHC4z5vkrrd+3XI4x1Xzm+2jOjxyf3zmuDzn3Wc72c41fzvpznH/DMUr9bPStI60/x3mlrXeM87OmqndmUy/mob9TT4aY+mPa0LQde/LFnES2C2WOAzv3PpIodWEJhQnJ35IQY/sAkuyfmG3S0O7v2OkxH/a5LhCxQXHs81cj5fzwrZvj+JTuG+3YSvun6VvM9SH2/Azti9TxD62f49jV1p+yb2zTc+yL0PGp7dNwesxnj6/e0P7LeX6OqeozszkONu2HSY4LUqiuXDs3ZnxS6tLWaVtWG25yXYw1bfqmp35Yao/X4TzX8rYPoNR9n4N2f8dO14ao2HVc82IuKD2cv9r6c42pZrnYba9xEW49zMbWI1l/jPqnFmaHy+T4DCLMNhBmfRf70LqS/kj6WDPMuupq6WKYOj5TDrPaPsV+ME41zM7+PSwpfcl5MdHU10uYLRHmcodZ7cVc07fU7c/5+ZPafq7xy1l/62FW8/kfml7i+JyfVuL8bCnYFn3PrI3kYjM/3fZv19+u+jUXkJj6c3PVnzq+KWPjamOM9qV987Uf2g5p/bNp0vqlx//8/8ZsX2i7Uve7tm/SZVLnh7az9PFhayM0PaZ/ufoWu/25zv/Q+pL5mjZSxi/X+T2/nFboGEhtP9f45aw/dh+VOr9d25fj+Ch5fofma9qOHbeSst+ZBdC21j6ESprStgKYtil/3hFmASyMlLsaANCrqX/uEWYBAADQLcIsAAAAulUkzIYeMC5FU/+Yt+JLfxWao+4xvq5Iffhf205JNY5zyQP8qT8AiN2O1r/qmvLXcQCwaKq8mmt4wSyp9QtUaHxy1x/7S82xlB6fknXWEHN+aca01vj7TP0zAgCgk/3VXCFTvlCN0TfCrLyd1sWeX4TZuvUDAOoaLcy6vuZL+Zp02IfQ+q62tf3L+WiD9GtgTX0aoe3S9i+mfdc0Sf3SfeObrj3+fGPgWje0rKbPoWVqhtnc51dovvb409avaV8yHwCQ3yhhdngBsv17uI5kvrS+UF2a+rQX+pj5tj5IAm3shTQmAA7/lu4HW13SQDGsPzWgxRx/OcZKSnN+lQrzqX2VHBulj7/YMc/x+QQAyG/0xwxcd1ZsF1RN/TmCo61/0no0bWr6JA2zKRfQmgFN2kZMP3zTxwqzs3kxQdF3F1DSrqR/qce4tn7tmPo+H6T9le4b7dhK+wcAyKu5MKtZ17WM5AKyyGE29eJJmLVPby3M2qYvephNaTum/tyfTwCA/EZ/m4HkYqG5Cym9+MRebFPvuvjGJ0eYzXFBJcy6p0v3f6mxSg1coeVaC7Oaz4fQctp6tO2nhnAAQJxR3jM7/+HvW8YWFnzzfctr1vf1byj2Qp+6fcM+StZP7Zu0f2O0LV0mdb6tPen6MceXq03J+EvWDe2/1L7Fbn+p4y9mvqaN1PEDAOgVCbNTwsVq2tj/AACMizCrxF2XaWP/AwDQFsIsAAAAukWYBQAAQLeyv5qr5R9AjN2fsdtfNIwnAACo/mquHFLqGzv8jN3+omE8AQCYNsJsZWO3v2gYTwAApq16mI15D+WwrpRHGHx1S+ov+R7O1PmhsUvtn+QxktT+8R5PAACgUSTM+sKMjSuw+ObHkvbJNl/af2l9w2mh+iXta7cv1Ddb/aX6F7P9hFkAAKatyp3Z0DxtWM35mEHKndEc7c9Pc935lM6XbJ+2b8PpKf0P9U+y/dI+AwCAaSDMCoOaqy5tX2LubEr64lqmhTuz0v7FbD9hFgCAaes+zKaGSU2Y7eUxg5x9C9Wfs388ZgAAALSKvmfWJvQVtKSO+WU1fF/bu/owmxbTR1/7rvVT5ku2L6aPNfsXUz+BFgCA6cp+ZxaLjeAIAABaQpiFGHdCAQBAawizAAAA6BZhFgAAAN0qEman8lV07HZqfgCX8iO5XP3NZez2tXrrr9aibx8AYBqK3Zlt+SKZs28xb1RwTXO9psr3aiptH8beL2O3rxX7HysljXn8AgDQGsJsxbpSl83R77H3y9jtaxFmAQBoW7HHDOb/dziv9ntMfevn7p9PS2FWuv2h+TF3pkvvf9/21e5fb/UDANCbqmHWdeH0hV/N/Pm/hyFH0w9N+zXD7Gx6jjAp7ZNk2VwhPcf+126ftG/S9jXLDaePUT9hFgDQu+xhNnThDYUw7V0n190nH01QHN7tk9alaXfMZVPuDMYIhdnQ+If2v/ZYkPZN2r6vzZjjS9rP2PoJswCA3hUJs9I7h9r5qRf70PyY9VoMqJplQ+Obsv8k7c9Pi91vvmVyh9nYeiTrj1E/YRYA0Luqd2ZDF+HU+aF2Qn2KaT9nmIuZpu1DSpgt0f78tBz7f4wwKx3TEsd37eMXAIDWZA2ztq81bXdXQ1/Rxs7PcVc4pv2YQOtbVzpP23bM/plNy91+6f3v2r7UPkq3P+fxVbp+Ai0AoGfFXs0FAAAAlEaYBQAAQLcIswAAAOgWYRYAAADdGvXVXKn48YodP+zZwhgAALD4sr/NwKZ0oO1NzfHocXxymvr2AwCw6KqE2ZJi2wyt12sAJ8zuNPXtBwBg0VUPs5J3eA7/LV1fIzbMSt7h6fo7tL5tvnb7UsNs7ve8utZ19U06vqWPDwAA0Ieqz8xKHkPwreMKLzFy3ZkNhUdNn3M8ppESZkPtS/efb53Q/FCfah0fAACgD1XeZjC8m6YJvDnDSqh9af9Cdw9D/estzIbm5wyzKeNLmAUAYHqqh9mQWmElJrhJphFm48Ns6vgSZgEAmJ6qbzPQhCHJPF+dITXCrO3Oom2ZUJ/GDrO1HjMgzAIAAK3q75mVfoVv+9u1fkxgSbkLaeunbZnhv13L+OqP3bYc68buv9m/bdN8823125atcXwAAIA+VHnMAAAAACiBMAsAAIBuEWYBAADQLcIsAAAAulX9B2A58eOevrH/AABAqtQwe88998hfzVUCYahv7D8AAJAiNcw+99xz4TBbUs33zCI/xhkAALjPm2EAABkfSURBVKSoHmY17ykt9R5WSV9Dbdv+lm5faBtD/Up9D2zo/biu+bb6bfN828Y7YAEAQE5Zw6wx4TBl4wq0tnm+dTVi78zaAlzMOpL1tH2Sjq9vndD8UJ9q7T8AAABjCoRZG9udTGngzRmGQu3n6F9ofW2fNevVCLPabSPMAgCAkqqH2ZBaYSg2GM7Piw2pvYZZyfgTZgEAQE1VnpmN+RpcMs9XZ0jNMFv6zmytxwwIswAAoDWpYfbYsWO698yGvsJ3fe3vWz8mEKWEWd986fal9Dt1fOf7bxtv13xb/bZla+w/AAAAY9LD7AsvvMD/AxgAAADGQZgFAABAtwizAAAA6BZhFgAAAN3KGmZb+nFPjXb58RIAAMC4st+ZndrrlxZ52wAAAFpHmE20yNsGAADQuuphNuU9qdr5tn7EvAdV036IpO7hv6Xtp26fa33XdgAAAIytSJj1hSWb4cv3Y+eHptmmp/YvNdT5Aq22f676NOuH+gAAANCSondmJXc1h3cCfULrD5d11eH6O6Z/qXdmff1x/S25Y2rrs3T8CK8AAKAX1cOsT+p86bKucBrTfmqftGF2OM+1vCvMxvYTAACgRcWfmW3tMQNffaUfM0gNs9q7zdrtCy0HAADQmmLvmZ1x/e37irvk/PnlXNO19WsDrevxBdt07fgN69Nsn2a7CLwAAKAF2e/MAgAAALUQZgEAANAtwiwAAAC6RZgFAABAt4r9ACz2B1I5jdm2j+TtDNIfaGl+AJfzx2u2v3O1HxofaV+RV61zu8Z5W7L+Vs/fYTsta/WzuyWLPka9bZ+mvz1tVy+Kv5rLNa2WFg+a0NsGfNNi1oldVrJ+qG+SZVx1trjvpq7W+d3rvm/9/M2h5//QaEHO7Yupq6f91+Kx4OtTi/3NrdVtrBJmx9Raf4zRvwc2tEzrYVbbPmG2XYRZtx7O3xx6CkMtGjvs9bT/WjwWCLNtbmPRMOv64A19jSb523VLP+VruNL1S9qPWWbRwmwK336R7F9N/baxSDl+htNCy0jXz8m3/yTtS88f33TJPpCOkWvd0LKaPoeWqX3+ppwfoX2Xenxq69e0L5nvk3p+S/ov7UPs9pUevzH3T2h9yf7T1m+b76s/tF05js/Y8c1xfo6pSJj1DaTNcEB969h2gK/+2JNBWn9MG762JctIDqgSJ4ut3tQPu1InRGj7Q8vFtpN6/PjGV7qvc2+jrW7JBWvYvuZY1ZzLvvpjzg/Jcpo6h8uMef5K6/ctl2NMNZ/5PprzI8fnd47rQ859lrP9XOOXs/4c599wjFI/G33rSOvPcV5p6x3j/Kyp6p3Z1It56O/UkyGm/pg2NG3HnnwxJ5HtQpnjwM69jyRKXVhCYULytyTE2D6AJPsnZps0tPs7dnrMh32uC0RsUBz7/NVIOT986+Y4PqX7Rju20v5p+hZzfYg9P0P7InX8Q+vnOHa19afsG9v0HPsidHxq+zScHvPZ46s3tP9ynp9jqvrMbI6DTfthkuOCFKor186NGZ+UurR12pbVhptcF2NNm77pqR+W2uN1OM+1vO0DKHXf56Dd37HTtSEqdh3XvJgLSg/nr7b+XGOqWS5222tchFsPs7H1SNYfo/6phdnhMjk+gwizDYRZ38U+tK6kP5I+1gyzrrpauhimjs+Uw6y2T7EfjFMNs7N/D0tKX3JeTDT19RJmS4S53GFWezHX9C11+3N+/qS2n2v8ctbfepjVfP6Hppc4PuenlTg/Wwq2Rd8zayO52MxPt/3b9berfs0FJKb+3Fz1p45vyti42hijfWnffO2HtkNa/2yatH7p8T//vzHbF9qu1P2u7Zt0mdT5oe0sfXzY2ghNj+lfrr7Fbn+u8z+0vmS+po2U8ct1fs8vpxU6BlLbzzV+OeuP3Uelzm/X9uU4Pkqe36H5mrZjx62k7HdmAbSttQ+hkqa0rQCmbcqfd4RZAAsj5a4GAPRq6p97hFkAAAB0izALAACAbhUJs6EHjEvR1D/mrfgaX4Wm1jvG1xWpD/9r2ympxnEueYA/9QcAsdvR+lddU/46DgAWTZVXcw0vmCW1foEKjU+O+lMv1GMHfcm0Eu30IOb80oxprfH3mfpnBABAJ/uruUKmfKGq2TfCrL6d1sWeX4TZuvUDAOoaLcy67h6mfE067ENofVfb2v7lfLRB+jVwqL6Ur4clYyTtn7YfvjAlqV+6b3zTtcefbwxc64aW1fQ5tEzNMJv7/ArN1x5/2vo17UvmAwDyGyXMDi9Atn8P15HMl9YXqktTn/ZCHzPf1gfNmGjFBMDh39L9YKtLGiiG9acGtJjjL8dYSWnOr1JhPrWvkmOj9PEXO+Y5Pp8AAPmN/piB686K7YKqqT9HcLT1T1qPpk1Nn3oJs7nbjumHb/pYYXY2LyYo+u4CStqV9C/1GNfWrx1T3+eDtL/SfaMdW2n/AAB5NRdmNeu6lpFcQAizaf3wTSfM1gmztumLHmZT2o6pP/fnEwAgv9HfZiC5WGiCm/TiE3uxTb3r4hsfwmzbYXb2b8n+LzVWqYErtFxrYVbz+RBaTluPtv0S5yIAIGyU98zOf/j7lrGFBd983/Ka9X39G4q90Kdu37CPkvVT+ybt3xhtS5dJnW9rT7p+zPHlalMy/pJ1Q/svtW+x21/q+IuZr2kjdfwAAHpFwuyUcLGaNvY/AADjIswqcddl2tj/AAC0hTALAACAbhFmAQAA0K3sr+Zq+QcQY/dn7PYXDeMJAACqv5orh5T6xg4/Y7e/aBhPAACmjTBb2djtLxrGEwCAaaseZmPeQzmsK+URBl/dkvpLvoczdX5o7FL7J3mMJLV/vMcTAABoFAmzvjBj4wosvvmxpH2yzZf2X1rfcFqofkn72u0L9c1Wf6n+xWw/YRYAgGmrcmc2NE8bVnM+ZpByZzRH+/PTXHc+pfMl26ft23B6Sv9D/ZNsv7TPAABgGgizwqDmqkvbl5g7m5K+uJZp4c6stH8x20+YBQBg2roPs6lhUhNme3nMIGffQvXn7B+PGQAAAK2i75m1CX0FLaljflkN39f2rj7MpsX00de+a/2U+ZLti+ljzf7F1E+gBQBgurLfmcViIzgCAICWEGYhxp1QAADQGsIsAAAAukWYBQAAQLeKhNmpfBUdu52aH8Cl/EguV39zGbt9rd76q7Xo2wcAmIZid2Zbvkjm7FvMGxVc01yvqfK9mkrbh7H3y9jta8X+x0pJYx6/AAC0hjBbsa7UZXP0e+z9Mnb7WoRZAADaVuwxg/n/Hc6r/R5T3/q5++fTUpiVbn9ofsyd6dL737d9tfvXW/0AAPSmaph1XTh94Vczf/7vYcjR9EPTfs0wO5ueI0xK+yRZNldIz7H/tdsn7Zu0fc1yw+lj1E+YBQD0LnuYDV14QyFMe9fJdffJRxMUh3f7pHVp2h1z2ZQ7gzFCYTY0/qH9rz0WpH2Ttu9rM+b4kvYztn7CLACgd0XCrPTOoXZ+6sU+ND9mvRYDqmbZ0Pim7D9J+/PTYvebb5ncYTa2Hsn6Y9RPmAUA9K7qndnQRTh1fqidUJ9i2s8Z5mKmafuQEmZLtD8/Lcf+HyPMSse0xPFd+/gFAKA1WcOs7WtN293V0Fe0sfNz3BWOaT8m0PrWlc7Tth2zf2bTcrdfev+7ti+1j9Ltz3l8la6fQAsA6FmxV3MBAAAApRFmAQAA0C3CLAAAALpFmAUAAEC3Rn01Vyp+vGLHD3u2MAYAACy+7G8zsCkdaHtTczx6HJ+cpr79AAAsuiphtqTYNkPr9RrACbM7TX37AQBYdNXDrOQdnsN/S9fXiA2zknd4uv4OrW+br92+1DCb+z2vrnVdfZOOb+njAwAA9KHqM7OSxxB867jCS4xcd2ZD4VHT5xyPaaSE2VD70v3nWyc0P9SnWscHAADoQ5W3GQzvpmkCb86wEmpf2r/Q3cNQ/3oLs6H5OcNsyvgSZgEAmJ7qYTakVliJCW6SaYTZ+DCbOr6EWQAApqfq2ww0YUgyz1dnSI0wa7uzaFsm1Kexw2ytxwwIswAAQKv6e2alX+Hb/natHxNYUu5C2vppW2b4b9cyvvpjty3HurH7b/Zv2zTffFv9tmVrHB8AAKAPVR4zAAAAAEogzAIAAKBbhFkAAAB0izALAACAblX/AVhO/Linb+w/AACQquqruUogDPWN/QcAAFJUCbMl1XzPLPJjnAEAQIrqYVbzntJS72GV9DXUtu1v6faFtjHUr9T3wIbej+uab6vfNs+3bbwDFgAA5FT1mVnJYwi+dVzhKEbsnVlbgItZR7Ketk/S8fWtE5of6lOt/QcAAGBMpbcZ2O5kSgNvzjAUaj9H/0Lra/usWa9GmNVuG2EWAACUVD3MhtQKQ7HBcH5ebEjtNcxKxp8wCwAAaqr6NgNN2JLM89UZUjPMlr4zW+sxA8IsAABoTfX3zIa+wnd97e9bPyYQpYRZ33zp9qX0O3V85/tvG2/XfFv9tmVr7D8AAABj+H8AAwAAQMcIswAAAOgWYRYAAADdIswCAACgW9nfZtDKj3tqtMuPlwAAAMZV5G0GQ4sc+BZ52wAAAFpHmE20yNsGAADQuuphNuU9qdr5tn7EvAdV036IpO7hv6Xtp26fa33XdgAAAIytSJj1hSWb4cv3Y+eHptmmp/YvNdT5Aq22f676NOuH+gAAANCSondmJXc1h3cCfULrD5d11eH6O6Z/qXdmff1x/S25Y2rrs3T8CK8AAKAX1cOsT+p86bKucBrTfmqftGF2OM+1vCvMxvYTAACgRcWfmW3tMQNffaUfM0gNs9q7zdrtCy0HAADQmmLvmZ1x/e37irvk/PnlXNO19WsDrevxBdt07fgN69Nsn2a7CLwAAKAF2e/MAgAAALUQZgEAANAtwiwAAAC6RZgFAABAt4r9ACz2B1I5jdm2j+TtDNIfaGl+AJfzx2u2v3O1HxofaV+RV61zu8Z5W7L+Vs/fYTsta/WzuyWLPka9bZ+mvz1tVy+Kv5rLNa2WFg+a0NsGfNNi1oldVrJ+qG+SZVx1trjvpq7W+d3rvm/9/M2h5//QaEHO7Yupq6f91+Kx4OtTi/3NrdVtrBJmx9Raf4zRvwc2tEzrYVbbPmG2XYRZtx7O3xx6CkMtGjvs9bT/WjwWCLNtbmPRMOv64A19jSb523VLP+VruNL1S9qPWWbRwmwK336R7F9N/baxSDl+htNCy0jXz8m3/yTtS88f33TJPpCOkWvd0LKaPoeWqX3+ppwfoX2Xenxq69e0L5nvk3p+S/ov7UPs9pUevzH3T2h9yf7T1m+b76s/tF05js/Y8c1xfo6pSJj1DaTNcEB969h2gK/+2JNBWn9MG762JctIDqgSJ4ut3tQPu1InRGj7Q8vFtpN6/PjGV7qvc2+jrW7JBWvYvuZY1ZzLvvpjzg/Jcpo6h8uMef5K6/ctl2NMNZ/5PprzI8fnd47rQ859lrP9XOOXs/4c599wjFI/G33rSOvPcV5p6x3j/Kyp6p3Z1It56O/UkyGm/pg2NG3HnnwxJ5HtQpnjwM69jyRKXVhCYULytyTE2D6AJPsnZps0tPs7dnrMh32uC0RsUBz7/NVIOT986+Y4PqX7Rju20v5p+hZzfYg9P0P7InX8Q+vnOHa19afsG9v0HPsidHxq+zScHvPZ46s3tP9ynp9jqvrMbI6DTfthkuOCFKor186NGZ+UurR12pbVhptcF2NNm77pqR+W2uN1OM+1vO0DKHXf56Dd37HTtSEqdh3XvJgLSg/nr7b+XGOqWS5222tchFsPs7H1SNYfo/6phdnhMjk+gwizDYRZ38U+tK6kP5I+1gyzrrpauhimjs+Uw6y2T7EfjFMNs7N/D0tKX3JeTDT19RJmS4S53GFWezHX9C11+3N+/qS2n2v8ctbfepjVfP6Hppc4PuenlTg/Wwq2Rd8zayO52MxPt/3b9berfs0FJKb+3Fz1p45vyti42hijfWnffO2HtkNa/2yatH7p8T//vzHbF9qu1P2u7Zt0mdT5oe0sfXzY2ghNj+lfrr7Fbn+u8z+0vmS+po2U8ct1fs8vpxU6BlLbzzV+OeuP3Uelzm/X9uU4Pkqe36H5mrZjx62k7HdmAbSttQ+hkqa0rQCmbcqfd4RZAAsj5a4GAPRq6p97hFkAAAB0izALAACAbhX5AdhM7tveqQ+Ha9spqWT9mge8Ux8Qj92O1r8KafHrmrH7NHb7Gi30tYU+AMAUFH81V+4Pc9cvJHPr9SIUGh/p+Pl+pSpdtpSe/0Mj1dh9G7t9iZb62FJfsIV9AiyeImE2FJ5SEGbdJH0mzI5ff4qx+zZ2+xIt9bGlvmAL+wRYPNXDbI73qLmmDevUfo0eakeyfuireF+7rv5Lx6iHMCvZ/uG/XetL5vvGXrL/crYvmR9Scnyk7adsn2T/+LZP2z9N/zV/jzG+qeMj+XzJMT65+iitX9p/2/zU9gG0IUuYPXXq1HaFwxN9+GFgo/lQkFwsbB9C2val00L1a7fZ9uErJVlWerH1TU+5WEvr9y2XY0x9bcSOeczxEdOepM2Y/knbd03Lsf3a7ZP2UdO+bx1f/zTHakr/UsbHt305xielj6ntp36maton0AJtyRJmjx8/vl1hzAdvicCWOn2sMDubFxMUXRfeUhcWbZ0x9WvH1FU0/ZXum5hgKemfpm++fe7a9phjy9Xe/LTQ9km2X7uvpH2UTpeMr3RdX5ul+qdto1SYjRU6PjXHv6+NUNuh45MwC7QlNcw+9dRTZunkyZPbFRJm0/oym5cjzNqmL3qYTWk7pn5tmE2VM0zlOsakF/aYc5cwmzfMzq8jratmmB3Wk3q85f78IMwCbUoNsydOnDBLZ86c2a4w9b/8Q1oOs7N/u/6rPqYvOcOGpr5ewmzM8VU7zIYufCnHvyZMlTr/pNtXO6zFTLedy746phxmtWFR2q/Q9JT+D//Wnh+EWaBNqWH25MmTV8OsLcDZPkgkYc8mtJ6k7tAyqfNt7UnXH06LGSNbG6HpMf3L1bfY7Y/ZvzHHh2S+po1cx7/t7xz9k7Zf4vzJcfxr91/o2PL1p8Q5Unp85uvStj9cxvXv1H5J6kjp/7Df0vVt55SvHgD1ZA2z2I0PNQCt6f1zqff+A8iLMJtZ6p0JACil98+l3vsPoAzCLAAAALpFmAUAAEC3CLMAAADoFmEWAAAA3SLMAgAAoFuEWQAAAHSLMAsAAIBuEWYBAADQLcIsAAAAukWYBQAAQLcIswAAAOgWYRYAAADdIswCAACgW4RZAAAAdIswCwAAgG4RZgEAANAtwiwAAAC6RZgFAABAt4bh9MSJE9bQ6pp+8uRJs3TP/YfG3g4AAABMkC20DoOrbdqs/Pd3HjBL+w88MvZ2AAAAYIJcYXYWXod/D8ud9z5ImAUAAMA4XI8UDIvrmVnCLAAAAEbjCqmSIEuYBQAAwKh8QTUUZLfD7HceeHTs7QAAAMAEpb6a6657HyLMAgAAYBx5wuyDh8feDgAAAExQcpj97kNm6V7CLAAAAEaQGmbvvu9hwiwAAADGkSXMfvehI2NvBwAAACYmNchubm6ae2ZhNkdlH3zwQXLJ0Q8KhUKhUCgUyjTKPfcfNEv3PfxYlsoIsxQKhUKhUCiUmmX//YcIsxQKhUKhUCiUPsv++w+ZpfsPPp6lMsIshUKhUCgUCqVm+c6BQ2bp/kPhMCv5/8clzFIoFAqFQqFMu0gyY87ynQceMUsHDj2RpVOEWQqFQqFQKBRKzUB77wOPmqUDj7jDrKYzhFkKhUKhUCgUyuZmvUB774OPmqUHHnkySycIsxQKhUKhUCiUWakRaL/74GGz9MCj9jCr7QRhlkKhUCgUCoWyuVnvzux3Hzpslh589HtZOkOYpVAoFAqFQqHUfGb2voePmKWHDn8/S6cIsxQKhUKhUCjTLrXfZnD/w4+ZpYeOhMOspBBmKRQKhUKhUCg1y4GDj5ulh488laUywiyFQqFQKBQKpWY5cOhxs/TwY4RZCoVCoVAoFEp/5YFHnjBLBx87mqUywiyFQqFQKBQKpWZ58NEnzdKhx/OEWQqFQqFQKBQKpWZ56PD3zNKhx58evSMUCoVCoVAoFIq2PHzkKbP0yBPPjN4RCoVCoVAoFApFWw4+dnQrzK6vr1MoFAqFQqFQKN0UY4w59PjTZunRJ39g1tfXR0/WFAqFQqFQKBSKpjzyxDOEWQqFQqFQKBRKn+XRJ39glg5/7xhhlkKhUCgUCoXSXSHMUigUCoVCoVC6K8YYs7m5aQ5/7xhhlkKhUCgUCoXSTzHGbGdXwiyFQqFQKBQKpZsyC7I7wuyR7z9LmKVQKBQKhUKhNF2GQXZzc9Mc+f6zhFkKhUKhUCgUSttlGGRnz8we+f6zZumxp44TZikUCoVCoVAoTRZbkJ39+7GnjhNmKRQKhUKhUChtFleQ3RFmz5w5Q5ilUCgUCoVCoTRVQkF2c3PTnDlzhjBLoVAoFAqFQmmrhILs7JlZwiyFQqFQKBQKpakiCbKzf585c8YsvXTqNGGWQqFQKBQKhTJ6kQbZ2d8vnTpNmKVQKBQKhUKhjF+0QXZzcy7MAgAAALWlBuDtMEuhUCgUCoVCofRY/j8PDqepAFsQygAAAABJRU5ErkJggg==)  any suggestion?
 
 
*) replace Xxxxxxxx with the correct name!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on August 21, 2020, 12:52:03 am
I found that for me it works on the second time, just start EZGPIB again.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: eliocor on August 21, 2020, 01:33:48 am
tested patched EZGPIB (2012-12-17) on two other computers (W10) with unluckily the same results....  :(
Title: Re: AR488 Arduino-based GPIB adapter
Post by: pqass on August 21, 2020, 03:42:14 am

EDIT: D/L the calibration data for my HP3478A, but it looks wierd. Is there some special software that I need to read it? Notepad shows me this:
Quote
O@@@BADBECEMML@@@@BACLMLLLH@@@@@BBEDALNEIIIIIDBE@COKE@@@@@@BEMDDNC@@@@@@@@@@@OO@@@@ICCLEDDMG@@@@C@ALNNLLG@@@@@EALAOCMJ@@@@@AALNCLMD@@@@@@ALNNMLI@@@@@@@EEO@NF@@@@@AALMAEMN@@@@@@@EEDAO@@@@AEADNLMOKN@@@@AFDNNMALJ@@@@@@@@@@@OO@@@@ICDOMMOKG@@@@@@@@@@@OO@@@@@@@@

That doesn't look like anything I've ever seen before that would suggest that the data has integrity. From memory, other peoples calibration data looked different/legible.

The calibration data looks as expected.

Basically, the first byte is thrown-away and the rest is divided into 13 byte records.
To understand how to interpret and verify each record, I refer you to my previous post: https://www.eevblog.com/forum/testgear/first-bench-multimeter-fluke-8840a-vs-hp-3478a/msg3008694/#msg3008694 (https://www.eevblog.com/forum/testgear/first-bench-multimeter-fluke-8840a-vs-hp-3478a/msg3008694/#msg3008694).

But since that post, I have created the following [linux] shell script (verify.sh) to dump and verify the raw calibration data.
Code: [Select]
#!/bin/sh

if [ -f "$1" ]; then
cat "$1" | od -A x -t x1z -w13 --skip=1 | awk 'BEGIN{
SEP="|";
rectypestr="30 mV DC" SEP "300 mV DC" SEP "3 V DC" SEP "30 V DC" SEP "300 V DC" SEP "<not used>" SEP "AC V" SEP "30 Ohm 2W/4W" SEP "300 Ohm 2W/4W" SEP "3 kOhm 2W/4W" SEP "30 kOhm 2W/4W" SEP "300 kOhm 2W/4W" SEP "3 MOhm 2W/4W" SEP "30 MOhm 2W/4W" SEP "300 mA DC" SEP "3A DC" SEP "<not used>" SEP "300 mA/3A AC" SEP "<not used>" SEP "<padding>";
rectype[0] = "";
split(rectypestr, rectype, SEP);
}{
crc=0;
if(NF==15) {
for(i=1; i<NF; i++)
if(length($i)==2)
crc += strtonum("0x"(substr($i,2))""((i==13)?"0":""));
printf "%s\t// %.2d\tcrc=%x\t%s\n", $0, (NR-1), crc, rectype[NR];
} else if(NF>1) {
printf "%s\t// %.2d\t\t%s\n", $0, (NR-1), rectype[NR];
}
}'
else
echo "$0 <cal file>"
fi

Running it with your raw calibration data produces the following:
Code: [Select]
$ ./verify.sh PixieDust.cal
000001 40 40 40 42 41 44 42 45 43 45 4d 4d 4c  >@@@BADBECEMML< // 00 crc=ff 30 mV DC
00000e 40 40 40 40 42 41 43 4c 4d 4c 4c 4c 48  >@@@@BACLMLLLH< // 01 crc=ff 300 mV DC
00001b 40 40 40 40 40 42 42 45 44 41 4c 4e 45  >@@@@@BBEDALNE< // 02 crc=ff 3 V DC
000028 49 49 49 49 49 44 42 45 40 43 4f 4b 45  >IIIIIDBE@COKE< // 03 crc=ff 30 V DC
000035 40 40 40 40 40 40 42 45 4d 44 44 4e 43  >@@@@@@BEMDDNC< // 04 crc=ff 300 V DC
000042 40 40 40 40 40 40 40 40 40 40 40 4f 4f  >@@@@@@@@@@@OO< // 05 crc=ff <not used>
00004f 40 40 40 40 49 43 43 4c 45 44 44 4d 47  >@@@@ICCLEDDMG< // 06 crc=ff AC V
00005c 40 40 40 40 43 40 41 4c 4e 4e 4c 4c 47  >@@@@C@ALNNLLG< // 07 crc=ff 30 Ohm 2W/4W
000069 40 40 40 40 40 45 41 4c 41 4f 43 4d 4a  >@@@@@EALAOCMJ< // 08 crc=ff 300 Ohm 2W/4W
000076 40 40 40 40 40 41 41 4c 4e 43 4c 4d 44  >@@@@@AALNCLMD< // 09 crc=ff 3 kOhm 2W/4W
000083 40 40 40 40 40 40 41 4c 4e 4e 4d 4c 49  >@@@@@@ALNNMLI< // 10 crc=ff 30 kOhm 2W/4W
000090 40 40 40 40 40 40 40 45 45 4f 40 4e 46  >@@@@@@@EEO@NF< // 11 crc=ff 300 kOhm 2W/4W
00009d 40 40 40 40 40 41 41 4c 4d 41 45 4d 4e  >@@@@@AALMAEMN< // 12 crc=ff 3 MOhm 2W/4W
0000aa 40 40 40 40 40 40 40 45 45 44 41 4f 40  >@@@@@@@EEDAO@< // 13 crc=ff 30 MOhm 2W/4W
0000b7 40 40 40 41 45 41 44 4e 4c 4d 4f 4b 4e  >@@@AEADNLMOKN< // 14 crc=ff 300 mA DC
0000c4 40 40 40 40 41 46 44 4e 4e 4d 41 4c 4a  >@@@@AFDNNMALJ< // 15 crc=ff 3A DC
0000d1 40 40 40 40 40 40 40 40 40 40 40 4f 4f  >@@@@@@@@@@@OO< // 16 crc=ff <not used>
0000de 40 40 40 40 49 43 44 4f 4d 4d 4f 4b 47  >@@@@ICDOMMOKG< // 17 crc=ff 300 mA/3A AC
0000eb 40 40 40 40 40 40 40 40 40 40 40 4f 4f  >@@@@@@@@@@@OO< // 18 crc=ff <not used>
0000f8 40 40 40 40 40 40 40 40 0a              >@@@@@@@@.< // 19 <padding>

"crc=ff" means that the record passed verification; any other value means that it failed.
"@@@@@@@@@@@OO" means that the record is unused and the last incomplete record is just padding.

All your records are correctly verified. Yay!

EDIT: For completeness, I've updated the script and output to include a note about which meter range the record pertains to.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on August 22, 2020, 05:54:16 pm
I'm using an "artag" interface with a modified ++ver string which contains the string: "Xxxxxxxxx GPIB-USB Controller version 6.101". *
I know the communication is OK: using the 'GPIB Configurator' from "KE5FX GPIB Toolkit" I'm able to read and write to my 34410A.
Unluckily the patched version of EZGPIB is unable to identify the AR488 interface: the debugging window reports the following text (COM30 is the AR488 interface):

 see attachment, please.....

  (https://www.eevblog.com/forum/data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArMAAAGsCAYAAADOjy/IAAAgAElEQVR4nO3dS4wdxd338dm8et8Fitgg5CyQorwEJfiV4AFnMTxcHALmYoPNJcEQY4fLeBTsByfeZZF4EUYhYeFFErEAMkqEFLEjUiw5YcEikaLISI5YIpHlsEEaASs29S7GZ3ympy7/f9266vT3I5Xi6UtVdXX36R99+nSWTp8+bVzlvvvuM2fOnHGUI+a2PXvMjftPeJa5utyePXvMbUdm006Y/TduTduz5zZzZLbsif3mxh3LecqR28yePTea/Sd2Tj+x/8addR65bdD2lT7duN+ccK0z1+cb958wL7/8snn55ZfN4f/aY/bs+S/z6P/8jzl9+rQ5deqU+cHd/9fs2bPH3HroR2Z1ddWsrKyYx++93Rw+fNjceeed5qWXXmq6nDlzZvt/KRQKhUKhUEqU1LyysrJizpw5Y276f3eYx44fN88995x58cUXzcmTJ83S6dOnDQAAANAbwiwAAAC6RZgFAABAtwizAAAA6BZhFgAAAN0izAIAAKBb0WH2008/Ne+884559dVXzerqqnn66afNuXPnzJtvvmk+/vjjAl0FAAAAdooKs3/5y1/M6uqqef75580rr7xi3njjDfPWW2+Zs2fPmoMHD5oDBw6YV1991XzxxReFug0AAABEhNk//OEPZnV11bz11ltmY2PDfPbZZ+aTTz4xH3/8sfnwww/N+++/b37+85+bu+66yxw/ftx8/vnnBbsPAACAKVOF2dkd2X/84x/myy+/3BVk//nPf5r33nvPvPvuu+ZXv/qV2bdvn/nJT35SeBMAAAAWz9LSkqi0ZmlpyVy6dMk5/9KlS1n7LQ6zn376qVldXTW/+c1vzJdffmn+85//mL///e/mb3/7m/nzn/9s/vSnP5nf//735re//a359a9/bc6dO2eOHj1q9u7da/71r385ar1gVgY7ZPn8R4JuXzArS8tGtGiUK/1auWCd+9H5ZbNUtH0AADB1ksDXYpi9dOmS+V//+/9YA61vXixxmH3nnXfM888/bzY2NsylS5fMs88+a86ePWuOHTtmTp48aX74wx+au+66yywvL5v9+/ebAwcOmOPHj5tbb73VrK6uOmodhlJ/iHSvl9tW/cvLtjZmAZwwCwAAyuk1zBpjD60lgqwxijD76quvmldeecV89tln5ne/+525dOmS+fDDD80vf/nL7UcLlpeXzb59+8yxY8fMuXPnzNmzZ83+/fvNDTfc4KjVEko/Om+Wl1aMP87WCbMrK8u77xRfWDFLKyuF2wcAAFPXc5g1Zmd4LRVkjVGE2dXVVfPGG2+YTz75xPz1r3/dfkb23Llz5t133zVvv/222bdvn7nlllvMk08+ac6ePWtWVlbMnXfeafbs2eOo1RZKPzLnl5fM9s3Zj86b5e3HEGYh98p6F67Ouxo6bXd75/7+aH6d845QOlvnglnZEaw/MueXZ9PtdV7t49Z2zB6f2Noe2zRjLqzMPWoxf1fa11dxmwAAoEe9h1ljrgbaUkHWGEWYffrpp81bb72168dezz33nHn77bfN66+/bm655Razd+9ec/DgQbOysmKOHj1qbr/9dnPdddc5ag2F2cH8CytXQuuVr/qXz5uPjLkS7GbL+cLs1nqzkOd+9vXqOhdWBsF6+bz5aFedlj5eWNn9uIRtmnM8fH1VtAkAALr8MRVhVkYcZmePDQzfWvDMM8+Y119/3bz22mtm79695qabbjL33nuvOXr0qDl48KC5+eabzbXXXuuo1RVmr0zbcfdx/s7l7vWuhk5PmN0Oo7723etY23D18cr0HY8p2KZtdX5ufUFfNW0CAIAu9R5mm3vM4M033zRPPPGEef/9982PfvQj8+Mf/9j84he/MKdOnTKvvfaaOXfunLnpppvM17/+dXPHHXeYgwcPmrvvvttcf/31Znl52VFr4JlZ5/Ozw/U8d3NTw+wsXF+YX3cYLN3P+G7dUd35lf+OaTvWHwR5b5jVtQkAAPrSc5ht8gdgH3/8sTlw4MCutxasra1t37W9+eabzQ033GC++c1vmn379plvfOMb5pprrjF//OMfHbXa32ZwNYRt/b37TuNg+q5AOFfHhZXB1/O6xwyu1uF6LtfVx6s+Or/7h2Tb0y6seB6X8D1moG8TAAD0o9cw2+yruYwx5mc/+5m56667zD333GMef/xx89Of/nQ7yK6srJhHHnnE7N2713zta18zX/3qV80111xjvv3tb3tqHL5n1hIsh1+pzz1msLKybP+x0/zX9sM3D8zNC/8AbLsT5vzy/J1Q3w/ArvRxx6MDV9a1TZv/0dbyillZFvZV2iYAAOhSj8/5GtPw/2mCMcZ88cUX5vjx4+aOO+4wL7zwwo4gO3tG9u677zbf+ta3zFe+8hVz/fXXm3//+9/ZOpud6DVgjeiprwAAAJWowqwxxnz++efmxRdfNHv37jW33nqr2b9/v7nzzjvN7bffbm6++WZz/fXXb9+RbTrImiuvxNrxXGq7euorAABALeowO/Pee++Z1dVVc8MNN5g9e/aY6667zlx77bVmeXnZ84zs2Ha+h7Xtr+J76isAAMA4osMsAAAAMDbCLAAAALpFmAUAAEC3CLMAAADoFmEWAAAA3SLMAgAAoFuEWQAAAHSLMAsAAIBuEWYBAADQLcIsAAAAukWYBQAAQLcIswAAAOgWYRYAAADdkofZy+vm9OnTV8q6ubw10ayfXjMXNwr30lw269ttb5X1y5mb2Lho1rJsS0JfZ2O8dtFs2P4GAADADrIwu3HRrG0H2K2/L142pm6YnWvn8vpcoG7NoK/DsfOuNx98h38DAABgSBZmL6877g6OFGartRsjtq89bSMAAEAbhI8ZbN0lXNuVrK4ErssXzdqVr9R3LLNxdfr81+2X14d3IAd3MnfdjrTcmZ0P1zvamb8LumEurlm+7rcuP2tja50dXZhvz9mWp6/blbkC685HE9YuXhz8vRHs9/r6mjl9en1XbwAAABaZ4gdgV4Ph8Kvwnc94zoesYYC8EuTmA97ldbO2trYd2DYurjlC89xzqDuT5q7wuLX+Vn+dAXzX8nPTdwTQ+fDtWtfT1x2B13f3NXRn1tdv23YCAAAsPv3bDK7cHbSGu/m/Lc+KbofCjYtm7UoAvrx+5c7u2kWzYTbMxTXbV+ueegd3f7fDrutZVdfyu4LlXCi33pW1BWvLmOz4YVlCmBX1GwAAYFqiXs21cXHNEaSEYXY7tM6C4oa5uLZuLs+F3J12trPj7q03tCqmO9oQteWpZ3aHOBj+RWFW8FgDAADAhAh/AHZxVzjb9dX81oKDcDZ8zOBqGNu4uLbr8YL1ddvX9sN67e3sXs/3mIHg8YONi2Ztbd2srw0fEwh9pe+7Mzt4HvfyujmtesxA0G8AAIAJUf0AbPdX65qvxgeBa/heV+97XncHto2La44fZQ37F/oBmOvr+ivPCA8fI3C25Rir4TbNv693fV3xzKy03wAAANPB/wMYAAAAuiUKszt+dDRXAAAAgDFxZxYAAADdIswCAACgW9th9rPPPqNQKBQKhUKhULoq22F2c3OTQqFQKBQKhULpqvCYAQAAAEZDmAUAAEC3CLMAAADoFmEWAAAA3SLMAgAAoFuEWQAAAHSLMAsAAIBu+YLqiRMnCLMAAABoly/IzgphFgAAAE0KBdlQoCXMAgAAYDShO7KhQEuYBQAAwGhcYTY0jTALAACA0Ul/9EWYBQAAQHN4NRcAAAC6RZgFAABAt7KH2aWlpV2lFZr+jN3v1sYuB9uxUWIba4xdyfpd4yMZP9/81PEfriNtI1f7w760bBHPXwBoVdYw6/rwbulDvaW+uPTQx1i2bSsVaHsUGh/p+GnORW2g1fRNskztfdXzf+gAAHarEmZbQh/HRZh1k/S5xzCbs/0cCLMAsFg++OCD6BIVZrVfk7rmzf+trd+1rq0N2zzp+qlf5Urrd/U95qtOyfjH1j1bzzUtx/71tSNZP7T/pPsmtKymz6FlphRmc5+fofna80tbv6Z9yXwAmKKsYdaY8MXAxveBHLpozS8jqT+1T771Uy/UKX2S9jG1L6l1Sy7GKftXOy1Uf459ISUNgyXDvLaP2rCVK4zFnJ+SdSXTQ23E7vOY41PbHgAsouxh1mZ4J0N698MXdnztSPoSW5dv/ZbCbCxJGElpK2YfxUwfK8zO5uUKirH/8RAzVtLzU9KOa5na54h2n4a2X9Jf6bGh3bfS/gHA1FQPs5LlYqZJ6rctQ5j1r0eYHS/M2qaXDLMx9S5amE1pO6Z+bZgFAOxW5ZnZUJjVhomUsFMyzM7+Tr1rQpgdJ8zO/i3Zf6X2RWrgCS1XMszGhvExw6y2/77ltPVo208N4QCwqKo+MxszfzZNsm5oGVu9vmVi1rf1RyPX9qUEacn42/4uuW3SZVLn29qTrp86Pq42QtNj+pfrGKndfq7xL3V+xczXtCEdv5j9CgC9qvKYwZRxUekb+w8AgLYRZjNLveuFcbH/AADoC2EWAAAA3SLMAgAAoFtFwmzoBxSlaOof8yvk0l9la34klNpGTbl+wCRtp6Qa50HMD7Bq/IBsVlfLeMwEAPpR5G0GQ8MLYkmtX4BC45O7fu3fMW3UVHr8StZZQ8z5pxnTWuPvM/XPEADATlXeMztvyheiMfpGmM3XTutizz/CbN36AQB5jRZmpe9h1L5nMfRYg+/r0fnpmv7lfLRB+jWvpj7N39r+pfY/pn3XNEn90n3nm649Pn1j4Fo3tKymz6FlaobZ3OdfaL72+NPWr2lfMh8AoDdKmB1eYGz/Hq4jmS+tL1SXpj7thTxmvq0PkjGR9DfmYhoTAH19iw1DklA0X39qQIs5PnOMlZTm/CsV5lP7Kjk2Sh9/sWOe4/MLAKA3+mMGrjsntgumpv4cwdHWP2k9mjY1fZKGWVedrYTZWDHHWMz0scLsbF5MUPTdBZS0K+lf6jmgrV87pr7PD2l/pftGO7bS/gEAdJoLs5p1XctILhCEWVmfYvuZu03NuoRZ9/RFD7MpbcfUn/vzCwCgt7m5mVSS32YguRiEgpurjlBgkEz33e3KFThits+1TurfEoRZ93Tp8VFqrFIDV2i51sKs5vMjtJy2Hm37qSEcAGCXPcwas/uCbptu+9u2riZM+pbXrO/r31DshTx1+4Z9dNURaj9n36X9T/kPgdi2pcukzre1J10/5vhztSkZf8m6of2X2rfY7S91/MXM17SROn4AgN2KhNkp4WIEH44PAADKIswqcVcFPhwfAADURZgFAABAtwizAAAA6FbWMJvjByIljd2fsdtfNIwnAACo/mquHFLqGzv8jN3+omE8AQCYNsJsZWO3v2gYTwAApq16mI15z+SwrpRHGHx1S+ov+Z7N1PmhsUvtn+QxktT+8Z5OAACgUSTM+sKMjSuw+ObHkvbJNl/af2l9w2mh+iXta7cv1Ddb/aX6F7P9hFkAAKatyp3Z0DxtWM35mEHKndEc7c9Pc935lM6XbJ+2b8PpKf0P9U+y/dI+AwCAaSDMCoOaqy5tX2LubEr64lqmhTuz0v7FbD9hFgCAaes+zKaGSU2Y7eUxg5x9C9Wfs388ZgAAALSKvmfWJvQVtKSO+WU1fF/bu/owmxbTR1/7rvVT5ku2L6aPNfsXUz+BFgCA6cp+ZxaLjeAIAABaQpiFGHdCAQBAawizAAAA6BZhFgAAAN0qEman8lV07HZqfgCX8iO5XP3NZez2tXrrr9aibx8AYBqK3Zlt+SKZs28xb1RwTXO9psr3aiptH8beL2O3rxX7HysljXn8AgDQGsJsxbpSl83R77H3y9jtaxFmAQBoW7HHDOb/dziv9ntMfevn7p9PS2FWuv2h+TF3pkvvf9/21e5fb/UDANCbqmHWdeH0hV/N/Pm/hyFH0w9N+zXD7Gx6jjAp7ZNk2VwhPcf+126ftG/S9jXLDaePUT9hFgDQu+xhNnThDYUw7V0n190nH01QHN7tk9alaXfMZVPuDMYIhdnQ+If2v/ZYkPZN2r6vzZjjS9rP2PoJswCA3hUJs9I7h9r5qRf70PyY9VoMqJplQ+Obsv8k7c9Pi91vvmVyh9nYeiTrj1E/YRYA0Luqd2ZDF+HU+aF2Qn2KaT9nmIuZpu1DSpgt0f78tBz7f4wwKx3TEsd37eMXAIDWZA2ztq81bXdXQ1/Rxs7PcVc4pv2YQOtbVzpP23bM/plNy91+6f3v2r7UPkq3P+fxVbp+Ai0AoGfFXs0FAAAAlEaYBQAAQLcIswAAAOgWYRYAAADdGvXVXKn48YodP+zZwhgAALD4sr/NwKZ0oO1NzfHocXxymvr2AwCw6KqE2ZJi2wyt12sAJ8zuNPXtBwBg0VUPs5J3eA7/LV1fIzbMSt7h6fo7tL5tvnb7UsNs7ve8utZ19U06vqWPDwAA0Ieqz8xKHkPwreMKLzFy3ZkNhUdNn3M8ppESZkPtS/efb53Q/FCfah0fAACgD1XeZjC8m6YJvDnDSqh9af9Cdw9D/estzIbm5wyzKeNLmAUAYHqqh9mQWmElJrhJphFm48Ns6vgSZgEAmJ6qbzPQhCHJPF+dITXCrO3Oom2ZUJ/GDrO1HjMgzAIAAK3q75mVfoVv+9u1fkxgSbkLaeunbZnhv13L+OqP3bYc68buv9m/bdN8823125atcXwAAIA+VHnMAAAAACiBMAsAAIBuEWYBAADQLcIsAAAAulX9B2A58eOevrH/AABAqqqv5iqBMNQ39h8AAEhRJcyWVPM9s8iPcQYAACmqh1nNe0pLvYdV0tdQ27a/pdsX2sZQv1LfAxt6P65rvq1+2zzftvEOWAAAkFPVZ2YljyH41nGFoxixd2ZtAS5mHcl62j5Jx9e3Tmh+qE+19h8AAIAxld5mYLuTKQ28OcNQqP0c/Qutr+2zZr0aYVa7bYRZAABQUvUwG1IrDMUGw/l5sSG11zArGX/CLAAAqKnq2ww0YUsyz1dnSM0wW/rObK3HDAizAACgNdXfMxv6Ct/1tb9v/ZhAlBJmffOl25fS79Txne+/bbxd823125atsf8AAACM4f8BDAAAAB0jzAIAAKBbhFkAAAB0izALAACAbmV/m0ErP+6p0S4/XgIAABhXkbcZDC1y4FvkbQMAAGgdYTbRIm8bAABA66qH2ZT3pGrn2/oR8x5UTfshkrqH/5a2n7p9rvVd2wEAADC2ImHWF5Zshi/fj50fmmabntq/1FDnC7Ta/rnq06wf6gMAAEBLit6ZldzVHN4J9AmtP1zWVYfr75j+pd6Z9fXH9bfkjqmtz9LxI7wCAIBeVA+zPqnzpcu6wmlM+6l90obZ4TzX8q4wG9tPAACAFhV/Zra1xwx89ZV+zCA1zGrvNmu3L7QcAABAa4q9Z3bG9bfvK+6S8+eXc03X1q8NtK7HF2zTteM3rE+zfZrtIvACAIAWZL8zCwAAANRCmAUAAEC3CLMAAADoFmEWAAAA3Sr2A7DYH0jlNGbbPpK3M0h/oKX5AVzOH6/Z/s7Vfmh8pH1FXrXO7Rrnbcn6Wz1/h+20rNXP7pYs+hj1tn2a/va0Xb0o/mou17RaWjxoQm8b8E2LWSd2Wcn6ob5JlnHV2eK+m7pa53ev+7718zeHnv9DowU5ty+mrp72X4vHgq9PLfY3t1a3sUqYHVNr/TFG/x7Y0DKth1lt+4TZdhFm3Xo4f3PoKQy1aOyw19P+a/FYIMy2uY1Fw6zrgzf0NZrkb9ct/ZSv4UrXL2k/ZplFC7MpfPtFsn819dvGIuX4GU4LLSNdPyff/pO0Lz1/fNMl+0A6Rq51Q8tq+hxapvb5m3J+hPZd6vGprV/TvmS+T+r5Lem/tA+x21d6/MbcP6H1JftPW79tvq/+0HblOD5jxzfH+TmmImHWN5A2wwH1rWPbAb76Y08Gaf0xbfjaliwjOaBKnCy2elM/7EqdEKHtDy0X207q8eMbX+m+zr2NtrolF6xh+5pjVXMu++qPOT8ky2nqHC4z5vkrrd+3XI4x1Xzm+2jOjxyf3zmuDzn3Wc72c41fzvpznH/DMUr9bPStI60/x3mlrXeM87OmqndmUy/mob9TT4aY+mPa0LQde/LFnES2C2WOAzv3PpIodWEJhQnJ35IQY/sAkuyfmG3S0O7v2OkxH/a5LhCxQXHs81cj5fzwrZvj+JTuG+3YSvun6VvM9SH2/Azti9TxD62f49jV1p+yb2zTc+yL0PGp7dNwesxnj6/e0P7LeX6OqeozszkONu2HSY4LUqiuXDs3ZnxS6tLWaVtWG25yXYw1bfqmp35Yao/X4TzX8rYPoNR9n4N2f8dO14ao2HVc82IuKD2cv9r6c42pZrnYba9xEW49zMbWI1l/jPqnFmaHy+T4DCLMNhBmfRf70LqS/kj6WDPMuupq6WKYOj5TDrPaPsV+ME41zM7+PSwpfcl5MdHU10uYLRHmcodZ7cVc07fU7c/5+ZPafq7xy1l/62FW8/kfml7i+JyfVuL8bCnYFn3PrI3kYjM/3fZv19+u+jUXkJj6c3PVnzq+KWPjamOM9qV987Uf2g5p/bNp0vqlx//8/8ZsX2i7Uve7tm/SZVLnh7az9PFhayM0PaZ/ufoWu/25zv/Q+pL5mjZSxi/X+T2/nFboGEhtP9f45aw/dh+VOr9d25fj+Ch5fofma9qOHbeSst+ZBdC21j6ESprStgKYtil/3hFmASyMlLsaANCrqX/uEWYBAADQLcIsAAAAulUkzIYeMC5FU/+Yt+JLfxWao+4xvq5Iffhf205JNY5zyQP8qT8AiN2O1r/qmvLXcQCwaKq8mmt4wSyp9QtUaHxy1x/7S82xlB6fknXWEHN+aca01vj7TP0zAgCgk/3VXCFTvlCN0TfCrLyd1sWeX4TZuvUDAOoaLcy6vuZL+Zp02IfQ+q62tf3L+WiD9GtgTX0aoe3S9i+mfdc0Sf3SfeObrj3+fGPgWje0rKbPoWVqhtnc51dovvb409avaV8yHwCQ3yhhdngBsv17uI5kvrS+UF2a+rQX+pj5tj5IAm3shTQmAA7/lu4HW13SQDGsPzWgxRx/OcZKSnN+lQrzqX2VHBulj7/YMc/x+QQAyG/0xwxcd1ZsF1RN/TmCo61/0no0bWr6JA2zKRfQmgFN2kZMP3zTxwqzs3kxQdF3F1DSrqR/qce4tn7tmPo+H6T9le4b7dhK+wcAyKu5MKtZ17WM5AKyyGE29eJJmLVPby3M2qYvephNaTum/tyfTwCA/EZ/m4HkYqG5Cym9+MRebFPvuvjGJ0eYzXFBJcy6p0v3f6mxSg1coeVaC7Oaz4fQctp6tO2nhnAAQJxR3jM7/+HvW8YWFnzzfctr1vf1byj2Qp+6fcM+StZP7Zu0f2O0LV0mdb6tPen6MceXq03J+EvWDe2/1L7Fbn+p4y9mvqaN1PEDAOgVCbNTwsVq2tj/AACMizCrxF2XaWP/AwDQFsIsAAAAukWYBQAAQLeyv5qr5R9AjN2fsdtfNIwnAACo/mquHFLqGzv8jN3+omE8AQCYNsJsZWO3v2gYTwAApq16mI15D+WwrpRHGHx1S+ov+R7O1PmhsUvtn+QxktT+8R5PAACgUSTM+sKMjSuw+ObHkvbJNl/af2l9w2mh+iXta7cv1Ddb/aX6F7P9hFkAAKatyp3Z0DxtWM35mEHKndEc7c9Pc935lM6XbJ+2b8PpKf0P9U+y/dI+AwCAaSDMCoOaqy5tX2LubEr64lqmhTuz0v7FbD9hFgCAaes+zKaGSU2Y7eUxg5x9C9Wfs388ZgAAALSKvmfWJvQVtKSO+WU1fF/bu/owmxbTR1/7rvVT5ku2L6aPNfsXUz+BFgCA6cp+ZxaLjeAIAABaQpiFGHdCAQBAawizAAAA6BZhFgAAAN0qEman8lV07HZqfgCX8iO5XP3NZez2tXrrr9aibx8AYBqK3Zlt+SKZs28xb1RwTXO9psr3aiptH8beL2O3rxX7HysljXn8AgDQGsJsxbpSl83R77H3y9jtaxFmAQBoW7HHDOb/dziv9ntMfevn7p9PS2FWuv2h+TF3pkvvf9/21e5fb/UDANCbqmHWdeH0hV/N/Pm/hyFH0w9N+zXD7Gx6jjAp7ZNk2VwhPcf+126ftG/S9jXLDaePUT9hFgDQu+xhNnThDYUw7V0n190nH01QHN7tk9alaXfMZVPuDMYIhdnQ+If2v/ZYkPZN2r6vzZjjS9rP2PoJswCA3hUJs9I7h9r5qRf70PyY9VoMqJplQ+Obsv8k7c9Pi91vvmVyh9nYeiTrj1E/YRYA0Luqd2ZDF+HU+aF2Qn2KaT9nmIuZpu1DSpgt0f78tBz7f4wwKx3TEsd37eMXAIDWZA2ztq81bXdXQ1/Rxs7PcVc4pv2YQOtbVzpP23bM/plNy91+6f3v2r7UPkq3P+fxVbp+Ai0AoGfFXs0FAAAAlEaYBQAAQLcIswAAAOgWYRYAAADdGvXVXKn48YodP+zZwhgAALD4sr/NwKZ0oO1NzfHocXxymvr2AwCw6KqE2ZJi2wyt12sAJ8zuNPXtBwBg0VUPs5J3eA7/LV1fIzbMSt7h6fo7tL5tvnb7UsNs7ve8utZ19U06vqWPDwAA0Ieqz8xKHkPwreMKLzFy3ZkNhUdNn3M8ppESZkPtS/efb53Q/FCfah0fAACgD1XeZjC8m6YJvDnDSqh9af9Cdw9D/estzIbm5wyzKeNLmAUAYHqqh9mQWmElJrhJphFm48Ns6vgSZgEAmJ6qbzPQhCHJPF+dITXCrO3Oom2ZUJ/GDrO1HjMgzAIAAK3q75mVfoVv+9u1fkxgSbkLaeunbZnhv13L+OqP3bYc68buv9m/bdN8823125atcXwAAIA+VHnMAAAAACiBMAsAAIBuEWYBAADQLcIsAAAAulX9B2A58eOevrH/AABAqtQwe88998hfzVUCYahv7D8AAJAiNcw+99xz4TBbUs33zCI/xhkAALjPm2EAABkfSURBVKSoHmY17ykt9R5WSV9Dbdv+lm5faBtD/Up9D2zo/biu+bb6bfN828Y7YAEAQE5Zw6wx4TBl4wq0tnm+dTVi78zaAlzMOpL1tH2Sjq9vndD8UJ9q7T8AAABjCoRZG9udTGngzRmGQu3n6F9ofW2fNevVCLPabSPMAgCAkqqH2ZBaYSg2GM7Piw2pvYZZyfgTZgEAQE1VnpmN+RpcMs9XZ0jNMFv6zmytxwwIswAAoDWpYfbYsWO698yGvsJ3fe3vWz8mEKWEWd986fal9Dt1fOf7bxtv13xb/bZla+w/AAAAY9LD7AsvvMD/AxgAAADGQZgFAABAtwizAAAA6BZhFgAAAN3KGmZb+nFPjXb58RIAAMC4st+ZndrrlxZ52wAAAFpHmE20yNsGAADQuuphNuU9qdr5tn7EvAdV036IpO7hv6Xtp26fa33XdgAAAIytSJj1hSWb4cv3Y+eHptmmp/YvNdT5Aq22f676NOuH+gAAANCSondmJXc1h3cCfULrD5d11eH6O6Z/qXdmff1x/S25Y2rrs3T8CK8AAKAX1cOsT+p86bKucBrTfmqftGF2OM+1vCvMxvYTAACgRcWfmW3tMQNffaUfM0gNs9q7zdrtCy0HAADQmmLvmZ1x/e37irvk/PnlXNO19WsDrevxBdt07fgN69Nsn2a7CLwAAKAF2e/MAgAAALUQZgEAANAtwiwAAAC6RZgFAABAt4r9ACz2B1I5jdm2j+TtDNIfaGl+AJfzx2u2v3O1HxofaV+RV61zu8Z5W7L+Vs/fYTsta/WzuyWLPka9bZ+mvz1tVy+Kv5rLNa2WFg+a0NsGfNNi1oldVrJ+qG+SZVx1trjvpq7W+d3rvm/9/M2h5//QaEHO7Yupq6f91+Kx4OtTi/3NrdVtrBJmx9Raf4zRvwc2tEzrYVbbPmG2XYRZtx7O3xx6CkMtGjvs9bT/WjwWCLNtbmPRMOv64A19jSb523VLP+VruNL1S9qPWWbRwmwK336R7F9N/baxSDl+htNCy0jXz8m3/yTtS88f33TJPpCOkWvd0LKaPoeWqX3+ppwfoX2Xenxq69e0L5nvk3p+S/ov7UPs9pUevzH3T2h9yf7T1m+b76s/tF05js/Y8c1xfo6pSJj1DaTNcEB969h2gK/+2JNBWn9MG762JctIDqgSJ4ut3tQPu1InRGj7Q8vFtpN6/PjGV7qvc2+jrW7JBWvYvuZY1ZzLvvpjzg/Jcpo6h8uMef5K6/ctl2NMNZ/5PprzI8fnd47rQ859lrP9XOOXs/4c599wjFI/G33rSOvPcV5p6x3j/Kyp6p3Z1It56O/UkyGm/pg2NG3HnnwxJ5HtQpnjwM69jyRKXVhCYULytyTE2D6AJPsnZps0tPs7dnrMh32uC0RsUBz7/NVIOT986+Y4PqX7Rju20v5p+hZzfYg9P0P7InX8Q+vnOHa19afsG9v0HPsidHxq+zScHvPZ46s3tP9ynp9jqvrMbI6DTfthkuOCFKor186NGZ+UurR12pbVhptcF2NNm77pqR+W2uN1OM+1vO0DKHXf56Dd37HTtSEqdh3XvJgLSg/nr7b+XGOqWS5222tchFsPs7H1SNYfo/6phdnhMjk+gwizDYRZ38U+tK6kP5I+1gyzrrpauhimjs+Uw6y2T7EfjFMNs7N/D0tKX3JeTDT19RJmS4S53GFWezHX9C11+3N+/qS2n2v8ctbfepjVfP6Hppc4PuenlTg/Wwq2Rd8zayO52MxPt/3b9berfs0FJKb+3Fz1p45vyti42hijfWnffO2HtkNa/2yatH7p8T//vzHbF9qu1P2u7Zt0mdT5oe0sfXzY2ghNj+lfrr7Fbn+u8z+0vmS+po2U8ct1fs8vpxU6BlLbzzV+OeuP3Uelzm/X9uU4Pkqe36H5mrZjx62k7HdmAbSttQ+hkqa0rQCmbcqfd4RZAAsj5a4GAPRq6p97hFkAAAB0izALAACAbhUJs6EHjEvR1D/mrfgaX4Wm1jvG1xWpD/9r2ympxnEueYA/9QcAsdvR+lddU/46DgAWTZVXcw0vmCW1foEKjU+O+lMv1GMHfcm0Eu30IOb80oxprfH3mfpnBABAJ/uruUKmfKGq2TfCrL6d1sWeX4TZuvUDAOoaLcy67h6mfE067ENofVfb2v7lfLRB+jVwqL6Ur4clYyTtn7YfvjAlqV+6b3zTtcefbwxc64aW1fQ5tEzNMJv7/ArN1x5/2vo17UvmAwDyGyXMDi9Atn8P15HMl9YXqktTn/ZCHzPf1gfNmGjFBMDh39L9YKtLGiiG9acGtJjjL8dYSWnOr1JhPrWvkmOj9PEXO+Y5Pp8AAPmN/piB686K7YKqqT9HcLT1T1qPpk1Nn3oJs7nbjumHb/pYYXY2LyYo+u4CStqV9C/1GNfWrx1T3+eDtL/SfaMdW2n/AAB5NRdmNeu6lpFcQAizaf3wTSfM1gmztumLHmZT2o6pP/fnEwAgv9HfZiC5WGiCm/TiE3uxTb3r4hsfwmzbYXb2b8n+LzVWqYErtFxrYVbz+RBaTluPtv0S5yIAIGyU98zOf/j7lrGFBd983/Ka9X39G4q90Kdu37CPkvVT+ybt3xhtS5dJnW9rT7p+zPHlalMy/pJ1Q/svtW+x21/q+IuZr2kjdfwAAHpFwuyUcLGaNvY/AADjIswqcddl2tj/AAC0hTALAACAbhFmAQAA0K3sr+Zq+QcQY/dn7PYXDeMJAACqv5orh5T6xg4/Y7e/aBhPAACmjTBb2djtLxrGEwCAaaseZmPeQzmsK+URBl/dkvpLvoczdX5o7FL7J3mMJLV/vMcTAABoFAmzvjBj4wosvvmxpH2yzZf2X1rfcFqofkn72u0L9c1Wf6n+xWw/YRYAgGmrcmc2NE8bVnM+ZpByZzRH+/PTXHc+pfMl26ft23B6Sv9D/ZNsv7TPAABgGgizwqDmqkvbl5g7m5K+uJZp4c6stH8x20+YBQBg2roPs6lhUhNme3nMIGffQvXn7B+PGQAAAK2i75m1CX0FLaljflkN39f2rj7MpsX00de+a/2U+ZLti+ljzf7F1E+gBQBgurLfmcViIzgCAICWEGYhxp1QAADQGsIsAAAAukWYBQAAQLeKhNmpfBUdu52aH8Cl/EguV39zGbt9rd76q7Xo2wcAmIZid2Zbvkjm7FvMGxVc01yvqfK9mkrbh7H3y9jta8X+x0pJYx6/AAC0hjBbsa7UZXP0e+z9Mnb7WoRZAADaVuwxg/n/Hc6r/R5T3/q5++fTUpiVbn9ofsyd6dL737d9tfvXW/0AAPSmaph1XTh94Vczf/7vYcjR9EPTfs0wO5ueI0xK+yRZNldIz7H/tdsn7Zu0fc1yw+lj1E+YBQD0LnuYDV14QyFMe9fJdffJRxMUh3f7pHVp2h1z2ZQ7gzFCYTY0/qH9rz0WpH2Ttu9rM+b4kvYztn7CLACgd0XCrPTOoXZ+6sU+ND9mvRYDqmbZ0Pim7D9J+/PTYvebb5ncYTa2Hsn6Y9RPmAUA9K7qndnQRTh1fqidUJ9i2s8Z5mKmafuQEmZLtD8/Lcf+HyPMSse0xPFd+/gFAKA1WcOs7WtN293V0Fe0sfNz3BWOaT8m0PrWlc7Tth2zf2bTcrdfev+7ti+1j9Ltz3l8la6fQAsA6FmxV3MBAAAApRFmAQAA0C3CLAAAALpFmAUAAEC3Rn01Vyp+vGLHD3u2MAYAACy+7G8zsCkdaHtTczx6HJ+cpr79AAAsuiphtqTYNkPr9RrACbM7TX37AQBYdNXDrOQdnsN/S9fXiA2zknd4uv4OrW+br92+1DCb+z2vrnVdfZOOb+njAwAA9KHqM7OSxxB867jCS4xcd2ZD4VHT5xyPaaSE2VD70v3nWyc0P9SnWscHAADoQ5W3GQzvpmkCb86wEmpf2r/Q3cNQ/3oLs6H5OcNsyvgSZgEAmJ7qYTakVliJCW6SaYTZ+DCbOr6EWQAApqfq2ww0YUgyz1dnSI0wa7uzaFsm1Kexw2ytxwwIswAAQKv6e2alX+Hb/natHxNYUu5C2vppW2b4b9cyvvpjty3HurH7b/Zv2zTffFv9tmVrHB8AAKAPVR4zAAAAAEogzAIAAKBbhFkAAAB0izALAACAblX/AVhO/Linb+w/AACQquqruUogDPWN/QcAAFJUCbMl1XzPLPJjnAEAQIrqYVbzntJS72GV9DXUtu1v6faFtjHUr9T3wIbej+uab6vfNs+3bbwDFgAA5FT1mVnJYwi+dVzhKEbsnVlbgItZR7Ketk/S8fWtE5of6lOt/QcAAGBMpbcZ2O5kSgNvzjAUaj9H/0Lra/usWa9GmNVuG2EWAACUVD3MhtQKQ7HBcH5ebEjtNcxKxp8wCwAAaqr6NgNN2JLM89UZUjPMlr4zW+sxA8IsAABoTfX3zIa+wnd97e9bPyYQpYRZ33zp9qX0O3V85/tvG2/XfFv9tmVr7D8AAABj+H8AAwAAQMcIswAAAOgWYRYAAADdIswCAACgW9nfZtDKj3tqtMuPlwAAAMZV5G0GQ4sc+BZ52wAAAFpHmE20yNsGAADQuuphNuU9qdr5tn7EvAdV036IpO7hv6Xtp26fa33XdgAAAIytSJj1hSWb4cv3Y+eHptmmp/YvNdT5Aq22f676NOuH+gAAANCSondmJXc1h3cCfULrD5d11eH6O6Z/qXdmff1x/S25Y2rrs3T8CK8AAKAX1cOsT+p86bKucBrTfmqftGF2OM+1vCvMxvYTAACgRcWfmW3tMQNffaUfM0gNs9q7zdrtCy0HAADQmmLvmZ1x/e37irvk/PnlXNO19WsDrevxBdt07fgN69Nsn2a7CLwAAKAF2e/MAgAAALUQZgEAANAtwiwAAAC6RZgFAABAt4r9ACz2B1I5jdm2j+TtDNIfaGl+AJfzx2u2v3O1HxofaV+RV61zu8Z5W7L+Vs/fYTsta/WzuyWLPka9bZ+mvz1tVy+Kv5rLNa2WFg+a0NsGfNNi1oldVrJ+qG+SZVx1trjvpq7W+d3rvm/9/M2h5//QaEHO7Yupq6f91+Kx4OtTi/3NrdVtrBJmx9Raf4zRvwc2tEzrYVbbPmG2XYRZtx7O3xx6CkMtGjvs9bT/WjwWCLNtbmPRMOv64A19jSb523VLP+VruNL1S9qPWWbRwmwK336R7F9N/baxSDl+htNCy0jXz8m3/yTtS88f33TJPpCOkWvd0LKaPoeWqX3+ppwfoX2Xenxq69e0L5nvk3p+S/ov7UPs9pUevzH3T2h9yf7T1m+b76s/tF05js/Y8c1xfo6pSJj1DaTNcEB969h2gK/+2JNBWn9MG762JctIDqgSJ4ut3tQPu1InRGj7Q8vFtpN6/PjGV7qvc2+jrW7JBWvYvuZY1ZzLvvpjzg/Jcpo6h8uMef5K6/ctl2NMNZ/5PprzI8fnd47rQ859lrP9XOOXs/4c599wjFI/G33rSOvPcV5p6x3j/Kyp6p3Z1It56O/UkyGm/pg2NG3HnnwxJ5HtQpnjwM69jyRKXVhCYULytyTE2D6AJPsnZps0tPs7dnrMh32uC0RsUBz7/NVIOT986+Y4PqX7Rju20v5p+hZzfYg9P0P7InX8Q+vnOHa19afsG9v0HPsidHxq+zScHvPZ46s3tP9ynp9jqvrMbI6DTfthkuOCFKor186NGZ+UurR12pbVhptcF2NNm77pqR+W2uN1OM+1vO0DKHXf56Dd37HTtSEqdh3XvJgLSg/nr7b+XGOqWS5222tchFsPs7H1SNYfo/6phdnhMjk+gwizDYRZ38U+tK6kP5I+1gyzrrpauhimjs+Uw6y2T7EfjFMNs7N/D0tKX3JeTDT19RJmS4S53GFWezHX9C11+3N+/qS2n2v8ctbfepjVfP6Hppc4PuenlTg/Wwq2Rd8zayO52MxPt/3b9berfs0FJKb+3Fz1p45vyti42hijfWnffO2HtkNa/2yatH7p8T//vzHbF9qu1P2u7Zt0mdT5oe0sfXzY2ghNj+lfrr7Fbn+u8z+0vmS+po2U8ct1fs8vpxU6BlLbzzV+OeuP3Uelzm/X9uU4Pkqe36H5mrZjx62k7HdmAbSttQ+hkqa0rQCmbcqfd4RZAAsj5a4GAPRq6p97hFkAAAB0izALAACAbhX5AdhM7tveqQ+Ha9spqWT9mge8Ux8Qj92O1r8KafHrmrH7NHb7Gi30tYU+AMAUFH81V+4Pc9cvJHPr9SIUGh/p+Pl+pSpdtpSe/0Mj1dh9G7t9iZb62FJfsIV9AiyeImE2FJ5SEGbdJH0mzI5ff4qx+zZ2+xIt9bGlvmAL+wRYPNXDbI73qLmmDevUfo0eakeyfuireF+7rv5Lx6iHMCvZ/uG/XetL5vvGXrL/crYvmR9Scnyk7adsn2T/+LZP2z9N/zV/jzG+qeMj+XzJMT65+iitX9p/2/zU9gG0IUuYPXXq1HaFwxN9+GFgo/lQkFwsbB9C2val00L1a7fZ9uErJVlWerH1TU+5WEvr9y2XY0x9bcSOeczxEdOepM2Y/knbd03Lsf3a7ZP2UdO+bx1f/zTHakr/UsbHt305xielj6ntp36maton0AJtyRJmjx8/vl1hzAdvicCWOn2sMDubFxMUXRfeUhcWbZ0x9WvH1FU0/ZXum5hgKemfpm++fe7a9phjy9Xe/LTQ9km2X7uvpH2UTpeMr3RdX5ul+qdto1SYjRU6PjXHv6+NUNuh45MwC7QlNcw+9dRTZunkyZPbFRJm0/oym5cjzNqmL3qYTWk7pn5tmE2VM0zlOsakF/aYc5cwmzfMzq8jratmmB3Wk3q85f78IMwCbUoNsydOnDBLZ86c2a4w9b/8Q1oOs7N/u/6rPqYvOcOGpr5ewmzM8VU7zIYufCnHvyZMlTr/pNtXO6zFTLedy746phxmtWFR2q/Q9JT+D//Wnh+EWaBNqWH25MmTV8OsLcDZPkgkYc8mtJ6k7tAyqfNt7UnXH06LGSNbG6HpMf3L1bfY7Y/ZvzHHh2S+po1cx7/t7xz9k7Zf4vzJcfxr91/o2PL1p8Q5Unp85uvStj9cxvXv1H5J6kjp/7Df0vVt55SvHgD1ZA2z2I0PNQCt6f1zqff+A8iLMJtZ6p0JACil98+l3vsPoAzCLAAAALpFmAUAAEC3CLMAAADoFmEWAAAA3SLMAgAAoFuEWQAAAHSLMAsAAIBuEWYBAADQLcIsAAAAukWYBQAAQLcIswAAAOgWYRYAAADdIswCAACgW4RZAAAAdIswCwAAgG4RZgEAANAtwiwAAAC6RZgFAABAt4bh9MSJE9bQ6pp+8uRJs3TP/YfG3g4AAABMkC20DoOrbdqs/Pd3HjBL+w88MvZ2AAAAYIJcYXYWXod/D8ud9z5ImAUAAMA4XI8UDIvrmVnCLAAAAEbjCqmSIEuYBQAAwKh8QTUUZLfD7HceeHTs7QAAAMAEpb6a6657HyLMAgAAYBx5wuyDh8feDgAAAExQcpj97kNm6V7CLAAAAEaQGmbvvu9hwiwAAADGkSXMfvehI2NvBwAAACYmNchubm6ae2ZhNkdlH3zwQXLJ0Q8KhUKhUCgUyjTKPfcfNEv3PfxYlsoIsxQKhUKhUCiUmmX//YcIsxQKhUKhUCiUPsv++w+ZpfsPPp6lMsIshUKhUCgUCqVm+c6BQ2bp/kPhMCv5/8clzFIoFAqFQqFMu0gyY87ynQceMUsHDj2RpVOEWQqFQqFQKBRKzUB77wOPmqUDj7jDrKYzhFkKhUKhUCgUyuZmvUB774OPmqUHHnkySycIsxQKhUKhUCiUWakRaL/74GGz9MCj9jCr7QRhlkKhUCgUCoWyuVnvzux3Hzpslh589HtZOkOYpVAoFAqFQqHUfGb2voePmKWHDn8/S6cIsxQKhUKhUCjTLrXfZnD/w4+ZpYeOhMOspBBmKRQKhUKhUCg1y4GDj5ulh488laUywiyFQqFQKBQKpWY5cOhxs/TwY4RZCoVCoVAoFEp/5YFHnjBLBx87mqUywiyFQqFQKBQKpWZ58NEnzdKhx/OEWQqFQqFQKBQKpWZ56PD3zNKhx58evSMUCoVCoVAoFIq2PHzkKbP0yBPPjN4RCoVCoVAoFApFWw4+dnQrzK6vr1MoFAqFQqFQKN0UY4w59PjTZunRJ39g1tfXR0/WFAqFQqFQKBSKpjzyxDOEWQqFQqFQKBRKn+XRJ39glg5/7xhhlkKhUCgUCoXSXSHMUigUCoVCoVC6K8YYs7m5aQ5/7xhhlkKhUCgUCoXSTzHGbGdXwiyFQqFQKBQKpZsyC7I7wuyR7z9LmKVQKBQKhUKhNF2GQXZzc9Mc+f6zhFkKhUKhUCgUSttlGGRnz8we+f6zZumxp44TZikUCoVCoVAoTRZbkJ39+7GnjhNmKRQKhUKhUChtFleQ3RFmz5w5Q5ilUCgUCoVCoTRVQkF2c3PTnDlzhjBLoVAoFAqFQmmrhILs7JlZwiyFQqFQKBQKpakiCbKzf585c8YsvXTqNGGWQqFQKBQKhTJ6kQbZ2d8vnTpNmKVQKBQKhUKhjF+0QXZzcy7MAgAAALWlBuDtMEuhUCgUCoVCofRY/j8PDqepAFsQygAAAABJRU5ErkJggg==)  any suggestion?
 
 
*) replace Xxxxxxxx with the correct name!

That is curious. On boards that use a hardware UART, connecting to a serial port causes a reset and EZGPIB does not allow enough time for this before reading the serial port, with the result that it reads a blank line. One way around this is to put a 10uF capacitor between RESET and GND which prevents a reset (and prevents programming). However, this shouldn't be an issue with Micro Pro/Leonardo 32u4 type boards which use software emulated CDC ports and do not reset. As maxwell3e10 reports - and I have observed this behaviour myself - often it will succeed on a second attempt, almost as if the serial connection is being held open or something between attempts. I do have a 32u4 Micro Pro board here so will dig it out and run a test. Are you using USB or TXO/RXI pins for serial comms?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: eliocor on August 22, 2020, 06:11:36 pm
I'm using an "artag" interface (v3 PCB) with a Micro Pro with installed the latest 0.48.28 fw version. 
I'm using the USB connection: outside EZGPIB the interface is working flawlessly.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on August 27, 2020, 01:43:21 pm
I just tried the "Artag" interface with the original copy of EZGPIB on Windows 7 and got the same result. EZGPIB fails to recognize the interface. I tried the patched version but found that it sits minimized in the task bar and even if you click on the icon in the task bar, the programming window never opens. Just to be sure, I deleted my patched copy of EZGPIB and re-created a new copy from scratch but got the same result. I did find that if I change the line in EZGPIB.ini:

SearchSERIAL=True

to:

SearchSERIAL=False

then it will start normally. Of course, in this case it no longer scans serial ports in an attempt to detect the interface and there is no means to specify one manually. The patch process is somehow causing the program to hang.

I had no problem starting the patched version of EZGPIB on Windows 10 although there was a small delay before the program window opened. However, as per your report, the interface was not recognized. At this point I am uncertain as to what the problem is, but I suspect it is about timing. I will investigate further when I have the time.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on August 29, 2020, 09:27:03 pm
I was under the impression that EZGPIB refuses most versions of the AR488 interface. I believe it looks for active RTS/CTS flowcontrol lines. These exist on the FTDI chip (and, therefore very old arduinos such as Duodecimilia) but not on most modern arduinos. The CH340 has them - though they're not normally connected - but I'm not sure if EZGPIB knows that driver either.

The 32U4-based AR488 uses the standard arduino usb-device driver which implements a CDC serial interface. It has RTS and DTR, I think.

I originally hoped to modify the driver to handle RTS as well but that doesn't just require a driver mod, it requires a new driver that emulates an FTDI or possibly CH340 interface and therefore has a Windows driver that handles that .. but since I don't really use Windows it's not very far up my list of jobs :).

The alternative is to patch EZGPIB so that it doesn't look for the handshake lines. This is probably the easiest course of action.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: jimmc on August 30, 2020, 03:38:35 pm
For Arduinos using the CH340G (e.g. NANO clones), grounding pins 9 & 10 Of the CH340G will assert CTS & DSR.
I can confirm that they will then be recognised by EZGPIB.
(see https://www.eevblog.com/forum/testgear/gpib-interface-(ieee488)/msg1148751/#msg1148751 (https://www.eevblog.com/forum/testgear/gpib-interface-(ieee488)/msg1148751/#msg1148751))
Jim
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on August 30, 2020, 04:37:00 pm
I got this patched copy of EZGPIB from someone that seems to work OK in Win 7 on second try.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: ElektroQuark on August 30, 2020, 06:10:30 pm
This AR488 works with multiple targets or only with one?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: eliocor on August 30, 2020, 07:36:29 pm
@maxwell3e10:
your .exe file is the same as the "standard" patched one....
Maybe I should resort to use IDA/Ghidra to try to find if it can be corrected.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on August 31, 2020, 12:45:50 am
This AR488 works with multiple targets or only with one?

There are commands to select the GPIB address of the device being used (for multiple targets), but you can also set it for a single address, when it will act as though it were serial over USB to a single device.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: xardomain on August 31, 2020, 10:51:07 am
Which is the string shown in the debug log about  the ++ver string?
I am using a Leonardo clone, and with the patched version apparently the ++ver does not return anything.

I was successful in reading the frequency from a Racal Dana 1998 frequency counter and changing the gate time by hand, using putty.

I plan to use it with Lazarus IDE, so can't say how much I will lose using EZGPIB. I have another GPIB adapter(PCI), EZGPIB works with this no problem.

Timing issue?

Giuseppe Marullo
IW2JWW - JN45RQ
Title: Re: AR488 Arduino-based GPIB adapter
Post by: eliocor on August 31, 2020, 02:13:08 pm
Is there any owner of a REAL Prologix interface who can do the following test:
- Open EZGPIB
- once the program has started, open the [Debug Message] window (Alt-D)
- publish the contents of this window
 
Thanks in advance....
Elio.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: softfoot on August 31, 2020, 09:35:20 pm

I have built a UNO based AR488 module and am using it to receive screen dumps from a TDS744A Tek 'scope using some software I have written.

The AR488 is in mode 0 and when the operator presses the scopes "HARDCOPY" key the file is recieved and written to a file.

At the moment the only way I have been able to detect the end of the datastream is to have a timeout on the read on the AR488 interface.

Is there a better way to detect the scope having sent the last character ?? An EOF indicator, perhaps, that I can poll ?? There doesnt seem to be anything in the stream for EOF (it's a binary stream anyway).

TIA
Dave
Title: Re: AR488 Arduino-based GPIB adapter
Post by: serg-el on September 01, 2020, 04:45:42 am
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3112320/#msg3112320 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3112320/#msg3112320)

Capture from oscilloscope TDS754C.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: softfoot on September 01, 2020, 05:15:53 am
Sorry, I cannot see how that relates to my question - my screen capture works, I just need a better way to detect the end of the data stream.
Regards,
Dave
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on September 05, 2020, 08:17:40 am
Which is the string shown in the debug log about  the ++ver string?
I am using a Leonardo clone, and with the patched version apparently the ++ver does not return anything.

If a custom version string has not been configured, then '++ver' should return the default version string defined at the top of the sketch. If a custom version string has been configured with '++setvstr' or '++id vstr' then:

++ver - returns the custom string
++ver real - returns the default string
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on September 05, 2020, 08:45:01 am

I have built a UNO based AR488 module and am using it to receive screen dumps from a TDS744A Tek 'scope using some software I have written.

The AR488 is in mode 0 and when the operator presses the scopes "HARDCOPY" key the file is recieved and written to a file.

At the moment the only way I have been able to detect the end of the datastream is to have a timeout on the read on the AR488 interface.

Is there a better way to detect the scope having sent the last character ?? An EOF indicator, perhaps, that I can poll ?? There doesnt seem to be anything in the stream for EOF (it's a binary stream anyway).

TIA
Dave

Since the stream terminates on an EOI signal, it might be possible to use ++eot_char and ++eot_enable to set a specific EOT character. The only catch is that any ASCII character from 0-255 could be present in plot data and when detected might stop your capture prematurely. Looking at the HPGL plot output files it seems that they usually end in the sequence 'SP0;' and then a null, although not consistently so. Occasionally the ';' is omitted and sometimes a handful of additional sequences follow 'SP0;' depending on the instrument. It suspect it might be possible to terminate on detecting the sequence 'SP0' or 'SP0;' although it might be necessary to flush any remaining characters in the buffer to prevent them being tagged on to the next plot.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: softfoot on September 05, 2020, 09:00:34 am

That is pretty well what I concluded ... that would only work on a non-binary format.

I'll stick with a timeout I think.

Thanks,
Dave
Title: Re: AR488 Arduino-based GPIB adapter
Post by: lambcutlet on November 03, 2020, 07:22:55 pm
Hi I've just built myself an AR488 with arduino micro. I can send commands like ++ver and receive a response back.
But I'm having some difficulty connecting to my Fluke8840a, command ++addr responds with 1 so i've set the hardware address to 1.
I'm hoping username kc9qvl is still on this forum as I see in post #412 he got it working.
I was hoping he could share the secret to get the Fluke chatting.
A random question, is the AR488 compatible with PyVISA?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Sprock on November 06, 2020, 07:39:33 am
Hi Lambcutlet

please try ++auto 3 return, then ++read return.

It spits out the Data from my 8840A.

Ps.
Thanks to wavy dipol, artag et al
Title: Re: AR488 Arduino-based GPIB adapter
Post by: lambcutlet on November 06, 2020, 01:06:03 pm
Hi Sprock,
thankyou for the commands, I gave them a try and receive nothing back from my 8840A  :(. I now suspect the GPIB board inside the 8840A is faulty, as I've tested the AR488 on another device so I know it's working.
Thankyou again

Fixed it. The ribbon cable went high impedance at the press-fit ends preventing power to flow through to create 5V on the GPIB board.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Miti on November 06, 2020, 03:52:42 pm
Is there any owner of a REAL Prologix interface who can do the following test:
- Open EZGPIB
- once the program has started, open the [Debug Message] window (Alt-D)
- publish the contents of this window
 
Thanks in advance....
Elio.

You mean this?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: eliocor on November 06, 2020, 04:02:03 pm
You mean this?

Yes, but for the Prologix USB interface. Nonetheless thanks anyway.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Tj138waterboy on November 21, 2020, 05:55:16 pm
Can I get a hint on what the hangup is with my setup. HP3478A, arduino nano 328p old bootloader wired to ar488 adapter connections are correct air wired. I have tried using Girlando and ar488.ino sketch, I did uncomment uno in the config.h and made active nano. I have used multiple configurations with cp230x usb to ttl adapter connected to nano with recmmended baud/bit rates, I have even rewired a new nano to breakout board as well as flash uno bootloader with no luck. The closest I can get using terminal as well as hp3478a software is this message...
Version 04-18-20
Gain encode/decode algorithm thanks to: Steve1515 (EEVblog) and fenugrec (EEVblog).
Windows 10 /S-2016  Platform ID 2
Config file loaded.
Command delay = 0ms.
Max COM port = 64.
Search COM ports for Prologix adapter.
***-
Found prologix on COM3
COM port set to COM3

Searching GPIB for instrument
*******************************
Auto search instrument not found!
Instrument comm fail!
Check GPIB port setting!
Check GPIB port setting!
Instrument stop/local
Check GPIB port setting!
Check GPIB port setting!
Debug ON.
Search COM ports for Prologix adapter.
*CheckCom start COM1
CheckCom end CreateFileA COM1
CheckCom port not found
FA:Port COM1 not found.
*CheckCom start COM2
CheckCom end CreateFileA COM2
CheckCom port not found
FA:Port COM2 not found.
*CheckCom start COM3
CheckCom end CreateFileA COM3
CheckCom port found
CheckCom end CloseHandle COM3
FA:Port COM3 found.
OC:Open COM3 CheckCom.
CheckCom start COM3
CheckCom end CreateFileA COM3
CheckCom port found
CheckCom end CloseHandle COM3
OC:Open COM3 open port.
OC:Open COM3 OK.
CA:Start CheckAdapter on COM3
CA:Check Prologix GPIB adapter. ProVer =:"GPIB"
QS: Send:"++ver" Reply:""
CA:Prologix not found. ++ver retry for Arduino.
CA:Retry ++ver (Arduino boot delay)
-CA:Retry: Found Prologix adapter (Arduino retry).
CA:Exit checkAdapter on COM3

Found prologix on COM3
COM port set to COM3
IG:Start InitGPIB
IG:Find Prologix GPIB adapter.
IG:ProVer srch:"GPIB"
IG:Found Prologix adapter.
IG:set ++mode 1.
IG:set eot_enable 0.
IG:set read timeout:++read_tmo_ms 3000
IG:SetGPIB Address ++addr 23 success.
IG:set EOI 0.
IG:set EOS 0.
IG:Set auto talk mode off: ++auto 0  success.
IGT:QSB result
IGT:Failed instrument ID: BR$=:""
IGT LEN BR$:0
Instrument comm fail!
Check GPIB port setting!
Check GPIB port setting!
Check GPIB port setting!


I tried manually setting GPIB address as well as auto and nothing. The multimeter is powered on SRQ jumper disabled on back of meter and Address is set to 23 using dip switches. I also tried setting dip switches to talk only and it seems nothing wants to communicate with arduino.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Tj138waterboy on November 22, 2020, 04:24:12 pm
Just want to put out a FYI, I bought a small batch of NorComp Inc. Product Number 111-024-103L001 IEEE-488 24 pin plug connector to go with the artag pcb and the pin size of the connector is too large to fit into the pads of the pcb. If building an adapter pay close attention to what you buy.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: BK on November 22, 2020, 07:56:37 pm
I just soldered an arduino Pro Micro to a Centronics Plug to connect to a Toellner PSU. When I enable verbose mode, I get the following output:

Code: [Select]
*IDN?
> ++read
TOELLNER,TOE8815-32,0,V1.34
                           gpibReadByte: timeout waiting for DAV to go LOW
Bytes read: 28
Timeout waiting for sender!
Is this DAV timeout "normal"? (I never used GPIB or ar488 before)

The reply string seems complete according to the manual.



Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on November 22, 2020, 11:39:58 pm
@Tj138waterboy

Yes, that's a connector intended for soldering to individual wires, not pushing into a PCB.
Digikey describes that as    CONN SCSI PLUG 24P STR SLDR CUP   - SLDR CUP for solder cup.

You need a PCB-mounting connector, which has thin pointed pins instead of those solder cups.
Rather unhelpfully, these are described simply as SOLDER.

This is the one you want  :
https://www.digikey.com/en/products/detail/norcomp-inc/111-024-113L001/955147 (https://www.digikey.com/en/products/detail/norcomp-inc/111-024-113L001/955147)

Note that it's 113, not 103.

You should be able to use it just by putting some short solid copper wire into each solder-bucket. A bit fiddle and maybe a mm or two deeper, but at least it wouldn't be a complete waste of the connector.
 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: BK on November 23, 2020, 09:13:28 am
Code: [Select]
*IDN?
> ++read
TOELLNER,TOE8815-32,0,V1.34
                           gpibReadByte: timeout waiting for DAV to go LOW
Bytes read: 28
Timeout waiting for sender!

Changed following settings:
Code: [Select]
++eoi 1
++eor 2
It is working now.

Title: Re: Adattatore GPIB basato su AR488 Arduino
Post by: hnjmkl on November 26, 2020, 08:19:42 am
Arduino novice I would like to use it to try to manage my HP tools including the 3478A, the UNO works, launching HP3478A.exe I see the value on the display reproduced on the PC, the ++ ver command, present in GPIB6.1, does not work instead should the Girlando version string.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on November 30, 2020, 03:20:08 pm
Hi group,

I want to give a big thank you to forum members WaveyDipole and artag.
I ordered the PCB:

[attachimg=1]
(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1120466;image)

last week.

I will let you know how I get on.

( I have an old, very old, Prologix interface board)


Best regards,
Jay_Diddy_B
Title: Re: AR488 Arduino-based GPIB adapter
Post by: hnjmkl on December 05, 2020, 05:21:07 pm
I have successfully used AR488 for hours with the HP 7225A plotter, the next day I was no longer able to send any command via terminal, it does not even return the version string with ++ ver, any suggestions?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: m k on December 06, 2020, 05:57:05 pm
After some Windows update?

Reconnect it using different USB port.
What device manager says?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: hnjmkl on December 07, 2020, 09:40:30 am
No Win update, try other USB ports but AR488 still doesn't work, device manager sees (COM3) as soon as I connect ELEGOO R3 board, basic programs such as blinkled example are loaded and work correctly.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: m k on December 07, 2020, 11:10:19 am
There shouldn't be a space in ++ver.
That gives you a USB side response.
So if not then something is wrong between AR488 and the PC.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: hnjmkl on December 07, 2020, 11:41:12 am
I also believe that the problem is as you say.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: m k on December 07, 2020, 06:11:52 pm
If flash is verified after write then RAM test is the obvious next step.

You can of course also try
++default
++savecfg

If there are unused pins one blinker wouldn't be bad for AR488 eighter.
Mean time you can use DAV, it seems to be flipped no matter what.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Tj138waterboy on December 08, 2020, 06:39:27 pm
Can anyone with a 3478a meter tell me after plugging in arduino"any variant" at what point do the announciators show up on meter screen, "TLK/LSN? Do they show up when you set ++addr or only when using ++read?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on December 08, 2020, 09:58:06 pm
Hi,

I just happen to have a 3478A on my desk. I also have AR488 using the PCB designed by forum member artag.
First a few pictures of the assembled interface:

[attachimg=1]
(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1126156;image)

[attachimg=2]
(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1126160;image)

[attachimg=3]
(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1126164;image)

I have s/w version

AR488 GPIB controller, ver. 0.48.28, 01/07/2020

If I use Tera Term to communicate with the 3478A. My 3478A is set to HPIB address 24.

I send

++auto
++addr 24

if I send

++read

The RMT indication comes on and stays on.
The TLK flash briefly when the 3478A is transmitting data.

RMT can be turned off by pressing the LOCAL button on the DMM.

if I set it to local and I enter

++read

The TLK flashes when transmitting, but the RMT stays off.

If I send

H1

(H1 configures the meter for DCV)

The RMT comes on and stays on.

Does this help?

Jay_Diddy_B






Title: Re: AR488 Arduino-based GPIB adapter
Post by: Tj138waterboy on December 09, 2020, 12:53:50 am
Greatly appreciated.  Just built a 3rd adapter and still no luck. Anything obvious other than not soldered in pic?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on December 09, 2020, 01:36:20 am
Greatly appreciated.  Just built a 3rd adapter and still no luck. Anything obvious other than not soldered in pic?

I am assuming that you have programmed the arduinio?

When I plug mine in three LEDs are on. A green one close to the USB connector and two red ones by the crystal oscillator.

In the Arduino IDE, Tools -> Serial Monitor

It will open a terminal window:

[attachimg=1]
(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1126338;image)

In the line type ++ver  and then click send

The red lights blink briefly during the communications.

The AR488 should respond with the version string. This will tell you that the Arduinio is programmed and working.

Try this.

Jay_Diddy_B
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Tj138waterboy on December 09, 2020, 01:59:14 pm
Im getting 3 red leds when plugged in. Not sure if the red one next to micro usb is bi-color or maybe chinese knockoff that uses different color led than others but im getting exact same return when typing ++ver on arduino serial monitor. Another question is are yiu uploading sketch as board "Arduino Micro"? When I first plugged in before programming boards it was detected as Leonardo.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on December 09, 2020, 02:45:11 pm
Hi,

I have my Arduino set like this:

[attachimg=1]
(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1127046;image)

I am not sure if I set it Arduino Micro manually or if it was detected

[attachimg=2]
(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1127050;image)

Regards,

Jay_Diddy_B
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Tj138waterboy on December 09, 2020, 03:02:04 pm
Well finally got ticked off enough to open up the meter and behold what I find. Have to blame myself due to replacing batteries and all caps.
Second meter was plugged in right and after fixing connector in first one both still not working. TBC
Title: Re: AR488 Arduino-based GPIB adapter
Post by: The Soulman on December 09, 2020, 11:46:50 pm
Well finally got ticked off enough to open up the meter and behold what I find. Have to blame myself due to replacing batteries and all caps.
Second meter was plugged in right and after fixing connector in first one both still not working. TBC

Happens to most of us sooner or later..
You may want to check the pinout of that connector and see if there are any voltages on there that could have damaged the arduino.  :-\

Title: Re: AR488 Arduino-based GPIB adapter
Post by: Tj138waterboy on December 10, 2020, 01:48:38 am
Finnally got 1 nano to work on both meters. Issue was ground connection.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: IanJ on December 10, 2020, 02:43:11 am
Hi all,

Is there a link to purchase the bare pcb anywhere,  or a link to the pcb files so I can build a few of these.

Eager to see if the AR488 will work with my windows based gpib logging software.

Ian.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: garrettm on December 10, 2020, 05:51:53 am
I would be interested in buying a blank AR488 PCB too.

If anyone has a spare they want to sell send me a PM.

I'd like to thank everyone that contributed to this project for their hard work!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: eliocor on December 10, 2020, 06:32:00 am
I have some of them (white color), version 3 with the correct hole size:
I paid just 5.20€ for 30 pieces (JLCPCB): I can ship some of them but you have to contact me via a private message.
Attached you will find the gerber files (directly uploadable to JLCPCB): just 3.30€ for 5 pieces or 5.45€ for 30 pieces....
Title: Re: AR488 Arduino-based GPIB adapter
Post by: IanJ on December 10, 2020, 08:02:52 am
I have some of them (white color), version 3 with the correct hole size:
I paid just 5.20€ for 30 pieces (JLCPCB): I can ship some of them but you have to contact me via a private message.
Attached you will find the gerber files (directly uploadable to JLCPCB): just 3.30€ for 5 pieces or 5.45€ for 30 pieces....

Thanks.......I ordered mine through PcbWay using your files.

What about the BOM, can you let me know where you bought the connectors from, and also the best resource for the source code etc?

Thanks,

Ian.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: eliocor on December 10, 2020, 08:33:04 am
FW:
https://github.com/Twilight-Logic/AR488 (https://github.com/Twilight-Logic/AR488)

HW:  IIRC EB67E model: please check!
https://www.ebay.com/itm/391507935311 (https://www.ebay.com/itm/391507935311)
https://richelectronics.co.uk/product/centronics-plugs-sockets-pcb-pcb-r-angle-idc-panel-mount-14-50-way-eb0067 (https://richelectronics.co.uk/product/centronics-plugs-sockets-pcb-pcb-r-angle-idc-panel-mount-14-50-way-eb0067)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on December 10, 2020, 06:30:32 pm
Hi,

I used the following connector:

NorComp 111-024-113L001

Digikey Part No: 1024PMA-ND

This is a straight connector as shown here:

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1126164;image)

The Arduino boards I bought from a Canadian Vendor on eBay. They were described as:

Pro Micro Atmega32u4 - Compatible With Arduino - 16MHz - 5V - 32kB - micro USB

Jay_Diddy_B
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mmcgraw74 on December 18, 2020, 10:10:27 pm
I wonder if the problem is your right angle GPIB connector.

Looking at the bare board photos on this page indicate the Arduino pin1 and GPIB pin1 are next to each other on the same end of the board as the Arduino USB connector.  Your photo shows GPIB pin 1 on the opposite end of the board.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mmcgraw74 on December 19, 2020, 01:30:38 pm
Quote from: Tj138waterboy on December 09, 2020, 12:53:50 am
Greatly appreciated.  Just built a 3rd adapter and still no luck. Anything obvious other than not soldered in pic?

Sorry, my previous post was in reply to Tj138waterboy.

Is the green board in your photos the artag original layout or the v3 layout?

The v3 layout has GPIB pin 1 and Pro Mini pin 1 on the same end of the PCB.

Your photo shows GPIB pin 1 on the opposite end from the Pro Mini.  Is your PCB the original artag layout and GPIB pin 1 is in the correct hole?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Tj138waterboy on December 20, 2020, 01:21:19 am
Edit pcb I ordered has pin 1 at opposite ends but I used still multimeter to beep out pin to pin and I didn't have it on the right way in the pic. I have since then used direct wiring to promicro and still can't get it to work. Even tried same trick I used on my nano board using all ground pins to arduino ground.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: m k on December 20, 2020, 03:12:12 pm
Are all parts powered from same outlet?

Can you use external USB hub with own power?

You did those signal tests earlier and they were fine but then time was not involved.
Maybe it's still a grounding issue but farer back this time and new setting is more picky.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Tj138waterboy on December 21, 2020, 01:20:11 am
Ok, finally got it right on the pro-micro. Issue was I have been looking at the wrong connector diagram or the right one but wrong perspective. After seeing pg 46 then pg 47 in the AR488 manual I started scratching my head and resoldered and works perfectly now. Sorry for the multiple messages and confusion to what would appear to be dummy proof instructions but I have to fail first to succeed I guess.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: hnjmkl on December 21, 2020, 04:27:15 am
From the arduino monitor I could not send commands, (AR488 and Arduino UNO), not even sending ++ ver I had an answer with the version string, I installed YAT and with the exception of the first send, then everything works, 3478A and 34401A.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mcj7247 on January 09, 2021, 01:20:09 am
Hello All. First a big thank you to the folks who developed the AR488 and decoded HP3478 GPIB protocols. I'm a beginner/hobbyist and just purchased an HP3478A and would love to try and read/write the calibration factors safely while I replace my 3V memory battery. I'm placing my orders on Digikey and JLCPCB for the battery, GPIB connector (NorComp 111-024-113L001) and PCB board (AR488V3 Gerbers) and would like to also replace any weak/faulty capacitors. Once you get more specific than Electrolytic vs Tantalum capacitor specs are a bit over my head ???. I could really use some direction, or perhaps even a Digikey part number, to the caps that require replacement?

I'd also like to offer up the extra PCB's to anyone else who might need them. I can order extra PCB's and GPIB connectors and reship to those located in the US. $2 per pcb and $6 per connector + shipping.

To the folks who contributed their time and expertise......Thanks again!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: pqass on January 09, 2021, 03:57:23 am
Quote
mcj7247:    I could really use some direction, or perhaps even a Digikey part number, to the caps that require replacement?

Not Digikey but these are the ones I used.  Apart from the value and the pin spacing, what's very important is that they are Class Y2.  https://www.eevblog.com/forum/testgear/first-bench-multimeter-fluke-8840a-vs-hp-3478a/msg3100584/#msg3100584 (https://www.eevblog.com/forum/testgear/first-bench-multimeter-fluke-8840a-vs-hp-3478a/msg3100584/#msg3100584)

If you'd like to read the proceedure I used for replacing the 3478a battery, read this thread; specifically the following two messages:   https://www.eevblog.com/forum/testgear/first-bench-multimeter-fluke-8840a-vs-hp-3478a/msg3008694/#msg3008694 (https://www.eevblog.com/forum/testgear/first-bench-multimeter-fluke-8840a-vs-hp-3478a/msg3008694/#msg3008694)   and   https://www.eevblog.com/forum/testgear/first-bench-multimeter-fluke-8840a-vs-hp-3478a/msg3015428/#msg3015428 (https://www.eevblog.com/forum/testgear/first-bench-multimeter-fluke-8840a-vs-hp-3478a/msg3015428/#msg3015428)

Any calibration data read from the meter can be decoded using this script:
https://www.eevblog.com/forum/repair/hp-3478a-how-to-readwrite-cal-sram/msg3210132/#msg3210132 (https://www.eevblog.com/forum/repair/hp-3478a-how-to-readwrite-cal-sram/msg3210132/#msg3210132)

Print the output and tape it to the inside of the meter for the next guy (which may be you).
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mcj7247 on January 09, 2021, 04:39:50 am
Not Digikey but these are the ones I used.  Apart from the value and the pin spacing, what's very important is that they are Class Y2.  https://www.eevblog.com/forum/testgear/first-bench-multimeter-fluke-8840a-vs-hp-3478a/msg3100584/#msg3100584 (https://www.eevblog.com/forum/testgear/first-bench-multimeter-fluke-8840a-vs-hp-3478a/msg3100584/#msg3100584)

They popped up in Digikey part finder so thank you. I'll add them to my order.

If you'd like to read the proceedure I used for replacing the 3478a battery, read this thread; specifically the following two messages:   https://www.eevblog.com/forum/testgear/first-bench-multimeter-fluke-8840a-vs-hp-3478a/msg3008694/#msg3008694 (https://www.eevblog.com/forum/testgear/first-bench-multimeter-fluke-8840a-vs-hp-3478a/msg3008694/#msg3008694)   and   https://www.eevblog.com/forum/testgear/first-bench-multimeter-fluke-8840a-vs-hp-3478a/msg3015428/#msg3015428 (https://www.eevblog.com/forum/testgear/first-bench-multimeter-fluke-8840a-vs-hp-3478a/msg3015428/#msg3015428)

Any calibration data read from the meter can be decoded using this script:
https://www.eevblog.com/forum/repair/hp-3478a-how-to-readwrite-cal-sram/msg3210132/#msg3210132 (https://www.eevblog.com/forum/repair/hp-3478a-how-to-readwrite-cal-sram/msg3210132/#msg3210132)

Print the output and tape it to the inside of the meter for the next guy (which may be you).
[/quote] Let's hope not but I'd rather be prepared. And this will be a huge help. I'm confident with AR488/arduino side of the hardware connection but I'm going to need to study the command set in the manual  to understand how to request the calibration data. I'm not Linux savvy either. I appreciate the info and thanks for sharing.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: pqass on January 09, 2021, 05:54:42 am
Quote
Not Digikey but these are the ones I used.  Apart from the value and the pin spacing, what's very important is that they are Class Y2.  https://www.eevblog.com/forum/testgear/first-bench-multimeter-fluke-8840a-vs-hp-3478a/msg3100584/#msg3100584 (https://www.eevblog.com/forum/testgear/first-bench-multimeter-fluke-8840a-vs-hp-3478a/msg3100584/#msg3100584)

They popped up in Digikey part finder so thank you. I'll add them to my order.

Quote
If you'd like to read the proceedure I used for replacing the 3478a battery, read this thread; specifically the following two messages:   https://www.eevblog.com/forum/testgear/first-bench-multimeter-fluke-8840a-vs-hp-3478a/msg3008694/#msg3008694 (https://www.eevblog.com/forum/testgear/first-bench-multimeter-fluke-8840a-vs-hp-3478a/msg3008694/#msg3008694)   and   https://www.eevblog.com/forum/testgear/first-bench-multimeter-fluke-8840a-vs-hp-3478a/msg3015428/#msg3015428 (https://www.eevblog.com/forum/testgear/first-bench-multimeter-fluke-8840a-vs-hp-3478a/msg3015428/#msg3015428)

Any calibration data read from the meter can be decoded using this script:
https://www.eevblog.com/forum/repair/hp-3478a-how-to-readwrite-cal-sram/msg3210132/#msg3210132 (https://www.eevblog.com/forum/repair/hp-3478a-how-to-readwrite-cal-sram/msg3210132/#msg3210132)

Print the output and tape it to the inside of the meter for the next guy (which may be you).

Let's hope not but I'd rather be prepared. And this will be a huge help. I'm confident with AR488/arduino side of the hardware connection but I'm going to need to study the command set in the manual  to understand how to request the calibration data. I'm not Linux savvy either. I appreciate the info and thanks for sharing.

Although I have not used it, see lmesters Windows program: https://www.eevblog.com/forum/repair/hp-3478a-how-to-readwrite-cal-sram/msg2884720/#msg2884720 (https://www.eevblog.com/forum/repair/hp-3478a-how-to-readwrite-cal-sram/msg2884720/#msg2884720)     or   https://www.eevblog.com/forum/testgear/free-hp3478a-multimeter-control-program/ (https://www.eevblog.com/forum/testgear/free-hp3478a-multimeter-control-program/)

Alternatively, you can converse with the AR488 via Hyper Terminal or similar program.
The 3478a command to extract a cal byte is this character sequence within the double-quotes: "W<esc><addr><cr>++read<cr>"
Where: <esc> is ASCII 27 decimal (1b hex); this will escape the next character,
           <addr> is a single ASCII character representing the address of the byte requested; from 0 to 255 decimal,
           <cr> is ASCII 13 decimal (0d hex) character
Issue the sequence for every address 0 through to 255. The first byte returned is the cal data at that address.

For all 3478a commands, see Table 3-6 in the manual here: https://www.qsl.net/n9zia/test/HP3478_Service_Manual.pdf (https://www.qsl.net/n9zia/test/HP3478_Service_Manual.pdf)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Tj138waterboy on January 11, 2021, 08:00:38 pm
I'll vouch for lmesters free program for ease of use and just 2 clicks to save the cal ram data. Be aware it takes a few minutes for it to read all of it. There is also a forum member/youtuber name NFM that has video of the process  and list of all replaceable caps https://www.digikey.com/short/zndr39 (https://www.digikey.com/short/zndr39)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 12, 2021, 12:39:56 pm
From the arduino monitor I could not send commands, (AR488 and Arduino UNO), not even sending ++ ver I had an answer with the version string, I installed YAT and with the exception of the first send, then everything works, 3478A and 34401A.

Thank you for your comment but could I ask for some further information? Although these are basic questions, please could I ask, which operating system are you using (Windows, Mac, Linux), which Arduino IDE version? Also was the correct port was selected in the Arduino IDE and the correct baud rate (default is 115200)? If both of the latter are true, then there should be no reason why the interface should not respond in Serial Monitor. I also assume that the project compiled and uploaded to your UNO board successfully? Finally, what changes, if any, have been made to AR488_Config.h?

Can I also ask, what is YAT? A Google search has failed to find anything helpful.

Thanks.
Title: Re: Adattatore GPIB basato su AR488 Arduino
Post by: hnjmkl on January 13, 2021, 08:21:16 pm
I'll be back after several days, YAT is a serial terminal downloadable from the network, I use WIN10, baud 115200, version 0.48.28, 01/07/2020, no changes to AR488_Config.h    ELEGO1 K3 board
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DefinitelyNotLarryEllison on January 13, 2021, 10:26:30 pm
Pretty sure "YAT" is referring to this: https://sourceforge.net/projects/y-a-terminal/
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on January 16, 2021, 12:05:33 pm
Look ma - no wires!  I've been working for a while on making a wireless self-powered GPIB adapter using Bluetooth and finally it (almost) works. The idea is to draw power from GPIB lines using diodes. It took a few iterations but now I have a working setup. The only thing that remains is to switch from regular Bluetooth (HC-05) to BLE, this would make it into a practical device. I could use some help since I am not very familiar with BLE.

The starting point is AR488 for Atmega328P with Bluetooth, a version of code posted some time ago. I switched the board to 3.3V, 8 MHz Arduino Pro Mini to get less power and less voltage required. It also eliminates the need for level shifters to talk to HC-05. The lower TTL levels work just fine with GPIB.

Next, one needs a step-up converter to 3.3 V, because the power that can be extracted from GPIB lines is at a voltage between 1.7 and 2.5 V. After trying a couple, I found Pololu model 2114  ($5), which has high efficiency for relatively small 10-50 mA output current. The amount of current that can be extracted from GPIB lines is about 10 mA, so one needs a super capacitor to store energy for Bluetooth communication, which takes  about 20 mA when active. I am using a 3.5F 5.5V supercap (ESR=0.1 Ohm, $4 from Digi-key). Finally one needs 16 Schottky diodes to connect all GPIB lines to the supercap. I am using 1N5817 ($2 from Ebay for a bunch). The supercap is on the input side of the Pololu boost converter, the output is powering Arduino and HC-05, bypassing their voltage regulators.

The next step is to modify WaveyDipole's code to make all Arduino lines go high impedance in the idle GPIB state when there is no communication. It may not exactly meet the GPIB protocol specifications, but seems to work fine. This way when (most of the time) GPIB bus is idle, one can extract power from the instrument GPIB lines.

Finally, one can use low-power libraries for Arduino to reduce power further. LowPower.idle command with everything turned off except USART reduces its power consumption from 4 mA to less than 1 mA without much effect on the code (except auto=3 command doesn't seem to work).  For HC-05 module the low-power commands are not well documented or may not work. The only one that I found which helps is AT+IPSCAN=1024,1,1024,1, it reduced the current when Bluetooth is not paired to about 4 mA. So by opening and closing the serial port one can control the power. But this is very inefficient and slow compared with what BLE is supposed to do.

The plot below shows the voltage on the supercapacitor as I open and close the serial port. When the port is open, I use GPIB to read HP3457. One can see that there is not enough power to keep the supercap from discharging if the port is open all the time. But when it's closed, the supercap can recharge. With BLE one can hope to reduce the transmission times to much less than a second for each reading. The question is what is the best module to use and how to modify the program.[attachimg=3]
[attachimg=1][attachimg=2]

Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 19, 2021, 07:29:35 pm
That was good thinking to use a supercap to store charge. It would seem you are getting really close to a practical working solution. I haven't really looked at power optimisation so am not really in a position to help there but interesting to see your project coming along.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: kutte on January 24, 2021, 04:08:09 pm
some people may have same problems with KE5FXs configurator, I had since I did not find it explicitly mentioned somewhere.
Solution is the version string must at least contain:
GPIB-USB controller version 6.1
Best to be put into AR488_Config.h
And btw, has anyone succeded to put EZGPIB to work using Arduino micro pro, called also Leonardo?? And...how?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: serg-el on January 24, 2021, 05:24:41 pm
It was described here.
https://www.eevblog.com/forum/testgear/$5-usb-gpib-adapter-for-ezgpib/20/ (https://www.eevblog.com/forum/testgear/$5-usb-gpib-adapter-for-ezgpib/20/)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: kutte on January 25, 2021, 08:59:24 am
@serg-el
It was described here.
https://www.eevblog.com/forum/testgear/ (https://www.eevblog.com/forum/testgear/)$5-usb-gpib-adapter-for-ezgpib/20/
« Last Edit: Yesterday at 05:27:18 pm by serg-el »

thank you for responding, but that link is related to Arduino nano or similar. My problems are with Arduino pro micro  which has a rather different USART-USB interface so any software patches mentioned there or in the AR488 to EZGPIB i've found do not work.
Kutte

Title: Re: AR488 Arduino-based GPIB adapter
Post by: Nx-1997 on January 25, 2021, 12:30:28 pm
This is a very nice adapter. I created a Window App that quickly lets you test the adapter, to see if it works, just click on a com port from the list and issue commands. Nothing fancy. Works on my Windows 10 machine, uses .net framework 4.7.2. Let me know if it crashes.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: kutte on January 25, 2021, 06:08:57 pm
thank you for your software, and it seems to work, nice!
I forgot to mention, that I could test my adapter with KE5FXs software successfully after correcting the version string accordigly (see above).
Still want to use EZGPIB.
Kutte
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Nx-1997 on January 25, 2021, 09:33:20 pm
Here is another software that works well with the first one I uploaded. Basically it issues a signal command and expects to receive data, if that data is a number then it's added to the graph using a double array. You can pan and zoom and zoom into a highlighted region. I tested it using a HP3478A, 3457A, and 6632A. Works with Windows 10. Let me know if it works, should you decide to try it.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 26, 2021, 03:11:13 pm
This is a very nice adapter. I created a Window App that quickly lets you test the adapter, to see if it works, just click on a com port from the list and issue commands. Nothing fancy. Works on my Windows 10 machine, uses .net framework 4.7.2. Let me know if it crashes.

Here is another software that works well with the first one I uploaded. Basically it issues a signal command and expects to receive data, if that data is a number then it's added to the graph using a double array. You can pan and zoom and zoom into a highlighted region. I tested it using a HP3478A, 3457A, and 6632A. Works with Windows 10. Let me know if it works, should you decide to try it.

Thank you for posting these apps. Very nice!
I tried both on my PC which is running Windows 7 and both worked OK although I couldn't find a way to change the GPIB address from 1 in LiveGraph so just got a climbing invalid reading count. My DMM is on address 3. I expect that it would start plotting valid results if I could switch to GPIB address 3. As it is, it does connect OK with the AR488 interface.

I did toy with the idea of writing something similar to your AR488 Utility, possibly in Python so it was cross-platform, but have just not been able to get around to it yet, so your apps are a welcome development.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on January 26, 2021, 04:02:04 pm
The plotting program that I use is https://hackaday.io/project/5334-serialplot-realtime-plotting-software
It lets you plot not only ASCII data, but also binary in various formats. Also good for logging with a time-stamp.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: eliocor on January 28, 2021, 01:47:32 pm
I was asked the correct mounting position (Pin 1 = RED color) of the IEEE-488 male connector on the V3 Pro Micro AR488 pcb: see attached picture.
Maybe this can help someone....


Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on January 29, 2021, 05:29:05 pm
Sofar so good.. in the sense that the 2 modules have been assembled. Based on "make do with what you have available" I have battered the connector shell into shape. No problems there.

Then the fun started: after a considerable time of  |O I discovered that 2 of my Arduino's are 3.3V variants. Which I think is a non-starter for this project (or.. ?).

I found two 5V variants which I got programmed after some more  |O.  Something to do with an old rev bootloader (?).  Anyway, USBasp allowed me to program them.

Hooked them up to an FTDI USB-serial.  ++ver, ++addr etc worked just fine.

But that is where it ends: neither the HP 3478a and the HP8642a (signal gen) seem to talk to the AR488 for now.

Most likely I am overlooking something completely obvious... but what  :scared:

Suggestions are more than welcome!

Wilko
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on January 29, 2021, 05:41:11 pm
Then the fun started: after a considerable time of  |O I discovered that 2 of my Arduino's are 3.3V variants. Which I think is a non-starter for this project (or.. ?).
I found 3.3V version works just fine, this is what I am using for my self-powered setup.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on January 29, 2021, 05:43:33 pm
Then the fun started: after a considerable time of  |O I discovered that 2 of my Arduino's are 3.3V variants. Which I think is a non-starter for this project (or.. ?).
I found 3.3V version works just fine, this is what I am using for my self-powered setup.

Self-powered?  And: isn't the 3.3V Arduino clocked at 8MHz iso 16MHz?

Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on January 29, 2021, 05:44:56 pm
See a few messages above. Arduino and Bluetooth powered by GPIB lines.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on January 29, 2021, 05:46:58 pm
Ah, ok, I see.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on January 29, 2021, 05:50:07 pm
I performed my testing with:

- HP3478A utility
- AR488 utility

and on 2 different AR488 assy's. Also tried (for good measure) 2 different USB-TTL serial cables, one a FTDI and one a CP2102.

The 2 Arduino's are also different versions, one a Funduino Pro Mini, the other is labeled Arduino Mini Pro (so generic stuff I'd say).

Wilko
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on January 29, 2021, 05:59:41 pm
Arduino's used as in the pictures.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on January 29, 2021, 06:06:52 pm
If you get response to ++ver command then Arduino and communication works fine. You can check that GPIB lines are actually switching when a message is send. See if the instrument responds in any way (goes to remote, beeps an error). I usually use a Terminal program for debugging. You can also try a command that does not require a response, like a range change.

Also, how long is the cable that goes from Arduino to FTDI? I found sometimes it helps to drop the serial baud rate from 115200 to 57600.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: eliocor on January 29, 2021, 06:23:17 pm
in my (working) Arduino some of the pins numbers are different:
your   mine
11----16
12----14
13----15
the rest are the same
I think you have to modify some pin definition in the sources....

(https://www.iot-experiments.com/content/images/2018/12/pro-micro-pinout.jpg)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on January 29, 2021, 06:36:51 pm
If you get response to ++ver command then Arduino and communication works fine. You can check that GPIB lines are actually switching when a message is send. See if the instrument responds in any way (goes to remote, beeps an error). I usually use a Terminal program for debugging. You can also try a command that does not require a response, like a range change.

Also, how long is the cable that goes from Arduino to FTDI? I found sometimes it helps to drop the serial baud rate from 115200 to 57600.

OK, I just took the HP 3478A and hooked that up to the AR488.  The FTDI cable is 1m long (~ 3 ft).

I tried multiple commands, eg ++llo  Nothing brings up the "annunciators", like RMT, that indicate the meter is under remote control.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on January 29, 2021, 06:38:55 pm
in my (working) Arduino some of the pins numbers are different:
your   mine
11----16
12----14
13----15
the rest are the same
I think you have to modify some pin definition in the sources....

(https://www.iot-experiments.com/content/images/2018/12/pro-micro-pinout.jpg)

Ouch... that is an interesting one..  Let me go and check that..  Thank you!

Wilko
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on January 29, 2021, 07:00:39 pm
This is what I found in AR488_Layouts.h :

/**************************************/
/***** UNO/NANO LAYOUT DEFINITION *****/
/***** vvvvvvvvvvvvvvvvvvvvvvvvvv *****/
#if defined(AR488_UNO) || defined(AR488_NANO)


/***** NOTE: UNO/NANO pinout last updated 21/09/2019 *****/
#define DIO1  A0  /* GPIB 1  : PORTC bit 0 */
#define DIO2  A1  /* GPIB 2  : PORTC bit 1 */
#define DIO3  A2  /* GPIB 3  : PORTC bit 2 */
#define DIO4  A3  /* GPIB 4  : PORTC bit 3 */
#define DIO5  A4  /* GPIB 13 : PORTC bit 4 */
#define DIO6  A5  /* GPIB 14 : PORTC bit 5 */
#define DIO7   4  /* GPIB 15 : PORTD bit 4 */
#define DIO8   5  /* GPIB 16 : PORTD bit 5 */

#define IFC    8  /* GPIB 9  : PORTB bit 0 */
#define NDAC   9  /* GPIB 8  : PORTB bit 1 */
#define NRFD  10  /* GPIB 7  : PORTB bit 2 */
#define DAV   11  /* GPIB 6  : PORTB bit 3 */
#define EOI   12  /* GPIB 5  : PORTB bit 4 */

#define SRQ    2  /* GPIB 10 : PORTD bit 2 */
#define REN    3  /* GPIB 17 : PORTD bit 3 */
#define ATN    7  /* GPIB 11 : PORTD bit 7 */


Which does not seem to map either your or my Arduino:
- for your pin nrs I see no corresponding #defines
- for mine I lack pin 13

I also added a picture of the bottom of my Arduino PCBs.  Note that A4, A5, A6 and A7 are unpopulated. A4 and A5 are listed in the AR488_Layouts.h file

So... Looks like this particular Arduino board variant is not suitable for the AR488. :-//

Wilko
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on January 29, 2021, 07:10:11 pm
The Arduino's I ordered this afternoon match the pin nrs you have on yours  ;D 

Might even be the same board.


Title: Re: AR488 Arduino-based GPIB adapter
Post by: eliocor on January 29, 2021, 07:57:15 pm
Try the following:
1) download the latest source code from https://github.com/Twilight-Logic/AR488
2) modify the AR488_Config.h as:
3) on line 26 remove the comment in front of: #define AR488_CUSTOM
4) change lines lines 218÷235 from:
Code: [Select]
#define DIO1  A0  /* GPIB 1  */
#define DIO2  A1  /* GPIB 2  */
#define DIO3  A2  /* GPIB 3  */
#define DIO4  A3  /* GPIB 4  */
#define DIO5  A4  /* GPIB 13 */
#define DIO6  A5  /* GPIB 14 */
#define DIO7  4   /* GPIB 15 */
#define DIO8  5   /* GPIB 16 */

#define IFC   8   /* GPIB 9  */
#define NDAC  9   /* GPIB 8  */
#define NRFD  10  /* GPIB 7  */
#define DAV   11  /* GPIB 6  */
#define EOI   12  /* GPIB 5  */

#define SRQ   2   /* GPIB 10 */
#define REN   3   /* GPIB 17 */
#define ATN   7   /* GPIB 11 */
to:
Code: [Select]
#define DIO1  3   /* GPIB 1  : PORTD bit 0   data pins assigned for minimum shifting */
#define DIO2  13  /* GPIB 2  : PORTB bit 1 */
#define DIO3  12  /* GPIB 3  : PORTB bit 2 */
#define DIO4  11  /* GPIB 4  : PORTB bit 3 */
#define DIO5  8   /* GPIB 13 : PORTB bit 4 */
#define DIO6  9   /* GPIB 14 : PORTB bit 5 */
#define DIO7  10  /* GPIB 15 : PORTB bit 6 */
#define DIO8  6   /* GPIB 16 : PORTD bit 7 */

#define IFC   4   /* GPIB 9  : PORTD bit 4 */
#define NDAC  A3  /* GPIB 8  : PORTF bit 4   fast control pins assigned to same port */
#define NRFD  A2  /* GPIB 7  : PORTF bit 5 */
#define DAV   A1  /* GPIB 6  : PORTF bit 6 */
#define EOI   A0  /* GPIB 5  : PORTF bit 7 */
#define REN   5   /* GPIB 17 : PORTC bit 6 */
#define SRQ   7   /* GPIB 10 : PORTE bit 6 */
#define ATN   2   /* GPIB 11 : PORTD bit 1 */
5) recompile
6) program
7) test

just to simply things, attached you will find the file already modified for you.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on January 30, 2021, 12:03:36 pm
hi! Thank you for the adapted .h file.  I just tried it on both of my 5V Arduino's but unfortunately no GPIB communications :-(  No "annunciator" like RMT on the display of my HP3478A

Serial communications are working, as before. 

Wilko

Try the following:
1) download the latest source code from https://github.com/Twilight-Logic/AR488

[snip]

just to simply things, attached you will find the file already modified for you.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: eliocor on January 30, 2021, 12:23:44 pm
maybe there is another way....
What kind of board have you selected in the "Arduino.exe" SDK?
See it in the [Tools/Board] menu or in the lower right of the Arduino.exe window.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on January 30, 2021, 12:59:15 pm
Found a problem:  pins for DIO3 and DIO4 were swapped with respect to the Arduino I have in use.

So the .h snippet below corrects that:

/*******************************/
/***** AR488 CUSTOM LAYOUT *****/
/***** vvvvvvvvvvvvvvvvvvv *****/
#ifdef AR488_CUSTOM

#define DIO1  3   /* GPIB 1  : PORTD bit 0   data pins assigned for minimum shifting */
#define DIO2  13  /* GPIB 2  : PORTB bit 1 */
#define DIO3  11  /* GPIB 3  : PORTB bit 2 */
#define DIO4  12  /* GPIB 4  : PORTB bit 3 */


At least I get "annunciators" TLK and RMT active on the HP3478A LCD  :D The HP3478A utility unfortunately still does not work.  I will first program the second one.. not all that confident about these  Arduino's I found here in my "used parts" bin.

But.. progress at least!

Wilko
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on January 30, 2021, 01:12:15 pm
YES!

2nd Arduino programmed with the fixed .h seems to work now!

Thanks/mille grazie to eliocor!

Wilko
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on January 30, 2021, 03:45:09 pm
 :palm: Conclusion: I have an  interesting collection of more or less duff Arduino's..  Just trashed a bunch that do not seem to respond to anything, or let themselves be programmed but that is about it etc..  |O

But in any case I have one working AR488 now.  So I am a happy camper!

Wilko
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on January 30, 2021, 03:51:58 pm
Your board looks identical to the one I used for a PCB layout. If you select the 32U4 layout it should work correctly. However, the pin numbers will not be the same as the Uno version - I relocated them to allow the code to work more efficiently (less bit-re-mangling, more whole-word writes).

So it's fine to rearrange the pins that are moved as you have done, but for a little more speed or to use my PCB layout, use the 32U4 option.



Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 30, 2021, 06:28:26 pm
Apart from the pin number differences already observed (11-13 vs 14-16), although the boards shown by wkb and eliocor are similar in appearance, they are rather different. Firstly note that they have two different processors. The board shown by wkb has a 328p whereas the board shown by elicor has a 32u4. That's the reason for the different pin numbers.

wkb, could you please confirm which board you purchased and based on the information provided here, I will add the layout for it to the next release.

artag's board was originally designed for the Micro Pro with 32u4 MCU on board. The 328p board shown appears to be a Nano variant without a micro-USB header. I was a bit concerned that the additional RST pin shown on the far side of GND pin that is next to pin 2 might be grounded. Its hard to tell from the picture, but I suspect it is probably mis-labelled and actually is a second GND pin, same as on the 32u4 board. Since your second board runs with the adjusted layout, that doesn't seem to be a problem anyway.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on January 30, 2021, 06:56:45 pm
hello Wavey,

I have attached some pictures of the working unit that are hopefully somewhat crispier. The silkscreen quality is not very stellar unfortunately. Hope this assists you somewhat?

I have these Arduino's in my possesion for a couple of years now,  no idea where they came from
other than "China". Sorry for a less than clueful answer.

Wilko

Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on January 30, 2021, 06:58:02 pm
blasted upload limit..  :box:

Please let me know if I can provide you with additional information.

Thanks for your work on making this possible!

Wilko
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 30, 2021, 08:20:21 pm
Was hoping you might have had a link to an eBay item number or something, but I think I have identified it as a "Pro Mini":

https://www.ebay.co.uk/itm/Arduino-Pro-Mini-compatible-5V-16MHz-ATMega328-pin-headers-UK-SELLER/254327628308 (https://www.ebay.co.uk/itm/Arduino-Pro-Mini-compatible-5V-16MHz-ATMega328-pin-headers-UK-SELLER/254327628308)

I see that both 3v3 and 5v variants do exist although the eBay photos seem identical. On the other hand, your photos show slightly different boards. The 3v3 variant seems to have an 8MHz clock whereas the 5v one has a 16MHz clock so there is likely to be some performance difference although both seem to have the same pinout. The name of this board is similar but subtly different to the "Micro Pro" which is a 32u4 based board, but is understandably and easily confused. Still, it seems to me that it would be worth having a documented and supported layout for it, especially as it appears to fit directly onto Artag's adapter board.

Since I don't have such a board to hand, could I ask you to test it for me once the update is ready :-)

Regards.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on January 30, 2021, 08:57:43 pm
Alas, no URL from eBay or similar. My bet would be Banggood or Aliexpress, not eBay.

The problem of 5V versus 3.3V is familiar. I have fed them 7V on their RAW voltage input and measured the Vcc they output.

More than happy to test if for you of course!  I currently have one working speciment, the Funduino one I posted pictures of.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on January 30, 2021, 09:13:09 pm
The only pinout difference between the pro mini and the pro micro is that there's a reset pin on the mini pro thaht's ground on the micro pro.

However, while that means either will fit my PCB, there may still be some pin mapping differences.

And the mini pro has TTL serial instead of USB, so it needs an external FTDI adapter or similar.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on February 03, 2021, 10:50:13 am
However, while that means either will fit my PCB, there may still be some pin mapping differences.

And the mini pro has TTL serial instead of USB, so it needs an external FTDI adapter or similar.

The only pinout difference between the pro mini and the pro micro is that there's a reset pin on the mini pro thaht's ground on the micro pro.

However, while that means either will fit my PCB, there may still be some pin mapping differences.

And the mini pro has TTL serial instead of USB, so it needs an external FTDI adapter or similar.

Yes, I run the AR488 with an FTDI cable, works fine.

To make EZGPIB work I had to jumper the CTS - RTS wires.  In the meantime I have patched the EZGPIB.EXE to eliminate the CTS check. So, something like a CP2102 cable should now also work. Have not verified that yet.

I dug up my 2 dusty IEEE488 0.5m cables (genuine HP, only the best  8) ). After connecting my two HP8642a generators I could make both of them work using a single AR488. I suppose this is better not tried with a 20m long bus but  a short one the Arduino drives without issues.

Wilko
Title: Re: AR488 Arduino-based GPIB adapter
Post by: kutte on February 04, 2021, 04:41:02 pm
my pro mini is accepted by EZGPIB withn an USB Prolific adapter cable tx/rx/gnd/vcc only.

@WKB
could you please provide your pin mapping so that the pro mini works with an PCB for pro micro in detail?
thank you Kutte
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Echo88 on February 04, 2021, 06:37:14 pm
I want to build a relay scanner thats capable of accepting front panel buttons and commands via a GPIB-port to make the relays switch.
So far i only found open source USB-GPIB-Controllers, which arent capable of the Device Mode as far as i understand.
AR488 seems to be capable of said mode, but im unsure how to actually use this very big library to do what i want.
Can someone guide me a bit on how to do what i mentioned with the library?
Is AR488 capable of using GPIB-addresses in Device Mode, which would allow the usage of more than one DIY-scanner on the same GPIB-Bus when they all have different adresses?

Thanks.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on February 04, 2021, 08:56:19 pm
my pro mini is accepted by EZGPIB withn an USB Prolific adapter cable tx/rx/gnd/vcc only.

@WKB
could you please provide your pin mapping so that the pro mini works with an PCB for pro micro in detail?
thank you Kutte

Yes I can..  8)


/*******************************/
/***** AR488 CUSTOM LAYOUT *****/
/***** vvvvvvvvvvvvvvvvvvv *****/
#ifdef AR488_CUSTOM

#define DIO1  3   /* GPIB 1  : PORTD bit 0   data pins assigned for minimum shifting */
#define DIO2  13  /* GPIB 2  : PORTB bit 1 */
#define DIO3  11  /* GPIB 3  : PORTB bit 2 */
#define DIO4  12  /* GPIB 4  : PORTB bit 3 */
#define DIO5  8   /* GPIB 13 : PORTB bit 4 */
#define DIO6  9   /* GPIB 14 : PORTB bit 5 */
#define DIO7  10  /* GPIB 15 : PORTB bit 6 */
#define DIO8  6   /* GPIB 16 : PORTD bit 7 */

#define IFC   4   /* GPIB 9  : PORTD bit 4 */
#define NDAC  A3  /* GPIB 8  : PORTF bit 4   fast control pins assigned to same port */
#define NRFD  A2  /* GPIB 7  : PORTF bit 5 */
#define DAV   A1  /* GPIB 6  : PORTF bit 6 */
#define EOI   A0  /* GPIB 5  : PORTF bit 7 */
#define REN   5   /* GPIB 17 : PORTC bit 6 */
#define SRQ   7   /* GPIB 10 : PORTE bit 6 */
#define ATN   2   /* GPIB 11 : PORTD bit 1 */

#endif
/***** ^^^^^^^^^^^^^^^^^^^ *****/
/***** AR488 CUSTOM LAYOUT *****/
/*******************************/


Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 05, 2021, 09:28:37 pm
I want to build a relay scanner thats capable of accepting front panel buttons and commands via a GPIB-port to make the relays switch.
So far i only found open source USB-GPIB-Controllers, which arent capable of the Device Mode as far as i understand.
AR488 seems to be capable of said mode, but im unsure how to actually use this very big library to do what i want.
Can someone guide me a bit on how to do what i mentioned with the library?
Is AR488 capable of using GPIB-addresses in Device Mode, which would allow the usage of more than one DIY-scanner on the same GPIB-Bus when they all have different adresses?

Thanks.

Yes. In controller mode the ++addr command sets the controller address, but in device mode it sets the device address so you could assign a different GPIB address to each device. Using ++savecfg stores the configuration in EEPROM. Alternatively you could enable Macro mode and store the ++mode 0 and ++addr x commands in the startup macro. Your relay scanner would presumably need to be capable of communicating via UART/USB for configuration purposes and to to receive its commands. There isn't as yet a hardware (dip-switch style) means of setting the address although such a thing would not be impossible to add. I would need to know more about the design of your relay scanner design to comment further.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Echo88 on February 07, 2021, 10:32:45 pm
I was planning on building a relay scanner like this one: http://www.dataproof.com/media/d0465722b2aecc8bffff8241ffffe907.pdf (http://www.dataproof.com/media/d0465722b2aecc8bffff8241ffffe907.pdf)
So for example 32 relays switched by suitable relay drivers, switchable via frontpanel-buttons or GPIB-commands.
Frontpanel-Buttons should be lockable and the Remote-LED/Local-Button should work.

If id use two Arduinos: The first runs the AR488 with the mentioned macro (++mode 0&++ addr X) and the second configures the first µC and then takes the serial commands (coming from the first µC, translated from GPIB) and switches the relays?

Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on February 09, 2021, 11:23:28 am
Boat from China has arrived: fresh Arduino's  :)

Silkscreen on these is of better quality, see attached picture.  Testing to commence tonight (I hope).

Wilko
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on February 09, 2021, 06:38:39 pm
OK, just programmed one and it seems to work just fine with EZGPIB and my HP3478a. Using the custom pinout I posted a couple of postings back.

Wilko

Boat from China has arrived: fresh Arduino's  :)

Silkscreen on these is of better quality, see attached picture.  Testing to commence tonight (I hope).

Wilko
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on February 12, 2021, 02:03:59 pm
The only pinout difference between the pro mini and the pro micro is that there's a reset pin on the mini pro thaht's ground on the micro pro.

However, whiley that means either will fit my PCB, there may still be some pin mapping differences.

And the mini pro has TTL serial instead of USB, so it needs an external FTDI adapter or similar.

Fresh Arduinos have arrived from China. Yet another variant(??). Definitely more pin mapping differences than just the extra Reset pin.

The silkscreen says "Arduino Pro Micro", it identifies as a Arduino Leonardo in device manager under windoze.

See attached picture. Note that the 3 pins to the right of pin 10 have different numbering compared to the Pro Mini picture I posted earlier.

Selecting model "Arduino Leonardo" does not lead to a working AR488 however. Compiles fine, talks to EZPGPIB, does not work other than that.

So...what I think I need is this adapted pin mapping:

/*******************************/
/***** AR488 CUSTOM LAYOUT *****/
/***** vvvvvvvvvvvvvvvvvvv *****/
#ifdef AR488_CUSTOM

#define DIO1  3   /* GPIB 1  : PORTD bit 0   data pins assigned for minimum shifting */
#define DIO2  15  /* GPIB 2  : PORTB bit 1 */
#define DIO3  16  /* GPIB 3  : PORTB bit 2 */
#define DIO4  14  /* GPIB 4  : PORTB bit 3 */
#define DIO5  8   /* GPIB 13 : PORTB bit 4 */
#define DIO6  9   /* GPIB 14 : PORTB bit 5 */
#define DIO7  10  /* GPIB 15 : PORTB bit 6 */
#define DIO8  6   /* GPIB 16 : PORTD bit 7 */

#define IFC   4   /* GPIB 9  : PORTD bit 4 */
#define NDAC  A3  /* GPIB 8  : PORTF bit 4   fast control pins assigned to same port */
#define NRFD  A2  /* GPIB 7  : PORTF bit 5 */
#define DAV   A1  /* GPIB 6  : PORTF bit 6 */
#define EOI   A0  /* GPIB 5  : PORTF bit 7 */
#define REN   5   /* GPIB 17 : PORTC bit 6 */
#define SRQ   7   /* GPIB 10 : PORTE bit 6 */
#define ATN   2   /* GPIB 11 : PORTD bit 1 */

#endif


Unfortunately selecting a custom layout by #define AR488_CUSTOM results in a compile error for the serial port  ::)

Like so:
215:46: error: cannot convert 'Serial_*' to 'HardwareSerial*' in initialization

   HardwareSerial *arSerial = &(AR_SERIAL_PORT);



So.. basically I am confused? The

Wilko
(wandering in a maze full of Arduinos, #define's and #ifdefs, all alike)

Title: Re: AR488 Arduino-based GPIB adapter
Post by: eliocor on February 12, 2021, 02:10:02 pm
it surely is a "Pro Micro" and it must be recognized as a "Leonardo".
Please take care that, even if correctly programmed, it will not be recognized by EZGPIB.  :(
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on February 12, 2021, 02:26:20 pm
Right... when programmed with the 'stock'  AR488 code and with AR488_CUSTOM left undefined it does work with the HP3478A.exe tool.  It now happily reads data from the HP meter.

Sofar so good.

Wilko
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on February 12, 2021, 02:30:42 pm
it surely is a "Pro Micro" and it must be recognized as a "Leonardo".
Please take care that, even if correctly programmed, it will not be recognized by EZGPIB.  :(

Sorry, got confused earlier: indeed EZGPIB does not seem to work using this particular 'Leonardo' Arduino.
I have patched the EZGPIB to skip the CTS check. No luck.

Wilko
Title: Re: AR488 Arduino-based GPIB adapter
Post by: eliocor on February 12, 2021, 03:46:04 pm
It seems no one who reads this thread is also the owner of an original Prologix USB interface. In a previous post https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3212484/#msg3212484 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3212484/#msg3212484) I asked for the output results (debug) when EZGPIB starts, but with no avail.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on February 12, 2021, 04:01:35 pm
Unfortunately I cannot help you there. The other AR488 which runs with a FTDI cable
works without complaints on EZGPIB. But you already knew that. 100$ question is what difference
makes EZGPIB not work with the Leonardo

Wilko
Title: Re: AR488 Arduino-based GPIB adapter
Post by: kutte on February 13, 2021, 05:59:11 pm
these Leonardos (e.g. arduino pro micro) use a so called CDC USB-interface that does not provide a CTS signal.
So no joy, sorry for that Kutte
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on February 13, 2021, 06:04:50 pm
these Leonardos (e.g. arduino pro micro) use a so called CDC USB-interface that does not provide a CTS signal.
So no joy, sorry for that Kutte

Hm, but a patched EZGPIB (i.e. should no longer care about CTS) also does not work. 🤔

But I have two working AR488 with FTDI cables that work just fine so I am happy 👍🏻😁😁

Wilko
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 14, 2021, 06:34:48 pm

Unfortunately selecting a custom layout by #define AR488_CUSTOM results in a compile error for the serial port  ::)

Like so:
215:46: error: cannot convert 'Serial_*' to 'HardwareSerial*' in initialization

   HardwareSerial *arSerial = &(AR_SERIAL_PORT);


Right... when programmed with the 'stock'  AR488 code and with AR488_CUSTOM left undefined it does work with the HP3478A.exe tool.  It now happily reads data from the HP meter.

Sofar so good.

Wilko

As has already been mentioned, on 32u4 based boards, a CDC (emulated) serial port is used rather than a hardware port. Therefore, if the custom layout is used with a board that uses a USB CDC serial port, then under #ifdef AR488_CUSTOM section (starting line 32),  the line #define AR_HW_SERIAL needs to be commented out and #AR_CDC_SERIAL needs to be uncommented.

Having said that, as you have discovered, the board in the photo is a "standard" Micro Pro clone and works without resorting to the custom layout. The board option to select for these within the IDE is 'Arduino Micro'.

It seems no one who reads this thread is also the owner of an original Prologix USB interface. In a previous post https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3212484/#msg3212484 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3212484/#msg3212484) I asked for the output results (debug) when EZGPIB starts, but with no avail.

That would certainly be useful if someone reading this has a Prologix interface.

Hm, but a patched EZGPIB (i.e. should no longer care about CTS) also does not work. 🤔

But I have two working AR488 with FTDI cables that work just fine so I am happy 👍🏻😁😁

Wilko

I investigated this somewhat a while back and the issue is, I beleive, one of timing. It is similar to the problem with the CH340 chip where the board reboots when you make a serial connection and there is a delay while the bootloader and then the sketch is re-loaded. Because there is no hardware RTS/CTS handshaking, EZGPIB has "moved on" and completed auto-detection before the re-boot cycle is complete and it fails as a result. With CDC Serial, the delay is not caused by a reboot, but I think ocurrs while serial emulation kicks in and the port is made available. By this time EZGPIB has checked for a resonse and having not received one, fails the autodetect. In my tests I simply saw a null response from the Arduino in response to the ++ver command. While for boards with the CH340 chip there is a hack to prevent the re-boot which solves the delay problem, the same cannot be applied to an emulated serial port. EZGPIB would need to wait until the serial port is ready or at least re-try after a short delay before attempting to read it. I need to do further research, but from what I have discovered so far, Arduino has no method to send the CTS signal over a CDC USB connection.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: l3VGV on February 16, 2021, 01:09:01 am
Im trying to make pro micro to work, with no success.

Board is same as in wkb post
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1172536;image (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1172536;image)

First i tried to flash hex file AR488.micro.32u4.hex, no luck
Code: [Select]
avrdude: erasing chip
avrdude: reading input file "C:\1\AR488.micro.32u4.hex"
avrdude: writing flash (32730 bytes):

Writing | ################################################## | 100% 2.92s

avrdude: 32730 bytes of flash written
avrdude: verifying flash memory against C:\1\AR488.micro.32u4.hex:
avrdude: load data flash data from input file C:\1\AR488.micro.32u4.hex:
avrdude: input file C:\1\AR488.micro.32u4.hex contains 32730 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.87s

[b]avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x70ff
         0x9a != 0x98
avrdude: verification error; content mismatch[/b]

Dont know how to change efuse for brownout on pro micro without external programmers. Builtin one cant do it it seems.

Well, it in device manager as com14(or Arduino MICRO on my laptop), but if i use putty there is no response. Two LED is always on, one blink if i write to terminal(one close to pin labeled 7).

***

second attempt was to flash board from Arduino IDE. Board option is set to "Arduino/Genuino Micro"
Just unziped, changed Board option and upload, no changes made in sources.
No errors.
Code: [Select]
avrdude: reading input file "AR488.ino.hex"
avrdude: writing flash (19714 bytes):

Writing | ################################################## | 100% 1.72s

avrdude: 19714 bytes of flash written
avrdude: verifying flash memory against AR488.ino.hex:
avrdude: load data flash data from input file AR488.ino.hex:
avrdude: input file AR488.ino.hex contains 19714 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.38s

avrdude: verifying ...
avrdude: 19714 bytes of flash verified

avrdude done.  Thank you.

But putty do not get any response from board anyway. LED is blinking if i type.

Board is connect to USB, is it supported or with pro micro usb-ttl adapter have to be used?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: eliocor on February 16, 2021, 01:22:25 am
if you are using the arduino IDE to compile the software you have to choose board type: [Arduino Leonardo]
Title: Re: AR488 Arduino-based GPIB adapter
Post by: l3VGV on February 16, 2021, 07:54:36 am
Ok, done that.
Firmware HEX size exactly the same.
Device ID and com number changed, both LED is normally OFF, and one blink while i type into terminal. But no reply from it anyway.  :scared:

Pins like A2, A0, D3 etc always high, is it supposed to be like that? No reaction on terminal on any of them. Always 1.

Made simple sketch that toggle all pins 1 and 0, works fine.



Flashed board back to arduino micro.

Now if i connect to board with putty while it in bootloader mode, terminal works fine, can see characters.



*
Ok, bought one more board. That new one somewhat working. I can get atleast some replies from my 34401. What wrong with previous one, no idea. Bad china fake?


putty
Quote
> *IDN?

    > ++read

    HEWLETT-PACKARD,34401A,0,5-1-1
                                  gpibReadByte: timeout waiting for DAV to go LOW
Bytes read: 32
Timeout waiting for sender!

    > MEAS:VOLT:AC?
    > ++read

    +1.47722700E-03
                   gpibReadByte: timeout waiting for DAV to go LOW

    Bytes read: 17
    Timeout waiting for sender!

Can see no difference with "Leonardo" or "Micro" board option in IDE, except that leonardo status LEDs always off and turn on when indicating typing and replies, and Micro is inverted - always on, and turn off.


**

Construction.

Connector is Connfly CENB-24M (DS1039 24ML0), Centronic-24
Case Connfly DPT-25C (DS1045-25 AP1L)

It almost perfect fit.  Well, almost. Ok to begin with.
See pictures.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 18, 2021, 10:18:01 am
My initial thought was to increase the value of ++read_tmo_ms, although that does not seem to be the issue here as the read process appears to have been completed. The other possible explanation is that the interface has not received the expected termination characters and assumes there is more data to come but the instrument is not sending any, therefore the read process times out. Looking at the HP34401 manual, the termination character over IEEE488 is just <nl>. By default the interface looks for CR+LF. You could try setting ++eor 2 which will check for LF (<nl>) only.

With regards to the first board, GPIB signals are HIGH when un-asserted and LOW when asserted. In controller mode (++mode 1) REN is asserted and therefore LOW, but in device mode (++mode 0) it is set to INPUT_PULLUP and therefore HIGH, expecting the controller to pull it low. On the other hand, A0 and A2 are mapped to data lines DIO1 and DIO3. The line state would be LOW to indicate that a bit is set but HIGH when the bus is idle. Therefore A0 and A2 being HIGH when the interface is idle would be normal. I am not sure why the serial port did not work.

The binary image is compiled with bootloader included and enables the USB CDC serial port by default at 115,200 baud, although with CDC ports the speed should be irrelevant. I had thought to include these binary images as a courtesy, but using the IDE and compiling from source is the recommended method.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: l3VGV on February 18, 2021, 12:30:54 pm
My initial thought was to increase the value of ++read_tmo_ms, although that does not seem to be the issue here as the read process appears to have been completed. The other possible explanation is that the interface has not received the expected termination characters and assumes there is more data to come but the instrument is not sending any, therefore the read process times out. Looking at the HP34401 manual, the termination character over IEEE488 is just <nl>. By default the interface looks for CR+LF. You could try setting ++eor 2 which will check for LF (<nl>) only.


"++eor 2" did the trick for 34401. Sorry for the fuss. I have two instruments with GPIB right now, hp 34401 and escort edm-3150, escort works totally fine without any adjustments. And with my little knowledge of GPIB, wrong assumptions were made.

GPIB seems to be complex and each vendor do whatever. (after alot of googling, YouTube kicked in with that recommendation https://www.youtube.com/watch?v=MH-srU3bPmU (https://www.youtube.com/watch?v=MH-srU3bPmU) )


Quote
> ++eor 2

Set EOR to: 2

> *IDN?

> ++read

HEWLETT-PACKARD,34401A,0,5-1-1
                              Bytes read: 31

>



With regards to the first board, GPIB signals are HIGH when un-asserted and LOW when asserted. In controller mode (++mode 1) REN is asserted and therefore LOW, but in device mode (++mode 0) it is set to INPUT_PULLUP and therefore HIGH, expecting the controller to pull it low. On the other hand, A0 and A2 are mapped to data lines DIO1 and DIO3. The line state would be LOW to indicate that a bit is set but HIGH when the bus is idle. Therefore A0 and A2 being HIGH when the interface is idle would be normal. I am not sure why the serial port did not work.

Current hypothesis - board was damaged by me :-[ Its winter here, very cold and alot of static(i like wool sweaters).
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 19, 2021, 03:57:26 pm
Glad that got it sorted.

You are correct that each device/vendor do their own thing. GPIB, like Ethernet or WiFi provides the connectivity, but its up to the application to interpret and send the correct instrument data. After all, each instrument has its own characteristics and they do vary wildly. A DMM is a very different thing from a Spectrum analyser or signal generator so each will have their own peculiar set of commands and data formats.

It is always possible to damage a part on a board by static discharge and its a bit of a "Russian routlette" as to whether it actually happens or not if one does not take precautions. Of course Russian winters are much colder than ours here in the UK, so I expect more wool required....
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Hydron on February 21, 2021, 11:15:02 pm
Just got my first GPIB instrument (Keithley 236), and found this project which looks like the perfect way to get basic connectivity (enough to access the GPIB-only cal routine, do some light datalogging etc) without spending the earth.

I am going to use artag's compact design as I just need the one instrument connected and want to avoid extra cables, and was wondering if anyone had a spare adapter PCB (this one: https://oshpark.com/shared_projects/HrS1HLSE) they could chuck in an envelope to send me if I pay postage? Mainly asking to avoid an order of 3/5/10 pcs when I only need one, given others likely already did that and have spares. No worries if nobody is keen, will just get it from OSHPark or in my next Chinese board order. Would be to London, UK, and I'm not in any particular rush.

Finally thanks to everyone who has worked on this project - looks like it'll make the GPIB interfacing task much easier than I expected, and for under 20 quid at that!

Edit: eliocor has offered to send a board, as per his earlier post that I missed on page 24 - cheers!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Sprock on February 22, 2021, 10:12:06 am
Hi there
in request from eliocor here the Prologix Print out.
May bee in wrong thread. So please excuse.

best regards
sprock
Title: Re: AR488 Arduino-based GPIB adapter
Post by: eliocor on February 22, 2021, 11:31:40 am
Tanks a lot!
Now I will try to identify in the disassembled code the different steps when an AR488 (micro pro) is connected.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: AtlanticSurfer on February 23, 2021, 03:41:16 pm
First of all, kudos to all the members contributing to this project and to WaveyDipole in particular, your detailed responses to questions and the thoroughness of the manual let alone the firmware itself are remarkable.   Thank you Artag for the board and code for it, it seems very popular – hope I can get it working.  I’d like to congratulate maxwell3e10 on the creation of the wireless contraption – I like that 😊.

I subscribed to this post March 2019 and finally decided to give building one a go – I have very little experience with this kind of stuff.  I’ve assembled one but testing has not gone as I’d wished so I’m hoping for some help to get over the line.

I’ve been using an Agilent interface and Agilent software and am pretty clueless when it comes to Prologix/NI.  My goal is to have this interface work with Test Controller software being developed by eevblog member HKJ (Blog Topic: Program that can log from many multimeters.) but at the moment I’m unable to communicate with my 34401a’s, they just time out.  I don’t know if there is something wrong with my interface or if I’m not getting the syntax of commands correct or if the serial connection setup needs modified - serial vs emulated vs virtual vs socket connection - this stuff baffles me.

Could someone suggest some (syntactically correct) commands that I could type into the Arduino IDE serial monitor or into PuTTY to check for a response?  The device responds to ++ver & ++addr but if I try *idn? It just times out.

Do I need to adjust any of the default parameters?  Further detail below.


Firmware: AR488 GPIB controller, ver. 0.49.12, 11/01/2021
MCU: Pro Micro, 32u4, 5V 16MHz (tested via raw).

With MCU mounted on Artag V3 PCB continuity tests indicate the MCU pin arrangement matches the arrangement detailed in the AR488 manual for the Micro (not Leonardo) except that GPIB pin 12 connects with PCB shield pad (but not MCU ground) and that MCU ground is connected to GPIB pin 24 in addition to all the other ground pins. Jumper wire fixed between PCB ground pad and connector shield in absence of screw.

Board selected in Arduino IDE is Arduino Micro (also tried using Arduino Leonardo). Config.h & firmware has not been modified – all default.  When MCU was fresh out of the packet and connected to the Arduino IDE the default board was Arduino Leonardo.

HP3478a control utility seems to work as it should with the 3478a.  Trying to connect to a 34401a with this utility results in the 34401a going into remote mode – this is the only evidence of communication between controller and 34401a I can get.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 23, 2021, 05:48:21 pm
Thank you for the comprehensive screenshot and information.

It looks like the 3478A program is doing some magic to automatically detect the GPIB address of the 3478A and has evidently identified it on GPIB address 6. However, looking at the AR488 Config output on the right hand side, it doesn't look like the interface has been given the GPIB address of the 34401A prior to sending commands to it - unless of course the 34401A happens to be set to address 1? Looking at the 34401A User manual (page 161), the factory setting is address 22, although it can be set anywhere between 1 and 30 so long as it doesn't clash with another instrument.

Probably best to check what GPIB address is configured on your 34401A and then issue a:

++addr nn

to address the instrument, where nn is the GPIB address of the 34401A before sending any commands to it. If the address has previously not been changed then chances are that it is still at factory settings so:

++addr 22
*idn?

should elicit a response from the meter.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: AtlanticSurfer on February 23, 2021, 07:17:46 pm
Thank you much Wavey, that's what I needed to know. :-DD
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 23, 2021, 08:44:54 pm
Great! Glad that's sorted it.  :-+
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Miti on February 23, 2021, 09:30:32 pm
Thank you much Wavey, that's what I needed to know. :-DD

@AtlanticSurfer  Can I ask what application is this in your attachment?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Miti on February 23, 2021, 09:57:16 pm
Even though I have quite a collection of GPIB adapters, you can never have enough, so I've heard, so I couldn't resist and I had to make another one.
A big thank you to WaveyDipole, Artag and Jay_Diddy_B for sending me a PCB.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: AtlanticSurfer on February 23, 2021, 11:10:31 pm
Miti - I can't remember how or where I came across that perhaps someone else knows but here's a link to it.

It's an executable in an encrypted zip, password is AR488utility.  If you uncheck the "Transfer with Mega" slide switch you should gat a simple download (i hope)

https://mega.nz/file/4ERjzAZK#i7ftiLU8j37xqheS_pOUeO4aOFm38676KiBDONivG3U (https://mega.nz/file/4ERjzAZK#i7ftiLU8j37xqheS_pOUeO4aOFm38676KiBDONivG3U)

Title: Re: AR488 Arduino-based GPIB adapter
Post by: Miti on February 23, 2021, 11:27:11 pm
It worked, thanks!

Cheers,
Miti
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 24, 2021, 04:33:02 pm
It was created by and mentioned earlier in the thread by Nx-1997:

https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3431088/#msg3431088 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3431088/#msg3431088)

He also has another tool called LiveGraph. See a couple of posts below the one in the link.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: dl6lr on February 24, 2021, 08:53:22 pm
I have created a 3d printed enclosure for the adapter with a pro micro.
See https://www.thingiverse.com/thing:4776409 (https://www.thingiverse.com/thing:4776409)for details and all files.

Edit: Fixed URL after re-publish to Thingiverse
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on February 28, 2021, 12:57:03 am
Hi,

I am struggling with a VB .net application.

I have built an AR488 using a Pro Micro 32U4 on Artag's PCB. It works fine with most applications.

I am having trouble with System.IO.Ports in Visual Studio. It seems to want the serial port operating at a standard baud rate. It seems to have difficulty with the virtual serial port on the Pro Micro.

I tried the AR488 software on a Arduino Uno and I can transmit and receive the ++ver command and the response. This works if I set the baud rate to 115200.

Anybody seen this?

Any solutions?

Thanks!!

Jay_Diddy_B
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on February 28, 2021, 01:35:40 pm
I have created a 3d printed enclosure for the adapter with a pro micro.
See https://www.thingiverse.com/thing:4774570 (https://www.thingiverse.com/thing:4774570) for details and all files.

Nice ! I like the way is screws together.

Could you make a version with less height ? I have usually built them with no socket for the 32u4 board, so there's only 3mm between boards or 13mm from the 24 pin socket flange to the top of the USB socket housing.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: dl6lr on February 28, 2021, 09:34:05 pm
I have created a 3d printed enclosure for the adapter with a pro micro.
See https://www.thingiverse.com/thing:4774570 (https://www.thingiverse.com/thing:4774570) for details and all files.

Nice ! I like the way is screws together.

Could you make a version with less height ? I have usually built them with no socket for the 32u4 board, so there's only 3mm between boards or 13mm from the 24 pin socket flange to the top of the USB socket housing.

If you look closely on Thingiverse, there is already such a version (which is only slightly less in height as the screw is then above the board). I haven't tested it yet, but I will.
Unfortunately a version with the UNC(?) screws toi secure it to a device are only possible with the higher version and you have no possibility to use it without a screw driver, as it must be countersunk so tht the USB-Micro-plug can be attached afterwards. Still unsure if I should make such a version (I have no such screws available here).

Unfortunately Thingiverse has some problems and the original upload got corrupt, so I reuploaded it to https://www.thingiverse.com/thing:4776409 (https://www.thingiverse.com/thing:4776409)

Artag, if you want some for tests, I can send them to you if you don't have access to a makerspace with a printer.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: AtlanticSurfer on February 28, 2021, 11:26:35 pm
dl6lr, the enclosure transfers all the mechanical forces to the metal shell without the connector pins being stressed and it protects the USB port.  It doesn’t require many additional parts – looks like just a fastener and a couple of 12 pin headers.  It protects all the contacts from being shorted  - and looks neat and there's no messing around with glue - good job!

Edit: forgot to mention about the MCU being removable - bonus!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 01, 2021, 11:17:29 am
I am having trouble with System.IO.Ports in Visual Studio. It seems to want the serial port operating at a standard baud rate. It seems to have difficulty with the virtual serial port on the Pro Micro.

I tried the AR488 software on a Arduino Uno and I can transmit and receive the ++ver command and the response. This works if I set the baud rate to 115200.

An interesting observation but 115200 is a standard baud rate. If Visual Studio cannot handle that speed, you could always try 57600 or 38400. Also set #define AR_SERIAL_BAUD to the same in AR488_Config.h.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: dl6lr on March 01, 2021, 04:06:10 pm
I am having trouble with System.IO.Ports in Visual Studio. It seems to want the serial port operating at a standard baud rate. It seems to have difficulty with the virtual serial port on the Pro Micro.

I tried the AR488 software on a Arduino Uno and I can transmit and receive the ++ver command and the response. This works if I set the baud rate to 115200.

An interesting observation but 115200 is a standard baud rate. If Visual Studio cannot handle that speed, you could always try 57600 or 38400. Also set #define AR_SERIAL_BAUD to the same in AR488_Config.h.

If I remember correctly, the System.IO.Ports.SerialPort opens and operates the port in default configuration of the OS, unless told otherwise. Normally the Windows ports are set to something like 9600,8,N,1. So you have to set the properties of BaudRate etc. before opening the port, or you could just change the default port configuration of the OS in the device manager.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on March 01, 2021, 04:21:02 pm
Hi,

I don't know the problem is. Here is a picture of my two adapters:

[attachimg=1]
(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1184454;image)

The one on the right is the Artag PCB with a Pro Micro attached. The one on the left has a Arduino Nano attached by a bunch of wires. The one on the left which uses the CH340C interface chip works fine with Visual Studio at 115200 baud. The Pro Micro doesn't work with Visual Studio at any baud rate. It will work with other programs.

Jay_Diddy_B

Title: Re: AR488 Arduino-based GPIB adapter
Post by: Nx-1997 on March 01, 2021, 08:38:41 pm
Here is a simple script for C#, I can connect to the pro micro version without any issues. Make sure that the request to send property is enabled.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on March 02, 2021, 09:50:58 am
Here is a simple script for C#, I can connect to the pro micro version without any issues. Make sure that the request to send property is enabled.

Hi group,

Nx-1997 nailed the issue. It was the RTS line parameter. I had a mental blockage. I thought that if I set the handshaking to none, the RTS line would not be used.

Here are some parts of the code:

[attachimg=1]
(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1184832;image)


And the main part:

[attachimg=2]
(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1184836;image)

This includes a quick and dirty delay to allow the AR488 to respond and fill the serial port input buffer.

The result:

[attachimg=3]
(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1184840;image)

The program sends ++ver and displays the response in a textbox.

Thanks again!!

Jay_Diddy_B
Title: Re: AR488 Arduino-based GPIB adapter
Post by: l3VGV on March 03, 2021, 02:25:41 pm
Just in case, here is a nice python ar488 example
https://github.com/gkeeth/python-AR488-USB-GPIB/blob/master/ar488.py
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mcj7247 on March 04, 2021, 01:19:27 am
First a big thank you to WavyDipole who was a huge help. I was able to connect the AR488 and an Arduino Pro Mini w/FTDI to my HP3478A and was also able to connect to the HP3478A Control Software App to download my calibration constants and a cal file. It wasn't without a little drama along the way however. In the middle of my GPIB adapter setup my meter front panel buttons decided to stop working properly. After a few deep breaths and a few emails to WavyDipole we confirmed that the meter was still alive and I was able to troubleshoot and fix a bad connection between the main pcb and the front panel button matrix pcb. All front panel buttons started working fine again....just an evil coincidence and disaster averted. I edited the 488 config file to use the custom layout for the Pro Mini that was previously mentioned by another poster (wkr?). I was able to connect to my meter and all the AR488 commands worked fine. My real need was to have a calibration backup plan for replacing my memory battery and the old capacitors. Initially I tried to use the newest version (04-18-20) of the HP3478A control software but it would lockup when ever I tried to edit or read the cal data. Eventually I tried an older version HP3478AGainCheck (01-18-20) and was able to download a cal file that WavyDipole confirmed was valid. I also was able to view and write down the constants from the edit cal window. I haven't tried to write the cal data back to the meter and still have yet to replace the battery and caps. But a big thank you again to WavyDipole for helping me out and for developing and sharing such a helpful tool.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: AtlanticSurfer on March 08, 2021, 03:34:27 pm

Here’s how my builds look in the end..

[attach=1]
Title: Re: AR488 Arduino-based GPIB adapter
Post by: geshka on March 31, 2021, 03:07:09 pm
Team.

I am having troubles communicating with this adapter to my Agilent E3631a power supply.  I've  made GPIB-USB on Arduino UNO with all connections as per manual.  I can communicate with Arduino itself and set parameters with ++ commands, I've set address of the device to the controller, hovewer attempt to talk to device is unsuccessfull.  I verified all connections and it seems to be fine....  |O

What would be  troubleshooting steps?   any suggestions ? Thanks.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: eliocor on March 31, 2021, 04:00:02 pm
@geshka: if you can communicate with the arduino (++ commands),
you have to double check your wiring between the arduino and the Cannon (IEEE 488) connector.
The culprit is there!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 31, 2021, 06:39:26 pm
Just to be sure, go over and verify the wiring including ground connections. Make sure that the GPIB interface is selected on the instrument. Apparently you can enable only one at a time, either RS232 or GPIB. Make sure its not set to RS232.

If that does not resolve it, then do you have a logic analyser?
You can probably check the state of individual lines (e.g. ATN should go low when a command is issued) with a DMM, but an LA would make things much easier.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: geshka on March 31, 2021, 06:45:03 pm
Still no luck.  Verified connector for several times, made sure it is indeed GPIB port and right address... I don't have logic analyzer unfortunately, but can watch individual signals with the scope.  I just checked  ATN -  it gos low with every command issued
Title: Re: AR488 Arduino-based GPIB adapter
Post by: serg-el on March 31, 2021, 07:01:36 pm
Don't forget - the pin numbering is different for the GPIB and for the connector!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: geshka on March 31, 2021, 08:21:30 pm
I am checking pinout and connection diagram from github pdf and verifing with original post from Emanuele blog....  Something fundamentally stupid  :palm: 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on March 31, 2021, 09:07:11 pm
mirrored?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 01, 2021, 09:49:51 am
You could try turning on ++verbose. The messages might give a clue.
I don't suppose you have another instrument with a GPIB connector to try?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: geshka on April 01, 2021, 01:05:03 pm
Here is output with ++verbose turned on and precompiled several debugs

> *idn?

Set GPIB lines for sending a command
gpibWriteByte: timeout waiting for data to be accepted - [NRFD asserted]
gpibSendCmd: failed to send command 3F to device
gpibSendData: failed to address device 5 to listen


> ++read


Set GPIB lines for sending a command
gpibWriteByte: timeout waiting for data to be accepted - [NRFD asserted]
gpibSendCmd: failed to send command 3F to device
Failed to address the device5 to talk
Set GPIB lines for reading data
gpibReceiveData: Start listen ->
Before loop flags:
TRNb: 0
rEOI: 0
ATN:  0
gpibReadByte: timeout waiting DAV to go HIGH
0
After loop flags:
ATN: 0
TMO:  2
Bytes read: 1
Timeout waiting for transfer to complete!
Set GPIB lines for sending a command
gpibWriteByte: timeout waiting for data to be accepted - [NRFD asserted]
gpibSendCmd: failed to send command 3F to device
gpibSendData: Failed to untalk busSet GPIB lines to idle state
<- End listen.

 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 03, 2021, 07:30:26 pm
Thank you for your output with verbose and debugs turned on. It seems the device is failing to respond to the very first byte of data being sent to it. We haven't even got as far as addressing the instrument.

You did confirm earlier that ATN was being pulled low. From the output we see a timeout has occurred when sending the NRFD signal during the handshake while sending the first byte. From the preceding steps in the handshake process we can surmise that NDAC was low, indicating the device was at attention and NRFD was high, indicating that the device was ready to receive data. The AR488 interface then placed the first byte (3F) on the bus and asserted DAV (data available). However, the instrument does not respond by asserting NRFD to indicate that it has accepted the data.

Since you said that you checked the wiring several times, one would have to presume that it wasn't mirrored as wkd suggested, i.e looked at from the opposite perspective, and that all wiring, including ground was correct. In which case, the instrument is either not detecting the DAV signal, or else not replying to it to say has read the first byte (3F) from the GPIB bus. This might suggest that the GPIB interface on the instrument may be faulty or simply not ready to receive data for some reason. Trying the AR488 on another instrument would confirm or rule out the GPIB hardware on the instrument side of things.

You can also try the ++xdiag command as described at the very end of the manual, without the interface being connected to the instrument. This allows the status of each signal to be set and flipped to confirm that the GPIO pin is working correctly. Bear in mind that the effect of the command lasts about 10 seconds before the line state reverts to the interface default. Its a bit tedious to do with a DMM, but it would prove whether all the GPIO pins on the Uno are working as expected.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on May 10, 2021, 01:28:07 pm
Looks very cool! I'd love to use a similar program for HP3457A. Since it requires extra commands to read 7th digit, one is often forced to use a program instead of simply getting readings from the meter.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on May 12, 2021, 04:01:50 pm
There's a sigrok driver for the 3457A - have you tried it ?
I'd be interested to know whether it's useful, as I maintain the 34401A version.

The sigrok display utilities are more aimed at continuous datalogging rather than presenting the full feature set as  NX-1997's utility does. But if the sigrok drivers could be used to extend the capacity of the utility it might be useful for a much wider selection of meters.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Miti on May 13, 2021, 12:42:29 am
Hi, I created the ultimate HP 3478A control and data logging software for the ar488 adapter. It has everything that you can ask for. Measurement Graph, math waveforms, statistics, histogram, etc. Works with Windows 10, 8, 7.
If you have a HP 3478A then please, try it and give me feedback. I will be creating similar software for 34401A, 3457A, 3456A.

Hi Nx-1997,

Nice program but there are some issues with the buttons. Please see attached.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Miti on May 13, 2021, 03:07:01 am
Ok, the buttons are ok now but in the Config window if I click on ++ver button, it refuses to connect to the instrument after that. I don't know what settings it changed in the AR488, I reprogrammed it and it connected again.

Edit: Also, if I may suggest, take a look at these two projects:
https://www.eevblog.com/forum/projects/project-extending-hp3478a-functionality/ (https://www.eevblog.com/forum/projects/project-extending-hp3478a-functionality/)
https://www.eevblog.com/forum/testgear/free-hp3478a-multimeter-control-program/msg2136739/#msg2136739 (https://www.eevblog.com/forum/testgear/free-hp3478a-multimeter-control-program/msg2136739/#msg2136739)

Lmester's program works with both, AR488 and Kirill's adapter. I think would be just a matter of accepting a different string to ++ver command to make your program work with Kirill's adapter.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Nx-1997 on May 13, 2021, 03:20:18 am
Only the ++addr command is used to change the address, everything else is default. If you have a pro micro version then just click the ++rst button, it will reset the controller back to default settings. Probably better to have one controller per instrument.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Miti on May 13, 2021, 03:27:15 am
I tried ++rst but it didn’t work for me. Also, it didn’t work with Luke’s program either. I had to reprogram it to start working again.
Yes, I use Pro Micro.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wkb on May 13, 2021, 09:35:59 am
I played with the software briefly yesterday evening and limited testing showed it works nicely for me.

Do have a question though: did I overlook something or is there currently no way to save settings?  That would be neat to have 😀
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Echo88 on May 13, 2021, 03:48:33 pm
Finally came around to testing the AR488-library on my Arduino Mega board connected to a stripped GPIB-cable.
It worked immediately in Controller Mode when communicating with my HP 34401A and also worked in Device Mode when my USB-GPIB-HS spoke to it via Python.
Im thrilled to see it working out of the box directly :-+

Im still a bit overwhelmed by the many commands and therefore have a few questions about the Device Mode (regarding my planned use of the Device Mode with the library: https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3449932/#msg3449932 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3449932/#msg3449932) )

In Device Mode the AR488 isnt capable of responding to a *IDN?-command with an answer, i assume?
It would be nice to actually be able to use DipSwitches to set the address in Device Mode, so one wouldnt need to connect to the Arduino to change the address in software. Will that be integrated into the library in the future?
I assume the Arduino is busy with the AR488-library and so i should use another µC to actually do my rather slow and amateur-programmer stuff like switching relays with its associated delays or is the library not bothered by it due to using interrupts for the time critical response stuff?
How do the LLO/LOC-commands coming from a controller influence the Device Mode actually? I can see the usage, but would expect that the Arduino in Device Mode activate two outputs for LEDs like "Front Panel Disabled" and "Remote Control Active" when seeing those commands?

Sorry for the many questions, i just think that your library could enable many hobbyists to build instruments with GPIB-capability, apart from the usage as a very nice and low cost controller.  :)

Is there a way to donate to you WaveyDipole? Couldnt find a way to do that on Github.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: T3sl4co1l on May 13, 2021, 10:37:57 pm
Putting this here as it's the most recently active thread, and, I think is compatible anyway?

I've made a humble start to my own tooling.  It's more of a script than an app:
https://github.com/T3sl4co1l/tekcap
I.. don't particularly feel like making a windowed version with common dialogs and remote controls and all that, but that's entirely possible for someone to do...  Think the most likely additions I would make, would be querying HARDCopy FORMat and setting default extension from that, or detecting known extensions to set FORMat respectively.  Maybe add some metadata, like echo out current waveform settings or something.  Or just dump through all the IMMediate MEASurements just because, Idunno.

Not sure what I'll do for my other instrument (HP 8590A), it resets configuration when addressed... PITA to use with hybrid controls like this.

Also, it's probably doable with generic / portable library functions, not Windows calls?  Not sure, I took a glance at serial port use and it looks very different in *nix, and I'm not sure simply fopen() has enough configuration settings to get to the same place.  Could write the output file that way, of course.  Anyway, the calls and settings are pretty obvious, not a big deal if porting is needed.

Tim
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on May 14, 2021, 02:26:28 pm
Finally came around to testing the AR488-library on my Arduino Mega board connected to a stripped GPIB-cable.
It worked immediately in Controller Mode when communicating with my HP 34401A and also worked in Device Mode when my USB-GPIB-HS spoke to it via Python.
Im thrilled to see it working out of the box directly :-+

Glad it worked!

In Device Mode the AR488 isnt capable of responding to a *IDN?-command with an answer, i assume?

Since its in device mode, it can't send GPIB commands to query another instrument. However, if you are thinking that as a device it might respond to *idn? from a controller just like an instrument does, then that functionality is not currently implemented but could be added. I will add it to the work log.

It would be nice to actually be able to use DipSwitches to set the address in Device Mode, so one wouldnt need to connect to the Arduino to change the address in software. Will that be integrated into the library in the future?

DIP switches require GPIO pins to detect their state and we don't have any spare on the smaller boards such as the Uno, Nano and Micro/Leonardo, but on the Mega that functionality could perhaps be added. I am also working on another development that might make it possible to implement DIP switches on the smaller boards as well. Another one for the work log.

I assume the Arduino is busy with the AR488-library and so i should use another µC to actually do my rather slow and amateur-programmer stuff like switching relays with its associated delays or is the library not bothered by it due to using interrupts for the time critical response stuff?

Obviously the more the microprocessor has to service the more processing cycles will be used which will impact on performance. I don't think switching a handful of GPIO pins and reading a response would be terribly onerous, particularly on a Mega 2560 which has better performance than a Nano, Uno or Micro Pro. Having said that, it is possible to link two Arduino boards via SPI, I2C or Serial and appropriate signalling could be implemented to have the second board respond to specific GPIB commands. That would allow one board to run the GPIB bus and the other to service the device hardware (relays etc) without one impacting much on the other.

Using interrupts on the Arduino does not seem as beneficial for controlling program flow as initially imagined. The interrupt service routine needs to be simple and fast, ie. set a variable which is then processed next time around the loop. The response is quicker in that the variable is set immediately the interrupt triggers, but one still has to wait for the next iteration of the loop before being able to process that variable and take the appropriate action. I am beginning to think that it would probably probably be easier and just as fast to check the state of the required pin as and when required during the process loop.

How do the LLO/LOC-commands coming from a controller influence the Device Mode actually? I can see the usage, but would expect that the Arduino in Device Mode activate two outputs for LEDs like "Front Panel Disabled" and "Remote Control Active" when seeing those commands?

Again, not currently implemented but could easily be done.

Sorry for the many questions, i just think that your library could enable many hobbyists to build instruments with GPIB-capability, apart from the usage as a very nice and low cost controller.  :)

Is there a way to donate to you WaveyDipole? Couldnt find a way to do that on Github.

I am happy to answer any questions and thank you for the ideas.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on May 14, 2021, 06:45:50 pm
Nx-1997 and T3sl4co1l, thank you for your software contributions.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mmcgraw74 on June 01, 2021, 12:35:44 pm
@WaveyDipole:

Your Twilight-Logic/AR488_Store repository is down or removed?

Should I continue to use your AR488 program to work on the Tektronix 4924 Emulator?

Thanks!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Vivis on June 02, 2021, 01:30:37 am
Tried posting this in the beginners sections but didn't get a response after a few days so i figured I'd repost here to see if anyone can help.

I have an HP1630D I'm trying to get an inverse assembler on. I've built the AR488 and can get the HP to respond to button press commands and rst, but i can't quite get an assembler to load. Honestly, I'm not even sure I'm sending it right. I've been trying to send the files via coolterm's send text/binary file function. The best I can get out of the 1630 is a CRC error. I have been able to successfully invoke the TC command but have not been able to reload the config that TC generates.

Thanks for any suggestions in advance
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on June 02, 2021, 02:34:22 pm
A 1630 uses HP-IL for mass storage and can probably do the same thing over HP-IB. There are emulators for HP-IB mass storage that are used by various HP computers.

I don't know how much of a project it is, but it might be worthwhile linking AR488 to those emulators so you can have a cheap storage emulator on PC. I think the  existing one uses standard NI or HP bus cards.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on June 03, 2021, 05:05:16 pm
@WaveyDipole:

Your Twilight-Logic/AR488_Store repository is down or removed?

Should I continue to use your AR488 program to work on the Tektronix 4924 Emulator?

Thanks!

That is very strange. Just had a look and it is still there as a private repository and you are still configured as a collaborator. I tried to send you another invitation but the system will not let me because you are already a collaborator.
Maybe its a GitHub glitch?

Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on June 03, 2021, 05:58:06 pm
Tried posting this in the beginners sections but didn't get a response after a few days so i figured I'd repost here to see if anyone can help.

I have an HP1630D I'm trying to get an inverse assembler on. I've built the AR488 and can get the HP to respond to button press commands and rst, but i can't quite get an assembler to load. Honestly, I'm not even sure I'm sending it right. I've been trying to send the files via coolterm's send text/binary file function. The best I can get out of the 1630 is a CRC error. I have been able to successfully invoke the TC command but have not been able to reload the config that TC generates.

Thanks for any suggestions in advance

Is it a text file or a binary file? How long is the file?

Arduinos have a very small serial buffer and there is no handshaking control. This is OK for short commands or one liners of a few bytes, but if a large amount of text or data is being sent in one go, then the process might be running into buffer overflows which would cause data to be lost and hence possibly the CRC errors. If the file is binary code, certain files bytes (e.g. CR [0x0D], LF [0x0A] and ESC [0x1B]) would need to be escaped. It might help to send one line or a chunk of no more than, say, 64 - 128 bytes at a time and have a short delay of a few milliseconds in between which could be done using a script.


Title: Re: AR488 Arduino-based GPIB adapter
Post by: mmcgraw74 on June 03, 2021, 06:05:39 pm
@WaveyDipole:

Your Twilight-Logic/AR488_Store repository is down or removed?

Should I continue to use your AR488 program to work on the Tektronix 4924 Emulator?

Thanks!

That is very strange. Just had a look and it is still there as a private repository and you are still configured as a collaborator. I tried to send you another invitation but the system will not let me because you are already a collaborator.
Maybe its a GitHub glitch?

I figured it out - I am using a replacement laptop, so I had to re-authenticate to github and log back in to access the AR488-Store and download it to this laptop.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Vivis on June 04, 2021, 12:08:51 am
The file is binary and just under 5149 bytes with the escapes added. I will try sending shorter pieces and if that works, whip up a python script to both escape the necessary chars and send it in manageable chunks. 
Thanks for a place to start!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Vivis on June 04, 2021, 01:42:52 am
It might help to send one line or a chunk of no more than, say, 64 - 128 bytes at a time and have a short delay of a few milliseconds in between which could be done using a script.

No Dice-- when i manually send data, as soon as it hits 128 bytes in size (no matter if i send in 32, 64 or 128 byte chunks), I always get flashing "WARNING Awaiting HP-IB transfer".
When I send ++read, I get "Bytes read:1 gpibReadByte: timeout waiting for DAV to go LOW" in return and a repeat of "WARNING Awaiting HP-IB transfer" on the analyzer. Tried changing the timeout to the max 32000 and it still doesn't work
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on June 05, 2021, 04:19:57 pm
Thank you for reporting back. The delay needs to be shorter than the timeout so that the controller does not drop out of the send loop.  and and subsequent transmission will be viewed as a new chunk of information. It sounds like "WARNING Awaiting HP-IB transfer" is the HP1603D's way of saying that it was expecting more data. Since the transmission was no complete and the instrument is still waiting, it is not yet ready to send anything back, hence no response to the expected handshake when attempting to ++read.

I had a thought to implement XON/XOFF to provide at least some kind of handshaking. Software handshaking is not ideal, but it is still supported by most terminal programs. Otherwise there would be a need to implement some custom form of software handshaking. I will do some experimenting and testing to determine what can be accomplished.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on June 06, 2021, 12:02:05 pm
It may be possible to avoid this on the 32u4 version by relying on the USB handshake, which I think will stall the transfer until bytes are read from / written to the UART buffer.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Vivis on June 06, 2021, 09:06:39 pm
I'll give it a try with my Leonardo and see what happens.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Vivis on June 07, 2021, 04:55:59 am
Ok, got a config and 2 separate IA's to load at this point, so I think it's all set.
I did not end up trying the Leonardo due to getting the nano to work.
Changed a few things, so I'm not sure if the below config is %100 necessary, but it works for me and will hopefully work for other 1630/1 owners
AR488 config:
eos: 3
eoi: 1
eor: 7
read_tmo_ms: 1200
eot_enable: 0

Make sure to escape 1B first (otherwise you'll have a lot of extra 1B's in your binary file!) then escape 0D, 0A, and 2B

See attachments for Coolterm config:

I think the combo of changing the transmit character delay to 3ms (there was none before) and setting eos to 3 is what did the trick.

Thanks All!


Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on June 07, 2021, 07:08:29 am
Again, thank you for reporting back. Setting EOS to 3 to removes line terminators which is usually a necessary step when sending binary data. Instead, the EOI signal is used to indicate the end of the transmission, which is what you have done. Setting eot_enable to zero is the default setting so probably does not have an effect here unless it was already set to 1 for some reason.

Glad you worked it out in the end. Use of EOI for binary data transmission is covered in the manual but I really should have thought of that. Sorry I missed it.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Vivis on June 07, 2021, 04:56:08 pm
I actually had EOI set to 1 before. I'm taking a guess it was EOS that made the difference.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Nx-1997 on June 11, 2021, 08:58:12 pm
Alright, I finished making GUI software for 34401A, 3457A, 3456A, and 3478A. They will work with Windows 10, 7, 8. I personally tested them on Window 10 and 7.
You can download the software from their GitHub links. Let me know if you encounter any issues.

HP 34401A: https://github.com/Niravk1997/HP-Agilent-Keysight-34401A-Control-and-Data-Logging-Software
HP 3457A: https://github.com/Niravk1997/HP-3457A-Software
HP 3456A: https://github.com/Niravk1997/HP-3456A-Software
HP 3478A: https://github.com/Niravk1997/HP-3478A-Software

HP34401A
(https://raw.githubusercontent.com/Niravk1997/HP-Agilent-Keysight-34401A-Control-and-Data-Logging-Software/main/Images/HP%2034401A%20Main%20Window%20(AR488).gif)

HP3457A (Supports 7.5 Digit mode)
(https://raw.githubusercontent.com/Niravk1997/HP-3457A-Software/main/Images/HP3457A_Main_Window.gif)

My goal is to replace my 82357B GPIB setup. Each instrument will get its own AR488 adapter. No more installing IO suite or NI-Visa. This will take some time to accomplish. :-/O
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on June 13, 2021, 07:00:22 pm
Good to see all those little adapters. That's exactly how I thought they should be used.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on June 14, 2021, 02:32:41 am
Thanks for writing the program for HP3457! I tested it and it looks like there is a lot of useful functionality there!
A few things that didn't seem to work:
Pressing on Graph caused the program to crash every time. It said "could not add data to graph window" and did not open any new window on Windows 7. Table feature works OK.
(minor) Switching gender of speech voice doesn't work

A few things that would be nice to add:
A way to save current configuration, so the meter can be restored to previous state. It can be done using SSTATE and RSTATE commands of HP3457 or the program could keep its own configuration file to keep track of other parameters.

A way to use a scanner card. The simplest step is just add CHAN command. The next feature to implement is SLIST and SADV command. A more complicated feature would allow different types of measurements on different channels, but that comes closer to scripting and would be awkward to add.

Add the cal memory dump feature. There are such programs, but I have yet to find one that works seamlessly with AR488.
https://www.eevblog.com/forum/metrology/dumping-cal-ram-of-a-hp3457a/?all (https://www.eevblog.com/forum/metrology/dumping-cal-ram-of-a-hp3457a/?all)
https://www.eevblog.com/forum/metrology/3458a-logging-via-windows-app-revisited/?all (https://www.eevblog.com/forum/metrology/3458a-logging-via-windows-app-revisited/?all)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Nx-1997 on June 14, 2021, 08:03:29 am
Thanks for the feedback.

I was able to replicate the graph window crashing the program. Net framework 4.7.2 is required, you probably have an older .NET framework installed. I probably should have mentioned this on the GitHub download page, my bad. I included instructions on how to install 4.7.2 framework on Windows 7 if there are any difficulties installing it.

Also, for the speech synthesizer issue, Windows 7 only has the female voice installed. The voice gender options will have no effect on Winnows 7. Microsoft improved the speech synthesizer feature on Windows 10, its much better compared to Windows 7.

Adding a way to save the current configuration might not be easy, this is due to how I wrote this software.

My 3457A does not have the scanner card option, it has the rear terminals option installed. So, I can't really add this feature to the software as I have no way of testing it.

I am working on HP3457A Cal dump utility for AR488, it will be a separate app. The app will only read the cal info, not write it. As I am scared to implement the cal write feature and test it.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on June 14, 2021, 10:08:58 am
Alright, I finished making GUI software for 34401A, 3457A, 3456A, and 3478A. They will work with Windows 10, 7, 8. I personally tested them on Window 10 and 7.
You can download the software from their GitHub links. Let me know if you encounter any issues.

Thank you for posting this. I have downloaded the HP34401A version and since I work on Linux, will test it in Wine when I have some spare time.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on June 14, 2021, 02:20:01 pm
Nx-1997, thanks for quick reply and detailed instructions on .NET installation. Now the graph window opens and it has lots of goodies!

Maybe a general approach to handle commands that are not implemented is just to add a terminal window for direct SCPI commands.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Nx-1997 on June 14, 2021, 04:56:41 pm
For the HP3457A, I updated the software. I added the ability to send custom commands. The users are responsible for any errors shown by the meter due to bad commands. Also, I tested the SSTATE and RSTATE commands. They work but the software keeps track of the measurement settings locally, so if you use SSTATE/RSTATE commands to change the meter's config such as DCV to ACV, the software will not reflect these changes. I am not doing to do anything about that, sorry.

For the HP344401A, I tried running the software on Ubuntu 20.04 LTS using Wine with no success. Every time I try to open the COM Selecting window the software crashes. I think the best bet is to run the software in a windows virtual machine, kind of extreme in my opinion.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on June 17, 2021, 08:07:00 am
So far, I haven't been able to get the program to run at all on Wine. I have the latest version from WineHQ, but there appears to be something missing:

0548:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0)

0548:err:eventlog:ReportEventW L"An unhandled Microsoft .NET Framework exception occurred in HP 34401A.exe [1320]. Just-In-Time debugging this exception failed with the following error: Not implemented.\n\nCheck the documentation index for 'Just-in-time debugging, errors' for more information."

0504:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0)

I am not sure where to find this missing component? Winetricks shows only common-controls 5.80
I am assuming its a 64-bit app? I tried downloading and installing VisualBasic6-KB896559-v1-ENU.exe but that didn't help.

Regarding serial ports, this might be useful:

https://wiki.winehq.org/index.php?title=Wine_User%27s_Guide&oldid=2519#Serial_and_Parallel_Ports

They get mapped in a rather strange manner but you can also map them manually. The command:

ls -l ~/.wine/dosdevices

lets you see what is mapped to where.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on June 19, 2021, 01:06:22 pm
For the HP3457A, I updated the software. I added the ability to send custom commands.
Thanks! I was able to use it now for my current project involving scanning several channels at high resolution and it works well.
A few more suggestions based on the use:
Acquisition:
Add number of samples/second received recently, maybe on the bottom where number of samples is shown, useful for optimizing throughput
Graph window:
Add an option to have x axis in seconds
Add rectangular window zooming. Using right mouse button works, but hard to zoom on region of interest
Maybe add manual axis range choice
Regarding 3457 7th digit:
I saw in the code you check the Range of DMM, perhaps its necessary in some cases, but also slows it down somewhat
When saving to log file, its not necessary always to save different components of the 7th digit.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: maxwell3e10 on July 06, 2021, 02:00:38 am
I am working on HP3457A Cal dump utility for AR488, it will be a separate app. The app will only read the cal info, not write it. As I am scared to implement the cal write feature and test it.
Did you get a chance to finish the cal dump utility for HP3457A?
Thanks
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Nx-1997 on July 06, 2021, 08:39:03 pm
Hi, maxwell3e10

Sorry, I could not reply earlier. I did finish the cal dump utility for HP3457A. The only thing missing is to convert the received data into a proper bin file, I will implement this in the coming few weeks.
Be wary of PEEK 10, PEEK 12 and PEEK 14 those peek values may not return data. You can try it out when you have time.

GitHub Link: https://github.com/Niravk1997/HP3457A-Calibration-Dump-Utility-for-AR488-GPIB-Adapter
GitHub Download Link: https://github.com/Niravk1997/HP3457A-Calibration-Dump-Utility-for-AR488-GPIB-Adapter/releases

Also, as for 3457A's 7th digit range check, the reason why range needs to be checked is due to auto range and is required to calculate the proper number of significant digits. I got this idea from Sigrok's HP3457A source code. Link, see line 309: https://sigrok.org/gitweb/?p=libsigrok.git;a=blob;f=src/hardware/hp-3457a/protocol.c;h=f0197290f3b6d0e4825194335309d8a1a0df8d42;hb=HEAD

I also improved NPLC 100 measurement speed, it should be much faster now. The Rectangular zoom region was already implemented, click and hold the middle mouse button on the graph. Date Time graph has also been added, see if that might be of any use to you.

I included the calibration dump for my HP3457A, old revision address and new revision address.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: softfoot on August 21, 2021, 04:33:47 pm
Hi, I have been using a UNO based interface for a while now using version "ver. 0.48.24, 25/04/2020".

I recently tried to upgrade to "ver. 0.49.14, 02/03/2021" and ran into a problem with the "LON 1" command.

I use the command sequence "++mode 0" "++addr 5" "++lon 1" to capture from a TEK 744A scope.

Under 0.48.24 the firmware returned to command mode at the end of the data stream (due to an EOI?).
However, 0.49.14 doesnt ... it reports seeing an EOI but just sits there reporting a timeout see the attached log file.

I also tried with "++eoi 1" thinking that may bee needed but it made no difference .

Regards,
Dave
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on August 23, 2021, 02:53:05 pm
Thanks for posting and for the log. I will have a look when I get a chance.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: softfoot on August 23, 2021, 05:30:30 pm

Thanks, Actually it seems to be worse than that ... while LON==1 it also ignores all ++ commands.

I also found that the screen dump data passed up via the USB is corrupted ... with teraterm logging in binary mode the data copied to the log file is wrong - it worked beautifully under "ver. 0.48.24, 25/04/2020".

Going back to "ver. 0.48.24, 25/04/2020" for now.

Best regards,
Dave
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on August 24, 2021, 04:18:05 pm
That's odd as I didn't make any changes that ought to impact LON. Still, thanks for reporting it. I will have a look and do some testing.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Nx-1997 on September 06, 2021, 03:47:10 am
I got the Tektronix Hardcopy capture working with the latest firmware, for pro micro adapter. I used ++eor 7, ++eoi 1, ++read_tmo_ms 8000, ++addr GPIB_Address, everything else is default. I tested it with TDS784D and TDS684B. I made an app for it, https://github.com/Niravk1997/Tektronix_TDS_HardCopy_AR488
Mono Hardcopy takes 7.5 seconds while color takes 31 seconds.
Not sure if the app will work with UNO adapter.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on September 20, 2021, 05:25:14 pm
Looks like a very nice app. Unfortunately I don't have one of the supported Tek instruments nor a C# installation to test with with so am not in a position to provide any feedback. It does look like you have a lot of Leonardo's connected there?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: justjason on October 03, 2021, 04:15:15 pm
Is anyone using this project to send data to an actual plotter over GPIB? Looking at the issues on Git https://github.com/Twilight-Logic/AR488/issues/12 (https://github.com/Twilight-Logic/AR488/issues/12) I am not clear about the flow control capabilities when sending large HPGL files that would over flow the buffer without flow control.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: null-a on October 06, 2021, 02:35:19 pm
(Edited to add: The PCBs mentioned below have now all been taken.)

I have a few Pro Micro PCBs left over from a run I did at JLCPCB, using the gerbers from earlier in this thread:

https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3362552/#msg3362552 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3362552/#msg3362552)

If you're in the UK and would like one, message me and I'll happily send you one in the post. (First come, first served, I suppose.)

P.S. This is a lovely project -- thanks to everyone involved!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: leo1984 on November 12, 2021, 05:29:27 pm
I have a potentiostat/galvanostat from EG&G Princeton Applied Research model 263A v2.19, with ieee 488 socket (attached picture). i need to connect it to a modern pc, do you think this AR488 will be suitable for the scope? How can i check the compatibility a priori?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: caiser01 on November 13, 2021, 08:17:15 pm
I wanted to say a big thanks to WaveyDipole, artag, and all the others who've contributed to AR488.

I just came across this fantastic project a few weeks ago so I decided to get some parts and try it out.

I used artag's V3 PCB design: https://oshpark.com/shared_projects/yfUOmUzA (https://oshpark.com/shared_projects/yfUOmUzA)
(If you want to use a different PCB vendor, you can still download the Gerbers at that link)

For the Arduino Pro Micro, I bought the HiLetgo version: https://www.amazon.com/HiLetgo-Atmega32U4-Bootloadered-Development-Microcontroller/dp/B01MTU9GOB (https://www.amazon.com/HiLetgo-Atmega32U4-Bootloadered-Development-Microcontroller/dp/B01MTU9GOB)

The connectors came from Digi-Key:
https://www.digikey.com/en/products/detail/norcomp-inc/111-024-113L001/955147 (https://www.digikey.com/en/products/detail/norcomp-inc/111-024-113L001/955147)
https://www.digikey.com/en/products/detail/sullins-connector-solutions/PPTC121LFBN-RC/807231 (https://www.digikey.com/en/products/detail/sullins-connector-solutions/PPTC121LFBN-RC/807231)

Once I had all the parts in hand, it was simply a matter of soldering the connectors to the boards, plugging in the Arduino, and flashing the code. I did not have to make any changes to the code at all.

This project is just as good as people have been saying; way better than using an NI USB GPIB adapter with their bloated software as I did about 10 years ago.

And yes, I'm another person looking forward to finally backing up my HP 3478A calibration!

Again massive thanks to everyone whose made this project happen!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: pqass on November 15, 2021, 02:16:54 am
I would also like to give a big thanks to WaveyDipole and everyone that contributed to AR488.

Last Feb 2020, I remember watching Dave's video on scoring cheap eBay bench meters.  With a little research, I stumbled upon the thread on how to read the 3478A calibration, and then this project.  It was too compelling and so I pulled the trigger and bought my first bench meter.

Using the well written AR488 manual and my Arduino UNO with a junk-shop IEEE488 connector, I successfully read the calibration! I then replaced the battery without incident.

A couple of months ago I turned-on my 3478A and it suddenly reported that it was uncalibrated! It serves me right to buy a 10 year lithium battery from a local guy that's probably been sitting around for 9 of those years.  But since I had downloaded the calibration, reinstalling was a breeze.

I've been mulling over a more robust AR488 implementation for a while (rather than using an UNO) and settled on one with the 7516x drivers. Rather than the  conventional/heavy/expensive multi-conductor cabling, I decided to use flat ribbon with female IDC connectors (like PATA cables); I made my own IDC header to solder-cup IEEE488 connector adapter which is still cheaper than the purpose made IDC-IEEE488 connectors.  I didn't want an AR488 per device and then having to terminate them on a USB hub.  My test gear hoard has since grown to a 34401A and four XANTREX XT-series power supplies; each GPIB controllable.

See attached for my AR488 GPIB-to-RS232 implementation.  Although, I'm seriously considering one with a ENC28J60 Ethernet and PoE. I think both the EtherCard library and AR488 code may just fit in 32KB. It would need a 74HC299 bi-directional serial-to-parallel for GPIB-data and re-mapping the GPIB-control pins to make the SPI pins available for the Ethernet and '299 chips. Maybe when I have more time.

Thank you everyone!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on November 18, 2021, 03:57:31 pm
I have a potentiostat/galvanostat from EG&G Princeton Applied Research model 263A v2.19, with ieee 488 socket (attached picture). i need to connect it to a modern pc, do you think this AR488 will be suitable for the scope? How can i check the compatibility a priori?

Having had a look at the manual online, despite the characters on the rear plate, Appendix B describes this as a standard IEE488 port so I see no reason why the AR488 should not enable communication with the instrument using a USB port on your PC.

https://lin-web.clarkson.edu/~skrishna/Model_263A_Command_Set_Handbook.pdf
Title: Re: AR488 Arduino-based GPIB adapter
Post by: leo1984 on November 18, 2021, 04:08:58 pm
I have a potentiostat/galvanostat from EG&G Princeton Applied Research model 263A v2.19, with ieee 488 socket (attached picture). i need to connect it to a modern pc, do you think this AR488 will be suitable for the scope? How can i check the compatibility a priori?

Having had a look at the manual online, despite the characters on the rear plate, Appendix B describes this as a standard IEE488 port so I see no reason why the AR488 should not enable communication with the instrument using a USB port on your PC.

https://lin-web.clarkson.edu/~skrishna/Model_263A_Command_Set_Handbook.pdf
Thanks for the confirmation!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: douardda on November 21, 2021, 05:15:46 pm
Hi everyone,

I've recently been working on porting the AR488 project on ESP32 (also made it work on stm32).
Doing so I've started a pretty massive refactoring of the code and started adding new features.

My version of the project is at https://github.com/douardda/AR488/tree/esp32 (https://github.com/douardda/AR488/tree/esp32)

The things I've done so far:

Concerning the project source code:
- started a major refactoring of the code (e.g. split the big AR488.ino source file in parts) 
- make it compilable on ESP32 (tested with several esp32 and esp32s2 boards) and STM32 (tested with a Nucleo STM32F303)
- use platformio to compile the project   
- port the documentation as a sphinx project https://www.sphinx-doc.org/en/master/ (https://www.sphinx-doc.org/en/master/) (which results in something like https://sdfa3.org/david/ar488/ (https://sdfa3.org/david/ar488/) )
- use github actions to automatically rebuild the documentation and compile a number of firmware on git push (eg. https://github.com/douardda/AR488/actions/runs/1473093046 (https://github.com/douardda/AR488/actions/runs/1473093046))

Firmware features
- rewrote the macro system to make macros editable (stored in EEPROM/NVS, so not much room on AVR but plenty on ESP32),
- on esp32: add support for BT-SPP (serial over Bluetooth) and wifi (no web app, just a raw TCP socket, credentials are set using a new '++wifi' commands and stored as config using the '++savecfg' command; the automatic connection to wifi on startup is a matter of adding the '++wifi connect' to the macro 0)
- automatically select the command stream from which there is activity, so you can have the main serial interface, the BT one and the TCP connection at the same time; when you type a command on one of the stream, the AR488 select this stream as main command I/O device)
- add support for the IEEE 488-1 'TCT' command (allow the controller in charge to transfer the control to a device, typically usefull for plottingm see https://pouet.chapril.org/@douardda/107276364706227913 (https://pouet.chapril.org/@douardda/107276364706227913) , I've been able to plot from my HP3562A using the HPGL python plotter emulator I wrote years ago having the AR488 in controller mode, but then when I hit the plot button or send the 'PLOT' GPIB command, the HP3562A ask the controller to take control, which the AR488 does using this new 'TCT' command and put itself in device mode listening on address 5, then take back control when the 3652A signal its job is done).
- add support for the IEEE 488-2 'FINDLSTN' common controller protocol (quick list listening devices on the bus, see https://pouet.chapril.org/@douardda/107289038291757650 (https://pouet.chapril.org/@douardda/107289038291757650))

The documentation still needs a lot of work to be adapted to all these changes, and all this is far from being done (I am still not satisfied with the code structure, especially the content of commands.cpp, and the responsibility of the 'GPIB' class vs the 'Controller' class; implement OTA on esp32, and many other new features ).
 
I've been discussing with @WaveyDipole about all this, and since he actually also have a bunch of refactoring on his plate, it's not clear yet if this work will be merged back to the main project at some point, or if it will remain as a friendly fork.
 
Anyway I've though this may interest some of you. TBH using "legacy" AVR arduino nowadays does not make a lot of sense when you can get an esp32 board for 5 bucks, so I've kept the code "compatible" with avr boards but I may not keep it that way in the future (my version of the fw already do not fit in the arduino micro anymore for example).

HW side, I've also made a small modular PCB (I am waiting for the delivery from jlcpcb). It's a 2 parts assembly: one with the Centronics socket and the driver ICs (SN7516x, should be compatible with both the SN75161 and SN74162), and a daughter board to adapt to the chosen MCU module (I have made one for the esp32-devkitc, one for the esp32-s2-saola, and one for the Arduino Nano for now):

[attachimg=1 align=center]

[attachimg=2 align=center]
[attachimg=3 align=center]

Once validated, this very simple design will be published.

If any (or all) of this interest you, I'm open for discussions and contributions on github :-)   

David 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: dl6lr on November 24, 2021, 12:56:18 pm
I got the Tektronix Hardcopy capture working with the latest firmware, for pro micro adapter. I used ++eor 7, ++eoi 1, ++read_tmo_ms 8000, ++addr GPIB_Address, everything else is default. I tested it with TDS784D and TDS684B.

I debugged a little bit and found: Everything else MUST be default, see above. Especially if the adapter is left in auto-read mode or in device mode, it will not work. Tested with a TDS540 OK (mono only, color will get a mono BMP too as the graphics adapter only supports monochrom, HPGL plots are in color).
Title: Re: AR488 Arduino-based GPIB adapter
Post by: one2one on November 27, 2021, 07:38:50 am
Hello People, i have built the AR488 for my HP5316A  (Universal Counter) Frequency Counter and it works nice.

I used the AR488v3 board with a Arduino Pro Micro,  I cutdown a Centronics Printer Cable Plug  (36way) with a hacksaw to be  24way and soldered  it onto the back of the AR488v3 board,
then Programmed the Arduino Pro Micro with the Arduino IDE.     

Some commands I found useful  were
 ++addr 20      ;  the default address for the      HP5316A
 ++auto 3    ( or 1)     ;  multi read  (or single read)
 ++read 

Typical reply is   something like
F     1.0000E+05

Thanks a lot for this great project.   (the "Minister of Finance" would not have ever approved funds for a commercially built GPIB to USB converter)

Only thing to note is that the USB micro connector on the Arduino Pro Micro is a little fragile, and i accidentally snapped  the USB off the board with almost no force applied. 
(lucky i had some spare Pro Micros)

Probably  also work on the  HP5315A, HP5315B,  HP5316A and HP5316B etc  that have the GPIB option.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on December 05, 2021, 06:02:30 pm
I have had a couple of people ask me for Kicad sources for my pcb so they can make modifications. They can be found at https://github.com/artgodwin/AR488-32u4-PCB

If you make a derivative that you think solves a problem of interest to other people, please feel free to mention it here and distribute it however you like. I make nothing from the design, so if you take all the users I can't lose anything !
 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DavidKo on December 10, 2021, 07:41:09 pm
Many thanks to artag. I was little bit confused with the archive name 32u4, but I can confirm that this design is for Arduino Nano (tested with MEGA328P)

I have "created" PCB with 5 pcs to produce more PCBs, when send to JLCPCB. After struggling with connector placement I have added the connector shape (that is untested in my batch).
https://github.com/konarik/AR488-multiple-PCBs (https://github.com/konarik/AR488-multiple-PCBs)

I have tried to use it with 32u4 nano PCB (2 pins which are not on standard nano are not connected), but it was beyond my programming skills - I have tried to modify the code, but nothing had worked.

If someone is interested I still have 3 1 PC (with 5PCBs) which I can sent, but check at first the shipping price from Czech. It can be cheaper to produce it directly in JLCPCB - I was surprised, no customs were necessary, VAT was payed during the order and it had came through someone in Germany.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bingo600 on December 12, 2021, 05:53:35 am
Many thanks to artag. I was little bit confused with the archive name 32u4, but I can confirm that this design is for Arduino Nano (tested with MEGA328P)
Could you point to the "GPIB connector you used" ?

/Bingo
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on December 12, 2021, 11:46:50 am
Apologies, I will put up the 32u4 (arduiino pro micro) version but that is indeed an earlier Nano layout.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DavidKo on December 12, 2021, 04:34:05 pm
Could you point to the "GPIB connector you used" ?

/Bingo

I have used Centronix 24 pin connector. I was not able to find the correct one at my favourite souces, so I bought a pack on ebay https://www.ebay.com/itm/392426119370 (https://www.ebay.com/itm/392426119370).
Title: Re: AR488 Arduino-based GPIB adapter
Post by: justjason on December 28, 2021, 09:39:34 pm
Apologies, I will put up the 32u4 (arduiino pro micro) version but that is indeed an earlier Nano layout.

Is this the right version for the 32u4 ?

https://oshpark.com/shared_projects/yfUOmUzA
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on January 03, 2022, 06:30:30 pm

Is this the right version for the 32u4 ?

https://oshpark.com/shared_projects/yfUOmUzA

Yes, but it only contains the gerbers. The github repo (should) contain the kicad sources.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: ONLYA on January 08, 2022, 03:40:31 pm
I build AR488 with Mega 2560 and the GPIB transceiver chips (SN75160BN and SN75161BN). They are in the format of Arduino Shield. The design, manufacturing and source code files are in https://github.com/ONLYA/AR488-Bluetooth-Mega-2560 (https://github.com/ONLYA/AR488-Bluetooth-Mega-2560) if anyone wants to modify and manufacture it.

I built it yesterday but it did not work. The handshake signals do not even change. After tests, I believed that the transceiver ICs that I purchased on eBay cannot transceive the data. Probably I need to buy new ones on Mouser or Digikey.
Now I am considering shorting the pins to make the direct connections.

Is there anything wrong with my design and my source code that makes this not work?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 12, 2022, 12:57:22 pm
It looks like you have spent quite a bit of time designing that hat for the Mega 2560! I had a look at your the schematic and layout. I am assuming that we are looking at the top of the board and the IEEE488 socket is facing up. If so, then I couldn't spot any obvious problem. This also assumes that the orientation of the socket is correct (narrow side towards the outer edge of the board).

Its been a little while since I worked out the SN7516x chip details so I would have to set this up on a breadboard again. As a matter of curiosity, did you prototype this on a breadboard first?

Did you use sockets for the SN75161x chips? If so, then it should be straightforward enough to jumper them temporarily, trying one IC at a time. I also presume you have jumpered either JP1 or JP2? You should have only one or the other connected. Since you are using pin 5 for DC in the config, then connect only this pin. Otherwise if you want to use REN, then comment out the DC pin in the config.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Martin Miranda on January 12, 2022, 02:40:45 pm
subscribing. i'm looking forward to make one.  ^-^
Title: Re: AR488 Arduino-based GPIB adapter
Post by: ONLYA on January 12, 2022, 02:46:31 pm
It looks like you have spent quite a bit of time designing that hat for the Mega 2560! I had a look at your the schematic and layout. I am assuming that we are looking at the top of the board and the IEEE488 socket is facing up. If so, then I couldn't spot any obvious problem. This also assumes that the orientation of the socket is correct (narrow side towards the outer edge of the board).

Its been a little while since I worked out the SN7516x chip details so I would have to set this up on a breadboard again. As a matter of curiosity, did you prototype this on a breadboard first?

Did you use sockets for the SN75161x chips? If so, then it should be straightforward enough to jumper them temporarily, trying one IC at a time. I also presume you have jumpered either JP1 or JP2? You should have only one or the other connected. Since you are using pin 5 for DC in the config, then connect only this pin. Otherwise if you want to use REN, then comment out the DC pin in the config.

Thanks for the comment. All your assumptions are what I have done.

I did not prototype this on a breadboard as I presumed it would work at the first time. As I did not have an IC socket when I built it, I directly soldered it on the board :palm:
Jumpers are to select different configurations to see the difference and I only soldered DC-5 and one side of both UART jumpers.

I got components from Farnell today and will make a new one tonight.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: ONLYA on January 14, 2022, 10:38:17 pm

I got components from Farnell today and will make a new one tonight.

It is the update of my board design. I built a new board.
The board did not work either with or without the GPIB transceivers. Probably the GPIB interface of my instrument (Agilent 34001a) is not working properly. Maybe I can only use RS-232 or use the others' breakout design.
I only have this equipment with a GPIB interface. I Hope WaveyDipole can get it to work with his instrument.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: m3vuv on January 15, 2022, 09:27:31 am
So without reading thru the whole 30+ pages of the thread,did this ever get finished?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jester on January 15, 2022, 01:55:01 pm
Hi, I’m a latecomer to this thread. I have not read the 30 odd pages. Hopefully someone familiar with this thread can answer a few questions:

I’m exploring options for a standalone data logger for up to 6 DMM’s (3x34401A with GPIB) and a 2-3 Flukes also with GPIB, all of these meters also have serial ports. I have an Agilent 82357B GPIB Adapter and it works great with option 2) below on my win7-64 PC even when running multiple instances of the standalone software to log multiple meters.

I’m familiar with the two data loggers introduced on this forum
1) Program that can log from many multimeters
2) HP 34401A … Standalone software  (BTW I really like this one, check it out if you have not discovered it yet)

I would like to setup a standalone data logger independent of my win7-64 pc that I use daily. I have a Win10 tablet that I thought would be ideal for the independent data logger using program 2) above however it has Win10-32 bit OS and this appears to be a problem for program 2), not verified I’m still checking. Program 1) above does not support the 82357B adapter, so that’s why I’m here exploring this option.

So finally the questions:
A) what arduino board should I use?
B) Has someone developed a readily available board that has whatever GPIB interface stuff on it?
C) Is such a board available either finished as a kit or in Altium or similar format so I can order one?
D) Has anyone reliably logged data from multiple meters using the Arduino solution and what logging software did you use?

Much appreciated,
J
Title: Re: AR488 Arduino-based GPIB adapter
Post by: pqass on January 15, 2022, 04:43:47 pm
...
I would like to setup a standalone data logger independent of my win7-64 pc that I use daily. I have a Win10 tablet that I thought would be ideal for the independent data logger using program 2) above however it has Win10-32 bit OS and this appears to be a problem for program 2), not verified I’m still checking. Program 1) above does not support the 82357B adapter, so that’s why I’m here exploring this option.

So finally the questions:
A) what arduino board should I use?
B) Has someone developed a readily available board that has whatever GPIB interface stuff on it?
C) Is such a board available either finished as a kit or in Altium or similar format so I can order one?
D) Has anyone reliably logged data from multiple meters using the Arduino solution and what logging software did you use?

Much appreciated,
J

Assuming that you already have all of your devices interconnected via GPIB cable,
you could use an Arduino UNO + shield with SN75160,SN75161 + HC05/06 bluetooth module + IEEE488 connector.

A perfboard shield can be easily made to mount the SN75160, SN75161 ICs, and bluetooth module.

See AR488-manual.pdf (Appendix A, pg 42) and AR488-Bluetooth.pdf here: https://github.com/Twilight-Logic/AR488 (https://github.com/Twilight-Logic/AR488) 
See page 13 of the manual pdf WRT use of pin 13 for SN75161_DC or AR_BT_EN.

FYI: I don't have personal experience with the bluetooth setup but can confirm that the SN7516x driver configuration works.
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3813158/#msg3813158 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3813158/#msg3813158)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: ONLYA on January 15, 2022, 05:15:47 pm
FYI: I don't have personal experience with the Bluetooth setup but can confirm that the SN7516x driver configuration works.
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3813158/#msg3813158 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3813158/#msg3813158)

I can confirm that Bluetooth works fine. See the attachments. It is directly powered from a 5V power supply instead of a PC.

Just need to verify which port is for AR488 itself. And unplug the Bluetooth module before you program Arduino.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 19, 2022, 08:36:10 pm

I got components from Farnell today and will make a new one tonight.

It is the update of my board design. I built a new board.
The board did not work either with or without the GPIB transceivers. Probably the GPIB interface of my instrument (Agilent 34001a) is not working properly. Maybe I can only use RS-232 or use the others' breakout design.
I only have this equipment with a GPIB interface. I Hope WaveyDipole can get it to work with his instrument.

Sorry to hear this. I so happens that I have a HP34401A here and I know that is works directly with the AR488, however I also set it up with the SN75161x configuration to test.


I can confirm that Bluetooth works fine. See the attachments. It is directly powered from a 5V power supply instead of a PC.

Just need to verify which port is for AR488 itself. And unplug the Bluetooth module before you program Arduino.

Nice to know that Blutooth worked. Port Rx0/Tx0 is connected to the UART serial over for USB. However on the Mega2560 there is an alternate choice of ports. In the configuration you are using ([D]efault for Mega 2560) I seem to recall using Rx2/Tx2 pins for GPIB signals, but Rx1/Tx1 and Rx3/Tx3 could be used for Blutooth. That way there would be no interferance with the UART and programming. You could not see any output from the AR488 via the UART though, only Bluetooth.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: RichardM on January 20, 2022, 07:59:02 am
I build AR488 with Mega 2560 and the GPIB transceiver chips (SN75160BN and SN75161BN). They are in the format of Arduino Shield. The design, manufacturing and source code files are in https://github.com/ONLYA/AR488-Bluetooth-Mega-2560 (https://github.com/ONLYA/AR488-Bluetooth-Mega-2560) if anyone wants to modify and manufacture it.

I built it yesterday but it did not work. The handshake signals do not even change. After tests, I believed that the transceiver ICs that I purchased on eBay cannot transceive the data. Probably I need to buy new ones on Mouser or Digikey.
Now I am considering shorting the pins to make the direct connections.

Is there anything wrong with my design and my source code that makes this not work?

Hi, does this Mega-2560 hat now work ?

Richard
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Davesdewas on January 20, 2022, 11:00:56 am
Thank you very much for your excellent work!
hellodear.in (https://hellodear.in/)
tea tv (https://teatv.ltd/dl/)

Title: Re: AR488 Arduino-based GPIB adapter
Post by: ONLYA on January 20, 2022, 12:29:15 pm
Sorry to hear this. I so happens that I have a HP34401A here and I know that is works directly with the AR488, however I also set it up with the SN75161x configuration to test.
It could be so many factors here: faulty cable, faulty GPIB ports, etc. The assertion tests of the data and control signals work fine before the SN7516X transceivers. I will check those factors one by one today later on.

Nice to know that Blutooth worked. Port Rx0/Tx0 is connected to the UART serial over for USB. However on the Mega2560 there is an alternate choice of ports. In the configuration you are using ([D]efault for Mega 2560) I seem to recall using Rx2/Tx2 pins for GPIB signals, but Rx1/Tx1 and Rx3/Tx3 could be used for Blutooth. That way there would be no interferance with the UART and programming. You could not see any output from the AR488 via the UART though, only Bluetooth.
The UART port are shared in the source code and seems not configurable with the config file. I can change this part to make the UART ports configured and work separately. You can solder the "3" sides of JP3 and JP4 to connect the Bluetooth UART port to Rx/Tx3.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: ONLYA on January 20, 2022, 12:39:05 pm

Hi, does this Mega-2560 hat now work ?

Richard

Not yet at least on my side. I am still checking it out. The replies https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3952730/#msg3952730 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3952730/#msg3952730) and https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3954029/#msg3954029 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3954029/#msg3954029) reflect my current status.
I updated my PCB to play around the track length tuning with KiCad 6 though.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: chickenHeadKnob on January 20, 2022, 08:51:47 pm
Well I am another happy user here, filled with gratitude. To ARtag and Wavey-dipole:
I kiss you!

if you know that meme you are probably as ancient as me.
I am new to using Arduino's and to my dismay found out that pro micros have that detestable surface mount USB connector that peels away easily as someone further back in this thread discovered.  So I examined the board bottom to see if I could strengthen the connector.

Rugged-datin' da connector

you will need: 22 awg solid copper wire, stripped clean.
                       some green scotch brite or sandpaper.
                        pointy blade Xacto knife
                       1 mm pcb drill bit and dremel or press
                       solder and iron.

step 1. scrape off the solder mask on the bottom of the board immediately underneath the usb connector with knife and scotch brite
            this should expose a strip of ground plane at the edge of  the board. Check continuity with the ground pin of the board and connector shell.
            I received boards from two sources one China the other a Canadian seller with the same layout. Don't know if other copper patterns exist
step 2  On the top side use the point of the xacto knife like a D bit and twirl some starter divots just outboard the edge of the solder pads.
step 3  Drill through the board
step 4  clean some bare copper 22 awg wire with the scotch brite. bend it into a square bottom U and fit through the holes you drilled.
step 5   solder the wire to bottom of board
step 6  flip board over and solder the wire ends to the connector as expedient hold down stakes.

something like this (not my best unit, but still serviceable)

Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 24, 2022, 07:36:51 pm
I have just suffered the same problem with a Cypress FX2 board and the USB connector is hanging on only by the USB signal tracks at the rear. I will be giving your idea a try in the hope that it might still be salvageable!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: ONLYA on January 26, 2022, 01:38:09 am
Thanks to WaveyDipole, the problem of the Mega hat is finally found. It is the wrong connection due to my misunderstanding of the GPIB connector orientation and the wrong library directly downloaded from the internet. What a serious mistake I have made! :palm:
I will correct and verify the design and update the status here as soon as possible.
The next thing I probably need to do is to desolder the expensive GPIB connectors...
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on January 26, 2022, 03:39:27 am
Yes, surface mount connectors are not robust, especially when as  small as a USB micro.
There is a design for a housing firther back in the thread. It can be 3d-printed and should give some protection. Ideally I would enclose the entire connector in the shell so you have to take it apart to change the cable. This is also how the HP 82537 housing works - it seems like a captive cable but it can actually be replaced.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: RichardM on January 26, 2022, 07:45:29 am
Thanks to WaveyDipole, the problem of the Mega hat is finally found. It is the wrong connection due to my misunderstanding of the GPIB connector orientation and the wrong library directly downloaded from the internet. What a serious mistake I have made! :palm:
I will correct and verify the design and update the status here as soon as possible.
The next thing I probably need to do is to desolder the expensive GPIB connectors...

That's great. Looking forward to the update.

Cheers
Title: Re: AR488 Arduino-based GPIB adapter
Post by: T3sl4co1l on January 26, 2022, 07:56:55 am
Also, PCB pads can be epoxied back down to the board.  Bit of a messy proposition, but done carefully, it can be flat and serviceable (i.e. not glommed up over the pads/pins so you can still desolder the connector in the conventional way).  Or glommed up intentionally, to add reinforcement around the shell, particularly using a filled type epoxy (JB Weld being a common and effective candidate).

Tim
Title: Re: AR488 Arduino-based GPIB adapter
Post by: ONLYA on January 29, 2022, 12:31:54 am
I finally got it right by reversing the connection. I spent a night trying to desolder the expensive connectors with only the soldering iron and solder sucker. No luck. I spent another night to rewire the route to a new connector and it is still reversed |O Seems like today is my lucky day 8)
Recognise that the instrument beeps and shows "ERROR" when I type "*idn?" although I can see the identity with "++read". Not sure whether this is normal or not.

In the HP34401A software developed by Nx-1997, it is unable to communicate to Bluetooth emulated COM port. With USB connection, it still needs to change the address manually with PuTTy first to make it work.

As it can work with Bluetooth, the device can be powered with a 9V battery for mobility. I have built a small circuit to use TL431 and LED to indicate the voltage level is not less than 7.3V. The circuit resistor config depends on the LED spec. Measure the LED for the best indication.
It is noted that the overall average current consumption with the 9V Vin will be 190mA-210mA idle, ~250mA when working. So one 9V battery will last for 2 hours in theory. It may be around 1 hour or less in practice due to the voltage limitation of Vin.
However, as the 9V battery can still work until 5.4V, I am thinking of adding a voltage booster with 3 TL431 (I have quite a lot TL431 ;D) or a proper voltage regulator to make the battery can be used thoroughly when it is below 7V.
The PCB is small so there is no space for a 9V battery. The battery will be dangling around the device.

I will correct the PCB and update the schematic as soon as possible.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 29, 2022, 01:47:42 pm
Removing the connector with a soldering iron and solder sucker is likely to be tricky. Sometimes adding a little solder to the joint first to enable better heat coupling helps, but the joints attached to the ground plane can be awkward as the ground plane sucks all the heat away very quickly.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: ONLYA on January 31, 2022, 09:13:26 pm
I have updated my MEGA 2560 Hat design.

The connection is corrected and the connector shields (MH1, MH2) are connected to the GND.

A battery circuit is added. Instead of directly powering to Vin with a 9V battery, a step-up DC-DC IC is used for two to three AAA batteries. An additional indicator is added for low battery indication. For more details, see my repository (https://github.com/ONLYA/AR488-Bluetooth-Mega-2560 (https://github.com/ONLYA/AR488-Bluetooth-Mega-2560)).

Because of the Spring Festival, JLCPCB is currently on holiday so I have not quoted it yet. As I have made a huge modification here, I am not sure whether it is perfectly fine in theory even though I have double-checked the schematic and PCB. If someone wants to use the battery circuit, use it at your risk.

Removing the connector with a soldering iron and solder sucker is likely to be tricky. Sometimes adding a little solder to the joint first to enable better heat coupling helps, but the joints attached to the ground plane can be awkward as the ground plane sucks all the heat away very quickly.
It is really tricky to desolder a GPIB connector with those two basic tools. The original way did not suck all the solder and the remains became a thin layer in the hole, which is harder to get rid of. A better way (soldering iron and solder sucker on different sides) seems not able to be applied to this connector as I smelled plastic when I did this.
I do not want to waste those two connectors and two soldered ICs. I think it will be better for someone else with a proper desoldering tool to use them rather than left them in storage. If someone wants those two boards to salvage the components, I can give them for free while you still need to cover the postage fee.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: ONLYA on February 14, 2022, 11:44:53 pm
I received my new designed PCB! It works perfectly fine and is able to be used with the HP34401a program! The pictures shown are under the condition of 3V battery voltage with Bluetooth. I do not have a screwdriver that turns the potentiometer to prove the Battery Low LED indication now.
A bit wondering why DAV signal timeout.

The first two are to prove the concept. The last two show it works with the HP34401a program.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 16, 2022, 09:04:21 pm
Brilliant! Glad to see your revised board working!  :-+

Thanks also to Niravk1997 (Nx-1997) for the HP Agilent Keysight 34401A Control and Data Logging software:
https://github.com/Niravk1997/HP-Agilent-Keysight-34401A-Control-and-Data-Logging-Software

Works with the HP34401A serial port and a VISA compatible GPIB adapter as well.

The DAV and subsequent timeout waiting for sender might be on account of the terminator. The default termination sequence is CR+NL. The HP34401A terminates SCPI sequences with a NL only but the interface will be looking for CR+NL and will be waiting for more data and then time out. Try it with:

++eor 2

This will tell the interface to expect NL only as the termination character.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on March 03, 2022, 01:52:30 am
Hi,

I got some of these boards today:

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1428664;image)

I added to them to my order from JLCPCB. I will try them out in the next few days.

I soldered one together. and it works well.

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1428697;image)

I have built the AR488 before. I like the idea of using the Arduino Nan, it is about half the price of the pro micro.

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1184454;image)

Many thanks to WaveyDipole and Artag.

Also a special thank you for DavidKo for creating the panelized version.

Best regards,
Jay_Diddy_B
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 03, 2022, 04:07:13 pm
Hi folks,

I'm using an individual AR488 adapter on each instrument, all of them connected via wifi (ESP8266).
This works very well in most cases.

BUT...
Now I am having the problem to synchronize a signal generator (HP8672A) and a power meter (Gigatronics 8541C).
The basic task is to step the output frequency and measure the power at each frequency.
Now, it appears to be quite a lottery as to when the data packets arrive at the instruments via the network.
Sometimes the power meter already starts reading while the generator has not yet changed the frequency.
This is nothing ultra-fast as I haven't managed to get more than about 10 readings per second out of the Gigatronics, even in swift mode.
Still the instruments are not always in sync.

Now my questions:

My generator is so old that it doesn't allow to read out the frequency or lock condition.
How can I make sure that the set frequency command has been dispatched by the AR488 adapter?
If I send a "++addr" command to the adapter and wait for the answer, can I be sure that the previous set frequency command has been completely dispatched to the instrument once I get the address answer or can the AR488 adapter reply while still processing the previous command?

And:
What happens when I send commands to the adapter in too rapid succession, which may happen for commands that do not invoke an answer?

And finally:
Does anyone have experience with fast reading measurements out of a Gigatronics 8541C? They advertise up to 500 measurements per second via GPIB but for single measurements (not block mode) I don't even come close to this. In swift mode I obtain 13 measurements per second.
This is the fastest sequence I could come up with:
Code: [Select]
++auto 0
++addr 15
AP     //sensor A
CW    //cw-mode, fastest
AE FM 0 EN  //averaging off
SWIFT FREERUN  //freerunning swift mode
++read
++read
++read
...

Any ideas what could be improved?
Btw, the Gigatronics terminates strings with CR+LF, so no problem from this side.

Many thanks,
Tom


Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 03, 2022, 08:54:41 pm
If I send a "++addr" command to the adapter and wait for the answer, can I be sure that the previous set frequency command has been completely dispatched to the instrument once I get the address answer or can the AR488 adapter reply while still processing the previous command?

Each command is added to the buffer in sequence and processed in turn by the parser. A call to read or write to a device must complete its read/write cycle before returning back to the main loop when the next command in the sequence can be processed.

What happens when I send commands to the adapter in too rapid succession, which may happen for commands that do not invoke an answer?

Depends on what board you are using. If you are using a 32u4 based board and you enable RTS/CTS handshaking, the 32u4 will do hardware handshaking so the buffer should not overflow. However with boards that have other UARTs (16u2, CH340) may overflow their buffer if data is fired at them too fast. The result will be dropped characters and corrupted commands resulting in errors. The CH340 can be configured to do RTC/CTS handshaking as well but requires a couple of extra GPIO pins. It works on Windows, but Linux is a little more complicated as it needs an updated driver.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 04, 2022, 06:09:13 am
Many thanks for the quick answer!

Quote
A call to read or write to a device must complete its read/write cycle before returning back to the main loop when the next command in the sequence can be processed.

Great, this should solve my synching problem. :-)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 07, 2022, 01:39:41 pm
Hi,

I am having trouble controlling an HP8350B with the AR488 USB adapter, while the same code runs fine with an original Prologix adapter.

Here is the code sequence I send to obtain the instrument identifier:
Code: [Select]
++addr 19<CR><LF>   //setting GPIB address 19
++eor 2<CR><LF>    //HP8350 answers with LF only, the Prologix doesn't need this
++auto 1<CR><LF>
IP<CR><LF>    //Instrument preset
OI<CR><LF>   //read identifier string

Through the Prologix I always get the full answer to the OI command, through the AR488 I mostly get nothing and sometimes a part of the string.
This is not a speed problem. I am doing this by hand through a terminal program for now. The AR488 does answer the ++ver command.
Also, the instrument indicates that it is being addressed when issuing the OI command. Strangely, it indicates already being addressed after the ++addr command for the Prologix, but not for the AR488.
Am I doing something wrong?
Am I overlooking something?

Thanks, Tom
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 08, 2022, 01:00:20 pm
Quote
I am having trouble controlling an HP8350B with the AR488 USB adapter, while the same code runs fine with an original Prologix adapter.

Update:
This does not seem to be the fault of the AR488 interface.
The effect is very strange:
Using the KE5FX GPIB configurator I do get reliable responses from the AR488 adapter+HP8350B.
If I just unhook it from the KE5FX software and hook up my YAT terminal program thus not changing the AR488 settings I no longer get reliable responses, sometimes only part of the response string, sometimes no response at all. I'm observing this in parallel with a serial port monitor software, so I am dead sure the AR488 adapter did not get reconfigured during the software switchover.

Btw, using YAT the only setting that lets me receive data from the Arduino Leonardo 32U4 native USB serial interface is RS485 transceiver control setting. None of the alternative settings work.

Can someone give me a clue what the KE5FX serial port communication may do differently than my terminal program?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 08, 2022, 05:28:43 pm
Quote
I am having trouble controlling an HP8350B with the AR488 USB adapter, while the same code runs fine with an original Prologix adapter.

Update:
Setting eoi to 1 does the trick.
It is strange that the Prologix works with eoi set to 0.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 09, 2022, 04:30:38 pm
Question about the AR488-ESP8266-addon firmware:

I run my ESP8266 interfaces all in client mode connected to a local access point.
Now, if I happen to switch on the AR488-ESP8266 devices BEFORE I switch on the access point (it is dedicated to the lab and only running when I'm there), the access point won't be found and the ESP8266 comes up in AP mode. As far as I understand, the access data to the access point is lost then, correct? If I power the device down and back up when the local access point is running, it will no longer connect, but will come up in AP mode again. Thus, in such a case I'll have to manually re-connect all devices to the local access point, which is a lot of work.

Is there any way to avoid this? I do not need the device to come up in AP mode if the access point is off. But it should connect to the access point next time it is powered up again.

Thanks, Tom
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 10, 2022, 10:01:53 am
Tom,

Although nothing is being saved to EEPROM, the WiFi chip does "remember" the last used settings, so I think the answer may be to comment out a bit of code in the startWiFi() function. You will see a statement like this:

if (startWifiStn("", "", AP.addr, AP.gate, AP.mask)) {
...
}else{
...
}

I think that the 'else' part with the the "Falling back to AP with defaults..." comment needs to be removed or commented out.  It is probably falling back to AP mode and when you try to connect again with the WiFi back up "remembering" that last settings which would now be the fallback AP settings. If it is stopped from falling back then it should hopefully just "remember" the last station settings. I will probably need to update the code accrodingly.

Thanks for pointing this out.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: douardda on March 12, 2022, 10:55:19 am
Question about the AR488-ESP8266-addon firmware:

I run my ESP8266 interfaces all in client mode connected to a local access point.
Now, if I happen to switch on the AR488-ESP8266 devices BEFORE I switch on the access point (it is dedicated to the lab and only running when I'm there), the access point won't be found and the ESP8266 comes up in AP mode. As far as I understand, the access data to the access point is lost then, correct? If I power the device down and back up when the local access point is running, it will no longer connect, but will come up in AP mode again. Thus, in such a case I'll have to manually re-connect all devices to the local access point, which is a lot of work.

Is there any way to avoid this? I do not need the device to come up in AP mode if the access point is off. But it should connect to the access point next time it is powered up again.

Thanks, Tom

Hi Tom,

using an ESP32 instead of an (AVR) Arduino may help here. Since the wifi management is part of the firmware, it's a bit easier to deal with this kind of situation.

For example, in my esp32 version of the AR488 GPIB firmware (https://github.com/douardda/AR488/tree/esp32 (https://github.com/douardda/AR488/tree/esp32)), I've implemented an automatic communication port selection. It will switch between serial, wifi or bluetooth automatically depending on which gets activity (aka receive data or ++ commands).

Also in this firmware, the wifi parameters are modifiable via ++ commands and stored in the EEPROM.

David
Title: Re: AR488 Arduino-based GPIB adapter
Post by: sixtimesseven on March 18, 2022, 08:57:44 am
Hi I've just built myself an AR488 with arduino micro. I can send commands like ++ver and receive a response back.
But I'm having some difficulty connecting to my Fluke8840a, command ++addr responds with 1 so i've set the hardware address to 1.
I'm hoping username kc9qvl is still on this forum as I see in post #412 he got it working.
I was hoping he could share the secret to get the Fluke chatting.
A random question, is the AR488 compatible with PyVISA?

Any updates on pyvisa?
Super usefull, so I'm surprised that I could not find anything on this topic.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: douardda on March 20, 2022, 06:34:31 pm
By the way, I forgot to put here a few pics of my "modular" design (kicad files are available here https://github.com/douardda/ESP32-GPIB-pcb (https://github.com/douardda/ESP32-GPIB-pcb)).

Here with the esp32 devkit v3 module:
[attach=1]
[attach=2]
[attach=3]

The common GPIB connector board comes with the driver ICs (75160 and 75162) populated:
[attach=4]

David
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 21, 2022, 09:39:15 pm
using an ESP32 instead of an (AVR) Arduino may help here. Since the wifi management is part of the firmware, it's a bit easier to deal with this kind of situation.

Can I ask whether you developed your code using a 30-pin or 38-pin ESP32? Only recently I recently became aware that a 38-pin version exists. Quite some time ago, when I was looking at this, I came to the conclusion that there were not enough pins on the ESP32 dev board to connect all 16 pins of the GPIB data and control buses combined. That conclusion was also influenced by the fact that on ESP8266 board I was testing at the time, several of the exposed pins could not be used as normal GPIO pins which substantially reduced the total number of actual pins available. My conclusion assumed this might also apply to the ESP32, although even now, I am still not sure whether that is the case. Naturally, the extra few GPIO pins on the 38-pin version would make a difference.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 21, 2022, 11:04:11 pm
Over time there have been some questions about serial buffer overruns serial handshaking on Arduino boards. Some boards support handshaking, others do not. I have recently done some testing of RTS/CTS and XON/XOFF handshaking on the most commonly available UART chips. I thought this information might be of interest to some. Attached is a summary the results of these tests.

Using the test program, it was possible to send a test data file from one serial port to another without data loss, even when the receiving port was running much slower than the sending one. However, this only worked with certain UART chips but not others. The attached shows which UART chips will or will not support serial handshaking, the steps required and the problems encountered.

I do plan to implement the technique used in the AR488 code at some point in the near future and document the findings in the AR488 manual.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on March 25, 2022, 04:41:01 pm
Thank you very much for the very interesting report, John!
This is one thing I have always wondered about. A very useful compilation, indeed!
Btw, did my email with the article reach you?

Best regards, Tom
Title: Re: AR488 Arduino-based GPIB adapter
Post by: douardda on March 26, 2022, 10:25:12 am
Over time there have been some questions about serial buffer overruns serial handshaking on Arduino boards. Some boards support handshaking, others do not. I have recently done some testing of RTS/CTS and XON/XOFF handshaking on the most commonly available UART chips. I thought this information might be of interest to some. Attached is a summary the results of these tests.

Using the test program, it was possible to send a test data file from one serial port to another without data loss, even when the receiving port was running much slower than the sending one. However, this only worked with certain UART chips but not others. The attached shows which UART chips will or will not support serial handshaking, the steps required and the problems encountered.

I do plan to implement the technique used in the AR488 code at some point in the near future and document the findings in the AR488 manual.

I've tested my version of the code with 2 (maybe 3, not sure) esp32 boards: a TTGO t8 and the DevKitC (38 pins).
My go to board is this later one today. (I've also made it work with a few STM32 Nucleo boards).

I indeed need all the available and compatible IO pins to make it work (a bit tricky to find which IO pin can be used to drive which line of the 7516x drivers, especially for the IO pins involved in boot config) especially when using the SN75162 driver driving the DC line individually (for now the firmware does not need this to be driven individually but I wanted to keep the possibility to do so).

I have not yet played with hw controls for the serial port, I may try at some point also. Nice job with your UART testing work!

David
 

   
Title: Re: AR488 Arduino-based GPIB adapter
Post by: douardda on March 27, 2022, 04:58:18 pm
By the way, forgot to mention that thanks to the wifi connection coming with the ESP32, it is possible to use serial over ip protocols. I've started to document this a bit. The resulting doc can be read here:

  https://douardda.srht.site/ar488-esp32/bluetooth.html

I have not tried yet to implement any kind of control protocol (using RFC 2217) but I may give a try to add at least some support for flow control (there is some support for XON/XOFF in RFC221 and there have been some work to extend this in like https://datatracker.ietf.org/doc/draft-edwards-telnet-xon-xoff-state-control/ but we'll see what's possible and useful.)
 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: porter on April 13, 2022, 05:05:54 pm
I've been testing my adapter on Ubuntu using a modified Perl package. Someone may be thinking about using this package so here are my initial observations.

https://metacpan.org/pod/Device::GPIB::Prologix

Module's initialise method:
Code: [Select]
sub initialised
{
    my ($self) = @_;
 
    return unless $self->version() =~ /^Prologix/;
    # Set the Prologix into a state we like
    $self->auto(0);
    return unless $self->auto() == 0;
 
    return 1; # OK
}

modified as follows
Code: [Select]
sub initialised
{
    my ($self) = @_;
    #
    # needed prior to $self->version() # on AR488
    $self->read();
    #
    return unless $self->version() =~ /AR488/;
    print("initialised:OK\n");
    return 1; # OK
}
Code: [Select]
#!/usr/bin/perl
#
# Send some commands to the HP 5316A
#
use lib '.';
use strict;
use AR488;

$Device::GPIB::Prologix::debug = 1;

my $dev = AR488->new('/dev/ttyACM0:115200:8:none:1:none');
if (!$dev) {
    print ("problem with device\n");
    exit
}
$dev->addr(4);
$dev->auto(1);
$dev->send("IN");
$dev->send("TR0");
$dev->send("FN1");

#
# Initialize to the following
#   FN1 Frequency A
#   AS0 A triggers on positive slope
#   BS0 B triggers on positive slope
#   TR0 A and B trigger based on front panel control
#   WA0 Continuous gating. output if addressed
#   SR0 Polls srq at end of measurement
#   GA0 Gate range is long entered on front panel

my $res = $dev->read();
$dev->close();
print("Reading: $res\n");

output

[AR488]$ ./hp5326A_test.pl
DEBUG: AR488 is connecting to /dev/ttyACM0 with 8:none:1:none
DEBUG: Sending: '++read'
DEBUG: Read: 'AR488 GPIB controller, ver. 0.51.04, 27/01/2022'
initialised:OK
DEBUG: Sending: '++addr 4'
DEBUG: Sending: '++auto 1'
DEBUG: Sending: 'IN'
DEBUG: Sending: 'TR0'
DEBUG: Sending: 'FN1'
DEBUG: Sending: '++read'
DEBUG: Read: 'F     +1.007281E+04'
Reading: F     +1.007281E+04

Title: Re: AR488 Arduino-based GPIB adapter
Post by: 8bitcpu on April 23, 2022, 04:58:53 pm
Tl,dr:
Does anybody here have a lead on SN75161 and SN75160 smd chips with a reasonable lead time?

Hi all,

So I bought NI USB to gpib from amazon for round 100euro, big mistake, turns out it is a fake...
A vey wel done fake, but a fake that doesn't work like it should .
So I got the plan to take it a part en convert it to a AR488.
I want to drive ~5 devices with it so I decided to go with the  SN75161 and SN75160  solution.
And to fit it all in de NI enclosure it all needs to be smd.

Turns out these chips in smd form are unobtainable at the moment.
so my question is:
Does anybody here have a lead on SN75161 and SN75160 smd chips with a reasonable lead time?

Kr
Title: Re: AR488 Arduino-based GPIB adapter
Post by: IanJ on April 25, 2022, 09:03:40 am
I buy my GPIB buffers from Ebay. Always seem to work ok.

Ian
Title: Re: AR488 Arduino-based GPIB adapter
Post by: 8bitcpu on April 25, 2022, 04:48:41 pm
@justjason thanks for the offer, but the dip versions are still some what available. but will not fit in my project... if things change I might take your offer.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: leo1984 on May 10, 2022, 10:39:53 am
hi everyone. i've got a problem...
i can connect to my ar488 (pro micro) with putty on windows and some of the commands were received by the instrument (with ++llo goes in rem mode), but I'm not able to set up the connection in ke5fx... could anyone help me?
the instrument is a par 263a potentiostat.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: dl6lr on May 10, 2022, 12:22:15 pm
hi everyone. i've got a problem...
i can connect to my ar488 (pro micro) with putty on windows and some of the commands were received by the instrument (with ++llo goes in rem mode), but I'm not able to set up the connection in ke5fx... could anyone help me?
the instrument is a par 263a potentiostat.

Make sure you changed the id: "++id verstr AR488 version 6.102" so ke5fx identifies it as a prologix. See some more findings in the discussion thread I opened, especially those on the read_tmo_ms:
https://github.com/Twilight-Logic/AR488/issues/22
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on June 20, 2022, 07:48:36 pm
I have just pushed an update (0.51.09) to the repository that implements a few enhancements and changes:

- improvements and simplifications to configuration, including serial ports and Bluetooth
- changes to serial port and debug handling
- implementation of the ++help command as provided by douardda (with a slight modification)
- minor fixes and corrections
- support for additional boards, including Logic Green LG8FX, MicroCore ATMega644 and ATMega1024
- updates to the relevant sections of manuals (more to follow)

I have also added to the acknowledgements. Apologies if I have missed anyone. There have been lots of helpful messages and ideas both on the thread and in personal messages. These have been very much appreciated. Sadly because of ongoing health problems and other commitments, things are moving along a bit slowly but I am gradually working my way though things.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: justjason on July 18, 2022, 01:30:59 am
Would it be possible to set up two AR488 adapters to communicate with each one another ( for the sake of testing ) ?
I have tried to set up one as controller ( mode 1 ) and the other as device (mode 0)  but running a ++spoll from the controller does not seem to find the device. Both are set to address 5.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: macboy on July 19, 2022, 02:28:52 am
Would it be possible to set up two AR488 adapters to communicate with each one another ( for the sake of testing ) ?
I have tried to set up one as controller ( mode 1 ) and the other as device (mode 0)  but running a ++spoll from the controller does not seem to find the device. Both are set to address 5.
Every device including the controller needs a unique address. Controller is typically 0.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: justjason on July 21, 2022, 06:14:56 pm
Quote
Every device including the controller needs a unique address. Controller is typically 0.

Thanks for the reply. After discovering a wiring issue, I have it working now.
Using one adapter set as controller, and the other as device in listen only mode, I can pass data between the adapters. In this config, it is not necessary to use different addresses.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on July 23, 2022, 08:07:23 am
By default, the controller GPIB address is 0.

When the AR488 is set in controller mode using ++addr, this will set the address of the device that the controller will be communicating with across the GPIB bus.

When the address is set using ++addr in device mode, this sets the GPIB address of interface as a device on the GPIB bus.

I had, at one point, considered adding a ++caddr command to allow the GPIB address of the controller to be set to something other than 0, but felt that this was unlikely to be needed. If anyone thinks this will be useful, I can certainly add a feature to allow the user to change the controller address.

justjason, I am glad you have resolved the problem. An AR488 controller and an AR488 in device mode should be able to communicate with each other just the same as it would with any other GPIB device. With the AR488 in device mode you should be able to set a status byte to a value of your choosing and the AR488 should return it to the controller when it conducts a serial poll. The AR488 in device mode should clear the SRQ bit from the status byte once the serial poll has been conducted by the controller. You should also be able to pass data (with caveats) between the two AR488 interfaces.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Smokey on July 27, 2022, 12:02:47 am
Sorry for the basic question...

Is the Artag Pro-Micro firmware a separate project?  It's not clear from the Github repo what is going on there.  Do updates get merged into both?

A better question might be:  What is the Arduino build procedure when using a Pro-Micro?  What code/config needs to be set/used?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Smokey on July 27, 2022, 07:16:03 am
I think I got it.  Having a separate folder in the repo for the original Artag stuff is a little confusing.   I'm not sure why this is still there.  The code is 3 years old.  It at least deserves a comment in the README that says something like:
"This branch is deprecated.  Don't use this.  Here is how you change the config file for a pro-micro......"

I think all I needed to do was uncomment this line in the config file:

Code: [Select]
/*** MEGA 32U4 based boards (Micro, Leonardo) ***/
#elif __AVR_ATmega32U4__
  /*** Board/layout selection ***/
  #define AR488_MEGA32U4_MICRO  // Artag's design for Micro board
  //#define AR488_MEGA32U4_LR3  // Leonardo R3 (same pin layout as Uno)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on July 27, 2022, 08:54:05 pm
That's a fair point and I will remove the older material or move it to the Archive folder.

Yes all you needed to do was un-comment the layout definition in the ATmega32u4 section and comment out the other one. This is covered in the AR488 manual, however I appreciate that having the older code lying around might have been confusing.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: dmikk2 on August 01, 2022, 03:32:58 am
The Nano Every is not listed as a supported platform, but since it is similar to the Nano I decided to try it.  With a few trivial edits to the code, it does seem to basically work.  Starting with the source code in the latest AR488-master.zip make the following changes.

1. In AR488_Config.h uncomment #define AR488_CUSTOM, to choose a custom layout.  Since this option does not specify a particular cpu/board type, and does not use interrupts, I hoped that this would avoid most hardware specific code.

2. In AR488_Layouts.h copy the Nano pin definitions to the AR488_CUSTOM section.

3. In AR488_Eeprom.h change EESIZE to 256, since the Nano Every only has 256 bytes of eeprom.

4. In AR488_Eeprom.cpp replace the hard coded constant 512 by EESIZE.

5. The file DEVNULL.h is included in AR488_ComPorts.h, but was not on my Ubuntu system or in the Arduino IDE.  Download DEVNULL.h from the web and if necessary, change the include statement to point to the downloaded file.

With these changes, the AR488 project built and could be uploaded to the Nano Every.  To test this, I cut an old GPIB cable in half and soldered the Nano Every onto the exposed wires at the end of the cable.  This has the advantage that the micro USB port can be brought to the front of the instrument.  I'm currently using it to log data from a pair of HP3456a meters, and it seems to be working properly.  Obviously, this is not a thorough test, and there might be problems in other applications.

I appreciate the hard work and expertise that went into the AR488 project.  Thanks!!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on August 06, 2022, 09:12:51 am
dmikk2,

Thank you for posting these instructions.

Your post raises a couple of interesting points which I shall address in the next update. I will see whether this can be determined automatically, or perhaps add a parameter to AR488_Config.h to allow the size of the EEPROM to be configured manually. Secondly, the DEVNULL library needs to be installed in the Arduino IDE using the Library Manager (Tools->Manage Libraries, search DEVNULL, click Install). I will make sure that the instructions are added to the manual and the repository main page.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: croma641 on August 08, 2022, 02:08:49 am

Hi, with the last firmware version, Timelab (for my experience) doesn't work anymore with my Hp5334a. In particular, I cannot set the instrument in talk mode.

Has anyone had the same problem?

thanks in advance

Title: Re: AR488 Arduino-based GPIB adapter
Post by: PerArdua on September 01, 2022, 03:35:55 pm
Hi,

I have tried using the AR488 with driver ICs, based on a design for use with raspberry pis. I ca get the device to commnds to the controllers (such as ++ver, ++id fwver), and have made contact with one instrument (*IDN? successfully with a HP 1650B), however it does work with any other instruments. I have tried using it with a E3632A power supply, which returns nothing and enters an error mode, and similarly on a E4403B spectrum analyzer - with an error for 'query interrupted'.

Would anyone be able to suggest a starting point to identify why these errors occur? I have tried searching, but have found no useful information.

I have also attached my schematic for reference, though I suspect that the hardware is correct, else I would not have seen the IDN response from the 1650B. I have also attached my config file.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: justjason on September 01, 2022, 07:30:51 pm
A good tool is the
Code: [Select]
x_diag function. Try setting and double checking each pin at the output to make 100% sure of the connections.
https://ar488.readthedocs.io/en/latest/main/xdiag.html (https://ar488.readthedocs.io/en/latest/main/xdiag.html)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wilhe_jo on September 04, 2022, 09:35:51 am
I've got this code working with the arduino pro micro, which has a built-in USB port. It's also a very small board that fits neatly on the back of a GPIB connector, making a really tiny interface.

I've designed (but not yet received) a PCB to mangle the wiring appropriately but will publish that once it's proven.

Waveydipole has a copy of my changes (which also support the Uno and Mega versions in the same Arduino project) and will make that available in due course.

Apart from the size (an arduino nano also fits quite nicely on the back of a plug), the use of the 32u4 should make it possible to support the RTS/CTS pins correctly (though I haven't tried to do that yet) and maybe at some point support USBTMC as an alternative to serial.

Hi!
After having troubles getting a second Arduino to work (maybe quirky fake cpu?), I opted to spend an afternoon to design something more professional that my current piece of artwork hanging from the back of my trusty 26.5GHz spectrum analyzer.

In the end, I got a vertical usb-c connector, proper ESD diodes and a GD32F350 on a PCB the size of the case of a typical connector.

So the next thing to do is to see which firmware could be ported. The AR488 codebase is a obvious candidate, since I already use this in my custom measurement tools, but USBTMC would be nice as well....

So my question is if there's some fork of the AR488 firmware with USBTMC already?

73


Title: Re: AR488 Arduino-based GPIB adapter
Post by: PerArdua on September 04, 2022, 04:11:45 pm
Thank you justjason.

I tried using that but have since discovered that all my lines are held high. I tried again, removing my driver board and measuring at the Arduino header pins, but they are all still high and do not respond to commands. i have tried another 328P to be sure the uC wasn't damaged, but again almost all pins are high - even after performing the following tests.

Code: [Select]
++ver
AR488 GPIB controller, ver. 0.51.09, 20/06/2022
++xdiag 0 0
++xdiag 0 255
++xdiag 1 0
++xdiag 0 0

Only pins 3, 6 and 13 on are measured low - the rest are at 5V. I have attached my current config file for reference - the only changes I have made was to enable the driver ICs but uncommenting lines 186, 189 and 190 in AR488_Config.h. note I also had to include DEVNULL.h in the directory as I didn't have that installed. Any ideas as to what might be occuring? I'm using an Arduino Uno board and get these results with and without any other hardware attached.

EDIT: I have also attempted to use a Nano - adjusting only the definitions on line 45/46 in the AR488_Config.h. However I observe the same behaviour - perhaps this a result of my config file being set up in incorrectly - or how I am using ++xdiag? 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: justjason on September 04, 2022, 09:41:48 pm
GPIB signals an active state by switching to LOW. ie the default state of the pins is HIGH so in the default controller mode,  your pins should be all high at start except REN

++xdiag 0 255 and ++xdiag 1 255  should hold the pins low for ~10 sec.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: PerArdua on September 04, 2022, 10:56:30 pm
Thanks again JustJason - i admit the 10s caught me out - the AR488 manual doesn't mention it returns automatically haha.

On an Arduino on its own, with no drver ICs selected, using a fresh download of the software, all pins are normally at 5V, and go low as expected when asserted. However, REN is the opposite - it is normally low, but does go high when I send ++xdiag 223. Any ideas what could be causing this, or is REN supposed to be low?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: justjason on September 05, 2022, 07:44:22 am
In controller mode ( the default mode) that is normal behaviour. REN low at start
Title: Re: AR488 Arduino-based GPIB adapter
Post by: PerArdua on September 05, 2022, 01:41:34 pm
Thanks for confirming. I've tried simplifying the hardware by connecting up the connector to the arduino uno directly - no driver ICs. The outputs at the connector measure correct, but when I attempt to communicate with my E3632A (sending a single *IDN?) I get an error 410 - Query Interrupted. From the E3632A manual:

Quote
Query INTERRUPTED
A command was received which sends data to the output buffer, but the output buffer contained data
from a previous command (the previous data is not overwritten). The output buffer is cleared when
power has been turned off, or after a *RST (reset) command has been executed.

Any ideas what could be causing this? My process is currently:

1) Connect GPIB connector to instrument.
2) Connect USB between Arduino and PC.
3) Open serial port.
4) send ++ver - this returns the correct response.
5) set address to 6 by ++addr 6
6) send *IDN?
7) Nothing happens - wait for even a few minutes.
8) send *IDN? again - error 410.

EDIT: Apologies, I realize I wasnt sending a single *IDN? - I would send a single *IDN? as per above, and there would be no response (though the instrument would indicate it is in remote mode due to annunciator REM illuminating on the display). Sending a following *IDN? would trigger the 410 message, which is to be expected if the output buffer still has data. However, I am unsure why it would be hanging.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: PerArdua on September 05, 2022, 07:28:15 pm
Thanks - some interesting results.

Changing the termination char had no affect on the response of the E3632A. The users manual says that a command string must terminate with a <new line> character and that CR +LF is also accepted (page 114). However, I did try going through each of the four options on the 1650B (much older instrument). When using CR+LF, CR and none, the instrument did not respond at all. However, when appending a LF, it would throw an error message of:

"invalid character received: *IDN/<LF>"

I double, triple checked - and my termite terminal says I sent *IDN? - is the ? being removed somewhere?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wilhe_jo on September 05, 2022, 09:01:11 pm
hmmm...

My failure in making another arduino-based AR488 got me similar problems...
The spectrum analyzer switches to remote, but I don't get any response data.
I thought, I might got some fake AVR, but maybe there's another problem.

I'll see if I manage to do the xdiag-debugging the next days...

73
Title: Re: AR488 Arduino-based GPIB adapter
Post by: PerArdua on September 05, 2022, 09:05:50 pm
Thanks for the input wilhe_jo - it's both encouraging to know someone else has had similar issues, and perhaps equally discouraging haha. I'll chip in and say that I'm using official Uno and nano boards, so unless they have used fake AVR, then that is maybe not the issue.  :-[
Title: Re: AR488 Arduino-based GPIB adapter
Post by: dl6lr on September 06, 2022, 07:18:26 am
"invalid character received: *IDN/<LF>"

I double, triple checked - and my termite terminal says I sent *IDN? - is the ? being removed somewhere?

Look at the ASCII table. "?" is 0x3F and "/" is 0x2f, so one bit is missing (stuck low), this is bit 4 (in programmers counting, starting with bit 0) or DIO5 pin 13 on the GPIB connector. Other characters are *IDN which are 0x2A, 0x49, 0x44, 0x4E and <LF> which is 0x0A, none of those characters have bit 4 set. So I guess Data line for bit 4 DIO5 is stuck low or tied with a short to another bit and therefore forced LOW.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: PerArdua on September 06, 2022, 01:30:46 pm
Thanks dl6lr - I'd not thought of debugging that way - thank you for the useful tip. Turns out that line was broken on a HPIB cable I was using to extend from my connector to the instrument! I moved the instrument so now I have it connected straight into the GPIB connected, connected to the Arduino. I've verified there are no shorts or other breaks - each pin is controllable using the xdiag function. Now I am back to receiving no message from the 1650B when sending *IDN? - this turn both CR+LF and LF shows I've sent *IDN? - but nothing happens. Sending a second results in a query interrupted message again. CR and none do nothing.

I will have connected a logical analyser to the arduino's outputs and taken a 3s measurement around the moment I hit send for a *IDN? command sent to addr 7. I could only take 8 concurrent measurements at a time, so I did two measurements - one showing data lines and one the control. The Arduino and Instrument were in the same configuration for both measurements (ie rebooted, single *IDN? sent, etc).

Is there a source for decoding the data on the GPIB? I tried looking through the standard, but couldn't find anything - is it simple ascii? I tried running the numbers through a binary to text converter but only got rubbish. I tried decoding using 1 for HIGH as well as 0 for HIGH, Ch0 connected to DIO1 -> Ch7 to DIO8. I've attached the measurement files as csv - though there isn't too much to them. Images are below.

From what I've understood from reading pin descriptions - the fact that EOI never asserts itself stands out - is this part of the problem?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: PerArdua on September 06, 2022, 09:53:45 pm
I think I have figured it out...

Under the default configuration, the controller is not automatically configured to attempt to read a response from an instrument after a sequence that is not a controller command  (beginning with ++). *IDN? is one such command. As such, the ++auto 2 should be sent to the controller.

The 'correct' order of operations should be (based on my post from page 34):

1) Connect GPIB connector to instrument.
2) Connect USB between Arduino and PC.
3) Open serial port.
4) send ++ver
5) send ++auto 2
6) set address to 6 by ++addr 6
7) send *IDN?
8) ?
9) win

Thanks to those who helped me with this - I've learned a lot more about debugging and GPIB than I anticipated. :)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: dl6lr on September 07, 2022, 08:55:43 am
Is there a source for decoding the data on the GPIB? I tried looking through the standard, but couldn't find anything - is it simple ascii? I tried running the numbers through a binary to text converter but only got rubbish. I tried decoding using 1 for HIGH as well as 0 for HIGH, Ch0 connected to DIO1 -> Ch7 to DIO8. I've attached the measurement files as csv - though there isn't too much to them. Images are below.

I don't know what type of LA you are using. Are you using sigrok? There is a IEEE488 decoder for sigrok. I have a Tek 1240 LA that supports GPIB directly with a pod adapter. Haven't used it yet.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: PerArdua on September 07, 2022, 08:31:27 pm
I'm using a saleae logic 8 in their logic 2 software (confusing naming scheme).

Hope you have some luck with your device - were you using the ++auto 2 command?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: dl6lr on September 07, 2022, 09:04:30 pm
I'm using a saleae logic 8 in their logic 2 software (confusing naming scheme).

Hope you have some luck with your device - were you using the ++auto 2 command?

So with the saleae you can use sigrok/pulseview.
I had no problems with all my AR488. Just use either ++auto 1 or when using ++auto 0 just issue a ++read for the response.

I had some problems using the KE5FX toolkit with my TDS scops, as it is "too slow" and the default ++read_tmo_ms will just let the read time out (and the timeout you configure in the toolkit is not honoured for unknown reason).
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on September 08, 2022, 07:41:53 am
Thanks again JustJason - i admit the 10s caught me out - the AR488 manual doesn't mention it returns automatically haha.

I will add a note to the manual about the 10 second test interval as well as a reminder that GPIB signals are HIGH when inactive and LOW when active to this section of the manual.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on September 08, 2022, 07:55:41 am
I think I have figured it out...

Under the default configuration, the controller is not automatically configured to attempt to read a response from an instrument after a sequence that is not a controller command  (beginning with ++). *IDN? is one such command. As such, the ++auto 2 should be sent to the controller.

Indeed, after sending a query ('?' terminated) SCPI command, it is then necessary to read back the response with ++read. For convenience, the ++auto 2 command automatically sends a ++read after detecting a command ending with '?' but this is a somewhat non-standard approach.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on September 08, 2022, 08:19:06 am

Hi, with the last firmware version, Timelab (for my experience) doesn't work anymore with my Hp5334a. In particular, I cannot set the instrument in talk mode.

Has anyone had the same problem?

thanks in advance

Sorry to hear that! Could I have some more details please?
I am not familiar with Timelab. Is it this software: https://www.miles.io/timelab/beta.htm (https://www.miles.io/timelab/beta.htm) ?
Are you sending the sequence of commands to make the instrument enter talk mode manually, using a script, or is that being done by the Timelab software?
Which firmware version did it work with last, and does it still work with that version of the firmware?

If its the Timelab software that is sending the commands to switch the instrument into talk mode, then I will need to somehow explore what the software is sending to the interface.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on September 08, 2022, 10:58:15 am
I'm using a saleae logic 8 in their logic 2 software (confusing naming scheme).

The problem with the Logic8 (I have one, it's fantastic) is that you really want more than 8 lines for GPIB. The sigrok decoder will work with the cheap Cypress breakouts. Just like the AR488 they can be handwired, but there's a pcb here

https://oshpark.com/shared_projects/1FVMoqoQ (https://oshpark.com/shared_projects/1FVMoqoQ)

Unfortunately oshpark charge by the square inch so this isn't as cheap as the 32u4 pcbs. It's under 10x10 though so the chinese suppliers can be incredibly cheap.

The cypress boards are are quite nice to build into devices like this to make a dedicated analyser pod. There's also a sigrok USB C PD decoder which I have in mind for the same treatment though probably using off-the-shelf USB C breakouts.
 
https://www.ebay.co.uk/itm/275071624433 (https://www.ebay.co.uk/itm/275071624433) (example supplier for no particular reason, there are many. search for fx2lp)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on September 20, 2022, 09:44:38 am
Hi,

I think I have detected an incompatibility between the AR488 and the Prologix adapter that seems to cause an issue with the KE5FX VNA toolbox.
The issue is with the ++spoll command. The KE5FX software issues it with an address, i.e. ++spoll 16, where 16 is the primary GPIB address of the polled instrument.

Here is the command sequence that works successful with the Prologix adapter in combination with the HP8510B VNA:

++addr
  16
++spoll
  1
++spoll 16
  1

For better visibility I have indented the adapter responses. So far so good.

Now, here is the same sequence using the AR488:

++ver real
  AR488 GPIB controller, ver. 0.51.09, 20/06/2022
++addr
  16
++spoll
  1
++spoll 16
 => no response from the AR488 which causes the KE5FX VNA tool to lock up.

Have I misunderstood something or can there be done something about this problem?

Thanks and best regards,
Tom DG8SAQ
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on September 20, 2022, 09:52:22 am
Hi Artag,

Quote
The sigrok decoder will work with the cheap Cypress breakouts. Just like the AR488 they can be handwired, but there's a pcb here

https://oshpark.com/shared_projects/1FVMoqoQ

This is very interesting! Is there a description available how the sniffer board is connected to the Cypress board?
Also, is there a schematic for the pcb? Component values?

Thanks, Tom DG8SAQ
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on September 20, 2022, 05:02:36 pm
Hi Tom,

The only components are connectors and the Cypress board. It fits right over the connector PCB.  I'll put a photo up.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on September 23, 2022, 05:36:30 am
Hi Artag,

Quote
The only components are connectors and the Cypress board.

It seems there is a total of 16 resistors on the board. What about those?

Quote
I'll put a photo up.

Please do so, thanks!

Best regards, Tom
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on September 23, 2022, 10:50:51 am
Sorry, I'd forgotten those. They're not critical, just to protect the Cypress inputs. I used 2k2.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on September 23, 2022, 12:49:20 pm
Hi Artag,

that's very cool, many thanks!
I take it the two GPIB connectors serve as a thru connection, right?
What is the purpose of J1?

Best regards,
Tom
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on September 23, 2022, 01:05:23 pm
Yes, the two connectors are in parallel with the Cypress chip tapping the data and control lines via the resistors. J1 is also in parallel with the other two connectors allowing a connector on a short ribbon cable to be used instead.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on September 27, 2022, 05:49:11 am
Hi Artag,

can you possibly provide a definition file describing how the adapter board wires the GPIB bus to the Cypress board such that SigRock can decode it?

Many thanks and best regards,
Tom
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on October 03, 2022, 11:32:16 pm
I've put the schematic and other Kicad files online at https://github.com/artgodwin/Sigrok-sniffer
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on October 04, 2022, 09:01:13 am
Great, many thanks!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on October 05, 2022, 01:12:40 pm
Hi group,

I would like to start by thanking WaveyDipole for the efforts that he has put into this great project.
I have built and used a few of the AR488 using the artwork from artag.

I would like to try a buffered version, using SN75160 and SN75161 buffers. Following the schematic that is provided in the AR488 manual have generated:

*** This has been revised ***

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1608037;image)

3D image - proposed placement


(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1607521;image)


I have attached a pdf of the schematic.

I have six instruments on the bus. I think it would be more convenient to talk to the instruments through a single interface.

Does this make sense?

Regards,
Jay_Diddy_B
[attachurl=3]
[attachurl=5]
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on October 05, 2022, 10:21:04 pm
Hi group,

I just sent to the files for the buffered version to my favorite PCB vendor for fabrication. I will report back and share the files after I have tested the prototype.

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1607722;image)

Regards,
Jay_Diddy_B
Title: Re: AR488 Arduino-based GPIB adapter
Post by: croma641 on October 07, 2022, 11:09:38 am

Apart from the dimensions, is the layout the same with the Mega32u4?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on October 09, 2022, 01:24:00 pm
I have six instruments on the bus. I think it would be more convenient to talk to the instruments through a single interface.

Does this make sense?

Regards,
Jay_Diddy_B

USB hubs and cables are cheap, but if all six of your instruments are placed such that they can be, or already are cabled together with GPIB cables, then this approach including buffer chips might also make sense. Otherwise you would require 6 USB ports and your PC would need to handle up to 6 USB serial connections. An interesting project to be sure and I am very interested to see how it works out!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on October 09, 2022, 01:29:02 pm
Hi,

I think I have detected an incompatibility between the AR488 and the Prologix adapter that seems to cause an issue with the KE5FX VNA toolbox.
The issue is with the ++spoll command. The KE5FX software issues it with an address, i.e. ++spoll 16, where 16 is the primary GPIB address of the polled instrument.

Here is the command sequence that works successful with the Prologix adapter in combination with the HP8510B VNA:

++addr
  16
++spoll
  1
++spoll 16
  1

For better visibility I have indented the adapter responses. So far so good.

Now, here is the same sequence using the AR488:

++ver real
  AR488 GPIB controller, ver. 0.51.09, 20/06/2022
++addr
  16
++spoll
  1
++spoll 16
 => no response from the AR488 which causes the KE5FX VNA tool to lock up.

Have I misunderstood something or can there be done something about this problem?

Thanks and best regards,
Tom DG8SAQ

Tom, could you log an issue please. It will help me keep track.

https://github.com/Twilight-Logic/AR488/issues

Just copy the contents of your post into it. Thanks.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on October 09, 2022, 01:38:53 pm

Hi, with the last firmware version, Timelab (for my experience) doesn't work anymore with my Hp5334a. In particular, I cannot set the instrument in talk mode.

Has anyone had the same problem?

thanks in advance

I am just wondering whether you managed to get this to work? If not, then please could you log an issue at:

https://github.com/Twilight-Logic/AR488/issues

Could you let me know what configuration you are using on the AR488 please?

I did have a look at the ++lon and ++ton commands on the assumption that you are probably using ++ton. I saw enough to establish that there may be possible problems here and I do need to do some further testing and investigating. If you log an issue that will help me to keep track. Thanks.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on October 09, 2022, 05:05:22 pm
Quote
Tom, could you log an issue please. It will help me keep track.

Done. Thanks for looking into this!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on October 10, 2022, 04:17:16 am
Hi group,

Today I ordered the Sigrok FX2LP sniffer board contributed by artag. I made a few cosmetic changes to the board:

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1610863;image)

In working on this I created a couple of step files for the 24-pin microribbon connectors.

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1610869;image)

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1610875;image)

I have attached the step files.

Regards,
Jay_Diddy_B
[attachurl=4]
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on October 10, 2022, 04:52:56 am
Hi group,

Today I worked on connecting the GPIB bus to an HP 16702A Logic Analyzer. This should also work with a MSOX Oscilloscope. I don't have the 40-pin cable to test this.

Schematic

The schematic and board artwork were generated in KiCAD.

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1610917;image)

Board Contruction

I made a single-sided PCB using my LKPF Protomat c60. The small traces were 10 mil.

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1610923;image)

HP 01650-63203 Termination Adapter

This contains 16 networks to isolate the LA from the system under test. It plugs into a 20-pin header on my board.

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1610929;image)

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1610935;image)

HP 16702A Logic Analyzer

Here is the result being displayed on an HP 16702A Logic Analyzer. It uses one 16-channel pod.

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1610941;image)

The data reads: "; <SPC> OUTP <SPC> ON <CR> <LF>"

The problem that I am trying to solve

The first write to a power supply, HP 6673A, doesn't work 100% of the time. This happens if the AR488 is disconnected from the USB port and then written to. I have seen that there is no activity on the GPIB bus. My next step will be to look at the connection between the CH340 and the ATMEGA328P. I don't know if the issue is in my VB.net program, the com port drivers or the AR488.
I have found that if you open a port the DTR line will reset the Arduino.

I am using an Arduino nano, I am not sure which bootloader.


Regards
Jay_Diddy_B
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on October 10, 2022, 05:31:55 pm
The problem that I am trying to solve

The first write to a power supply, HP 6673A, doesn't work 100% of the time. This happens if the AR488 is disconnected from the USB port and then written to. I have seen that there is no activity on the GPIB bus. My next step will be to look at the connection between the CH340 and the ATMEGA328P. I don't know if the issue is in my VB.net program, the com port drivers or the AR488.
I have found that if you open a port the DTR line will reset the Arduino.

I am using an Arduino nano, I am not sure which bootloader.

Regards
Jay_Diddy_B

Arduinos such as the UNO and Nano do use the DTR line to reset the Arduino. This is how programming works. During reset, the bootloader checks whether a particular sequence of bytes has been sent to indicate an upload is pending. If so, then it jumps to a routine that uploads the code. If not, then it runs the program already present in memory.

There is approximately a one second delay while the bootloader does its stuff. Any data sent over serial while the bootloader is running and before Serial is initialized (i.e. Serial.begin() ) is simply lost. For this reason, if using one of those boards, time has to be allowed after the serial connection is made, for the Arduino to initialise.

The reset can be prevented by placing a 10μF capacitor between  RST and GND, however, this has to be removed or switched out of circuit form programming. I have read comments from some who do not recommend doing this as they feel it is risky. I haven't had any problem doing this during testing, but if you try it, then you do so at your own risk.

The Pro Micro board and others using the 32u4 MCU do not reset themselves when a serial connection is made.

The camera angle probably makes it look a lot worse than it is, but I do hope that there is not too much mechanical stress on that PCB joint. The HP Termination Adapter looks quite bulky!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on October 10, 2022, 06:35:26 pm

Snip ...

There is approximately a one second delay while the bootloader does its stuff. Any data sent over serial while the bootloader is running and before Serial is initialized (i.e. Serial.begin() ) is simply lost. For this reason, if using one of those boards, time has to be allowed after the serial connection is made, for the Arduino to initialise.

Snip ...

The camera angle probably makes it look a lot worse than it is, but I do hope that there is not too much mechanical stress on that PCB joint. The HP Termination Adapter looks quite bulky!


WaveyDipole,

I am sure that you are correct. I will insert a delay in my code to allow the Arduino to start.

This is the reason that I was exploring the buffers. I was having unreliable data transfer on the first instructions sent to the power
 supplies, to turn them on.

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1611376;image)

I will give you a little insight into the application. I am testing high-power circuit boards. From left to right I have a stack of 2kW power supplies, 6671A (8V 220A) and 6673A (35V 60A). In the middle is my 'scope. and the then loads, power supplies and DMM (2x 3457A) Then another load two 6050As with a total of six 600W modules.

I run the test on multiple computers. I have to remember which instrument is on each port on each computer. If I use a single USB to GPIB interface, this is simpler.

The HP 01650-63203 has a fairly substantial flex circuit board between the two blocks. If I was using it for a longer period of time, I would use a right-angle connector and support the 01650-63203 on the PCB.

Thanks again!!

Jay_Diddy_B

Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on October 11, 2022, 12:19:53 pm
Hi group,

If made the step files for the straight versions of the microribbon connectors.

(https://www.eevblog.com/forum/index.php?action=dlattach;topic=168326.0;attach=1611862;image)



(https://www.eevblog.com/forum/index.php?action=dlattach;topic=168326.0;attach=1611868;image)

Regards,
Jay_Diddy_B
[attachurl=3]
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on October 11, 2022, 04:50:47 pm
I pushed an update today that should fix the SPOLL problem. If an ++spoll was sent without an address then it would return a status byte from the currently addressed device. If however the address was specified, e.g. ++spoll 3 then it would run into a problem.

I have also looked at and hopefully fixed problems with LON mode.

I have also implemented a prom(iscuous) mode that allows data sent between a controller and device on the bus to be monitored. It is similar to lon mode, except that lon mode works only with a Talk-Only node where no controller is present on the bus, whereas prom mode can operate when addressing is used. In prom mode, command bytes are ignored but the interface will receive data sent across the bus between the controller and any device.

I am still working on problems with supporting the MCP23x17 chips. I thought I had at least sorted out  MCP23S17 support. I know there were problems with supporting the MCP23017. However, some further problems have surfaced with both chips.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on October 12, 2022, 12:13:46 pm
Have just posted a further update (0.51.15) this morning that fixes a couple more bugs.
Still working on the MCP23x17 stuff.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on October 25, 2022, 12:19:09 pm
Hi group,

I have built and tested the buffered version of the AR488 that I shared in replies 850 and 851 in this thread. The board uses the SN75160BN and SN75161BN buffer chips. These were available from Digikey.

Photographs

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1623286;image)

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1623292;image)

Code Modification

A small change must be made to AR488_config.h to support the buffers:

Code: [Select]
/***** Enable SN7516x chips *****/
/*
 * Uncomment to enable the use of SN7516x GPIB tranceiver ICs.
 * This will require the use of an additional GPIO pin to control
 * the read and write modes of the ICs.

// Mod JDB

 */
#define SN7516X
#ifdef SN7516X
  #define SN7516X_TE 6
  #define SN7516X_DC 13
//  #define SN7516X_SC 12
#endif

Files

I have attached a zipfile containing the Gerber files.

Regards,

Jay_Diddy_B
[attachurl=3]
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on October 30, 2022, 06:40:54 am
for the life of me  with the latest arduino ide   2.0.1   

It always miss some files  devnull.h or pro_micro.h        BUT they are there ??? or in the same folder than the ar488 ino file

even reverted to the old 1.8.x   no luck

all come from :  https://github.com/Twilight-Logic/AR488 (https://github.com/Twilight-Logic/AR488)  and i use the latest SRC folder ???

and the arduino is the sparkfun  pro micro at 16mhz :  https://www.sparkfun.com/products/12640 (https://www.sparkfun.com/products/12640)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bingo600 on October 30, 2022, 08:52:43 am
If you are using a case sensitive OS (filesystem) ... Ie. linux.
I have been "bitten" several times by the #include statement not matching the case of the file on the disk.
Usually won't be an issue on a M$ OS , but will be on linux & prob MAC too.

Not saying that this is the issue but ..... Worth a check.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on October 30, 2022, 12:16:01 pm
for the life of me  with the latest arduino ide   2.0.1   

It always miss some files  devnull.h or pro_micro.h        BUT they are there ??? or in the same folder than the ar488 ino file

even reverted to the old 1.8.x   no luck

all come from :  https://github.com/Twilight-Logic/AR488 (https://github.com/Twilight-Logic/AR488)  and i use the latest SRC folder ???

and the arduino is the sparkfun  pro micro at 16mhz :  https://www.sparkfun.com/products/12640 (https://www.sparkfun.com/products/12640)

From: https://github.com/Twilight-Logic/AR488 (https://github.com/Twilight-Logic/AR488)

You have to:

DEVNULL Library

The project requires the DEVNULL library to be installed in the Arduino IDE. To install this library, please follow these steps:

within the IDE go to Tools -> Manage Libraries... After a second or two, this should display a list of available libraries. In version 2.0rc9.x, the list ,may not appear the first time around. In that case, just go to Tools->Manage Libraries... again.

in the search box type 'DEVNULL'. This should filter the list of libraries leaving only the DEVNULL library by Rob Tillaart listed.

click the 'Install' button. This will install the latest version of the DEVNULL library.

Been there ...

Regards,
Jay_Diddy_B
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on October 30, 2022, 01:45:28 pm
@jay  thks

Done that  so  many times, even the old arduino 1.8.18  complaint the same

ar488 master with the src folder   "AR488 GPIB controller, ver. 0.51.15, 12/10/2022"

Even the old versions in the archive are not uploading  ... sent an email to sparkfun

Even trashed the bootloader   :--

It's an 32u4 based board at 16 mhz,  tried a leonardo variant board type  ...  now it give me this :

Picture attached  --->   Prologix gpib configurator see  AR488 GPIB controller ver 0.51.15  ...  ok    but nothing else is shown or active for the other choices ??

QUESTION:   how should an ar488 device be declared in the device manager  ??   mine only shows as a serial device  ...  ??   baud rate speed ? 115200  or faster ?

some rant

Oh man i'm getting too old for this stuff, i'm forced to build an gpib adapter to try  a majority of softwares  who talks to gpib adapters / some does lan  but  i see there is no interest  to make the 34410 34411 l4411 generations work or being added

WHY   because the Keysight software only start the meter when doing data logging .......  i want to set things up before ...

I'm testing  huge power cells and this meter was fine for this setup and would be easier to protect it against an exploding battery (vibration tests  etc ..)

Talked to the Testcontroller  creator to add some of them in his definition file   but man even reading his documents is hard as h...  i'm native french

Bought an L4411 meter thinking it would be easy to interface without this adapter, an simple to use software interface, to make the meter work BEFORE  doing any data logging  ...   lost so many hours just to make an s#$$% (discovered too late) arduino clone from sparkfun work, even my never used mega 2560  doesn't want to be an ar488  ?? 

The sparkfun variant has to be resetted twice to get into DFU mode
, you have 8 seconds to reflash it or do something with it ??? avrdude cant flash it fast enough  and it will crash the 32u4 boot loader, (sparkfun made an updated bootloader)   even my 1k$$ programmer would not recover it,  because of the clock fuses it can not understand  :-- way to go ELNEC

An old stk500 clone  worked fine in isp ....                   

I'm happy to receive help from here ...  thks  even now  i'm not sure how to configure it   loll even reading the ar488 manual ...
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on October 30, 2022, 04:35:51 pm
Hi coromonadalix,

see this message:

https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4166605/#msg4166605 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4166605/#msg4166605)


Make sure you changed the id: "++id verstr AR488 version 6.102" so ke5fx identifies it as a prologix.

No experience myself, just remembering I had read about this issue.


Jay_Diddy_B
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on October 31, 2022, 12:00:45 am
@Jay   thks 

Well after tons of fun with ar488 Master on Github, this SparkFun Arduino Pro micro 32u4  is stubborn,    only the Girlando v6.1  works ?? 

I Managed to get an Sparkfun Pro Micro at 16Mhz be shown in arduino ide  ....  :palm:

Now GPIB configurator see's it, and can communicate,  not sure for the pinouts in the definition file ...  i have to wait for pcb's and the connector


a Frustrating  run for me ... i do understand the gpib universe a bit, but for me  |O


Oh you can use  ComNameArbiterTool  in Admin  mode  to clean your com ports ...
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on October 31, 2022, 06:54:05 pm
Tried a new board  NANO V3  BUT  it as an Mega328 BP    and once again  it doesn't work  with all the web tricks, another shi#$#$%  clone,  you have the old bootloader and the new bootloader .... 

with the sketch  blink ................  no led blink  nada  niet  nothing     |O   


tried other boards support for the nano v3 with  the BP variant    web tricks    no avail
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on November 04, 2022, 11:46:14 pm
Hi,

I just want to report that I have built and tested the Sigrok / FX2LP/ Breakout board posted by artag.

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1631494;image)

I ran into a little issue with the 'CY7C68013A-56 EZ-USB FX2LP USB2.0 Development Board Logic Analyzer EEPROM' I purchased from eBay. I bought two boards. I had to change the EEPROM on one of the boards. I don't know if it was defective or counterfeit. I replaced the EEPROM with an AT24C128C from Digikey (AT24C128C-SSHM-T) then worked properly. I was using the Cypress control center software.

The defective part was marked, ATHYC...

 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1631500;image)

The Sigrok should be setup like this:

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1631506;image)

Regards,
Jay_Diddy_B
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on November 05, 2022, 12:11:52 am
i recall there was some problems with the eeprom   on theses thing,  i have one  somewhere who is configured as an logic analyser .... saleae clone

what is the code put in it ? just to help the others
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on November 05, 2022, 12:12:33 am
Hi group,

Here is a sample capture. 'VOLT 24; CURR 60; OUTP ON <CR> <LF> is being written to an HP6673A power supply.

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1631518;image)

Regards,
Jay_Diddy_B
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on November 05, 2022, 12:26:30 am
i recall there was some problems with the eeprom   on theses thing,  i have one  somewhere who is configured as an logic analyser .... saleae clone

what is the code put in it ? just to help the others

Hi, the configuration file is:

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1631524;image)

0xC0 is a header
0x50 is VID low byte
0x1D is VID high byte

0x8D is the PID low byte
0x60 is the PID high byte

0x20
0x20
0x00 this a version code

This identifies the board as a FX2 LAFW. This does not use the Saleae software.

This is the best source of instructions that I found:

https://community.infineon.com/t5/Knowledge-Base-Articles/Cypress-EZ-USB-FX2LP-based-Logic-Analyzer-using-Open-Source-sigrok-PulseView/ta-p/252866 (https://community.infineon.com/t5/Knowledge-Base-Articles/Cypress-EZ-USB-FX2LP-based-Logic-Analyzer-using-Open-Source-sigrok-PulseView/ta-p/252866)

Regards,
Jay_Diddy_B
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on November 08, 2022, 03:12:35 pm
I have received a board from Jay Diddy and have it working with my Solartron 7150 Plus DMM.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on November 08, 2022, 04:50:55 pm
for the life of me  with the latest arduino ide   2.0.1   

It always miss some files  devnull.h or pro_micro.h        BUT they are there ??? or in the same folder than the ar488 ino file

even reverted to the old 1.8.x   no luck

all come from :  https://github.com/Twilight-Logic/AR488 (https://github.com/Twilight-Logic/AR488)  and i use the latest SRC folder ???

and the arduino is the sparkfun  pro micro at 16mhz :  https://www.sparkfun.com/products/12640 (https://www.sparkfun.com/products/12640)

I am sorry to hear this. I can't vouch for pro_micro_h as its part of the board library but am curious about the DEVNULL library. I have added instructions to the manual and the Readme indicating that the library needs to be installed using the Arduino IDE. I haven't tested the code in Arduino 2.0.x yet but it should work fine in 1.8.19. In the meantime, I will make a point of testing it in 2.0.x.

When you say it misses files, I presume you are getting error/warning messages during compile? If its still an issue, could I ask you to raise a case and post the related error messages here please:

https://github.com/Twilight-Logic/AR488/issues (https://github.com/Twilight-Logic/AR488/issues)

The DEVNULL library is quite simple and I could have just copied the code into one of my project files, but on the other hand it is not unusual for a project to depend on other third party libraries. It means that one does not have to re-invent the wheel and can simply download the library via the IDE from the maintainer. Doing so also gives them credit for the work. In the end I decided to add it as a dependency. If this is causing too much hassle then I am open to re-thinking that approach.

If you are using a case sensitive OS (filesystem) ... Ie. linux.
I have been "bitten" several times by the #include statement not matching the case of the file on the disk.
Usually won't be an issue on a M$ OS , but will be on linux & prob MAC too.

Not saying that this is the issue but ..... Worth a check.

This is a good point. On Microsoft Windows it doesn't matter since the FAT32 and NTFS filesystems are case insensitive. On other operating systems where file system are case sensitive, it will be importent to ensure that #include entries in code are specified in the same case as the ffilename. That having been said, I develop on Linux which IS case sensitive so, in theory, I should be catching any problem in that regard during development. On the other hand, my project files are on a shared NTFS drive. I therefore just checked the DEVNULL library. It's name is in uppercase in the Arduino IDE Library Manager. The filenames in libaries/DEVNULL are named DEVNULL.h and DEVNULL.cpp, both uppercase except for the extension, as is the already mentioned directory name. Its entry in the library_index is also upper case:

"providesIncludes": [
        "DEVNULL.h"

"name": "DEVNULL",

For good measure, I also checked the developers GitHub page and its also in upper case there, so everything looks consistent.

Tried a new board  NANO V3  BUT  it as an Mega328 BP    and once again  it doesn't work  with all the web tricks, another shi#$#$%  clone,  you have the old bootloader and the new bootloader .... 

with the sketch  blink ................  no led blink  nada  niet  nothing     |O   


tried other boards support for the nano v3 with  the BP variant    web tricks    no avail

What "web tricks" are you referring to? Are you using the Arduino Cloud editor by any chance?

Regarding that Nano V3, a quick search seems to indicate that the 328BP is different from the 328P and I will have a look at the detail. On eBay all the boards I found seem to have the 328P. Could you post a link to where you purchased the your Nano V3 board from?

I did also find a Nano 'red' board on eBay which has a 168P MCU. I have not tested either the 328PB or the 168P but perhaps it would perhaps not hurt to get a couple to try. If it differs, I would be able to create a layout for them.

It sounds like you have not had much 'fun' with your Sparkfun board. I have never tried one of these, but I was able to recover two 32u4 boards that had failed during upload by using a usbasp programmer to burn the bootloader back on to them. Woth regards to bootloaders, I would expect brand new Nano boards to be using the new bootloader, although if one has an old Nano board lying around it might still have the old bootloader on it. Of course with boards from the far east one never knows....

Incidentally I was considering to move the AR488 code to VsCode/PlatformIO at some point but haven't made a decision on that yet. However, before I get ahead of myself, I will test on Arduino IDE 2.0.x first.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on November 08, 2022, 05:13:45 pm
Just a quick update. I updated my IDE 2.0.0 installation to IDE 2.0.1 (I am using the ZIP file version). I then tried compiling the AR488 project and uploading it to my UNO test setup and it worked without any difficulty. As with IDE 1.8.19, I selected the .ino file and the IDE loaded all of the remaining project project files just as it does in IDE version 1.8.x. Based on this test, I don't envisage any problems with compiling on account of upgrading to IDE 2.0.x. However, just because I did not encounter any difficulties does not means that others might not, so I continue to be interested in hearing about any problematic experiences that others have encountered while compiling this project using IDE 2.0.x.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on November 08, 2022, 10:54:58 pm
hi,  well   on the sparkfun pro mini (32u4)  it did finally work, or seems to ??   Still waiting for the connectors ...

Reinstalled Arduino IDE, installed the devnull package,  re-downloaded the ar488 master,  but not so sure if i flashed it at 9600 baud instead of 115200 ???


The prologix gpib configurator now see it, but no options are available (all greyed out) is it a normal behavior ? 

And Emanuele Guirlando  is still working ok, and the options are not greyed out  ??


What is the normal adapters speeds in theses cases : ar488  and  Emanuele Guirlando ??

thks         



the"tricks" i mentioned earlier where for the other  arduino board i had, i got refunded  .... i tried many "328BP boards definitions packages" to add it properly into IDE, but did not work
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on November 09, 2022, 03:31:50 pm
Emanuelle's version ran at 115,200 baud. AR488 also runs at 115,200 baud by default. The baud rate is not that critical so long as the baud rate configured in the connecting software matches that of the adapter. I believe that the default baud rate for KE5FX is also 115,200 baud although this can be set to an alternative value in CONNECT.INI.

In order for KE5FX to recognize the interface, it must have a specific character sequence in the string returned by the ++ver command. The same is true for EZGPIB.

KE5FX requires the sequence 'Version 6' and is case insensitive.
EZGPIB requires 'GPIB-USB'

The fixed character sequence returned by Emanuelle's program when using the ++ver command is:

Code: [Select]
ARDUINO GPIB firmware by E. Girlando Version 6.1

On the AR488 the version string displayed with the ++ver can be set to anything convenient by using the following example commands:

Code: [Select]
++id verstr AR488 GPIB-USB version 6
++savecfg

This will set the version string to 'AR488 GPIB-USB version 6' and should be enough to get the interface recognized by the Prologix GPIB Configurator program in KE5FX Tools. The version number does not actually require the '.1' suffix, but there is no harm leaving it in if preferred as per Emanuelle's version string. The second command saves the setting to EEPROM. This is important since we need the version string setting to survive a reset. That the string has been saved can be confirmed by resetting or power cycling the adapter and using the command:

Code: [Select]
++id verstr

This should display the string entered in the previous command.

That PB variant of the 328 seems to be a bit of an oddity as it is not supported as a processor for the Nano in Arduino IDE 1.8.19 or 2.0.1, both of which support, as you have noted 328P and 328P (Old bootloader), as well as the 168. No listing of the PB variant in either IDE. The PB variant appears to be almost the same as the 328P but there are some minor differences including fuse values. Not having come across one of these myself, I am not sure how to deal with it yet, but I am happy to purchase a couple to experiment with if someone could point me in the right direction.

Incidentally, all these chips have EEPROM. The 32u4 has 512 bytes, the 328P and the 328PB both have 1024 bytes. Non-AVR boards may not have EEPROM. Examples include the ESP8266 and ESP32. However, the Arduino framework for both of these boards supports an EEPROM library that implements EEPROM in flash.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on November 09, 2022, 09:31:04 pm
Success    thks for your patience and understanding(s)

++id verstr AR488 GPIB-USB version 6
++savecfg

worked fine     :-+

Q:  is there a way to implement/set it up in the sketch file ??    or just add a comment in the documentation ??    unless I've totally overlooked it ??
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on November 10, 2022, 05:18:56 pm
Glad to hear that worked.

Near the top of the AR488_Config.h file there is a line like this:

Code: [Select]
#define FWVER "AR488 GPIB controller, ver. 0.51.15, 12/10/2022"
Thinking about your request it occurred to me that you could just change that line to:

Code: [Select]
#define FWVER "AR488 GPIB-USB version 6"
This would make the above character sequence the default version string returned by the ++ver command and it would then be stored as part of the program code.

I will add some instructions regarding all of this to the manual. There is some brief information in the command reference under the ++id command, but perhaps it ought to be explained in more detail in the  section that references the KE5FX tools.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: simba15 on December 14, 2022, 04:25:07 pm
So I built the AR488 for the first time.

I uploaded the code 0.51.09 ( with no changes ) Arduino Mega with D wiring config.  ( is there any changes required?)

I can get a response to ++ver, but get no reply to ++idn 1 or *idn?

Testing with 34401A ( set to gpib addr 22).

Any suggestions to troubleshoot? How could I enable Debug?

Thanks.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: justjason on December 16, 2022, 04:20:23 pm
++ver will confirm that the adapter is running and talking to your PC .
You may still have a issue between the adapter and your 34401A

Presuming all setting are ok ( address etc..), and you have chosen the correct board definition,  then the most likely cause after that is the connections between the Mega and the GPIB plug / cable.
These can be checked using the Xdiag function https://ar488.readthedocs.io/en/latest/main/xdiag.html  (https://ar488.readthedocs.io/en/latest/main/xdiag.html)  to check each pin is connected as expected
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on December 16, 2022, 06:40:53 pm
So I built the AR488 for the first time.

I uploaded the code 0.51.09 ( with no changes ) Arduino Mega with D wiring config.  ( is there any changes required?)

I can get a response to ++ver, but get no reply to ++idn 1 or *idn?

Testing with 34401A ( set to gpib addr 22).

Any suggestions to troubleshoot? How could I enable Debug?

Thanks.

Thank you for your interest in the project.

To enable debug, first un-comment this line in AR488_Config.h:

Code: [Select]
//#define DEBUG_ENABLE
Further down in DEBUG LEVEL OPTIONS, you will need to enable one or more options by un-commenting them. Un-commenting the following option might be helpful:

Code: [Select]
//#define DEBUG_GPIBbus_SEND
You may also want to turn on verbose mode with ++verbose.

Have you tried 0.51.15 btw?

Since the 34401 can respond to the *idn? command, there is no necessity to turn on the AR488's own IDN responder with ++idn 1. All you should need to do is send *idn? followed by a ++read and the instrument should respond. Alternatively, change the 'auto' setting to ++auto 2. The interface will then then get query responses automatically. In order to verify that a parameter has been changed, issue the command again without the parameter, for example:

Code: [Select]
++idn 1
++idn

should respond with a 1 to indicate that the AR488 IDN responder has been turned on.

Code: [Select]
++auto 2
++auto

should respond with a '2' showing that the value of the 'auto' parameter is now set to 2.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on December 17, 2022, 02:41:39 pm
So I built the AR488 for the first time.


Testing with 34401A ( set to gpib addr 22).

Any suggestions to troubleshoot? How could I enable Debug?

Thanks.

How did you build it? Did you use one of the board designs that has been shared on this forum?

Can you share a picture of your interface?

Best regards,

Jay_Diddy_B


Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on December 17, 2022, 05:45:38 pm
Hi there, does anyone have in DE, or around, some of the Jay's PCBs for the buffered version of the adapter, or is anyone interested in a group order in Germany ?
If someone has available boars and can send please PM me, for group buy let's do it here if it's not too much of a hassle.

Cheers,
DC1MC
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on December 17, 2022, 10:28:06 pm
Hi there, does anyone have in DE, or around, some of the Jay's PCBs for the buffered version of the adapter, or is anyone interested in a group order in Germany ?
If someone has available boars and can send please PM me, for group buy let's do it here if it's not too much of a hassle.

Cheers,
DC1MC

All the files that you need to send to a low-cost PCB factory are attached to this message:

Link: https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4483507/#msg4483507 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4483507/#msg4483507)

If you can wait the time, and get the cheapest shipping option. I paid a total of $5.70 USD. I ordered 6 October and received the boards on the 18 October. Using DHL would have reduced the time in half, but the cost would be 5 times.

Similarly, I ordered the connectors from Aliexpress for $1.60 each on 9 October and received them 17 October (Aliexpress Standard Shipping) in Canada.

The buffer chips SN75160BN and SN75161BN I bought from Digikey and Mouser. I don't want to mess with counterfeit chips.

Regards,

Jay_Diddy_B
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on December 18, 2022, 08:15:48 am
Many thanks Jay for all the support, unfortunately I have exactly zero experience with ordering PCBs to be manufactured, could you kindly go "the last mile" and share the link to the PCB service so I can order a number of them, with the Christmas stuff and the general tardiness of the German customs, they'll arrive most likely after my Christmas vacation will be over, but that's on me for MY tardiness and at least some boards will be quickly available for members in DE.

Cheers,
DC1MC
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on December 18, 2022, 11:26:43 pm
Many thanks Jay for all the support, unfortunately I have exactly zero experience with ordering PCBs to be manufactured, could you kindly go "the last mile" and share the link to the PCB service so I can order a number of them, with the Christmas stuff and the general tardiness of the German customs, they'll arrive most likely after my Christmas vacation will be over, but that's on me for MY tardiness and at least some boards will be quickly available for members in DE.

Cheers,
DC1MC

I only have used JLCPCB recently. I have had to no reason to go anywhere else. Let me take you through the process.

Data Preparation

I generated the artwork using the open source software KICAD. I am using version 5.
When I am finished the design, I generated the Gerber files and the drill data. These files are all zip together. I use the Protel naming conventions for the different layers. Because of the naming convention it is not necessary to give any instructions to JLCPCB.

The zipfile contains:

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1667788;image)

These are all the files needed to make the board. gko is the outline, xln is the drill data etc.

JLCPCB website

Go to the JLCPCB website. At some point you will have to register. I registered a while ago.

Find the instant quote button and click on it.

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1667770;image)

When prompted click on add gerber file button.


(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1667794;image)

Select the zipfile. This will upload all the manufacturing data to JLCPCB.

You will be given a preview:

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1667776;image)

It should look like this. You can change the color of the board if you require. You can also change the quantity of boards. When you are happy with the quantity and price, add to cart.

Shipping options

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1667782;image)

There are a number of shipping options available. If I am not in a hurry and it is a low value shipment, I use the cheapest economical. If I am in a hurry I use DHL DPP. DPP means that the customs charges and taxes are pre-paid. No big surprise bills from the courier.


Jay_Diddy_B
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on December 19, 2022, 05:27:29 pm
I can confirm that ordering from JLPCB is that simple, 10pcs with the cheapest shipping to Germany costs €9.56 so I comes to 1.80 to send around Germany in a letter envelope is someone wants.
All that is left for me now is to see if the software compiles on my machine and, most important, to find an Arduino that is not a total fake and doesn't take a millennia to arrive. Suggestions for DE area are appreciated.

 In the end one more
Herzliche Dank
:clap: to Jay and the other project contributors for their effort spent on this project.

 Cheers,
 DC1MC
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on December 21, 2022, 07:09:07 am
Some update:
I've downloaded and compiled the software on Arduino IDE 1.18.19, to my great amazement and pleasure "It just compiled" ᵀᴹ (I did spend a couple of seconds actually reading the README and installed the DEVNULL library), none of the crap the other forum member experienced in his own thread  :clap:
Now I'm waiting for the two Nanos I've bought from a seller Germany to see if it loads and runs, but, if the Nanos are not the most miserable fakes, I expect to happen without issue.
The boards are "In production" for a couple of days, hopefully soon they'll board the slow China boat to reach Kartoffelfressendland :D.
 
Cheers,
DC1MC
Title: Re: AR488 Arduino-based GPIB adapter
Post by: gmac34 on December 22, 2022, 02:19:21 am
Hi, I'm having a weird issue trying to control two devices with an Arduino.
I have been successfully using AR488 for a couple of months, controlling an old Philips 5390 (A low-frequency synthesizer) with python, making it do frequency swipes and so on, and it worked very well. Then I got a Keithley 2000, and I thought I could pair the two to do frequency response measurements.

Since the Philips doesn't use the usual gpib connector I had to chop a glib cable in two and terminate it on one side with a DB-25 connector.
the other side plugs in the Keithley on one side and the Arduino on the other (usual pass trough GPIB connector)


Here comes the problem, the cable I made seems to work fine if the Keithley is disconnected, but if all are connected on the bus I start getting errors in the communication to the Philips, some commands are not sent at all others get corrupted, even if the Keithley is off. The weirdest part is that consistently, if an instruction includes a 7 (for example set the frequency to "F175000") all the following characters are received by the Philips as 7s

so F175000 becomes F177777 and F123789 becomes F123777 quite odd. I tried to probe the GPIB lines and it seems that half the times the messages are not transmitted at all.

The communication with the Keithley instead works fine I made measurements and got data back without issues, unfortunately I do not have any other device to test.


                         Ar
              PH____Ke               - The Philips doesn't work well even if the  Keithley is powered off, the Keithley appears to work fine

                         Ar
              PH____Ke               - If the Keithley is unplugged the Philips works fine (the Keithley works alone, without issues)

Am I missing something?

 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on December 22, 2022, 02:22:27 am
@gmac37 Are you using the buffered, or un-buffered version ?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on December 22, 2022, 03:40:16 am
Advantages of insomnia  ;D:
Quote
Dear dc1mc,
Thank you for your order from JLCPCB. It’s our pleasure serving you. We are pleased to inform you that the items listed below have been packaged and are waiting for pick up by Global Standard Direct Line.

Liars, the tracking code is from Yun Express, not Global Standard Line  :-DD
Title: Re: AR488 Arduino-based GPIB adapter
Post by: gmac34 on December 22, 2022, 08:22:08 am
Hi @DC1MC , Just straight from the Arduino, is this something the buffer might fix?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on December 22, 2022, 09:19:30 am
Hi @DC1MC , Just straight from the Arduino, is this something the buffer might fix?

Reading trough your issue description it seems that 95% there is an driving strength problem and 5% a cabling issue. The line drivers (75160/75161) used in the buffered version of the AR488 are the absolute golden standard for GPIB compatible interfaces and it will allow you to connect up to the maximum possible number of devices while preserving signal integrity, with only some marginal extra costs (like a medium pizza, no drinks  ;D ).

So, egal if there is a cabling issue or not, I strongly recommend building yourself a buffered version.

 Cheers,
 DC1MC
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on December 22, 2022, 09:23:09 am
Or one device for each Equipment you need to control .... they cost way less than real or fake gpib adapters from ....
Title: Re: AR488 Arduino-based GPIB adapter
Post by: gmac34 on December 22, 2022, 09:50:28 am
Ok, I was a bit in doubt because, probing around the data lines it seemed that when the signal was coming through the edge was not visibly degraded.
I will make myself one of Jay Diddy Boards, and see. at worse, I will use one Arduino per device.

Thanks!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on December 22, 2022, 10:23:01 am
Ok, I was a bit in doubt because, probing around the data lines it seemed that when the signal was coming through the edge was not visibly degraded.
I will make myself one of Jay Diddy Boards, and see. at worse, I will use one Arduino per device.

Thanks!

Actually, looking more into your post it could be a power problem as well producing glitches, some (long) USB cables, especially no name ones, have very little litze (strands ?!?) in their power conductors and may have also the "chinesian optimization", that is replacing copper with tin, or copper-clad aluminium or even iron wires. Measuring the resistance of these cables always shows surprising results. Anyways, if possible try as well with an external 5V power supply or put a beefy elco on the 5V rail of the Arduino.

PS: Got my tracking number from JLPCB, the slow ship will painfully navigate to here  :-DD

Cheers,
DC1MC


 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: gmac34 on December 22, 2022, 01:02:15 pm
good idea, I will test that too.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: gmac34 on December 22, 2022, 05:21:47 pm
Well, it shouldn't be a power issue, I tried powering the Arduino form a lab psu and hot rodded a cap on the 5v rail with no difference. The buffer is the only hope
Title: Re: AR488 Arduino-based GPIB adapter
Post by: T3sl4co1l on December 22, 2022, 06:30:48 pm
FWIW, my adapter (not exactly the same design here) drives two loads just fine, unbuffered.  With an XMEGA MCU at least.  So cables or power sound more likely.

Tim
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on December 22, 2022, 11:31:48 pm
To not let this this thread go stale and even give some useful info (TL;DR at the bottom):

- My two NANOs arrived nice and fast, but then disaster struck, they're both with ATmega168, the anemic and castrated cousin of the ATmega328P  :palm: and no matter how much code cleaning and help text removal there is no way for the AR488 current software to fit in one of these. I wanted to strangulate the seller, but then I've looked better and guess what, they mentioned that is an ATmega168 Arduino NANO, both in title and in the description, shame on me that I didn't know what's the difference  |O and considering the price I decided to keep them both (one is in use right now, one is available at cost if some one is interested).

- I've decided to get the latest fancy ORIGINAL NANOs and most likely the last model on 5V, and got a student pack of three Arduino Nano Every from the Arduino Store, they even claim that will fight with the ever watching Bundesadler and took the tax as well, so I hope the parcel will arrive directly and spare me the trip and waiting time to the Zollamt (customs), all nice and dandy, but what to do in the meantime  :scared: ?!?! I vaguely remembered that long ago I evaluated the Arduino platform for a project and got TWO pieces, digging trough the embedded systems box, at the bottom of the crate (as usual) a small modest anti-static bag holds the loot, open it and first disappointment, one NANO is an STM32F103 blue pill, at 3.3V, useless for our purpose, but the other one is an honest to God 328P NANO, and an older one from the time when vendors were competing on quality, the difference in between finishing and soldering in between the generations is staggering, not to mention the price.

- Connected the prize board to the USB cable, git checkout . to revert the desperate attempts to reduce the program size, recompile and upload the AR488 and... error, 10 attempts of upload the program all failed !!! WTF  :-//, oh looky there is a CPU version called "ATmega328P(old bootloader)", figures, is an old board it could have an old bootloader, switched and voila, load and runs  ;D, now we're talking, let's do testing, testing done, all well (actually spotted a number of bugs already, but not catastrophic), well up until the ill fated command "++rst", this produced a full lockdown of the board and a spasmodic blinkerei of the LEDs that could only be cured with power-cycle, not even the reset button on the board was able to do anything !!! what the rotating fuck again, now what  :scared:

- Oh well, after reading the code, the data-sheet and the stars configuration I have painfully  :'( extracted from google that the culprit is the friggin OLD BOOTLOADER  |O, in some situations the genius that programmed triggers at sw reset an infinite reset loop due to cretinic programming of the watchdog  :box:, let's attempt to program the "new" bootloader, here the pseudo-useless 168 board proved to be a lifesaver, got on Arduino forums an über-verbose tutorial/blog spam that attempted to explain to every simpleton how to reflash the bootloader using these psychedelic Kritzing or whatever is called that idiotic cartoon-ish  schematic capture program, and always using an Uno as programmer. Once I figured out the actual simple interconect schema I've programmed the "new" bootloader and reloaded the AR488 repeating the test of the available commands without a connected device, everything OK, including "++rst", all is well.

- Here are the first commands and the first bugletts  ;D

AR488 GPIB controller, ver. 0.51.15, 12/10/2022
Verbose: ON
> ++mode 1
Interface mode set to: CONTROLLER
> ++mode 0
Interface mode set to: DEVICE
> ++rst
AR488 GPIB controller, ver. 0.51.15, 12/10/2022
<...snip most ++help text...>
++mode: [P] Set the interface mode (0=controller/1=device) <-BUG1: inconsistent help message and command status (see above)
<...>
++srqauto: [C] Automatically condiuct serial poll when SRQ is asserted

So an inconsistent help message and a typo, did you expect more on dry run  >:D, the moment the boards arrive, I'll seriously stress all the existing functionality and even contribute some code back if thre is some stuff to fix and implement, meanwhile (finally) summary:


Cheers,
DC1MC





Title: Re: AR488 Arduino-based GPIB adapter
Post by: macaba on December 23, 2022, 10:28:45 am
With regards to the failed programming, I found I had to do this (copied from my notes):

Select "Arduino/Genuino Micro" as the board and short the RST/GND pins briefly during upload.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on December 23, 2022, 10:46:17 am
By the way, did anybody already designed a 3D enclosure for the AR488, I suck at mechanical designing and have no 3D printer  :'(,  but if there is no design already for the buffered version I'm offering a modest sponsorship for one and HUGE sympathy bonus  ^-^. Also of course, to be made public.

 Cheers,
 DC1MC
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Ismsanmar on December 23, 2022, 10:58:58 am
With regards to the failed programming, I found I had to do this (copied from my notes):

Select "Arduino/Genuino Micro" as the board and short the RST/GND pins briefly during upload.
He is talking about the ATmega328 Nano, not the ATmega32U4 Micro.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on December 24, 2022, 01:19:03 am
Finally got trough the whole thread, end to end, wow, what a treasure trove of information  :-+, the bootloader infinite reset loop was mentioned already, and that the Every NANO works with small layout changes, I even realized that I've got the wrong connectors, female instead of male  |O, but they were like 3,60€ for two pieces from Ali and still could be used for the GPIB sniffer or even building a GPIB capable device :).
Also wanted to add special thanks to @WaveyDipole for relentless work to improve the code and @artag for the pcbs and all the other stuff, as well as all the other contributors, you guys rock  :clap: :clap: :clap: !!!

Cheers and Happy Christmas  (or your favorite winter festivity) to everybody,
DC1MC

Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on December 24, 2022, 02:32:53 pm

Incidentally I was considering to move the AR488 code to VsCode/PlatformIO at some point but haven't made a decision on that yet. However, before I get ahead of myself, I will test on Arduino IDE 2.0.x first.

Please, no.

Platfomio is an insanely overcomplicated kitchen sink thing that some may find useful for their projects. In my view it's not something that should be imposed on an open source project. VSCode even more so - an overcrowded interface where nothing is obvious and there is far too much baggage to trap the unwary.

AR488 is a great little project. Simple to build electronically and in software. It suits the Arduino IDE very well -  The IDE needs very little learning because it doesn't have much functionality. For a tool that you might be using just to put together your nice cheap little HPIB adapter it's great. Not as simple as just typing 'make' but at least it's cross-platform and self-contained.

I''m not an arduino-only person. I've been developing on embedded projects since 1980. But I think it suits a niche very well, and the unholy duo of platformio and vscode make me want to cry. Platformio has the saving grace that it can generally be run from the command line but please don't use VScode as the environment, at least not as the default for the casual builder.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on December 25, 2022, 03:10:20 am
+1   same toughts
Title: Re: AR488 Arduino-based GPIB adapter
Post by: justjason on December 25, 2022, 11:16:39 am

Incidentally I was considering to move the AR488 code to VsCode/PlatformIO at some point but haven't made a decision on that yet. However, before I get ahead of myself, I will test on Arduino IDE 2.0.x first.

Please, no.

Platfomio is an insanely overcomplicated kitchen sink thing that some may find useful for their projects. In my view it's not something that should be imposed on an open source project. VSCode even more so - an overcrowded interface where nothing is obvious and there is far too much baggage to trap the unwary.

AR488 is a great little project. Simple to build electronically and in software. It suits the Arduino IDE very well -  The IDE needs very little learning because it doesn't have much functionality. For a tool that you might be using just to put together your nice cheap little HPIB adapter it's great. Not as simple as just typing 'make' but at least it's cross-platform and self-contained.

I''m not an arduino-only person. I've been developing on embedded projects since 1980. But I think it suits a niche very well, and the unholy duo of platformio and vscode make me want to cry. Platformio has the saving grace that it can generally be run from the command line but please don't use VScode as the environment, at least not as the default for the casual builder.

Converting a project to PlatformIO does not exclude building the same project on Arduino IDE. 

I think that it is a great idea to use PlatformIO. It takes care of library management, in that you can lock the versions of libraries to the exact ones you want, as well as automatically pulling all needed libraries. A good example of this is the the new DevNull library that is not included by default. There are several posts in this thread that have mentioned the confusion caused because the project would not build - the cause being that the user had not added this to their Arduino IDE library.  This sort of thing can be completely removed by PlatfomIO using lib_deps in the .ini file.
Either way, I still would go back to the original point - a PlatformIO project does not exclude the building in Arduino  IDE, rather , it adds the option of using other tools. I will not comment on if PlatformIO is easier or harder for beginners, but for sure, I am very confident in saying it is a MUCH better platform for code dev than Arduino and seeing as the move would not exclude the use of Arduino, I am very much in favor of the move.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on December 25, 2022, 11:39:57 am
its much more capable,certainly. But that doesnt make it better. I think quite a lot of these devices have been built by people who just want a cheap adapter and dont want to do software development. ARduino mostly 'just works', that missing library excepted (waveydipole : just include the code if its small. avoids the need to track versions and does whats required)

building under both is more release work, but even if that's acceptable, Vscode is a daunting, overbearing mess for the new user. i speak as a long-term emacs user :). you dont want to present the casual builder with that and then expect them to find out how to do it in the simpler  - and more limited - arduino world. offer the easy one first and let the vscode/platformio user select that.

i dont know how the arduino 2 will work out . imho its too early to tell, my jnitial tryout sent me running back to what worked. doubtless it will both mature and become unavoidable. does that provide the dependency management you prefer ? arduino kind of equates libraries with include files and also offers library installation so all the bits appear to be there for automation.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on December 25, 2022, 01:36:57 pm
The problem is making forks and managing them  etc ....  and it may or be a bigger time consuming thing than it was, i was lucky to get help when needed  BUT     

You can't be here all days and nights  loll

Now the project, IS  i think relatively easy, matured to great extents,    even for a noob like me,  arduino is an easy platform if i may say


The code is open,  if other people want to make some fork  let them be ... it will be their responsability


Why the rush now ???  even explained earlier ???
Title: Re: AR488 Arduino-based GPIB adapter
Post by: justjason on December 25, 2022, 04:49:32 pm
I can only reapeat the point once again. PlatformIO projects can still be used under Arduino. you do not loose anything. I am NOT talking about forks nor branches, nor diverse builds, the one single project is usable in BOTH environments
Title: Re: AR488 Arduino-based GPIB adapter
Post by: gmac34 on December 27, 2022, 08:44:03 pm
FWIW, my adapter (not exactly the same design here) drives two loads just fine, unbuffered.  With an XMEGA MCU at least.  So cables or power sound more likely.

Tim

Today I borrowed a national instruments adapter from work and it did work without problems with the same wiring, I also triple checked all the pins. I also don't see any sag on the power lines of the Arduino or in the GPIB data. The data streams just gets interrupted, in the screenshot I was probing 4 of the DIO lines and triggering on the ATN, always sending the same command. Something like "F12743" to set the frequency on the Philips synthesiser and sometimes the data would only go trough up to the 7 in the middle.

On another note, to get the national instruments adapter running I used pymeasure https://pymeasure.readthedocs.io/en/latest/ and it's lovely, did anyone try to use it with the AR488? it's supposed to be compatible with the Prologix adapter, but I didn't manage to get it to talk successfully with the Arduino. . The latest version of Pymeasure works perfectly with AR488
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on December 27, 2022, 08:51:06 pm
@gmac34: You need to save an ID string to have the AR488 "pretend" that is Prologix adapter, the way to do it is in this thread if you search about Prologix. My boards are now in the clutches of the German eagle and hepfully they will release them before the new year.

 Cheers,
 DC1MC
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on December 28, 2022, 08:02:13 pm
Hey, look what I've got today, a nice card from Jay with a red PCB, a trifecta of original Arduino Everys and the announcement that DHL !!! will bring tomorrow my order of buffered  AR488 from JLPCB.
In the images are the Jay's gift with the very fresh and unopened Everys, a picture of Kika, the supervisor, and a cat charity donation.

 Cheers,
 DC1MC
EDIT: Six boards will be available on quick sending for Germany !!!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: gmac34 on December 28, 2022, 08:32:16 pm
I made some test and AR488 actually works with Pymeasure, and pyvisa as they support the prologix adapters, it's great. I still have my errors with the Philips synthesiser under those, will see if the buffers make any difference.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on December 30, 2022, 05:41:05 pm
So it begins, I have found my old project bag with connectors and buffers from saner and healthier times, not let's assemble the first board from Jay, a beautiful menstrual red, mine are puke green  :-DD.
Still boards available for DE !!!

Cheers,
DC1MC



Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on December 30, 2022, 08:06:15 pm
Well, there are my first two guys, they may not fit the German concept of "wunderschön" (I leave this to Claudia Schiffer  ;D ), but they do fit the concept of "Stabil"  :-DD
One little snafu, the square pins that were installed on my Arduino are totally not fitting in the cool round machine pins that I've put on Jay's red board  :palm:, there are round M-M pins but it will take ages to arrive at the end of the year  :'(, so the Everys will have to wait a bit, to have something to test I've soldered one of my green boards, putting the Arduino directly on the PCB, in solidarity, the buffers also requested direct soldering and their request was granted  >:D.
So I have still materials for two buffered boards and also for four unbuffered, does anyone knows if there is a manufacturing package (zip) with the unbuffered PCBs, I've seen the rendering but I wasn't able to find the archive in the thread  |O.

A small note to WeavyD, maybe it could be a good idea to edit the first post and add the PCB archives for both of the versions as well as the schematics, it could make the life of future AR488 builders a bit easier.

Also a note to Jay: what is the purpose of J1 ?

Well tomorrow I will stick it in my Solartron 7150 to see if I'll get the same results.

Cheers,
DC1MC
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on December 30, 2022, 09:55:51 pm

Snip ...

Also a note to Jay: what is the purpose of J1 ?


Cheers,
DC1MC

DC1MC,

The AR488 manual, available from here: https://github.com/Twilight-Logic/AR488 (https://github.com/Twilight-Logic/AR488)

contains this drawing for adding buffers to an Arduino Uno version:

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1676737;image)

I created the schematic by copying the connections from the drawing.

(https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/?action=dlattach;attach=1676731;image)

I kept the option to route the pin 11, DC, on the SN75161 to either D3 on the Arduino, REN on the GPIB bus or D13 on the Arduino.

The boards I have used have the jumper installed in the 2-3 position.

Remember that you have to modify the AR488 sketch to drive the buffer. This is described in the message. There is more discussion in the AR488 manual.

https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4483507/#msg4483507 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4483507/#msg4483507)

Regards,

Jay_Diddy_B
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on December 30, 2022, 10:12:42 pm
Thanks Jay for chiming in  :-+, besides the little modification (just x-uple check: the SC signal remains commented ?) everything is as it comes from the repository ?
All this interrupt stuff works now or should remain commented ?

I'll torture it tomorrow and then look closer to the code :). so far the sketch loads on the assemble board and nothing gets hot, so I have great expectations :)

Cheers,
DC1MC

Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on December 30, 2022, 10:13:20 pm
DC1MC and the group,


So I have still materials for two buffered boards and also for four unbuffered, does anyone knows if there is a manufacturing package (zip) with the unbuffered PCBs, I've seen the rendering but I wasn't able to find the archive in the thread  |O.

Snip ...

Cheers,
DC1MC


The original artwork for the Arduino nano version was created by forum member artag. This was placed into a panel format by forum member DavidKo.

This is the message: https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3866630/#msg3866630 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg3866630/#msg3866630)

The files for PCB manufacture can be obtained from: https://github.com/konarik/AR488-multiple-PCBs (https://github.com/konarik/AR488-multiple-PCBs)

I will attach a copy of the zipfile to this message for convenience. If you use this to order from JLCPCB you will get a total of 25 of the nano style adapters.


Note: You can build the un-buffered version on my buffered PCB if you replace U1 and U2 with wire connections. Connect pins 2-19, 3-18 4-17 .. 9-12.

Regards,

Jay_Diddy_B

[attachurl=1]
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_Diddy_B on December 30, 2022, 10:15:40 pm
Thanks Jay for chiming in  :-+, besides the little modification (just x-uple check: the SC signal remains commented ?) everything is as it comes from the repository ?
All this interrupt stuff works now or should remain commented ?

I'll torture it tomorrow and then look closer to the code :). so far the sketch loads on the assemble board and nothing gets hot, so I have great expectations :)

Cheers,
DC1MC

It is the only change that I made, and it works for me.

Make sure that you have the DEVNULL Library.

Jay_Diddy_B
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on December 30, 2022, 11:22:10 pm
I think I may overload you with thanks Jay   ^-^, so one more thanks for putting the zip with the un-buffered ones where I can find it, the software compiles and runs like a charm, tomorrow (actually later today ;) ) I'll stick the green one that is complete in the Solartron 7150 and see if it works then I'll start my quest to try and get my 2-3 GPIB cables to have some load.

 Cheers,
DC1MC
Title: Re: AR488 Arduino-based GPIB adapter
Post by: gmac34 on January 10, 2023, 11:50:45 am
Two more buffered adapters are assembled. Working well!

It seems to have cured the problem I was having with my Philips PM5190 and Keithly 2000, but I'm still not sure what was the problem there.
I now have 3 GPIB instruments and with all 3 on the bus, the "naked" Arduino was also working fine.

But now this buffered version works regardless of what I connect to it. Thanks!

I have 3 extra PCBs, shipping from Norway or Sweden, if anyone needs one.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on January 10, 2023, 02:20:02 pm
The basic arduino version has only the internal pullups rather than the correct totem-pole termination. In some combinations this might be inadequate but the buffers may well provide a stronger termination to 3V.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 11, 2023, 09:20:34 pm
A small note to WeavyD, maybe it could be a good idea to edit the first post and add the PCB archives for both of the versions as well as the schematics, it could make the life of future AR488 builders a bit easier.

Sounds like a good idea. So long as the original designers/authors agree then I can post links in the opening thread to the various contributions that many on here have made.

Please, no.

Platfomio is an insanely overcomplicated kitchen sink thing that some may find useful for their projects. In my view it's not something that should be imposed on an open source project. VSCode even more so - an overcrowded interface where nothing is obvious and there is far too much baggage to trap the unwary.

AR488 is a great little project. Simple to build electronically and in software. It suits the Arduino IDE very well -  The IDE needs very little learning because it doesn't have much functionality. For a tool that you might be using just to put together your nice cheap little HPIB adapter it's great. Not as simple as just typing 'make' but at least it's cross-platform and self-contained.

I''m not an arduino-only person. I've been developing on embedded projects since 1980. But I think it suits a niche very well, and the unholy duo of platformio and vscode make me want to cry. Platformio has the saving grace that it can generally be run from the command line but please don't use VScode as the environment, at least not as the default for the casual builder.

I will stick with Arduino IDE 2.0.x for now.

Since Platformio was mentioned to me as being more suitable for projects across multiple platforms, I tried writing a couple of projects in PlatformIO while IDE v2 was still at beta and release candidate stage. Although I also didn't like the idea of it being based on vscode, I found that it worked rather well and I did actually start preferring it to IDE v2 which was still rather buggy. Unfortunately the O/S Atom version of PlatformIO is no longer supported, hence having to use vscode. I agree that vscode is rather confusing at first and requires a bit of a learning curve to get familiar with its features. However, once set up it works very well.

Having said that, I was also concerned that PlatformIO might be too much of a hurdle for new users which is why I asked for views on the forum. I appreciate the responses. I don't want to impose any further burden on new users so the project will stay in the Arduino IDE. I will move to version 2.0.3 for future development, although I will continue testing in 1.8.19. I may consider additionally posting a PlatformIO project for any who might already be using that platform. Once the project is set up it should require only a minimal amount of effort to convert the .ino file. There is a plug-in that allows an Arduino project to be used directly, but it is not free.

ARduino mostly 'just works', that missing library excepted (waveydipole : just include the code if its small. avoids the need to track versions and does whats required)

artag, the code is actually quite small. I was a little torn between using the library or making a local copy. The library approach is generally the preferred approach and has the advantage of being automatically updated. On the other hand, copying the code directly into the project would make things simpler. On further consideration I might actually do that and eliminate this library problem.

I made some test and AR488 actually works with Pymeasure, and pyvisa as they support the prologix adapters, it's great. I still have my errors with the Philips synthesiser under those, will see if the buffers make any difference.

Thanks for highlighting PyMeasure and PyVisa. They look interesting and I will have a look at those tools. Would you like to share what steps were required to allow the AR488 to work with these programs? I could add a short section to the manual describing how to set up the AR488 to use with these tools along with KE5FX Tools, EZGPIB and Sigrok.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: proess on January 12, 2023, 07:45:04 am
Hello
I use a buffered version of the GPIB adapter. Thanks for the fine project. As mechanical engineer I didn't understand most of the electronical / coding topics of this thread - I just want to 'use' the adapter.
Testing with HP3488A switch control unit work fine.
Tests with Philips PM2534 multimeter show some problems (for me):
most of the commands will work, but there is no response at the serial monitor for:
FNC ?
OUT ?
...
as well as for
++read.

I use the following command sequence:

++eos 2                                   Arduino
++eor 2                                   Arduino
++addr 2                                 Arduino
trg i                                         PM2534
out s                                        PM2534
x 1                                          PM2534
++read                                   Arduino

Does anyone has a suggestion how to get answers (measuring values) from the PM2534.
Thanks
Peter
Title: Re: AR488 Arduino-based GPIB adapter
Post by: gmac34 on January 12, 2023, 03:47:15 pm
Just after a quick check of the manual it seems the commands for the PM2534 are in capital letters and I think also with underscores instead of spaces:
TRG_I
OUT_S

maybe that's the issue?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on January 12, 2023, 04:09:27 pm
Just after a quick check of the manual it seems the commands for the PM2534 are in capital letters and I think also with underscores instead of spaces:
TRG_I
OUT_S

maybe that's the issue?

I don't think so, I've found a bit better scanned manual and it seem that there are these denominators for blank spaces: |_|,  ␣  see page 26, 78+ from here:
https://bama.edebris.com/download/philips/pm2534/PHILIPS%20PM2535-OM-last%20version.djvu

Cheers,
DC1MC
Title: Re: AR488 Arduino-based GPIB adapter
Post by: gmac34 on January 12, 2023, 04:37:17 pm
Ok, but it should still be capitalised.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on January 12, 2023, 04:50:31 pm
Ok, but it should still be capitalised.

That, definitely !!!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: proess on January 12, 2023, 05:06:54 pm
Thanks for your hints.
But:

changing commands with underscore will not help.
no response: fnc ? or fnc_? or FNC ? or FNC_?

the PM2534 commands are not case senistive:
it works: FNC RTW or fnc rtw or rtw or RTW  (resp. FNC VDC or ... vdc)

PM2534 initialisation:
++eos 2
++eor 2
++addr 3

rtw                      work; switch to RTW mode
fnc ?                    work not

greetings
Peter
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 12, 2023, 05:58:50 pm
The query commands on instruments I have worked with so far do not have a space between the command and the '?'. I would therefore have expected fnc? or FNC?, but I am not familiar with the Philips command set although looking at the manual it does appear to show a space. Might be worth trying without though?
 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: proess on January 12, 2023, 11:31:47 pm
I just tested the proposed command 'FNC?' with no success.

The PM2534 initialisation just with

++addr 3

and no special ++eos and ++eor commands shows the described device function: no results for FNC? (FNC ?, fnc? fnc ? ..) and ++read.

Is it possible that the multimeter has an internal failure?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on January 13, 2023, 11:40:09 am
@Proess    check the user manual of your  meter

You have 2 or 3 modes :  talk, talk only and listner  ???

Section 4.4
http://bee.mif.pg.gda.pl/ciasteczkowypotwor/Philips/pm2534.pdf (http://bee.mif.pg.gda.pl/ciasteczkowypotwor/Philips/pm2534.pdf)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: proess on January 13, 2023, 02:10:48 pm
I checked the manual ch. 4.4
there are commands
++ton 0 / 1                       talk only
++lon 0 / 1                       listen only
++prom 0 / 1                    promiscuous mode off / on

I ran tests with this modes but the commands FNC ?, RSL ?, OUT ? as well as ++read still fails.
other commands FNC RTW, FNC VDC, RSL 4, .. work.

@coromonadalix: do you have a suggestion which mode should be the best one (++ton. ++lon, ++prom  all = 0 ) ?

Greetings
Peter
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 13, 2023, 03:04:17 pm
Ideally should be in 'addressable' mode as shown in PM2534 section 4.4.2.5) and GPIB address set. The default seems to be 22, but 3 should be fine if you have nothing else connected to the bus on that address. That should give you bi-directional communication.

If you set the the PM2534 in talk-only mode then you will be able to receive data, but not remote control the instrument. In this case use ++lon 1. (Device talks, interface listens).

If you use it in listen mode, then you can remote control the instrument but not receive data. In that case use ++ton 1. (Device listens, interface talks).

You might also check whether a FNC 1 (or FNC_1) needs to be followed by a ++read to get the response?
(Not sure whether that was what you meant with 'as well as for ++read' in your earlier comment).
Title: Re: AR488 Arduino-based GPIB adapter
Post by: proess on January 14, 2023, 10:54:57 am
Hello
thank you for your valuable hints.
I 've done some additional basic tests with the PM2534. They failed and I 'm now convinced that the multimeter has some failures sending data, so I 'll finish this project.
Nevertheless the AR488 board is a very nice project.
Greetings
Peter
Title: Re: AR488 Arduino-based GPIB adapter
Post by: A.M.Student on January 16, 2023, 02:30:51 pm
Hello everyone.
I hope i follow the rules and dont post this message to the wrong place.
Big respect for all your work arround this ar488 project.

Guys I need help. I want to read data from 2 different yokogawa WT 130.( Fat multimeters) The goal is to record the data in a Excel file. I know excel is not the best to datalog but its part of a greater project and I need it to be like that.

So far i have done my interface using an arduino nano and sacrificing an old national instrument gpib cable. I also 3d printed a litle case for it ( not perfect but i can share the file if you want)

That was the easy part, now I am trying to understand what do i need to install on my computer to communicate with the device.
I'm studying électrical engineering so all this is a bit out of my usual skills. Do i need drivers? Maybe NI488.2 drivers? Do i need a software in particular like "FTDI RS232/USB terminal emulator (i dont even know what it is) or maybe visa?

In witch direction should i work?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on January 16, 2023, 02:45:21 pm
Hello everyone.
I hope i follow the rules and dont post this message to the wrong place.
Big respect for all your work arround this ar488 project.

Guys I need help. I want to read data from 2 different yokogawa WT 130.( Fat multimeters) The goal is to record the data in a Excel file. I know excel is not the best to datalog but its part of a greater project and I need it to be like that.

So far i have done my interface using an arduino nano and sacrificing an old national instrument gpib cable. I also 3d printed a litle case for it ( not perfect but i can share the file if you want)

That was the easy part, now I am trying to understand what do i need to install on my computer to communicate with the device.
I'm studying électrical engineering so all this is a bit out of my usual skills. Do i need drivers? Maybe NI488.2 drivers? Do i need a software in particular like "FTDI RS232/USB terminal emulator (i dont even know what it is) or maybe visa?

In witch direction should i work?

If you want to read it directly in excel you may want to look here:
https://learn.microsoft.com/en-us/microsoft-365/education/data-streamer/connecting-serial-devices

If the GPIB adapter is seen as a serial port, you don't need to install anything.

 Cheers,
 DC1MC
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on January 16, 2023, 07:43:50 pm
Thank you.

There is a button for this  :-DD
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on January 20, 2023, 11:30:56 am
hi @ll
How can i change the pins configuration in config.h  to reflect anothe adapter ive bought

it was sold in the sale thread  it's an "gpibusb"  dongle, based on lufa and usbtmc, my 34410a  doens't like it, and sometimes spit an error on the display

Flashed the arduino bootloader fine, connect as a com port with the right identifier ...  like my previous post for a sparkfun pro / micro  32u4 board

and once again  i'm lost a bit, i'm confused  :palm:

it is wired like this, unless i made a mistake

32u4 physical pin 18 (PD0)   to gpib pin 1    DIO1
32u4 physical pin 19 (PD1)   to gpib pin 2    DIO2
32u4 physical pin 20 (PD2)   to gpib pin 3    DIO3
32u4 physical pin 21 (PD3)   to gpib pin 4    DIO4

32u4 physical pin 28 (PB4)   to gpib pin 5    EOI
32u4 physical pin 30 (PB6)   to gpib pin 6    DAV
32u4 physical pin 31 (PC6)   to gpib pin 7    NRFD
32u4 physical pin 32 (PC7)   to gpib pin 8    NDAC
32u4 physical pin 33 (PE2)   to gpib pin 9    IFC
32u4 physical pin 36 (PF7)   to gpib pin 10   SRQ
32u4 physical pin 37 (PF6)   to gpib pin 11   ATN

32u4 physical pin 25 (PD4)   to gpib pin 13   DIO5
32u4 physical pin 22 (PD5)   to gpib pin 14   DIO6
32u4 physical pin 26 (PD6)   to gpib pin 15   DIO7
32u4 physical pin 27 (PD7)   to gpib pin 16   DIO8
32u4 physical pin 29 (PB5)   to gpib pin 17   REN

32u4 physical pin 38 (PF5)   led status

thks
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DavidKo on January 20, 2023, 12:17:14 pm
Have you tried uncomment in AR488_Config.h

/*** Custom layout ***/
/*
 * Uncomment to use custom board layout
 */
//#define AR488_CUSTOM


Pin definitions are later in the file
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on January 20, 2023, 02:32:25 pm
If i understand      usb gpib schematic attached  and the sparkfun 32u4 board  pins_arduino.h  file    i have  trying to understand the pinout functions


D3   would be  32u4 physical pin 18 (PD0)   to gpib pin 1    DIO1
D2   would be  32u4 physical pin 19 (PD1)   to gpib pin 2    DIO2
D0   would be  32u4 physical pin 20 (PD2)   to gpib pin 3    DIO3
D1   would be  32u4 physical pin 21 (PD3)   to gpib pin 4    DIO4
D8   would be  32u4 physical pin 28 (PB4)   to gpib pin 5    EOI
D10  would be  32u4 physical pin 30 (PB6)   to gpib pin 6    DAV
D5    would be  32u4 physical pin 31 (PC6)   to gpib pin 7    NRFD
D13  would be  32u4 physical pin 32 (PC7)   to gpib pin 8    NDAC
??     would be  32u4 physical pin 33 (PE2)   to gpib pin 9    IFC        HWB  on a leonardo it is going to ground with an resistor
A0   would be  32u4 physical pin 36 (PF7)     to gpib pin 10   SRQ
A1   would be  32u4 physical pin 37 (PF6)     to gpib pin 11   ATN
D4   would be  32u4 physical pin 25 (PD4)    to gpib pin 13   DIO5

??     would be  32u4 physical pin 22 (PD5)   to gpib pin 14   DIO6       on a leonardo  it is a tx led ??
D12  would be  32u4 physical pin 26 (PD6)   to gpib pin 15   DIO7
D6    would be  32u4 physical pin 27 (PD7)   to gpib pin 16   DIO8
D9    would be  32u4 physical pin 29 (PB5)   to gpib pin 17   REN

??                   32u4 physical pin 38 (PF5)   led status                        on a leonardo  gives A2


Should became like this ?

#ifdef AR488_CUSTOM

#define DIO1    D3     /* GPIB 1  */
#define DIO2    D2     /* GPIB 2  */
#define DIO3    D0     /* GPIB 3  */
#define DIO4    D1     /* GPIB 4  */
#define DIO5    D4     /* GPIB 13 */
#define DIO6    ???     /* GPIB 14 */  ------------------------
#define DIO7    D12   /* GPIB 15 */
#define DIO8    D6     /* GPIB 16 */

#define IFC       HWB   /* GPIB 9  */   ------------------------EDITED
#define NDAC    D13   /* GPIB 8  */
#define NRFD    D5     /* GPIB 7  */
#define DAV      D10   /* GPIB 6  */
#define EOI       D8     /* GPIB 5  */

#define SRQ      A0    /* GPIB 10 */
#define REN      D9    /* GPIB 17 */
#define ATN       A1   /* GPIB 11 */

and the led status   ???   ---------------  A2    EDITED



I'm trying to see or understand  where you kinda "switch"  the definition pinout ?
Between the analog and digital pins if i may say

I've tried to check other 32u4 related configs,  but some of them  "null out" previous pinout and substitue/change them ?


In the ar488 master repo, you have this "micro.rst"   file, it seems to fit a bit, not totally,    is it used when compiling ?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 21, 2023, 07:01:04 pm
The micro.rst file is in the /docs directory and is part of the documentation. It is NOT used during compilation. On recommendation I had been experimenting with a documentation system called Sphinx, although this is not yet implemented.

The switching of templates is done partially automatically by architecture and partially manually to select a template for a given architecture. The CUSTOM template is the exception. When the line:

Code: [Select]
//#define AR488_CUSTOM
is un-commented, then the custom layout template is activated via the #ifdef AR488_CUSTOM compiler directive. All of the subsequent #elif sections up to the next #endif are then ignored.

I concur that PF5 is A2. I also think PD5 (TXLED) is pin D3. I am puzzled by th use of the HWB pin though as it does not appear to be mapped in the pins_arduino.h file. IFC will probably not have much impact if not connected.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on January 22, 2023, 03:38:53 pm
ok thks   

Take 2
In the Sparkfun board package  with the pins_arduino.h file     we see  pins  remapping


/*******************************/
/***** AR488 CUSTOM LAYOUT *****/
/***** vvvvvvvvvvvvvvvvvvv *****/
#ifdef AR488_CUSTOM

#define DIO1  D3  /* GPIB 1  */
#define DIO2  D2  /* GPIB 2  */
#define DIO3  D0  /* GPIB 3  */
#define DIO4  D1  /* GPIB 4  */
#define DIO5  D4  /* GPIB 13 */
#define DIO6  D30  /* GPIB 14 */
#define DIO7  D12  /* GPIB 15 */
#define DIO8  D6   /* GPIB 16 */

#define IFC   HWB   /* GPIB 9  */
#define NDAC  D13   /* GPIB 8  */
#define NRFD  D5   /* GPIB 7  */
#define DAV   D10  /* GPIB 6  */
#define EOI   D8   /* GPIB 5  */

#define SRQ   A0   /* GPIB 10 */
#define REN   D9   /* GPIB 17 */
#define ATN   A1   /* GPIB 11 */

#endif
/***** ^^^^^^^^^^^^^^^^^^^ *****/
/***** AR488 CUSTOM LAYOUT *****/
/*******************************/


Just need to figure out  where the status led is  called / defined ??  who should be  A2

Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on January 22, 2023, 06:08:53 pm
>  I've tried to check other 32u4 related configs,  but some of them  "null out" previous pinout and substitue/change them ?

Some of those might have been mine. I have had at least 2 layouts, though I'm not sure if they went into the release.

I may have done an early version that nominally used the same mapping as the Uno or whatever the default was, but changed one or two where the real (as opposed to the Arduino's Digital Pin) mapping needed to follow the assignment of ports on the 32U4. Or perhaps I did that for the Arduino nano.

Because I wanted to do a tiny adapter that fitted a 32U4 Pro Micro (a Sparkfun design which is different to an Arduino Micro), I  assigned the pins that most closely matched the pro micro pin layout to the 24-pin connector. This was my first pcb design - I had some made but I don't think I made it public.
I used the custom pin assignment to support this, but I wasn't very happy with it.

The code has to iterate over all the pins and set each one in turn. I wanted to be able to write a byte to an 8-bit port for faster operation. I think waveydipole's code might do this, I don't remember. Anyway, it was far from ideal on the 32u4. I don't think the obvious Arduino pins are ideal either : you don't generally want to use D0 and D1 as they're used for the UART, and I don't think D0-D7 are a single contiguous set of GPIO bits either.

In fact, it's not possible with a pro micro - there is no whole 8 bit port assigned to the pins due to the gpio assigned for the leds. The best I could was to use 6 bits from one port and 2 from another, aligning them so that  two mask-and-write operations were needed to set the data bits. I then made specific changes for the pro micro version of the code to make use of this more efficient port assignment without iterating over every pi, so it does NOT use the custom pin macros. This became my version 2 pcb.

Finally, I changed the PCB layout to turn the pro micro board 180 degrees, causing the USB cable to come out the same side of the connector as typical HP cables. This was so that instruments with little space around the HPIB connector would be likely to have space for the cable exit. This is the recommended version 3 pcb, but it doesn't change any pin assignments so it uses the same code.

The usbtmc adapter doesn't use an arduino, it's built from scratch. As a result, it can assign a whole contiguous port to the HPIB data lines, which is more efficient when you're trying to go at top speed. I haven't looked at the code carefully enough to see if any other pins are optimised but I do know I can't
use my PCB layout for it without some code changes byond the simplest pin reassignment. This means that you should be able to use the slow custom pin code to drive it with ar488 code, but if you make use of the pin optimisation to modify the data port in one operation you will achieve a higher transfer speed.

The usbtmc board also has the advantage over mine of a better - albeit bigger - layout to support a full size USB connector. The micro B used on pro micro boards is very fragile and easily torn off. It's probably best to create a housing which makes it impossible to put too much force on the cable. If you're going to make and populate special AR488 boards and don't mind dealing with assembly of the entire circuit, it's probably the best hardware design to use (and of course gives the option of using either the ar488 or usbtmc code).








Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on January 22, 2023, 06:52:19 pm
thanks

i've hitted a wall  and it doesn't do nothing once connected on the meter ....  i may have done some errors trying to figure out the pinout  loll or modding the ar 488 config file

Not sure if i have to play with the board definition file ?? It goes beyond my knowledge this time

And Arduino now 2.03  as a few time trown errors for the devnull thing, even installed ??   Reverting to the old  <2 version works better ?

The most nagging things abouth them, is when you use them in a portable way, they trows some files / save repertory / librairies /   outside their own "work" folders ... even putting ar488 folder inside them ..


Bought them  hoping they could work as intended .... sadly no, they dont enumerate the meter as it should (meter as gpib enabled) unless i have to kill the other ports ??  in the device manager they show as : USB Test and Measurement Device (IVI)

Converting them to ar488 partially work,  prologix gpib see it ...  but no request / answers ....

EDIT

I will phisically modify some pins to reflect an leonardo  IE:  moving the led pin, the HWB  pin with an pull down resistor,   and using 2 of left available pins  PF0 PF1 and PF4,  it should be easier to make it work ??   
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on January 24, 2023, 05:19:29 pm
coromonadalix, what was the adapter you purchased please?
Was it something on eBay?
I am curious as to what it is.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on January 24, 2023, 06:02:56 pm
it was bought here,  called  gpibsub      2 of them based on 32u4  avr

They do work up to a point,  not blaming the seller

They dont mount properly the 34410a meter i have,  and  keysight sorftware doesn't see it,  but it work in usb  mode

It's the  given pinout    schematic posted earlier

i have a hard time to figure out how to give it  some basic  leonardo pinout  or sparkfun pro-micro   pin naming / id's   used in arduino IDE

there is 3 pins  who give me some headache,  may have to do some hardware mods ...
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Nx-1997 on January 24, 2023, 10:28:42 pm
There is nothing wrong with xyphro's UsbGpib (https://github.com/xyphro/UsbGpib (https://github.com/xyphro/UsbGpib)) adapter. All you need with this adapter is to install R&S Visa Software (https://www.rohde-schwarz.com/ca/applications/r-s-visa-application-note_56280-148812.html (https://www.rohde-schwarz.com/ca/applications/r-s-visa-application-note_56280-148812.html)), nothing else. Also, the solution to the meter's initial error is shown on his GitHub page.

This adapter is a lot faster then the AR488 adapter, in terms of data transfer speed. Much better then even the commercial adapters.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on January 25, 2023, 11:26:35 am
Ok  thks a lot  Nx-1997,    not hijacking this thread

Works fine, use R&S  configurator  and use R&S  Visa as preferred

For the "old" Agilent / Keysight DMM,  i had to install  old  I/O librairies to make it work ??

Keysight DMM  works !!!

Ill continue to read this thread,  i have ordered  ARTAG  pcb's for the sparkfun pro micro  and see ....  Gpib plugs received
Title: Re: AR488 Arduino-based GPIB adapter
Post by: caiser01 on January 26, 2023, 07:17:19 pm
Ok  thks a lot  Nx-1997,    not hijacking this thread

Works fine, use R&S  configurator  and use R&S  Visa as preferred

For the "old" Agilent / Keysight DMM,  i had to install  old  I/O librairies to make it work ??

Keysight DMM  works !!!

Ill continue to read this thread,  i have ordered  ARTAG  pcb's for the sparkfun pro micro  and see ....  Gpib plugs received

If you're going to ARTAG's boards, make sure you have the correct board layout uncommented in AR488_Config.h:

Code: [Select]
/*** MEGA 32U4 based boards (Micro, Leonardo) ***/
#elif __AVR_ATmega32U4__
  /*** Board/layout selection ***/
  #define AR488_MEGA32U4_MICRO  // Artag's design for Micro board
  //#define AR488_MEGA32U4_LR3  // Leonardo R3 (same pin layout as Uno)

The default changed between 0.49.14 and 0.51.09, and when I recently upgraded the firmware on my ARTAG boards everything stopped working. Had a minor freak out before I realized it was this change in AR488_Config.h causing it but at least it was an easy fix!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: earlish on February 08, 2023, 03:38:00 am
There is nothing wrong with xyphro's UsbGpib (https://github.com/xyphro/UsbGpib (https://github.com/xyphro/UsbGpib)) adapter. All you need with this adapter is to install R&S Visa Software (https://www.rohde-schwarz.com/ca/applications/r-s-visa-application-note_56280-148812.html (https://www.rohde-schwarz.com/ca/applications/r-s-visa-application-note_56280-148812.html)), nothing else. Also, the solution to the meter's initial error is shown on his GitHub page.

This adapter is a lot faster then the AR488 adapter, in terms of data transfer speed. Much better then even the commercial adapters.

I can also confirm that xyphro's UsbGpib works great with the 34401A and Nx-1997's software. Thanks so much it's really awesome.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: ON7CH on February 13, 2023, 01:26:40 pm
Hello to all,

I am using the AR488 Pro-Mini with an FTDI cable.

With a terminal program (Termite...) I can control a RACAL 1991 counter and the HP53131A counter.

If I want to use EZGPIB, this does not work.
However, my AR488 Pro-Mini has been positively recognized by the EZGPIB program. CTS=OK

Can someone advise me to make my AR488 Pro-Mini work with EZGPIB.

Thanks in advance.

Guido
Title: Re: AR488 Arduino-based GPIB adapter
Post by: ON7CH on February 13, 2023, 04:24:36 pm
[attach=2]Here some extra information regarding the problem with EZGPIB and the AR488_Pro-Mini.

Below the Debug Messages of the two different configurations.
- EZGPIB with Prologix & RACAL Counter
- EZGPIB with AR488 ProMini & RACAL Counter

It is as if the GPIB-commands are well received by the RACAL counter but the measurements responses are not readback by the AR488.[attach=1]

Guido
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bingo600 on February 25, 2023, 03:38:41 pm
So it begins, I have found my old project bag with connectors and buffers from saner and healthier times, not let's assemble the first board from Jay, a beautiful menstrual red, mine are puke green  :-DD.
Still boards available for DE !!!

Cheers,
DC1MC

I just got some neatly assembled boards from DC1MC  :-+
They were made for nothing but "parts cost", and a small token "for the Cat".

Thank you for that ... Now i have backed up my HP3478A

Edit: Also Thank you to JDB for making the buffered PCB.

And that sparked my GPIB interest again ... I just installed linux-gpib on my Raspi3, for my Agilent USB adapter.
And did an alternae 3478a calram backup there.

/Bingo
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on February 25, 2023, 04:00:49 pm
@bingo600 - thanks for the nice words and support.

@world there are sill a couple more available, if I somehow manage to get over my crazy sickness I'll be able to finish them and hopefully find them a nice home, unfortunately the prognosis isn't that good  :'(, especially if they intubate me (no, not Covid, unfortunately some other shite can terminate you). Well, if this happens there will be lots of Ferengi food on Bus/sell.. while I will embrace my new "in the cloud(s)" status  :scared:.

One word of advice, check you vitamin D and B12, egal if the health insurance doesn't pay for the tests, pay yourself, best money spend, my levels were not fully zero, but kind of the lowest measurable limit. At this levels every stupid viral cold can frak you for good. And why were so demented low, well because yours truly had months and months of drinking Cola Zero instead of anything, because A) I don't like coffee and B) I'm a giant idiot  :palm:


Cheers,
DC1MC
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bingo600 on February 25, 2023, 09:12:58 pm
if I somehow manage to get over my crazy sickness.

I wish you a quick recovery  :-+

Ps: I take my Vitamins every morning, SWMBO will make sure of it.

/Bingo
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Tj138waterboy on February 27, 2023, 12:25:15 pm
Is it possible to bodge in a multiplexer or temp humidity sensor or are all needed pins taken/unable to be interrupted?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 27, 2023, 01:08:31 pm
I have just pushed an update which cleans up some of the code and includes additional fixes some recently reported issues. I have also removed dependence on the DEVNULL library by importing its code into the AR488 project.

Is it possible to bodge in a multiplexer or temp humidity sensor or are all needed pins taken/unable to be interrupted?

Quite some time ago, someone produced a layout that freed up the SDA/SCL pins which allowed a sensor to be attached. I will have have a trawl through the thread to see whether I can dig out this information. I think it required one of the pins to be sacrificed, but can't remember for sure and, if so, which one at this point.

I had also been working on including MCP32017/8 or MCP32S17/8 chips into the project with the idea being to run the GPIB bus from the MCP chip while leaving the other pins available for various sensors. I had some success, getting this to work primarily with the MCP23S17, but unfortunately while doing some more work on this recently, both of the chips got fried and I am not sure why yet. I suspect they maybe can't handle a full load of 16 GPIB bus signals or else I made some stupid wiring mistake, or perhaps I was fortunate for a while and they require buffering resistors or something. Whatever the case, I will need to order some more chips to pursue this further.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on February 27, 2023, 05:43:34 pm
noob here

Having theses ic's on the gpib board(s) even controlled separately,  you would need some new gpib commands / set ??   since they would run on a "declared / identified" Windows Linux Mac gpib peripheral ???

Would it still work on IVI, Ni Visa, Keysight   etc ....  drivers ?

No ?  Yes ? 

Don't want to be rude nor offensive, but now   It would be a new kind of peripheral and a new code to implement and manage ??? 

I don't call this a gpib adapter anymore ? or call it an AR488 ??

Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 27, 2023, 06:34:47 pm
My aim was for the project to operate exactly the same as the current AR488. These chips communicate with the Arduino via the I2C (MCP23017, MCP23018) or SPI (MCP23S17, MCP23S18) bus and they simply extend the number of available GPIO pins. There would be no need for separate or additional commands. I intended their inclusion to be completely optional and enabled/disabled in the AR488_Config.cfg file, much the same as is currently the case with the SN7516x buffers. Ironically, it might actually be cheaper now to just buy a Mega2560 board which is why after my two test chips got toasted, I was ready to abandon the idea. If there is no usage case, then it is probably not worthwhile spending more money, time and effort developing that option.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: dietert1 on February 27, 2023, 07:13:04 pm
I guess with an I2C port expander GPIB transfers will be rather slow. Better use a MCU with more pins.
Recently i made a proto board using all 16 GPIOB ports of a bluepill module and there were still enough ports left for I2C, SPI, one UART and a LED. GPIB transfer speed was 300 KBytes/second at 80 MHz CPU clock, including debouncing/synchronizing incoming GPIB control signals and data.
Next one may be a 64-pin MCU with MC3446 buffers or the like, with two separate 16-bit ports for sending and receiving GPIB signals. It can support tracing GPIB activity while acting as system controller.

Regards, Dieter

Edit: SPI is for a ADS1256 mezzanine that is needed for precision temperature and for a DIY relay scanner.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 27, 2023, 08:21:51 pm
Dieter, yes that was also my concern with I2C. I got it working but it was never stable and I suspect that might be partly the reason why. On the other hand, the SPI version worked very well until the chip failed....

I find it interesting that you got BluePill to work. Which BluePill board did you use? I had a couple of STM32F103C8 boards here but I could not get them to function, not even with blink example. I could get the board to present a CDC USB port when programmed with a specific bootloader and I could program it with an ST-Link but the board just did not seem to do anything else. For example, the LED would not blink when the blink sketch was uploaded and with the bootloader uploaded, the board would not respond to programming via USB as it was supposed to. After a lot or trying I finally gave up on it. It might be that the examples I had were fake but the consensus after seeking help was that they were not working properly so I gave up on them. I have been considering using the Pico board instead.

Incidentally, I have now added a number of links into the opening post for the various AR488 projects discussed within the thread.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: dietert1 on February 27, 2023, 09:15:43 pm
Yes the two bluepill modules i got did not work either, so i ordered two STM32L433CCT6 to replace the bad MCU. This worked well and i could use a cheap STLink programmer and CubeMX. USB worked out of the box and without pulling in a realtime OS. For the GPIB  test i had to mod the bluepill once more:
- "free" PB2 (L433 doesn't need Boot1)
- wire 1K5 USB pullup to PA8 in order to automate USB re-enumeration at boot time (USB "pretreatment")
There are 16x 2k7 pull-ups to 3.3V on the bottom.

Regards, Dieter
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on February 28, 2023, 12:06:50 am
ok  it would need  more horse power  ....   teensy ?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: dietert1 on February 28, 2023, 08:17:32 am
Teensy has a VFPv5 with double support, so it may even replace a RPi, except with fast GPIB. For a test i wired up a GPIB connector to a NUCLEO-H743ZI board without bus buffers and it works well.
The STM32L433 i mentioned is 5V tolerant on most pins. With Teensy one can use a bus interface with level translation. For example the bus receivers in MC3446 won't output more than 3.3 V with a 5 KOhm pulldown.

Regards, Dieter
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 28, 2023, 03:56:14 pm
Yes the two bluepill modules i got did not work either, so i ordered two STM32L433CCT6 to replace the bad MCU. This worked well and i could use a cheap STLink programmer and CubeMX. USB worked out of the box and without pulling in a realtime OS. For the GPIB  test i had to mod the bluepill once more:
- "free" PB2 (L433 doesn't need Boot1)
- wire 1K5 USB pullup to PA8 in order to automate USB re-enumeration at boot time (USB "pretreatment")
There are 16x 2k7 pull-ups to 3.3V on the bottom.

Regards, Dieter

Ah, so it wasn't just me having problems with the cheap STM32F103C8 then! I spent probably 3 full days on trying to get it the basics to work it and it was driving me crazy! I forgot to mention that I did do the resistor mod (to A12 on these) for USB enumeration, upgraded the library in the IDE and tried different programming methods and bootloaders including the older Maple and newer HID bootloaders. I might just get a Nucleo-32 to play with. I have been trying to work out whether it is 5V tolerant which you seem to have answered in your last post. I had wondered the same for BlackPill SMT32F401. The datasheets do not seem to make this clear.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on February 28, 2023, 05:33:33 pm
same here, had same problems on the "blue pill"    bought the "corrected" boards  ... worked fine

recently had problems with a pro micro, to find they had another bootloader type (32u4 from sparkfun) now works fine ...

And some arduino mini who had another mega 328 type ??? got refunded, nothing would work in IDE
Title: Re: AR488 Arduino-based GPIB adapter
Post by: dietert1 on February 28, 2023, 08:32:08 pm
5V tolerance is specified in the pinout table in the datasheet. Pins marked as "FT_something" are 5V tolerant in GPIO mode. There is a legend above that table.
By the way: Digikey has 20x Nucleo-L433 on stock for US$20 each. It's a Nucleo-64, so twice the price for twice the pins..

Regards, Dieter
Title: Re: AR488 Arduino-based GPIB adapter
Post by: serg-el on March 21, 2023, 09:17:39 am
Quite some time ago, someone produced a layout that freed up the SDA/SCL pins which allowed a sensor to be attached.

It was me.
The BME and BMP sensors have been connected and have been verified to work.
The board is used by RobotDyn UNO R3 ATmega328P-AU
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rockstedy40 on March 21, 2023, 10:58:30 am
Hello everyone,

First I want to thank all the very talented people who’ve created so many versions of the 488 adapters.  Almost too many to choose from.  Especially want to thank WaveyDipole for all his work on the software and support he’s given, and  Jay_Diddy_B for his board design that I’ve chosen to use.

I have been concentrating on building the buffered version by Jay_Diddy_B, shown in reply 862.  I’m waiting on parts and so started to get going on the AR488 software.  I’d like to get confirmation on the changes I need to make on the Config.h file.  The numbers at the beginning of the lines below are the line numbers of the unmodified config.h file.

45   //#define AR488_UNO  // Commented this line out since a NANO board is being used.
46   #define AR488_NANO  // Uncommented this line since a NANO board is being used.

158 #define SN7516X  // Uncommented this line since the design uses buffers.
 
160  #define SN7516X_TE 6  //Jay_Diddy_B SD Rev 2 in Reply 848, pg34, shows SN75160-1 and 61-1 (TE) going to D6.  So uncommented this line.

161  #define SN7516X_DC 13 // Jay_Diddy_B SD Rev 2 in Reply 848, pg34, shows SN75161-11 (DC) going to J1 for selection of either D3 or D13.  But D3 is also used for REN so use pin 13.  Thus uncommented this line.

162 //  #define SN7516X_SC 12 // Jay_Diddy_B SD Rev 2 in Reply 848, pg34, shows SN75161-14 (EOI) connected to D12.  Can't find an "SC" on the schematic, so leave commented out.

163  // ONLYA board  // Since I'm not using the ONLYA board, I think the following two lines should be commented out.
164 //  #define SN7516X_TE 13
165 //  #define SN7516X_DC 5

186 thru 197 deal with interrupts.  Since I’m using a NANO, should the interrupt section be uncommened?

205-216 deal with dip switches, which I don’t have.  Should line 205 (#define DIP_SWITCH) be commented out?

Thanks in advance
Bob
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 23, 2023, 05:26:52 pm
186 thru 197 deal with interrupts.  Since I’m using a NANO, should the interrupt section be uncommened?

205-216 deal with dip switches, which I don’t have.  Should line 205 (#define DIP_SWITCH) be commented out?

The interrupts section should remain commented out. It is no longer needed.

The lines relating to DIP switches can be commented out. It was an idea quite a long time ago to have the GPIB address made configurable with DIP switches, but these definitions are not implemented. I will remove them in the next release.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rockstedy40 on March 24, 2023, 07:51:42 pm
Thanks WaveyDipole for your response and all your efforts on the software!
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Gertjan on March 25, 2023, 11:22:34 am
Hi WaveyDipole,
A happy AR488 user here. Many thanks for all the hard work you put into AR488!  :-+

A suggestion for a small improvement:
Several times the subject of problems with the ++ver string came up, as discussed here:
https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4512557/#msg4512557 (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4512557/#msg4512557)

The problem is that KE5FX requires 'Version 6' and EZGPIB requires 'GPIB-USB' in the version string.

So far the solution was that KE5FX and EZGPIB users had to change the version string with ++id verstr and  ++savecfg.

I looked at the version string of my Fenrir GPIB-USB adapter (a Chinese Prologix clone): “Fenrir GPIB-USB 1.0 (Prologix version 6.0 compatible)"
It is clever that all required character sequences are present in the string.

Would it be a good idea to do the same thing for AR488? And make the default ++ver string something like: "AR488 GPIB controller, ver. 0.51.18, 26/02/2023 (Prologix version 6.0 GPIB-USB compatible)".

Putting the character sequences required by KE5FX and EZGPIB into the default version string would save new users a lot of searching before finding the ++id verstr solution.

Regards, Gertjan.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on March 25, 2023, 07:33:39 pm
I would put like this, the other is way too long for device manager  loll

"AR488 GPIB, v0.51.18, (Prologix version 6.0 GPIB-USB compatible)"
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on April 03, 2023, 04:02:13 pm
Happy to include that. I added the ++id verstr command so that users could change the string as requited. If the software changed, it had the flexibility to be changed. If any other software required some other string, then that could be configured as well. However, if it works with both KE5FX and EZGPIB, then I am happy to make the string proposed by coromonadalix the default and extend the string variable to 64 characters (63+null) as it would probably cover most use cases.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: dietert1 on April 04, 2023, 06:33:54 am
How do people use the SRQ auto poll?
As far as i understand the SRQ:... message may arrive at any time. What is a good scheme to use on the host side in order to avoid confusion? Don't use the GPIB controller while waiting for an interrupt?

Regards, Dieter
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Gertjan on April 06, 2023, 12:56:31 pm
I found another source for GPIB connectors.

The Chinese manufacturer Fuyconn (http://www.fuyconn.com/) is now selling its connectors on AliExpress (https://www.aliexpress.com/item/1005005334693654.html?spm=a2g0o.productlist.main.7.142c19ecEKBd6l&algo_pvid=63a8e9ad-0f9a-468b-87ca-f35056500503&algo_exp_id=63a8e9ad-0f9a-468b-87ca-f35056500503-3&pdp_ext_f=%7B%22sku_id%22%3A%2212000032650758236%22%7D&pdp_npi=3%40dis%21EUR%212.96%212.96%21%21%21%21%21%4021227e5116795810787216854d070b%2112000032650758236%21sea%21NL%21793968063&curPageLogUid=K7qevFC9WwKb).

The quality is a bit more "Chinese" than the A-brand connectors, but is still very decent, and they work flawless.
I am happy with their look & feel:

(https://www.miedema.dyndns.org/co/2023/racal1998/IMG_2312__Fuyconn_GPIB_connectors-600pix.jpg)
IMG_2312__Fuyconn_GPIB_connectors-2000pix.jpg (https://www.miedema.dyndns.org/co/2023/racal1998/IMG_2312__Fuyconn_GPIB_connectors-2000pix.jpg)

Regards, Gertjan.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: dietert1 on April 06, 2023, 03:10:01 pm
Yesterday we got two 1.5 m GPIB cables from Amazon at € 20 each. I'd guess they are of chinese origin, too. I opened one of the plugs to see the cable shield. These cables are sold as new and appear to be very similar to those old ones offered elsewhere for more than double the price.

Regards, Dieter
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bingo600 on April 09, 2023, 05:13:42 pm

The Chinese manufacturer Fuyconn (http://www.fuyconn.com/) is now selling its connectors on AliExpress (https://www.aliexpress.com/item/1005005334693654.html?spm=a2g0o.productlist.main.7.142c19ecEKBd6l&algo_pvid=63a8e9ad-0f9a-468b-87ca-f35056500503&algo_exp_id=63a8e9ad-0f9a-468b-87ca-f35056500503-3&pdp_ext_f=%7B%22sku_id%22%3A%2212000032650758236%22%7D&pdp_npi=3%40dis%21EUR%212.96%212.96%21%21%21%21%21%4021227e5116795810787216854d070b%2112000032650758236%21sea%21NL%21793968063&curPageLogUid=K7qevFC9WwKb).

$17 in shipping for 1 pcs  :scared:
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Gertjan on April 09, 2023, 05:42:26 pm

The Chinese manufacturer Fuyconn (http://www.fuyconn.com/) is now selling its connectors on AliExpress (https://www.aliexpress.com/item/1005005334693654.html?spm=a2g0o.productlist.main.7.142c19ecEKBd6l&algo_pvid=63a8e9ad-0f9a-468b-87ca-f35056500503&algo_exp_id=63a8e9ad-0f9a-468b-87ca-f35056500503-3&pdp_ext_f=%7B%22sku_id%22%3A%2212000032650758236%22%7D&pdp_npi=3%40dis%21EUR%212.96%212.96%21%21%21%21%21%4021227e5116795810787216854d070b%2112000032650758236%21sea%21NL%21793968063&curPageLogUid=K7qevFC9WwKb).


$17 in shipping for 1 pcs  :scared:

Yes, shipping costs are high, at least in the context of what is usual on AliExpress. But you are dealing with a manufacturer selling direct, not with the average AliExpress shop...
And the price of the connectors is low: $2,90. I ordered five, and paid less than when I had ordered connectors from Mouser or Digikey.

And I did get value for the shipping costs: The connectors arrived within a week.  :-+

Regards, Gertjan.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Gertjan on April 25, 2023, 02:02:10 pm
For people who want even cheaper Chinese GPIB connectors:

Dutch Circuits Online forum member Peter_dtn found these: cheap GPIB connectors on Ali Express (https://nl.aliexpress.com/item/1005003473505428.html?spm=a2g0o.order_list.order_list_main.10.501379d2bgUsD5&gatewayAdapt=glo2nld)

Take care to choose "24p MALE SOLDER" to get the right model with PCB pins....

These connectors are cheaper, and also, for these the shipping costs are the usual Ali Express low price  :)
But I did not buy them, so I do not have any idea about quality... (I am still happy with the Fuyconn connectors)

Regards, Gertjan.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rssenior on May 30, 2023, 11:27:19 am
Have just posted a further update (0.51.15) this morning that fixes a couple more bugs.
Still working on the MCP23x17 stuff.

I recall reading that recent MCP23017's aren't completely bi-directional.  GPA7 and GPB7 can only go one direction (output only). MCP23S17 (the SPI version) doesn't have that problem. See: https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP23017-Data-Sheet-DS20001952.pdf
Title: Re: AR488 Arduino-based GPIB adapter
Post by: rssenior on May 30, 2023, 11:48:36 am
Over the last few days, I hacked together a "custom" AR488 using a Teensy 3.1 (3.3V with 5V tolerant pins) I had lying around along with SN75160/SN75161. I posted a github issue about it earlier today (https://github.com/Twilight-Logic/AR488/issues/37). After a ++mode 1 and ++xdiag 1 255, I am seeing DAV and SRQ only drop to 0.5V instead of 0V (the other control pins nicely go to 0V), and the GPIB bus side of the corresponding transceivers not going low (hanging around 2.8V). Does this sound familiar to anyone? If I remove the SN75161 chip, the Teensy is trying to assert 0V, so something about the SN75161 isn't letting it get them pulled all the way down. TE and DC are both low. AHA! The function table on page 2 of the datasheet say that when TE, DC are low, SRQ and DAV are in receive mode. DC needs to be high to test SRQ and TE needs to be high to test DAV.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: caiser01 on June 06, 2023, 08:36:14 pm
Got a notice from Digi-Key yesterday that the DIP version of the SN75160 is going EOL. The SMD version looks like it will still be available for now. If anybody wants factory-fresh DIP versions of the SN75160 on hand for prototyping, you may want to think about getting them soon.

https://www.digikey.com/en/products/detail/texas-instruments/SN75160BN/370217 (https://www.digikey.com/en/products/detail/texas-instruments/SN75160BN/370217)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on June 11, 2023, 09:15:42 am
Thanks for pointing this out. As demand for through-the-hole components continues to fall, suppliers have been reducing and eliminating their stock in favour of their SMD equivalents, so I guess this is not entirely surprising. Wroth being aware of though.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on June 11, 2023, 09:23:09 am
Have just posted a further update (0.51.15) this morning that fixes a couple more bugs.
Still working on the MCP23x17 stuff.

I recall reading that recent MCP23017's aren't completely bi-directional.  GPA7 and GPB7 can only go one direction (output only). MCP23S17 (the SPI version) doesn't have that problem. See: https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP23017-Data-Sheet-DS20001952.pdf

Hmm, yes, table 2.1 on page 11. I hadn't noticed that. The chips are not high-Z either and power on the bus does reach the MCU board. I have, for now, abandoned testing these chips.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: Miti on June 11, 2023, 12:44:38 pm
Got a notice from Digi-Key yesterday that the DIP version of the SN75160 is going EOL. The SMD version looks like it will still be available for now. If anybody wants factory-fresh DIP versions of the SN75160 on hand for prototyping, you may want to think about getting them soon.

https://www.digikey.com/en/products/detail/texas-instruments/SN75160BN/370217 (https://www.digikey.com/en/products/detail/texas-instruments/SN75160BN/370217)

I have been using the smallest packages that I can work with for quite some time. 0603, SC70, SOT, TSSOP, etc. If you want to do electronics these days, you have no choice but to adapt, and it makes no sense hanging onto the dinosaurs.

Cheers,
Miti
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Kean on June 11, 2023, 01:04:00 pm
If you want to do electronics these days, you have no choice but to adapt, and it makes no sense hanging onto the dinosaurs.

Isn't the main purpose of building these GPIB interfaces so that we can continue to hang onto our T&M dinosaurs and boat anchors?  :P
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Miti on June 11, 2023, 01:29:44 pm
If you want to do electronics these days, you have no choice but to adapt, and it makes no sense hanging onto the dinosaurs.

Isn't the main purpose of building these GPIB interfaces so that we can continue to hang onto our T&M dinosaurs and boat anchors?  :P

You don’t do nothing to those boat anchors, you use them as is to make something new or to learn. If you want to make something new, you’ll have to adapt. Not only that the old parts are disappearing but the new ones offer much more flexibility and performance. This adapter that we’re talking about is only used to connect to the boat anchors.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on June 11, 2023, 02:57:18 pm
If you want to do electronics these days, you have no choice but to adapt, and it makes no sense hanging onto the dinosaurs.

Isn't the main purpose of building these GPIB interfaces so that we can continue to hang onto our T&M dinosaurs and boat anchors?  :P

You don’t do nothing to those boat anchors, you use them as is to make something new or to learn. If you want to make something new, you’ll have to adapt. Not only that the old parts are disappearing but the new ones offer much more flexibility and performance. This adapter that we’re talking about is only used to connect to the boat anchors.

@ Miti  that's your opinion, not the same for others ... some "old" stuff where better in many ways ...  ''new''  doesn't mean better  since quality and durability in some case(s) are long gone
Title: Re: AR488 Arduino-based GPIB adapter
Post by: dietert1 on June 11, 2023, 05:52:02 pm
For me the reason to make GPIB adapters was security. When i looked into the process table in my workstation and saw several processes installed by NI and whoever even when i wasn't using any of their stuff i wanted to become independent of that. No sniffing in our lab.
14 years ago i made some GPIB controllers based on XILINX CPLD with a FT245. They implemented only the basic bus handshaking, which means they require quite some library on the host to execute the usual GPIB transactions. Connecting two of them back-to-back one can transfer at 2 MBytes/sec.
Recently i made some STM32 based adapters with text interface to be used with a terminal program, much like the AR488. I am using it all the time. It can also support I2C ambient sensors, precision temperature monitoring with a ADS1256, SPI control of a relay scanner and a transparent RS232 connection. I want to use that for a setup with a Keithley 2182A nanovoltmeter.

Regards, Dieter

Title: Re: AR488 Arduino-based GPIB adapter
Post by: Miti on June 11, 2023, 06:02:47 pm
If you want to do electronics these days, you have no choice but to adapt, and it makes no sense hanging onto the dinosaurs.

Isn't the main purpose of building these GPIB interfaces so that we can continue to hang onto our T&M dinosaurs and boat anchors?  :P

You don’t do nothing to those boat anchors, you use them as is to make something new or to learn. If you want to make something new, you’ll have to adapt. Not only that the old parts are disappearing but the new ones offer much more flexibility and performance. This adapter that we’re talking about is only used to connect to the boat anchors.

@ Miti  that's your opinion, not the same for others ... some "old" stuff where better in many ways ...  ''new''  doesn't mean better  since quality and durability in some case(s) are long gone

I was talking about parts, you are talking about final products. For parts, you don't even have something to compare with in many cases. What do you compare an Altera Cyclone V (random choice) in BGA with, that come in DIP package?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Miti on June 11, 2023, 06:06:19 pm
For me the reason to make GPIB adapters was security. When i looked into the process table in my workstation and saw several processes installed by NI and whoever even when i wasn't using any of their stuff i wanted to become independent of that. No sniffing in our lab.
14 years ago i made some GPIB controllers based on XILINX CPLD with a FT245. They implemented only the basic bus handshaking, which means they require quite some library on the host to execute the usual GPIB transactions. Connecting two of them back-to-back one can transfer at 2 MBytes/sec.
Recently i made some STM32 based adapters with text interface to be used with a terminal program, much like the AR488. I am using it all the time. It can also support I2C ambient sensors, precision temperature monitoring with a ADS1256, SPI control of a relay scanner and a transparent RS232 connection. I want to use that for a setup with a Keithley 2182A nanovoltmeter.

Regards, Dieter

Agree, and let's not forget the price. Check the price of a genuine NI GPIB-USB-HS which in many cases does the same thing that AR488 does.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Shonky on June 21, 2023, 12:12:25 am
I'm putting together the artag (thanks for the gerbers!) design AR488 v3 based around a ATmega32U4.

I've had a pretty good search through this thread but I'm not sure what the recommendations are for configuring the Arduino for 5V or 3.3V supply. It seems from the photos and a few posts 3.3V works fine and that's what most people are using in absence of directive.

However GPIB is rated up to 5.25V maximum so shouldn't we be using 5V IO where possible? The ATmega is only rated to Vcc+0.5V on its inputs.

It appears the J1 jumper on the Arduino Pro Micro simply bypasses the 3.3V regulator and runs the whole device at 5V when shorted.

So is 5V recommended where possible?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: T3sl4co1l on June 21, 2023, 11:50:56 am
TTL outputs only pull up to about 3.5V.  3.3V LVCMOS is actually a pretty good fit.

Tim
Title: Re: AR488 Arduino-based GPIB adapter
Post by: mankan on June 21, 2023, 04:15:32 pm
@shonky Maybe it could be a good idea to be pin compatible with https://www.eevblog.com/forum/testgear/open-source-gpib-adapter/ (https://www.eevblog.com/forum/testgear/open-source-gpib-adapter/)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: artag on June 21, 2023, 08:25:10 pm

So is 5V recommended where possible?

I used 5V and I think of GPIB as a 5V bus, although you might get away with 3v3.
Note that the important difference between 3v3 and 5v pro micros is not the voltage, which can be fairly easily changed, but the crystal. If run from 3v3 you can only use 8Mhz, so a 16MHz 5V version can't just have the regulator enabled / added.

If you use 3v3 / 8Mhz , also note when you program it that you need to choose an 8MHz board version. I'm not sure if the USB will work if you misconfigure it. Certainly delays and serial baud rate will be wrong.

If iot will work at 3v3 with no buffers that's useful as the pro micro has got very much more expensive than it used to be, and a cheaper alternative would be good.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bnz on September 29, 2023, 06:11:18 pm
I have a problem getting AR488 running on a Arduino Pro Micro, 5V version (I also have a Nano and no problems there).
I use AR488 ver 0.51.18. Building and uploding to the Pro Micro works fine. The Pro Micro shows up as serial port 18 in the terminal program. The terminal program does not complain when making a connection. But the Pro Micro just does not react on commands  - 0 bytes received - regardless what I send (e.g. ++ver should produce an output and does with the Nano).

Any suggestions what I could try to get it running?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: dl6lr on September 30, 2023, 03:05:46 pm
Try a minimal echo program that echoes every character received. For each character received, toggle the LED. When you upload and get nothing back, you can detect by the LED if its receiving characters and fails to send. I have one chinese board that is "unreliably" sending characters. You can program it most of the time, verification usually fails and you get a lot of garbage or nothing back from the board.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bnz on September 30, 2023, 05:49:59 pm
An echo program works (also at 115200-speed). Moreover I tried with two different Pro Micro. They however are from the same source.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bnz on October 01, 2023, 06:49:46 am
I found the problem. In the source, as coming from github, there are two Arduinos defined for the 328P architecture:
Code: [Select]
/*** UNO and NANO boards ***/
#elif __AVR_ATmega328P__
  /* Board/layout selection */
  #define AR488_UNO
  #define AR488_NANO
  //#define AR488_MCP23S17
  //#define AR488_MCP23017

Following the instructions that only one per architecture should be uncomented, the code worked on the Pro Micro. Why this affects the Pro Micro, but was no problem with the Nano, is strange. Well the important thing is it works now.  ^-^
Title: Re: AR488 Arduino-based GPIB adapter
Post by: dl6lr on October 01, 2023, 03:39:30 pm
I found the problem. In the source, as coming from github, there are two Arduinos defined for the 328P architecture:

I am a little bit confused as the Pro Micro doesn't use a 328P, it has a 32U4 (Leonardo compatible). So it should never go through that path for the Pro Micro...
Title: Re: AR488 Arduino-based GPIB adapter
Post by: bnz on October 01, 2023, 05:29:13 pm
I know. Therefore I wrote it is a strange behaviour.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Echo88 on October 26, 2023, 10:43:57 pm
I produced/populated two boards based on user Jay_Diddy_Bs design: https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4483507/#msg4483507, (https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/msg4483507/#msg4483507,) many thanks  :-+
The sourcecode was changed accordingly as described in the SN7516x GPIB transceiver support-section.
Im able to control a Keysight 33509B Function generator just fine, but have trouble with reading/querying any response from a device like a DMM.
So i can control for example the voltage range of a Keysight 34401A and 34465A and they show a measurement when sending "MEAS?", but both wont send back the measurement in any ++eos/auto/read-configuration and *IDN? also wont get me any response.
Does anyone know what i might be doing wrong?
The parts i used are all from Mouser, so i dont suspect defective hardware.

Edit: Found the error. The //#define SN7516X - modifications had to be done in the config-file, not in the .ino itself, duh.  :palm:
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Echo88 on November 02, 2023, 11:19:30 pm
Anyone here with a 3458A?
Everything works so far, but i cant get a nonblocking method to work with the AR488 attached to a Raspberry Pi:
I want to use STB? to poll available measurement data, so that i can do other stuff while the 3458A takes its sweet 4s time for each 100NPLC-sample.
Alternatively a RQS-solution might work, but cant get that to work also.
Any idea what im doing wrong? Apparently the 3458A never sets the weighted sum of the STB to >=128, while this method worked a few years ago with a GPIB-USB-HS-adapter.
Attached are a code snippet that reads x samples at selectable NPLCs of 1/10 or 100, tested, works.
The attached SRQ-method doesnt work for me..then again im a really bad programmer.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: caiser01 on November 04, 2023, 02:46:43 pm
Any idea what im doing wrong? Apparently the 3458A never sets the weighted sum of the STB to >=128, while this method worked a few years ago with a GPIB-USB-HS-adapter.

You're never reading the status byte inside the while loop. You're reading the SRQ line with the ++srq command, which can only return a 0 or 1 (SRQ not asserted or SRQ asserted) so naturally, when you test that value, it will never be 128. Instead, try using the ++spoll command ("++spoll 22\r\n" in your case). This should give you the value of the status byte for your instrument.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Swake on November 15, 2023, 06:58:58 pm
Got a bit of an issue and would like to ask for debugging help. I tried using TestController over a Nano based AR488 with an HP 34410A DMM connected to a laptop and it doesn't work.

Using the AR488 Utility it is possible to talk with the nano and to identify the DMM configured at address 1 on the GPIB.
Code: [Select]
Date,COM #,Status,Message
9:33:02 pm,COM7,Send,++ver
9:33:02 pm,COM7,Recieved,"AR488 GPIB controller, ver. 0.51.18, 26/02/2023"
9:33:11 pm,COM7,Send,*idn?
9:33:12 pm,COM7,Send,++read
9:33:12 pm,COM7,Recieved,"HEWLETT-PACKARD,34401A,0,9-5-2"

However using TestController (latest verion) it cannot identify the DMM
Code: [Select]
;; AR488 B:1 Device HEWLETT-PACKARD,34401A, do not match: null
Tried a second nano on the same PCB and same issue. The PCB seems ok, no shorts, solder joints are fine and connections from arduino to the GPIB connector measure ok.

I've been using a Pro Micro based AR488 with the same HP 34410A DMM on the same laptop and that just works fine. Therefor I think my software is configured correctly. AR488 Utility gives exactly the same reply and TC configured according to the different virtual COM port van identify the DMM and return measurements fine:
Code: [Select]
;; Found Agilent 34401A on AR488 A:1
For what it's worth 1: With the Nano the first ++ver message sent always fails. Subsequent messages all work. With the Pro Micro the first message never fails.
For what it's worth 2: The Nano is new old stock and having the 'old' arduino bootloader.
For what it's worth 3: On the Pro Micro the send and receive LED's seem on all the time. Not with the nano.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Gertjan on November 15, 2023, 09:11:21 pm
I tried using TestController over a Nano based AR488 with an HP 34410A DMM connected to a laptop and it doesn't work.
Using the AR488 Utility it is possible to talk with the nano and to identify the DMM
......
However using TestController (latest verion) it cannot identify the DMM

I have seen this problem mostly with Chinese Nano clones. They are still rebooting during the TC init, and are not ready in time for answering TestControllers *IDN? question.

The solution is to add a extra line in the 34401A device definition file:
#resetDelay 3.5

See the TestController documentation: https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html#Arduino_startup_reset

Regards, Gertjan.
Title: ESP32S2
Post by: wilhe_jo on November 16, 2023, 02:45:57 pm
Just wanted to note that I just made a pull-request to the ESP32 repo to introduce ESP32S2 support.

General support has already been there - what's new is the support of the USB-peripheral in the ESP32-S2 module.
This allows to build simple and small adapters.

I attached photos of my first rev... it features ESD protection and programs via the internal USB and uses the same for comms.
Of course, rev1 has some medium d'oh... so there will rev2 in the close future.
Maybe this one will get open-hardware (I need to check all the 3d models, footprints,... to see if there's some licensing/copy-right issues).

If there's some additional demand (I guess, I'll need 10 for my museum...ähhh... lab to get rid of all these GPIB cabling), I could make my batch bigger.

Regards
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on November 16, 2023, 05:25:41 pm
even some PRO may give you problems   there is some who have different boot-loaders for 32u4  chips   ... and they way to make them work ... and they where a nightmare to fit in arduino ide ... 

just to let you know ..
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Swake on November 16, 2023, 10:41:08 pm
Quote
I have seen this problem mostly with Chinese Nano clones. They are still rebooting during the TC init
Tried those delay settings to no avail unfortunately.

Quote
there is some who have different boot-loaders for 32u4
Yes, Coromonadalix, and for the nano too. Your message gave me the indirect hint to try selecting an Arduino Uno as target in the IDE as that is near the same as the Nano except for the physical size. And that made it work!

The nano with the old bootloader appears to be in a frantic reboot loop. This issue was mentioned before already in this thread, but of course one has to read that particular message from a year ago and make the link to this case.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: selevo on November 27, 2023, 12:09:43 pm
Bright thoughts to everyone! I tried to compile the project in ArduinoDroid application for sndroid smartphones and I'm getting a lot of compilation errors. the project is not going to happen.
https://github.com/Twilight-Logic/AR488/issues/42

I also tried to compile the project in the Arduino IDE online editor - the project is assembled but does not generate hex code.
Can anyone help me by uploading  for me the HEX file for Nano on atmega328 here or other sites? I don't have a computer, just a smartphone, so I can't use the Arduino IDE standard
Title: Re: AR488 Arduino-based GPIB adapter
Post by: selevo on November 27, 2023, 12:44:08 pm
I also noticed a square pad for the GPIB connector. usually a square pad This is the first pin But in reality this is not the first conclusion and it is misleading.
https://github.com/konarik/AR488-multiple-PCBs
Title: Re: AR488 Arduino-based GPIB adapter
Post by: caiser01 on November 27, 2023, 03:44:13 pm
Can anyone help me by uploading  for me the HEX file for Nano on atmega328 here or other sites? I don't have a computer, just a smartphone, so I can't use the Arduino IDE standard

See attached.

I didn't know it was possible to flash an Arduino from a smartphone...
Title: Re: ESP32S2
Post by: WaveyDipole on November 27, 2023, 06:08:43 pm
Just wanted to note that I just made a pull-request to the ESP32 repo to introduce ESP32S2 support.

General support has already been there - what's new is the support of the USB-peripheral in the ESP32-S2 module.
This allows to build simple and small adapters.

I attached photos of my first rev... it features ESD protection and programs via the internal USB and uses the same for comms.
Of course, rev1 has some medium d'oh... so there will rev2 in the close future.
Maybe this one will get open-hardware (I need to check all the 3d models, footprints,... to see if there's some licensing/copy-right issues).

If there's some additional demand (I guess, I'll need 10 for my museum...ähhh... lab to get rid of all these GPIB cabling), I could make my batch bigger.

Regards

Thanks. I will have a look at that.

There is actually already a fork of this project targeting the ESP32 which adds a couple of additional protocols. You can find it here:

https://sr.ht/~douardda/AR488-ESP/

I would like, at some point to add those features to this project but haven't had a chance to analyse the code in detail. Maybe I will get some time this winter....

Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on November 27, 2023, 06:31:15 pm
Bright thoughts to everyone! I tried to compile the project in ArduinoDroid application for sndroid smartphones and I'm getting a lot of compilation errors. the project is not going to happen.
https://github.com/Twilight-Logic/AR488/issues/42

I also tried to compile the project in the Arduino IDE online editor - the project is assembled but does not generate hex code.
Can anyone help me by uploading  for me the HEX file for Nano on atmega328 here or other sites? I don't have a computer, just a smartphone, so I can't use the Arduino IDE standard

Also didn't know it was possible to compile on an Android phone. Must have a look at that!
BTW, I have seen and responded to your logged issue.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on November 29, 2023, 02:46:03 pm
Hi folks,

I am lately experiencing trouble with the HC-06 Bluetooth module, which I have hooked up to the AR488 adapter.
The AR488 works flawlessly, but the HC-06 seems to drop data packets. The number of bytes received on the PC side is quite often less than the number of bytes sent by the AR488. To double-check I had replaced the HC-06 by a USB to serial adapter and no problems there.
Has anybody experienced such a problem with the HC-06? Any ideas what the cause could be?

Tom
Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on November 30, 2023, 03:35:24 pm
I think I have found the problem:
My latest batch of HC06 modules appears to be built with faked chips.
These only work without data loss up to 57,6 kBaud!
An earlier batch of the same modules from a different supplier shows no problems at all at
115,2kBaud.

SO BEWARE OF FAKE MODULES!

Tom
Title: Re: AR488 Arduino-based GPIB adapter
Post by: DC1MC on December 01, 2023, 11:47:38 am
I think I have found the problem:
My latest batch of HC06 modules appears to be built with faked chips.
These only work without data loss up to 57,6 kBaud!
An earlier batch of the same modules from a different supplier shows no problems at all at
115,2kBaud.

SO BEWARE OF FAKE MODULES!

Tom

If you have a sample from both batches maybe you can publish a side by side picture to help future users chose them properly. Of course, if they're identically looking then is a tough choice.

 Cheers,
 DC1Mc
Title: Re: AR488 Arduino-based GPIB adapter
Post by: moyemojee on December 02, 2023, 01:46:09 pm
Witch arduino version do you have when you try to compile it  ???,  please  be more specific with your errors to help  WaveyDipole
indigocard activate (https://indigocard.ltd/)
roblox exploit (https://jjsploit.click/)


Title: Re: AR488 Arduino-based GPIB adapter
Post by: tom_iphi on December 03, 2023, 08:27:58 am
Quote
If you have a sample from both batches maybe you can publish a side by side picture to help future users chose them properly. Of course, if they're identically looking then is a tough choice.

Both HC-06 modules are looking identical. They can be distinguished by querying the firmware version:

Good:
AT+VERSION
hc01.comV2.0

Bad:
AT+VERSION
OKlinvor
V1.8

But the bad one may also just be a clone of a working linvor device. Anyway, reducing the baud rate on the HC-06 and the AR488 adapter to 56k also fixes the problem.

Tom
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on December 07, 2023, 09:47:43 am
It looks like the Android app is a bit of a red herring. There is an official Arduino IOT cloud app which is a different beast. The other app mentioned in the earlier post has negative reviews and at least one post complains about code compatibility mentioning that code that compiles fine in the Arduino IDE generates lots of errors in this mobile app. I guess there is nothing to be excited about yet. For now, stick to the official Arduino IDE.

tom_lphi, that's an interesting note about HC-06 Bluetooth boards. Worth being aware of.

Title: Re: AR488 Arduino-based GPIB adapter
Post by: lmester on January 22, 2024, 02:32:05 am
I have users of my HP 3478A multimeter control software that are getting checksum errors when trying to read the calibration data. This is happening with newer AR488 firmware versions. Older firmware works fine.

https://mesterhome.com/gpibsw/hp3478a/index.html (https://mesterhome.com/gpibsw/hp3478a/index.html)

My program works with AR488 0.49.14 but fails with AR488 0.51.18.

Could wavydipole comment on what changes there may be between these two AR488 versions?

Code: [Select]

AR488 0.49.14 read calibration data cheksum good:

Reading calibration data.
**********
Verify checksums.
@@@CA@BLLLNLG : CkSum = (199 + 56) Checksum OK.
@@@@CABLLCOLO : CkSum = (207 + 48) Checksum OK.
@@@@@DBLLOELM : CkSum = (205 + 50) Checksum OK.
IIIIIDAEBAOKF : CkSum = (182 + 73) Checksum OK.
@@@@@@AEBMNML : CkSum = (220 + 35) Checksum OK.
@@@@@@@@@@@OO : CkSum = (255 +  0) Checksum OK.
IIIE@BADODEL@ : CkSum = (192 + 63) Checksum OK.
IIII@D@E@MNKG : CkSum = (183 + 72) Checksum OK.
IIIIIA@EDNNJL : CkSum = (172 + 83) Checksum OK.
IIIIII@ECDDKI : CkSum = (185 + 70) Checksum OK.
IIIIII@EABLKE : CkSum = (181 + 74) Checksum OK.
IIIIII@EBBOKA : CkSum = (177 + 78) Checksum OK.
IIIIII@EBMAKD : CkSum = (180 + 75) Checksum OK.
IIIIII@EBDOJO : CkSum = (175 + 80) Checksum OK.
@@@BF@CNOE@MB : CkSum = (210 + 45) Checksum OK.
@@@@BECN@@MMJ : CkSum = (218 + 37) Checksum OK.
@@@@@@@@@@@OO : CkSum = (255 +  0) Checksum OK.
IIIE@BCLCOBKJ : CkSum = (186 + 69) Checksum OK.
@@@@@@@@@@@OO : CkSum = (255 +  0) Checksum OK.

Reading calibration data complete.
Calibration data checksum valid.


------------------------------------------------


AR488 0.51.18 read calibration data checksum failed:

Reading calibration data.
**********
Verify checksums.
@@@CA@BLLGNLG : CkSum = (199 + 51) Checksum Fail.
@@@@CABLLCOLO : CkSum = (207 + 48) Checksum OK.
G@@@@DBLLOELM : CkSum = (205 + 57) Checksum Fail.
IIIIIDAEBAOKF : CkSum = (182 + 73) Checksum OK.
@@@@@@AEBMNML : CkSum = (220 + 35) Checksum OK.
@@@@@@@@@@@OO : CkSum = (255 +  0) Checksum OK.
IIIE@BADODEL@ : CkSum = (192 + 63) Checksum OK.
IIII@D@E@MNKG : CkSum = (183 + 72) Checksum OK.
IIIIIA@EDNNJL : CkSum = (172 + 83) Checksum OK.
IIIIII@ECDDKI : CkSum = (185 + 70) Checksum OK.
IIIIII@EABLKE : CkSum = (181 + 74) Checksum OK.
IIIIII@EBBOKA : CkSum = (177 + 78) Checksum OK.
IIIIII@EBMAKD : CkSum = (180 + 75) Checksum OK.
IIIIII@EBDOJO : CkSum = (175 + 80) Checksum OK.
@@@BF@CNOE@MB : CkSum = (210 + 45) Checksum OK.
@@@@BECN@@MMJ : CkSum = (218 + 37) Checksum OK.
@@@@@@@@@@@OO : CkSum = (255 +  0) Checksum OK.
IIIE@BCLCOBKJ : CkSum = (186 + 69) Checksum OK.
@@@@@@@@@@@OO : CkSum = (255 +  0) Checksum OK.

Reading calibration data complete.
Invalid checksum during calibration data read!
CalEd: inst com checksum fail!
Abort: COM fail cal Checksum failed.
Exit cal update.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: unseenninja on January 29, 2024, 11:54:35 am
Is there a particular reason why read_tmo_ms is limited to a maximum of 32,000 milliseconds? The code seems to handle the timeout as an unsigned long internally, allowing 4,294,967,295 milliseconds as the real maximum.

The Solartron 7081 takes 51.2 seconds to produce a full 8.5 digit reading. With the maximum allowed timeout of 32 seconds, there's no way to get the AR488 to wait long enough for it.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Gertjan on January 30, 2024, 06:58:52 am
If you have to wait that long, consider that you are not using the right solution......
Waiting that long means that the entire GPIB  buss is blocked during the waiting time.

A better solution is to send a command requesting a measurement first, and then poll at regular intervals to check if there is an answer. Read about the++spoll command.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: robert.rozee on February 12, 2024, 02:08:23 pm
[...] I have been considering using the Pico board instead

did the idea of using a RPi pico ever go anywhere? looks like with some series resistors the signal level differences shouldn't be too much of an issue - or there are plenty of little level-shifter boards out there.


cheers,
rob  :-)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: coromonadalix on February 12, 2024, 03:04:57 pm
an RPI   would be more challenging to build and develop,  since rpi need an OS to boot  ... and you need to load  plugins etc ..

if i recall it does exist ...   https://www.hackster.io/lightside-instruments/the-gpib4pi-gpib-for-raspberry-pi-shield-4b3e9a (https://www.hackster.io/lightside-instruments/the-gpib4pi-gpib-for-raspberry-pi-shield-4b3e9a)

i think the actual project is more than enough ?
Title: Re: AR488 Arduino-based GPIB adapter
Post by: caiser01 on February 12, 2024, 03:57:41 pm
an RPI   would be more challenging to build and develop,  since rpi need an OS to boot  ... and you need to load  plugins etc ..

You're talking about using a Raspberry Pi 0/1/2/3/4/5 for which there is a different solution as you pointed out.

robert.rozee was asking about the Raspberry Pi Pico, which is a microcontroller board (https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico.html (https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico.html)) and just needs to have the AVR firmware ported to it.

There is an Arduino core for the Pico that might simplify porting AR488 to it (https://github.com/earlephilhower/arduino-pico (https://github.com/earlephilhower/arduino-pico)). It just needs someone with some time on their hands to do the work and test it.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: H.O on February 12, 2024, 06:47:02 pm
Having it run on something like a W5500-EVB-PICO and use Ethernet instead of UART would be cool.
No, I'm afraid I'm not the guy for it and I don't expect it from anybody else - but it would be cool...
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wilhe_jo on February 12, 2024, 07:22:56 pm
Well, it runs on a ESP32-S2 (see photo) with a minimum number of components!
That's the module, the connectors, some ESD protection and some passives to make the module happy.
I converted more or less every instrument to usb with these and put some remaining boards on Lectronz in case somebody else would want some...

Compared to eg. the RPi pico, this module provides a USB peripheral.

I thought of doing an Ethernet version (maybe a port to a ch32v307).
The problem with this is, that you have to seriously think about locking/unlocking equipment (GPIB isn't that good with multiple-"masters" on the "bus"...).
Additionally, you'd need power.
Of course, you could add PoE... but why?
Ideally, the converter is small enough to hide on the backside of the measurement instrument.

Frankly, I think a GPIB -> USB converter is really the best compromise.
Both, the Atmega328 (+ USB-serial IC) and the mega32u4 cost more than a ESP32-S2 module does.
So IMHO these offer the best bang-for-buck.

BTW: if someone really plans to look into making a nice web-interface for the ESP32, I'd be open to send out 1 or 2 of my devices to help out with hardware... ideally within Europe to keep shipping costs reasonable

73
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 14, 2024, 09:24:28 pm
Well after a long spell of illness during December and most of January, I have finally managed to push the latest release out. There has been some code re-factoring for better consistency, an ESP32 layout added and a couple of fixes (EOI, ++spoll) . I have also added a ++tct command, although not the remaining additional functions that the David Douards ESP32 verision includes.

To answer some of the above questions:

I have users of my HP 3478A multimeter control software that are getting checksum errors when trying to read the calibration data. This is happening with newer AR488 firmware versions. Older firmware works fine.

Might be down to the EOI bug (Issue 9) reported by m0pub? This has been addressed in the latest release which might be worth a try. Will be interested to know if the problem still persists.

Is there a particular reason why read_tmo_ms is limited to a maximum of 32,000 milliseconds? The code seems to handle the timeout as an unsigned long internally, allowing 4,294,967,295 milliseconds as the real maximum.

It is limited by the int variable used to store its value in EEPROM. In the original code the limit was even smaller. When I extended it, I thought 30 seconds was reasonable and not likely to be exceeded. The reason why an unsigned long is being used in the handshaking routine is because the value is being compared to millis, which is also an unsigned long. I am not fortunate enough to have an 8-digit meter, but there is no reason why a larger variable could not be used in the config struct to accommodate longer time periods. Of course that would require re-saving of EEPROM contents.

[...] I have been considering using the Pico board instead

did the idea of using a RPi pico ever go anywhere? looks like with some series resistors the signal level differences shouldn't be too much of an issue - or there are plenty of little level-shifter boards out there.

I did create a layout for the Pico (it is commented out in the current code) and ran some tests. Unfortunately, so far, unlike the ESP32, these have not been successful. It seems to be almost working, that is, I get a normal looking logic analyzer trace but is has slight errors. I am not yet sure of the reason for this but it may be that the Pico on its own is not capable enough to directly drive the bus, or it could be a timing issue. I need to find more time for testing. I had hoped to try the Arduino RP2040, but haven't got around to buying one of those yet.

Well, it runs on a ESP32-S2 (see photo) with a minimum number of components!
That's the module, the connectors, some ESD protection and some passives to make the module happy.

An interesting looking board. I see it is already up on Lectronz.

I thought of doing an Ethernet version (maybe a port to a ch32v307).
The problem with this is, that you have to seriously think about locking/unlocking equipment (GPIB isn't that good with multiple-"masters" on the "bus"...).
Additionally, you'd need power.

The other problem you have is that the Ethernet interface needs additional GPIO pins. An Arduino Mega Mini would have sufficient and the Pico might (would have to investigate further) if I can get it to work.... The ESP32 WROVER module also might although since it already has WiFi, that would probably make adding Ethernet redundant.

BTW: if someone really plans to look into making a nice web-interface for the ESP32, I'd be open to send out 1 or 2 of my devices to help out with hardware... ideally within Europe to keep shipping costs reasonable
73

Quite some time ago I had developed a web interface for the ESP8266. It had to be substantially re-written to run on the ESP32 and was in a working state but still in need of further development when I last worked on it. I have just recently added an ESP32 layout to the AR488 code and was planning to revisit that code and develop further into a web interface module that could be added in and used as an option. I do have an ESP32 devkit board which I can use although it does not have the ESD protection implemented in your board.

BTW, I can add support for the ESP-S2 to my project. I just need the pinout details.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: linux-works on February 14, 2024, 10:19:32 pm
I do lots of web REST interfaces for the esp (8266 but I can move to esp32).

not graphical, but pure REST interfaces (gets and sets via simple routes or paths).

PM me if you want to discuss.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wilhe_jo on February 14, 2024, 10:36:29 pm
BTW, I can add support for the ESP-S2 to my project. I just need the pinout details.

Well, I made a pull request... https://github.com/douardda/AR488-ESP32/pull/1
My repo: https://github.com/WilheJo/AR488-ESP32

I'm defaulting to some esp32s2 dev-board for the usb-stuff.
ATM, I'm playing with the idea of sponsoring a usb-pid (there are some resellers).
That would make it easier to define the serial device name via udev.

I do lots of web REST interfaces for the esp (8266 but I can move to esp32).

not graphical, but pure REST interfaces (gets and sets via simple routes or paths).

PM me if you want to discuss.


Well, my board uses an esp32s2.
This is mainly because this one is cheap and has hardware USB.

As for the rest API: I have no real clue how that could be implemented for non-standard compliant equipment.
I have some older equipment hat is just ieee488 compliant... Absolutely no scpi -like communication.

I could think of some web socket interface that feeds the same streams that take data from the serial interface.
The webinterface would "just" provide a convenient way for humans to take to the bus manually.

73
Title: Re: AR488 Arduino-based GPIB adapter
Post by: unseenninja on February 15, 2024, 12:15:58 am
Well after a long spell of illness during December and most of January, I have finally managed to push the latest release out.

I'm sorry to hear that. I hope you are feeling a bit better now.

Is there a particular reason why read_tmo_ms is limited to a maximum of 32,000 milliseconds? The code seems to handle the timeout as an unsigned long internally, allowing 4,294,967,295 milliseconds as the real maximum.

It is limited by the int variable used to store its value in EEPROM. In the original code the limit was even smaller. When I extended it, I thought 30 seconds was reasonable and not likely to be exceeded. The reason why an unsigned long is being used in the handshaking routine is because the value is being compared to millis, which is also an unsigned long. I am not fortunate enough to have an 8-digit meter, but there is no reason why a larger variable could not be used in the config struct to accommodate longer time periods. Of course that would require re-saving of EEPROM contents.

Thanks, but Gertjan's suggestion put me on the right track. I tell the meter to assert SRQ when it has a reading ready and then handle it with ++srqauto. Much more efficient!

Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 15, 2024, 11:35:27 am
BTW, I can add support for the ESP-S2 to my project. I just need the pinout details.

Well, I made a pull request... https://github.com/douardda/AR488-ESP32/pull/1
My repo: https://github.com/WilheJo/AR488-ESP32

Indeed. I have discovered that David Douard has added the ESP32 (and STM32) layout configurations to the platformio.ini file. I can pick them up from there and add them to this project.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: linux-works on February 15, 2024, 03:20:14 pm
the way I'm doing my t/m remote control stuff is now focused on wifi REST calls for simple gets and sets.  for that, you dont need esp32, esp8266 is more than enough.  the only reason I'd HAVE to use a 32 is if I went with bluetooth for some reason.  some lower cost meters use BLE as their remote control and for that the esp32 would be ideal.

the meters I'm more interested in are those that have serial interfaces.  for that, software serial is more than enough for an esp class chip.

no usb wanted or needed.   certainly not 'real' usb.  usb-serial would be sort of ok, but micros usually cant do usb inputs, they are uart focused.  so having serial wrapped in usb is overkill and not useful to me.

for streaming output, websockets are fine.  espnow is also fine for some things (esp to esp comms).

but mostly I'm using just 'curl -s' to get and set things.  start polling, stop polling, get values, set config, restore config, etc.

I have power supplies, meters, dc loads and planning other things that use this method of config/control.

(in my last several jobs, I got into the json religion and never looked back.  connectionless fetches via REST are so simple and so fast, I dont see much need for other forms of remote control anymore)

I've been working on an api infra for all this so that the user only has to write a few lines to get all that up and running.

I do plan to release to my github but its not there yet, still under devel.  but its been running for a while now (years) and its proven itself in my labs.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wilhe_jo on February 15, 2024, 06:11:58 pm
the way I'm doing my t/m remote control stuff is now focused on wifi REST calls for simple gets and sets.  for that, you dont need esp32, esp8266 is more than enough.  the only reason I'd HAVE to use a 32 is if I went with bluetooth for some reason.  some lower cost meters use BLE as their remote control and for that the esp32 would be ideal.

Well, if you look at the espressif website, they recommend migrating from the ESP8266 to the ESP32-C2... so I'd call this EOL/obsolete...

the meters I'm more interested in are those that have serial interfaces.  for that, software serial is more than enough for an esp class chip.

But that's a totally different usecase to the AR488, right?
AR488 is about controlling IEEE488 aka GPIB... that's a multi-drop bus with interrupts, byte-wide data bus and handshake signalling.


no usb wanted or needed.   certainly not 'real' usb.  usb-serial would be sort of ok, but micros usually cant do usb inputs, they are uart focused.  so having serial wrapped in usb is overkill and not useful to me.

Are you sure? My boards programm via USB (just press a button to switch to the preprogrammed internal usb-bootloader), get power via usb and use usb for comms. That's just 1 single cable that can get extended with ease using active cables (I've done 10 without any issue in my 3d print farm).


for streaming output, websockets are fine.  espnow is also fine for some things (esp to esp comms).

but mostly I'm using just 'curl -s' to get and set things.  start polling, stop polling, get values, set config, restore config, etc.

I have power supplies, meters, dc loads and planning other things that use this method of config/control.

(in my last several jobs, I got into the json religion and never looked back.  connectionless fetches via REST are so simple and so fast, I dont see much need for other forms of remote control anymore)

Well, GPIB isn't really something you want to use in an connectionless environment.
You're better off blocking any but one concurrent connection!

At some point you'll try to run 2 tests using the same equipment by accident, and you'll mess up you readings... that's when you start to lock equipment carefully.
BTW. that's exactly what GPIB does. You lock the local "UI" when you control equipment via the bus.

I run a pre-compliance EMC lab with quite some equipment.
For my testing, I have created a Qt6 application (there are some UI things that are missing... but there are plans to get it published as open source) that abstracts the workflows, test equipment and (bus) interfaces.
In fact, the workflow doesn't bother whether I use my PMM 9060 receiver, or my trustworthy Advantest R3271 via an  Arduino AR488, my ESP32-S2 AR488 or some old galvant GPIB dongle.
Just replace the receiver in the measurement chain, and you're good to go.

The abstraction is done in software, and not on the interface to the hardware.... but again, different usecase...

Additionally, I don't want wireless comms to my equipment. Again, I run a EMC lab, and I have situations (eg. getting the radiation pattern of an antenna) where my EUT would kill any wifi comms, and I don't want any other active transmitter to have a clean reading... again, special usecase...

So there's a very, very good reason why USB is a good thing to control instruments.

Yes, Ethernet might be also an interesting solution, but getting POE right, tiny and reliable is way more difficult than "just" have a USB cable connected to 2 pins :)


I've been working on an api infra for all this so that the user only has to write a few lines to get all that up and running.

I do plan to release to my github but its not there yet, still under devel.  but its been running for a while now (years) and its proven itself in my labs.

Been there, done that... still not ready for publishing after 3 years of constant development... the problem is to make the UI.

Just a script-set isn't really what you want/need... maybe as a start, but at some point, you want to have nice graphic.

Then, you want to do protocols right in there, because why would you keep the protocol separate from the measurement, right?

After a while, editing the (json) config files gets boring, so you need some sort of config-dialogs.

It's endless....


73
Title: Re: AR488 Arduino-based GPIB adapter
Post by: linux-works on February 15, 2024, 06:41:24 pm
there is no sign of the wemos d1 mini EVER going out of style in my timeframe (where I'd care).  its a standard and its not going anywhere.  the esp32 fans really crack me up.  there's a place for both but to deny the older one makes no sense.  the d1 mini footprint is de-facto and they are cheap as chips with next day delivery possible.

if you dont need ble, then there's no compelling reason to have to use esp32.

I have those chips at home but have not actually had the need to go beyond an 8266.  seriously. 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: linux-works on February 15, 2024, 06:46:29 pm
Quote
Just a script-set isn't really what you want/need... maybe as a start, but at some point, you want to have nice graphic.

I'm more about automation and so graphic and user-data fields and mousing is definitely not what I want.  and not my focus at all.  there are already too many graphical this and that and you can always make one IF you have a raw get/set interface that works.

json as the language and rest over port 80 as the transport is, again, a great way for automation to work network-wide.

before that, usb and serial to local systems made sense.  gpib was like that, too.  but now I see the world as networked and with things being able to send a get or set and get a simple ascii json reply back.  if you give me that, I can do anything after that.

if you give me graphics and user clicky, I have no desire to try to automate it or even use it.  just being honest.

so again, my focus is entirely on a sane remote api (json over rest) and while it wont be directly usable by scpi style clients, that's not a problem for me.  I just want the timestamped data so that I can do things with it myself.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wilhe_jo on February 15, 2024, 08:00:12 pm
there is no sign of the wemos d1 mini EVER going out of style in my timeframe (where I'd care).  its a standard and its not going anywhere.  the esp32 fans really crack me up.  there's a place for both but to deny the older one makes no sense.  the d1 mini footprint is de-facto and they are cheap as chips with next day delivery possible.

if you dont need ble, then there's no compelling reason to have to use esp32.

I have those chips at home but have not actually had the need to go beyond an 8266.  seriously. 

don't blame the messenger :)

The espressif website cleary hints to migrate from the ESP8266 to the esp32-c2 (that's actually the RISC-V series... so that's totally different to the "normal" esp32 series).
They make the chip, so they should know why they write something like this...

My choice for the ESP32-S2 was purely because of the USB peripheral and its availability.
Why should I add some additional IC when I can get something "better" (read: something that has everything I want from the beginning) for the same price without any drawback?

Quote
Just a script-set isn't really what you want/need... maybe as a start, but at some point, you want to have nice graphic.

I'm more about automation and so graphic and user-data fields and mousing is definitely not what I want.  and not my focus at all.  there are already too many graphical this and that and you can always make one IF you have a raw get/set interface that works.

json as the language and rest over port 80 as the transport is, again, a great way for automation to work network-wide.

before that, usb and serial to local systems made sense.  gpib was like that, too.  but now I see the world as networked and with things being able to send a get or set and get a simple ascii json reply back.  if you give me that, I can do anything after that.

if you give me graphics and user clicky, I have no desire to try to automate it or even use it.  just being honest.

so again, my focus is entirely on a sane remote api (json over rest) and while it wont be directly usable by scpi style clients, that's not a problem for me.  I just want the timestamped data so that I can do things with it myself.


Trust me, I made all this because IMHO everything not automated is a big problem from a business perspective... just leaves too much room for mistakes.


This software is not about "clicky". It automates several workflows you need for emc-testing (and some others).
BTW: "clicky" can be a way of automation (eg. generating default templates with 1 click instead of some commands on the shell).

But again...there are different use-cases :)

I don't care about the interface, I just don't see good use of REST in a situation, where you strictly have to have only 1 connection/session at a time.
If you corrupt data because you started by accident some other workflow that also uses a test-instrument, you did something terribly wrong in automation!

Additionally, this potential wifi-connection needs crypto.
There's no excuse to have some non-ssl service in 2024!

So a simple Websocket over HTTPS should be perfect.
You just accept a single connection and forward all bytes from/to the existing datastreams.

73


Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 16, 2024, 08:15:06 pm
Well after a long spell of illness during December and most of January, I have finally managed to push the latest release out.

I'm sorry to hear that. I hope you are feeling a bit better now.

Thank you. Recovery has been a gradual recovery, but I am slowly getting there and almost back to a normal routine.

It is limited by the int variable used to store its value in EEPROM. In the original code the limit was even smaller. When I extended it, I thought 30 seconds was reasonable and not likely to be exceeded. The reason why an unsigned long is being used in the handshaking routine is because the value is being compared to millis, which is also an unsigned long. I am not fortunate enough to have an 8-digit meter, but there is no reason why a larger variable could not be used in the config struct to accommodate longer time periods. Of course that would require re-saving of EEPROM contents.

Thanks, but Gertjan's suggestion put me on the right track. I tell the meter to assert SRQ when it has a reading ready and then handle it with ++srqauto. Much more efficient!

Fair enough.I am glad to hear that the SRQ feature is being used and is actually useful!

BTW, I can add support for the ESP-S2 to my project. I just need the pinout details.

Well, I made a pull request... https://github.com/douardda/AR488-ESP32/pull/1
My repo: https://github.com/WilheJo/AR488-ESP32

Indeed. I have discovered that David Douard has added the ESP32 (and STM32) layout configurations to the platformio.ini file. I can pick them up from there and add them to this project.

I have now retrospectively added the ESP32 pinout configurations from the forked projects to this project. It should be noted however, that David Douard's version has flags to enable use of PSRAM and the built-in Bluetooth feature on the ESP32, which I have not implemented yet.

I do lots of web REST interfaces for the esp (8266 but I can move to esp32).

not graphical, but pure REST interfaces (gets and sets via simple routes or paths).

PM me if you want to discuss.

I did consider doing something with MQTT a while back. I had experimented with it for another project and it seemed useful, however that idea took a back seat. In any case, it would require an MQTT broker, e.g. running on a Pi or on the PC which adds a little complexity. I haven't really worked with RESTful APIs yet. Interesting idea though.

Additionally, this potential wifi-connection needs crypto.
There's no excuse to have some non-ssl service in 2024!

I tend to agree, even did back in 2020 when I first had a look at this. At the time it was feasible to set up a HTTPS server on an ESP32. It is a bit more complex because you have to create and set up an SSL certificate, but it does work. Encryption is expected these days. Unfortunately, at the time, unlike the ESP8266, the ESP32 SDK did not appear to have a native WebServerSecure library, only WebServer which was clear text. A third party library called esp_https_server library was available and could be used but was still in development. The syntax and methods were different from the ESP8266 version, so the code ended having to be almost totally re-written to work on the ESP32. Eventually I ended up with a working prototype (2 or 3 actually), but it felt rather less responsive to requests than the equivalent running on the ESP8266, which is odd since the ESP32 has hardware to run the encryption, whereas the ESP8266 had to do this in software. I plan to re-visit HTTPS on the ESP32 in the not too distant future.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wilhe_jo on February 16, 2024, 09:46:31 pm
Well after a long spell of illness during December and most of January, I have finally managed to push the latest release out.

I'm sorry to hear that. I hope you are feeling a bit better now.

Thank you. Recovery has been a gradual recovery, but I am slowly getting there and almost back to a normal routine.

It is limited by the int variable used to store its value in EEPROM. In the original code the limit was even smaller. When I extended it, I thought 30 seconds was reasonable and not likely to be exceeded. The reason why an unsigned long is being used in the handshaking routine is because the value is being compared to millis, which is also an unsigned long. I am not fortunate enough to have an 8-digit meter, but there is no reason why a larger variable could not be used in the config struct to accommodate longer time periods. Of course that would require re-saving of EEPROM contents.

Thanks, but Gertjan's suggestion put me on the right track. I tell the meter to assert SRQ when it has a reading ready and then handle it with ++srqauto. Much more efficient!

Fair enough.I am glad to hear that the SRQ feature is being used and is actually useful!

BTW, I can add support for the ESP-S2 to my project. I just need the pinout details.

Well, I made a pull request... https://github.com/douardda/AR488-ESP32/pull/1
My repo: https://github.com/WilheJo/AR488-ESP32

Indeed. I have discovered that David Douard has added the ESP32 (and STM32) layout configurations to the platformio.ini file. I can pick them up from there and add them to this project.

I have now retrospectively added the ESP32 pinout configurations from the forked projects to this project. It should be noted however, that David Douard's version has flags to enable use of PSRAM and the built-in Bluetooth feature on the ESP32, which I have not implemented yet.

I do lots of web REST interfaces for the esp (8266 but I can move to esp32).

not graphical, but pure REST interfaces (gets and sets via simple routes or paths).

PM me if you want to discuss.

I did consider doing something with MQTT a while back. I had experimented with it for another project and it seemed useful, however that idea took a back seat. In any case, it would require an MQTT broker, e.g. running on a Pi or on the PC which adds a little complexity. I haven't really worked with RESTful APIs yet. Interesting idea though.

Additionally, this potential wifi-connection needs crypto.
There's no excuse to have some non-ssl service in 2024!

I tend to agree, even did back in 2020 when I first had a look at this. At the time it was feasible to set up a HTTPS server on an ESP32. It is a bit more complex because you have to create and set up an SSL certificate, but it does work. Encryption is expected these days. Unfortunately, at the time, unlike the ESP8266, the ESP32 SDK did not appear to have a native WebServerSecure library, only WebServer which was clear text. A third party library called esp_https_server library was available and could be used but was still in development. The syntax and methods were different from the ESP8266 version, so the code ended having to be almost totally re-written to work on the ESP32. Eventually I ended up with a working prototype (2 or 3 actually), but it felt rather less responsive to requests than the equivalent running on the ESP8266, which is odd since the ESP32 has hardware to run the encryption, whereas the ESP8266 had to do this in software. I plan to re-visit HTTPS on the ESP32 in the not too distant future.


Wolfssl sems to be able to create self signs certificates on fly.
So you could have a partition holding certs for the IP addresses you get via DHCP...or the new key algorithms you get via updates.

The question is if someone needs this ...

Anyhow, I still would opt for a transparent (web)socket.
This would allow the existing software to use this minimal (if at all) changes.
I mean redirecting serial data via some TCP socket is nothing new...

Regards
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on February 17, 2024, 07:09:54 pm
I spent quite a bit of time investigating the HTTPS on the ESP32 and the situation seems rather discouraging from an Arduino IDE perspective. The Hessel esp_https_server library does not appear to have been updated for 4 years although it has arrived at a full version 1.0.0 rather than the point versions I was working with previously. It uses various encryption and webserver library components contained in the ESP32 SDK, but since these have been updated as time goes on, when you compile even the basic examples on Arduino, you end up with errors about missing files and warnings about deprecated and superseded library components. As the SDK moves forward, this will only become increasingly problematic unless someone forks the Hessel project and develops it further. I did initially try to make some adjustments to the library code, but things just went into a deeper and deeper mess. Its going to take a lot more time and knowledge than I have at present to update the library and bring it into line with the current ESP32 SDK version and then maintain it.

Another possibility would be to switch to working with Vscode and the Espressif ESP32 SDK framework rather than Arduino framework, which would be something of a learning curve. I already use Vscode, but have never worked directly with the Espressif framework, although I expect that anyone who is serious about programming the ESP32 does this already.

Previously I met with resistance trying to switch the project to Vscode and I appreciate that some may be more comfortable with the relative simplicity of the Arduino IDE rather than having to learn a new IDE environment. It is for this reason that I have kept the core project as and where it is. Of course, it is possible to maintain Arduino projects in both environments simultaneously, but out of of necessity, the ESP32 code would have to diverge. For this reason, a separate ESP32 version of the AR488 project might be the best way forward and such a project, created by David Douard, already exists.

The bottom line is that whereas it would be relatively simple to create an HTTP interface for the ESP32, implementing HTTPS as would be expected from a modern web interface is an entirely different problem. Quite why Espressif implemented an ESP8266 compatible WebServer library but omitted the WebServerSecure conterpart is something of a mystery. Perhaps it was easy to port WebServer as it is just software, but for the secure version, since the ESP32 hardware includes hardware encryption, porting it would likely require rewriting the encryption code and they perhaps didn't want the hassle of doing that and then maintaining of a separate fork of the code? Who knows.

Wolfssl sems to be able to create self signs certificates on fly.
So you could have a partition holding certs for the IP addresses you get via DHCP...or the new key algorithms you get via updates.

Thanks. I will have a look at WolfSSL and I see that is is available in the Arduino IDE. Having a separate partition is what I had in mind with the intention of containing the certificate and the served up web pages. Of course, just for a plain SSL connection, the certificate and maybe the a config file would suffice.

Anyhow, I still would opt for a transparent (web)socket.
This would allow the existing software to use this minimal (if at all) changes.
I mean redirecting serial data via some TCP socket is nothing new...

That's starting to look a more likely option, especially if I can get that connection SSL encrypted. Authentication and sending/receiving data over an encrypted TCP connection is one requirement, some form of protocol for submitting requests/queries is another and I guess REST might be one option for that.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: linux-works on February 18, 2024, 06:48:28 pm
for some reason, I'm not overly bothered by the fact that controllers dont support native encryption like 'real hosts' do.

you're also on wifi and that's not super secure, either.

lets remember what we're doing.  this is test and measurement.  how 'secure' do you have to be?  no one's running finance apps on a microcontroller.

if I ever need more than the esp-style controller can do, that bumps me immediately up to a linux host of some kind (often an arm system).

I still prefer the instant boot and lack of backdoors (...) that simple controller systems offer.  managing a bunch of esp chips is so much easier than even one linux box (and I'm a multi decade sysadmin for unix).
Title: Re: AR488 Arduino-based GPIB adapter
Post by: wilhe_jo on February 18, 2024, 09:09:11 pm
Well, the esp can do SSL. It has hardware for good random numbers.
So it's actually 'just' a matter of figuring out how the cert should look like.
The result would be a self provisioning system.

ATM, I have some different tasks, that have priority, but I guess that would make an interesting project.

I don't really like Arduino and platformio... But I get the point why it's used here... It's just convenient to support many targets. However platform features are a problem.

So I agree that the WiFi interface is better implemented in the esp32 centric fork.

73
Title: Re: AR488 Arduino-based GPIB adapter
Post by: linux-works on February 19, 2024, 11:14:56 pm
even after all these years, the arduino ide build system is not muli-cpu aware.  it does not do the simple 'make -j8' kind of thing.  builds take forever.

but I still use their system since the end result is what I care about and the system is livable.  libraries are mostly all there and so are examples.

none of it is pro level but it can be if you put time in it.  and if you lock down the libs once you fix them ;)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_esp32 on March 03, 2024, 05:17:44 pm
Hello, newly registered here....i have some old hp test equipment..8903b, 3478a and lots more, i came across the ar488 and built one based on the arduino nano. I want to use labview (community edition) and found that the prologix labview example did not work at all, i could not find much information on ar488 combined with labview. I debugged it and found that on connection the arduino resets itself, this is by design in order to program it from the arduino IDE but the labview code does not see anything returned after a command is sent because the nano is restarting during the time the command is sent and does not "see" it. This can be solved by adding a little delay after the opening of the visa device in labview. Maybe something to add to the readme of the ar488 code. 
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Miti on March 04, 2024, 12:00:08 am
Remove the capacitor on the reset line.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 12, 2024, 10:21:10 pm
Hello, newly registered here....i have some old hp test equipment..8903b, 3478a and lots more, i came across the ar488 and built one based on the arduino nano. I want to use labview (community edition) and found that the prologix labview example did not work at all, i could not find much information on ar488 combined with labview. I debugged it and found that on connection the arduino resets itself, this is by design in order to program it from the arduino IDE but the labview code does not see anything returned after a command is sent because the nano is restarting during the time the command is sent and does not "see" it. This can be solved by adding a little delay after the opening of the visa device in labview. Maybe something to add to the readme of the ar488 code.

Jay, thank you for your interest in the AR488 project and your feedback. This problem is a known issue with older Arduino AVR boards such as the UNO R3, Nano or Mega 2560 due to the way the serial UART is implemented in order to allow the board to be programmed. It is less of a problem with the Micro or Leonardo which has a CDC serial port and a reset does not have to be forced in order to program them. I am not yet sure about the UNO R4 or the Nano BLE33 and Nano RP2040 Connect boards. I purchased the Nano Connect to test but have not got around to it yet.

If you could provide me with details (including screenshots or example listing) of what you did to add the delay after opening a visa device in labview, I would be happy to include that in the User Manual.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: lmester on March 16, 2024, 08:02:38 pm


I have users of my HP 3478A multimeter control software that are getting checksum errors when trying to read the calibration data. This is happening with newer AR488 firmware versions. Older firmware works fine.

Might be down to the EOI bug (Issue 9) reported by m0pub? This has been addressed in the latest release which might be worth a try. Will be interested to know if the problem still persists.


The problem is still there with 0.51.28. It's very specific. You get a checksum error on the first and third cal entries.

Code: [Select]
AR488 GPIB controller, ver. 0.49.14, 02/03/2021
Reading calibration data.
**********
Verify checksums.
@@@CA@BLLLNLG : CkSum = (199 + 56) Checksum OK.
@@@@CABLLCOLO : CkSum = (207 + 48) Checksum OK.
@@@@@DBLLOELM : CkSum = (205 + 50) Checksum OK.
IIIIIDAEBAOKF : CkSum = (182 + 73) Checksum OK.
@@@@@@AEBMNML : CkSum = (220 + 35) Checksum OK.
@@@@@@@@@@@OO : CkSum = (255 +  0) Checksum OK.
IIIE@BADODEL@ : CkSum = (192 + 63) Checksum OK.
IIII@D@E@MNKG : CkSum = (183 + 72) Checksum OK.
IIIIIA@EDNNJL : CkSum = (172 + 83) Checksum OK.
IIIIII@ECDDKI : CkSum = (185 + 70) Checksum OK.
IIIIII@EABLKE : CkSum = (181 + 74) Checksum OK.
IIIIII@EBBOKA : CkSum = (177 + 78) Checksum OK.
IIIIII@EBMAKD : CkSum = (180 + 75) Checksum OK.
IIIIII@EBDOJO : CkSum = (175 + 80) Checksum OK.
@@@BF@CNOE@MB : CkSum = (210 + 45) Checksum OK.
@@@@BECN@@MMJ : CkSum = (218 + 37) Checksum OK.
@@@@@@@@@@@OO : CkSum = (255 +  0) Checksum OK.
IIIE@BCLCOBKJ : CkSum = (186 + 69) Checksum OK.
@@@@@@@@@@@OO : CkSum = (255 +  0) Checksum OK.

Reading calibration data complete.
Calibration data checksum valid.
Calibration data saved to:D:\HP3478A_6\cfg\HP3478A.cal

#################################################

AR488 GPIB controller, ver. 0.51.18, 26/02/2023
Reading calibration data.
**********
Verify checksums.
@@@CA@BLLGNLG : CkSum = (199 + 51) Checksum Fail.
@@@@CABLLCOLO : CkSum = (207 + 48) Checksum OK.
G@@@@DBLLOELM : CkSum = (205 + 57) Checksum Fail.
IIIIIDAEBAOKF : CkSum = (182 + 73) Checksum OK.
@@@@@@AEBMNML : CkSum = (220 + 35) Checksum OK.
@@@@@@@@@@@OO : CkSum = (255 +  0) Checksum OK.
IIIE@BADODEL@ : CkSum = (192 + 63) Checksum OK.
IIII@D@E@MNKG : CkSum = (183 + 72) Checksum OK.
IIIIIA@EDNNJL : CkSum = (172 + 83) Checksum OK.
IIIIII@ECDDKI : CkSum = (185 + 70) Checksum OK.
IIIIII@EABLKE : CkSum = (181 + 74) Checksum OK.
IIIIII@EBBOKA : CkSum = (177 + 78) Checksum OK.
IIIIII@EBMAKD : CkSum = (180 + 75) Checksum OK.
IIIIII@EBDOJO : CkSum = (175 + 80) Checksum OK.
@@@BF@CNOE@MB : CkSum = (210 + 45) Checksum OK.
@@@@BECN@@MMJ : CkSum = (218 + 37) Checksum OK.
@@@@@@@@@@@OO : CkSum = (255 +  0) Checksum OK.
IIIE@BCLCOBKJ : CkSum = (186 + 69) Checksum OK.
@@@@@@@@@@@OO : CkSum = (255 +  0) Checksum OK.

Reading calibration data complete.
Calibration data not saved. Invalid checksum!

There are more examples of this on the How to read/write cal SRAM thread. https://www.eevblog.com/forum/repair/hp-3478a-how-to-readwrite-cal-sram/msg5391623/#msg5391623 (https://www.eevblog.com/forum/repair/hp-3478a-how-to-readwrite-cal-sram/msg5391623/#msg5391623)
Title: Re: AR488 Arduino-based GPIB adapter
Post by: Jay_esp32 on March 17, 2024, 01:37:54 pm
Here is example code to initialise the ar488 in labview, i made the delay (3 seconds) optional. The reset at the end sends the ++clr command, also optional, to reset the measurement device to its default settings.
I nearly completed the software for the 8903b audio analyser, it works excusively on the ar488 and equivalents (prologix, galvant) and will be made available free of charge.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: WaveyDipole on March 18, 2024, 08:41:57 pm
The problem is still there with 0.51.28. It's very specific. You get a checksum error on the first and third cal entries.

Thanks for bringing this to my attention and posting the link to the other thread where this has been discussed in further detail and the problem identified. An update has now been posted to the repository and confirmation received that is seems to work fine now.
Title: Re: AR488 Arduino-based GPIB adapter
Post by: CraigD73 on March 31, 2024, 04:12:06 am
Just cobbled together a 488 connector connected to an old UNO. Compiled the code and managed to get a *IDN? reply from my HP53131A counter.   At first I got nothing but after setting the auto to 1 the counter's response showed up.  Next I need to try out my HP8657B signal generator.

Thanks for the nice piece of code and project manual.