Fixed (I hope): A bug in GPIB when reconnecting.
Added: HP/Agilent 34401A support for GPIB (Thanks dl6lr)
I think the reconnect now works better, it does not throw exceptions. However it is still not working properly: After reconnect it sends "++default" to the AR488, so it is reset to its default values, that is i.e. address 1. But the meter is on address 22, and it does not set its parameters again, so it tries to identify the 34401A but it does not send any data to address 22.
c:\g\TestController\2.38>testControllerDebug.bat
Starting
;; jSerialComm version: 2.10.3
;; COM20: Set params: 115200
;; Start thread for: AR488 A:22 - Hewlett-Packard 34401A
;; COM20: Tx: <++default.> 2B 2B 64 65 66 61 75 6C 74 0A
;; COM20: Tx: <++addr 22.> 2B 2B 61 64 64 72 20 32 32 0A
;; COM20: Tx: <*IDN?.> 2A 49 44 4E 3F 0A
;; COM20: Tx: <++read_tmo_ms 9950.> 2B 2B 72 65 61 64 5F 74 6D 6F 5F 6D 73 20 39 39 35 30 0A
;; COM20: Tx: <++read eoi.> 2B 2B 72 65 61 64 20 65 6F 69 0A
;; COM20: Rx: <HEWLETT-PACKARD,34401A,0,11-5-3> 48 45 57 4C 45 54 54 2D 50 41 43 4B 41 52 44 2C 33 34 34 30 31 41 2C 30 2C 31 31 2D 35 2D 33
;; AR488 A:22: Tx <SerialInit>
;; AR488 A:22: Script start
;; AR488 A:22: Script end <>
;; Found Hewlett-Packard 34401A on AR488 A:22
;; HP34401A: Tx <FUNC?>
;; COM20: Tx: <FUNC?.> 46 55 4E 43 3F 0A
;; COM20: Tx: <++read eoi.> 2B 2B 72 65 61 64 20 65 6F 69 0A
;; COM20: Rx: <"VOLT"> 22 56 4F 4C 54 22
;; HP34401A: Rx <"VOLT">
*CLS
;; HP34401A: Tx <*CLS>
;; COM20: Tx: <*CLS.> 2A 43 4C 53 0A
;; COM20: Close
;; HP34401A: Tx <SerialExit>
;; jSerialComm version: 2.10.3
;; COM20: Set params: 115200
;; Start thread for: AR488 A:22 - Hewlett-Packard 34401A
;; COM20: Tx: <++default.> 2B 2B 64 65 66 61 75 6C 74 0A
;; COM20: Tx: <*IDN?.> 2A 49 44 4E 3F 0A
;; COM20: Tx: <++read eoi.> 2B 2B 72 65 61 64 20 65 6F 69 0A
;; COM20: Rx: timeout
;; AR488 A:22 Device HEWLETT-PACKARD,34401A, do not match: null
;; COM20: Close
;; Stopping thread for: AR488 A:22 - Hewlett-Packard 34401A
;; COM20: Close
I am still uncomfortable with my 34401A setup with GPIB. It does not switch back to local mode, I have tried with [LOC] in exitCmd, but this seems to be ignored in SCPIx driver. It works when using ++loc with a terminal session to the AR488.
Furthermore I am struggeling with writing a driver for Prologix USB GPIB/AR488 and a HP3437A system voltmeter. It uses binary commands. I can easily access the instrument using a terminal program, but I am failing in writing the definitions for the TestController (inspired by HP3478A definition):
I have to set EOI on the last character and do not append any termination characters to send a single "B" character for binary query. Using #eol eoi and #eolRx eoi does not seem to do anything with the GPIB interface. Maybe the definitions are not effective in Ascii driver?
Trying to use an ugly hack to test at least something and setup the GPIB adapter with #initCmd ++eoi 1; ++eos 3 logs these commands in debug, but does not send them out. Using #initCmd tx ++eoi 1; tx ++eos 3; sends <dle>+<dle>+eoi 1 to the adapter, so ++eoi 1 gets send to the instrument. Using txBin does not seem to work either...
Just a question: The source is not available anywhere (github?) to have a look into?