Author Topic: Program that can log from many multimeters.  (Read 489690 times)

0 Members and 3 Guests are viewing this topic.

Offline Gertjan

  • Regular Contributor
  • *
  • Posts: 116
  • Country: nl
Re: Program that can log from many multimeters.
« Reply #3125 on: September 18, 2023, 02:25:37 pm »
Hi HKJ,

I am working on a definition for the Rigol DG1032Z ARB generator.
One can set the generator output amplitude units in Volts pp, Volts rms or dBm. Of course I want to use the correct units in TestController. A Vpp is different from a Vrms, en certainly different from a dBm :). So the amplitude unit in TC has to change with the Vpp / Vrms / dBm setting of the generator.

To make this possible I (mis)used the Mode function, and created different modes for Vpp, Vrms and dBm (for both CH1 and CH2)

The code I am using now:
Code: [Select]
; Possible modes for Channel 1: CH1_VPP, CH1_VRMS, CH1_DBM
; Possible modes for Channel 2: CH2_VPP, CH2_VRMS, CH2_DBM

#value Freq1 Hz SI
#value Ampl1_pp Vpp SI CH1_VPP
#value Ampl1_rms Vrms SI CH1_VRMS
#value Ampl1_dB dBm D3 CH1_DBM
#value Offset1 V SI

#value Freq2 Hz SI
#value Ampl2_pp Vpp SI CH2_VPP
#value Ampl2_rms Vrms SI CH2_VRMS
#value Ampl2_dB dBm D3 CH2_DBM
#value Offset2 V SI



; :SOUR1:FREQ?      Query the waveform frequency of CH1
; :SOUR1:VOLT?      Query the waveform amplitude of CH1
; :SOUR1:VOLT:OFFS? Query the offset voltage of CH1
; :SOUR1:VOLT:UNIT? Query the amplitude unit of CH1 (VPP|VRMS|DBM)

#askValues :SOUR1:VOLT:UNIT?;:SOUR2:VOLT:UNIT?;:SOUR1:FREQ?;:SOUR1:VOLT?;:SOUR1:VOLT:OFFS?;:SOUR2:FREQ?;:SOUR2:VOLT?;:SOUR2:VOLT:OFFS?;
#askValuesReadFormat xxffffff

#askMode :SOUR1:VOLT:UNIT?;:SOUR2:VOLT:UNIT?
#askModeMathFormat "CH1_"+getElement(value,0)+" CH2_"+getElement(value,1)
#modeFromValue "CH1_"+getElement(value,0)+" CH2_"+getElement(value,1)


; ---Setup Menu---
#cmdSetup combobox Amplitude_unit AMPL_1
:read: :SOUR1:VOLT:UNIT?
:write: :SOUR1:VOLT:UNIT #
Vpp VPP
Vrms VRMS
dBm DBM


This is working fine. Now TC selects the correct #value line, with the correct name and unit.
But I have to use #modeFromValue to read the modes. It would be better to set the modes directly when setting the output unit in the Setup Menu.

- Is it possible to set a mode from the Setup Menu?
- Is there a better way to accomplish the same thing that I have overlooked?

Thanks & regards, Gertjan.
« Last Edit: September 19, 2023, 06:14:28 am by Gertjan »
 

Offline dl6lr

  • Frequent Contributor
  • **
  • Posts: 458
  • Country: de
Re: Program that can log from many multimeters.
« Reply #3126 on: September 18, 2023, 06:11:12 pm »
HPAK 34401 with AR488 USB GPIB-Adapter

I found the 34401 is supported using serial only. I tried to copy and edit the definition to use the AR488 to drive the instrument. Kinda works.
Problems I encountered:

- Whenever it connects to the instrument, an error is reported by the 34401
- Sometimes the instrument gets stuck

After that I ran out of time and have neither debugged the USB connection nor the GPIB bus. yet.

Anyone already used a 34401 with GPIB reliably?

Edit: Using 2.36: Seems to be related with SCPI commands used that are not in the GPIB command set. I can now use GPIB with the AR488 and it seems to work as designed despite the errors on connect and shutdown of the program.
One more thing I noticed: Changing the devices after program start and pressing the reconnect renders the application in an unusable state. After shutdown and restart, the program works with the new parameters/devices.
« Last Edit: September 20, 2023, 07:37:56 pm by dl6lr »
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3127 on: September 24, 2023, 07:20:49 am »
When using "block" driver I have some issues, a few questions:

1. I need to send first a specific byteSequence to force device to respond on a pool byteSequence.
How can I do that?
#initCmd works only after device Found, which is a result of the pool definition, so it does not help.

The first command to a device is *idn?, in the block driver it is the #verifyDevice command, but it is not used for async devices.

2. If I need to perform a fixed delay after the specific byteSequence, before starting the pool, how is it possible?
#cmdDelayTime and #readingDelay are not related here - do not give me a result.

You might be able to use [ms] (i.e. [500] for 500ms) as a command.


3. If I need to make a few different pools (with different byteSequences) and then parse them all to have all variables to parse their values.
How this can be made?

I am not sure what you mean by this.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3128 on: September 24, 2023, 07:25:53 am »
- Is it possible to set a mode from the Setup Menu?

No, everything that requires changing of columns must be done from "mode".
This is also the reason the "mode" functions are blocked while logging (Columns cannot change while logging).

- Is there a better way to accomplish the same thing that I have overlooked?

I do not believe so.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3129 on: September 24, 2023, 07:28:57 am »
One more thing I noticed: Changing the devices after program start and pressing the reconnect renders the application in an unusable state. After shutdown and restart, the program works with the new parameters/devices.

I have not seen this, can you specify exactly how you get that unstable state?
I might be something I forget to shut down when doing a reconnect, but I need some pointers to find it.
 

Offline dl6lr

  • Frequent Contributor
  • **
  • Posts: 458
  • Country: de
Re: Program that can log from many multimeters.
« Reply #3130 on: September 26, 2023, 08:55:23 am »
One more thing I noticed: Changing the devices after program start and pressing the reconnect renders the application in an unusable state. After shutdown and restart, the program works with the new parameters/devices.

I have not seen this, can you specify exactly how you get that unstable state?
I might be something I forget to shut down when doing a reconnect, but I need some pointers to find it.

I will try to reproduce and log the communication. Maybe this will shed some light.

I found the difference between serial and GPIB to be these commands that are sent to the 34401A:

; Initial commands to meter when establishing connection
#initCmd SYST:REM;[500]

; Final command to meter before breaking connection
#finalCmd system:local

In serial mode this is required, in GPIB this is an unrecognized command. How can I omit/include these commands with respect to the chosen interface?
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3131 on: September 28, 2023, 07:09:22 am »
I found the difference between serial and GPIB to be these commands that are sent to the 34401A:

; Initial commands to meter when establishing connection
#initCmd SYST:REM;[500]

; Final command to meter before breaking connection
#finalCmd system:local

In serial mode this is required, in GPIB this is an unrecognized command. How can I omit/include these commands with respect to the chosen interface?


This is on the advanced side, you have to define a command and then use it:

#scpiCmd MyInit #pgm#
if (portType!="GPIB")
  deviceWrite(handle,"SYST:REM;[500]");
endif;

This command can then be used:
 #initCmd *RST;MyInit;

There is some documentation here: https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html#Protocol_is_nearly_SCPI,_but_there_is_a_few_issues_(SCPIx)

 
The following users thanked this post: dl6lr

Offline dl6lr

  • Frequent Contributor
  • **
  • Posts: 458
  • Country: de
Re: Program that can log from many multimeters.
« Reply #3132 on: September 30, 2023, 08:12:18 pm »
Now this works with either serial or GPIB connection to my 34401A!  :-+

I could retest the strange behaviour and with debug I found some errors.
My configuration is: 2 34401, one with serial on COM1 (not enabled), one with AR488 GPIB on COM20 (enabled). The GPIB is connected.
[ Specified attachment is not available ]

I start Testcontroller and it detects the 34401A at GPIB address 22. Everything is fine. I issue the command DISP:TEXT "WORKING" to check the GPIB is OK.
Now I go to the "Load devices" tab and press "Reconnect" (n o changes made). I get some erros in the console and the thread for COM20 with the GPIB adapter is getting closed. The GUI is grayed out.

See this console output:
Code: [Select]
c:\g\TestController\2.36>testControllerDebug.bat
Starting
;; jSerialComm version: 2.9.1
;; 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">
DISP:TEXT "WORKING"
;; HP34401A: Tx <DISP:TEXT "WORKING">
;; COM20: Tx: <DISP:TEXT "WORKING".> 44 49 53 50 3A 54 45 58 54 20 22 57 4F 52 4B 49 4E 47 22 0A
;; COM20: Close
;; HP34401A: Tx <SerialExit>
java.lang.NullPointerException
        at dk.hkj.shared.SharedInterface.isOpen(SharedInterface.java:272)
        at dk.hkj.comm.GpibInterface.isOpen(GpibInterface.java:89)
        at dk.hkj.devices.DeviceSCPIx$TranslatingCommInterface.write(DeviceSCPIx.java:95)
        at dk.hkj.main.SCPICommand.writeReadInternal(SCPICommand.java:316)
        at dk.hkj.main.SCPICommand.writeRead(SCPICommand.java:339)
        at dk.hkj.main.DeviceInterface.doCommand(DeviceInterface.java:83)
        at dk.hkj.devices.DeviceSCPI.close(DeviceSCPI.java:154)
        at dk.hkj.main.InterfaceThreads$DeviceThread.run(InterfaceThreads.java:1638)
Thread for HP34401A
;; jSerialComm version: 2.9.1
java.lang.NullPointerException
        at dk.hkj.shared.SharedInterface.close(SharedInterface.java:238)
        at dk.hkj.comm.GpibInterface.close(GpibInterface.java:38)
        at dk.hkj.comm.LayerInterface.close(LayerInterface.java:40)
        at dk.hkj.main.InterfaceThreads$DeviceThread.run(InterfaceThreads.java:1639)
;; 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
 

Offline dl6lr

  • Frequent Contributor
  • **
  • Posts: 458
  • Country: de
Re: Program that can log from many multimeters.
« Reply #3133 on: September 30, 2023, 08:16:10 pm »
Here is the expanded file for the 34401A with either serial or GPIB.

 

Offline Josec

  • Contributor
  • Posts: 16
  • Country: au
Re: Program that can log from many multimeters.
« Reply #3134 on: October 05, 2023, 07:56:21 am »
I am trying to use a testcontroller to log readings of two multimeters, Fluke 8845A and HP3455A over GPIB. The interface is an AR488 (works and communicates with all my instruments).
I can't use the Fluke 8845A with GPIB. Using a socket works but stops logging readings after 3 minutes and happens independently of the logging interval. Also the values in the table don’t align with the values in the display (See photo).
My question is why is that happening? How difficult would it be to add support for GPIB for the fluke multimeter, and is there a driver for the HP3455A or can one be developed easily (I appreciate it is quite old, but I am older)?
I would appreciate any suggestions or solutions.
 

Offline Gertjan

  • Regular Contributor
  • *
  • Posts: 116
  • Country: nl
Re: Program that can log from many multimeters.
« Reply #3135 on: October 05, 2023, 10:29:37 am »
Hi Josec,

I am using my Fluke 8846A without any problems, connecting via the Ethernet interface. So your 8845A should work too...
With the 8845A / 8846A definitions, you can (and must) change settings on the meter itself. So make sure the meter settings are appropriate for your measurement.

Note that on the Ethernet interface the 8845A / 8846A is only supporting its native 8846A language (=SCPI).
But on the GPIB interface it also supports a Fluke 45 emulation and a Fluke 8840 / 8842 emulation.

So, if you are persistent in using GPIB, you could also try the Fluke 45 definition. Or the Fluke 8840A definition I am writing right now, and will post when done. :-)

In fact that is the best solution: write your own definitions, and share them, so others can use them too. After all, this is community supported software....

Regards, Gertjan.
 

Offline Josec

  • Contributor
  • Posts: 16
  • Country: au
Re: Program that can log from many multimeters.
« Reply #3136 on: October 06, 2023, 09:30:08 am »
Thanks Gertjan for your reply, unfortunately it didn’t fix the issue. I checked the network settings of the Fluke, and it all seems to be OK, all the other settings are just default settings. If you have an instrument that is working would you be able to give me some guidance on what to change?

I tried to change to Fluke 45 but the testcontroller support is just for  serial not the GPIB.

And in amongst all that I got the HP3455A working with the HP3478A driver over GPIB, so far it has been logging readings for more than 10 hours, I can get a graph, histograms and table, I didn't do a lot of testing, but if I change the function (AC, DC ohms) it does what I need.

I also tried to run the Fluke (over Ethernet) and HP together, the fluke takes over and the HP is not showing any readings.

I would really appreciate if you can help me with any more information regarding the Fluke 8845A such as  sharing your settings.
 

Offline Gertjan

  • Regular Contributor
  • *
  • Posts: 116
  • Country: nl
Re: Program that can log from many multimeters.
« Reply #3137 on: October 06, 2023, 11:48:18 am »
Hi Josec,

Congratulations with getting your HP 3455A working. Good to know it is using the same commands as the HP 3478A.

"the fluke takes over" sounds strange....
First step is to run TestController in debug mode, so you can see what is going on. With only the 8845A selected in the "load devices" tab, to make it easy to see what is going on. If you can't find the problem, post the debug log.

There is not much to set for the 8845A. In TestController, on the "Load Devices" tab, Type is Socket, and Address is the IP address of the 8845A.
The 8845A should be set to LAN: push Instrument Setup -> Port IF -> LAN (should be highlighted). If LAN is not highlighted: push Instrument Setup -> Port IF -> Select Port -> LAN.

Most probable is that the IP address is not correct. If you are using DHCP, the meter could get another address each time it connects to your network. Solutions: give it a fixed address in the DHCP table in your router, of a fixed address in the 8845A (outside of your DHCP range)

You can check the IP address on the meter: push Instrument Setup -> Port IF -> LAN (should be highlighted) -> IP-ADDR

Try to ping the 8845A from the TestController computer to check if the network connection is OK


In case you want to try the 8840A emulation using GPIB, I  have attached my 8840A definition below. This is not a release version. It is fully functional, but needs more  testing & debugging.
Fluke8840A.zip

good luck & regards, Gertjan.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3138 on: October 06, 2023, 12:18:44 pm »
I could retest the strange behaviour and with debug I found some errors.

I am looking at it.

« Last Edit: October 06, 2023, 12:25:47 pm by HKJ »
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3139 on: October 06, 2023, 12:20:23 pm »
Here is the expanded file for the 34401A with either serial or GPIB.

It will be included in the next release.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3140 on: October 06, 2023, 12:23:55 pm »
I am trying to use a testcontroller to log readings of two multimeters, Fluke 8845A and HP3455A over GPIB. The interface is an AR488 (works and communicates with all my instruments).
I can't use the Fluke 8845A with GPIB. Using a socket works but stops logging readings after 3 minutes and happens independently of the logging interval. Also the values in the table don’t align with the values in the display (See photo).
My question is why is that happening? How difficult would it be to add support for GPIB for the fluke multimeter, and is there a driver for the HP3455A or can one be developed easily (I appreciate it is quite old, but I am older)?
I would appreciate any suggestions or solutions.

I have no idea why it stops after 3 minutes.

Added GPIB is generally easy:
First step is to add it to this line in the definition: #port com gpib
Then check it out.
Some devices has small differences in supported commands depending on interface, I posted something about this a few posts back and the just posted 34401A definition file includes a example.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3141 on: October 06, 2023, 12:25:31 pm »
In case you want to try the 8840A emulation using GPIB, I  have attached my 8840A definition below. This is not a release version. It is fully functional, but needs more  testing & debugging.
Fluke8840A.zip

I look forwards to you posting the release version.
 

Offline Josec

  • Contributor
  • Posts: 16
  • Country: au
Re: Program that can log from many multimeters.
« Reply #3142 on: October 06, 2023, 10:07:05 pm »
Gertjan:
Thanks; your driver works, I can log and read the values in the table, also the log time limit (3 minutes) is gone).
I couple of comments, the reading is just 5 digits, may be the emulation mode limit? also at start up log and current_values are blank, after you select "Mode" and DC everything works. I include picture of the debugging window of the 8840A start up, log and Current_values reading.
If you need more information please let me know.

Best Regards and thanks again.
Jose
 

Offline Josec

  • Contributor
  • Posts: 16
  • Country: au
Re: Program that can log from many multimeters.
« Reply #3143 on: October 06, 2023, 10:21:41 pm »
HKJ:

Thankyou for create and support this program.
I think the problem with the 3 minutes is related to the initialization file on the part

"; How to poll for data, this is used for table and #values?
; a #askMode, #cmdMode and #prepareSample is used before this is string is used.
; This is a single line command
#askValues FETCH1?"

I have no idea what to add there, but the FETCH3? command didn't work, with FETCH1? I get hundred of readings.
 I have attached the the log file of the initialization screen and the log screen, you may have a better idea of what is happening.
The log is quite different to the log screen of Gertjan 8840 emulation in my post before.

Regards
Jose
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3144 on: October 07, 2023, 11:18:45 am »
"; How to poll for data, this is used for table and #values?
; a #askMode, #cmdMode and #prepareSample is used before this is string is used.
; This is a single line command
#askValues FETCH1?"

I have no idea what to add there, but the FETCH3? command didn't work, with FETCH1? I get hundred of readings.
 I have attached the the log file of the initialization screen and the log screen, you may have a better idea of what is happening.
The log is quite different to the log screen of Gertjan 8840 emulation in my post before.

You may try a READ? command, you might have to add some trigger settings for that (That is done after the #prepareSample command in the definitions).

 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3145 on: October 07, 2023, 01:07:07 pm »
V2.38 is up
This is a fairly minor update with a few new devices and latest version of jSerialComm.
   Fixed (I hope): A bug in GPIB when reconnecting.
   Added: HP/Agilent 34401A support for GPIB (Thanks dl6lr)
   Changed: jSerialComm updated to V2.10.3
   Added: Philips PM2811 30V-10A, Fluke PM2811 30V-10A, Philips PM2811 60V-5A, Fluke PM2811 60V-5A power supplies (Thanks Gertjan)
   Added: Mecmesin BFG 10, BFG 1000, BFG 200, BFG 2500, BFG 50, BFG 500 Basic Force Gauge (Thanks jmurray)
 
The following users thanked this post: dl6lr

Offline dl6lr

  • Frequent Contributor
  • **
  • Posts: 458
  • Country: de
Re: Program that can log from many multimeters.
« Reply #3146 on: October 07, 2023, 09:09:26 pm »
   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.

Code: [Select]
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?
« Last Edit: October 08, 2023, 05:01:03 pm by dl6lr »
 

Offline Gertjan

  • Regular Contributor
  • *
  • Posts: 116
  • Country: nl
Re: Program that can log from many multimeters.
« Reply #3147 on: October 08, 2023, 01:56:34 pm »
It does not switch back to local mode, I have tried with [LOC] in exitCmd, but this seems to be ignored in SCPIx driver.

I encountered the same problem while writing other definitions, also connecting over GPIB. Solution was to add a pause to the #finalCmd.
In your definition this would  would look like: #finalCmd SerialExit;[1000];
My explanation is that otherwise the connection is broken before the meter had the time to receive the last command.

Do try to use [LOC], as it is the standard GPIB command for "Go to Local". But use it in the #finalCmd line, not in a #cmdSetup line
(Everything in the #cmdSetup command will be sent directly to the meter, everything in the #finalCmd line is interpreted by TestController)

Regards, Gertjan.
 

Offline dl6lr

  • Frequent Contributor
  • **
  • Posts: 458
  • Country: de
Re: Program that can log from many multimeters.
« Reply #3148 on: October 08, 2023, 08:29:45 pm »
It does not switch back to local mode, I have tried with [LOC] in exitCmd, but this seems to be ignored in SCPIx driver.

I encountered the same problem while writing other definitions, also connecting over GPIB. Solution was to add a pause to the #finalCmd.
In your definition this would  would look like: #finalCmd SerialExit;[1000];
My explanation is that otherwise the connection is broken before the meter had the time to receive the last command.

Do try to use [LOC], as it is the standard GPIB command for "Go to Local". But use it in the #finalCmd line, not in a #cmdSetup line
(Everything in the #cmdSetup command will be sent directly to the meter, everything in the #finalCmd line is interpreted by TestController)

Regards, Gertjan.

Yes, I tried both. Still not working. [LOC] does never issue the ++loc command to the Prologix compatible AR488. I assume this [LOC] does not work in SCPIx mode. Delaying the exit does not work either. I tried to use Ascii mode in the driver and then the GPIB even works worse. It i.e. does not address the instrument any more, in fact it never sends a ++addr 22 when trying to talk to instrument 22. I am a little bit confused.
 

Offline Gertjan

  • Regular Contributor
  • *
  • Posts: 116
  • Country: nl
Re: Program that can log from many multimeters.
« Reply #3149 on: October 09, 2023, 03:31:53 pm »
Hi HKJ,

I looked into the issue of the HP 34401A not going back to local control after terminating TestController.
Fully expecting that this was a matter of just better reading the manual :). But that was not (or partially) the case...

It turns out that the 34401A does not have a built in SCPI command to control remote and local.  You have to use a lower level GPIB command related to the REN line in order to do this.

And indeed, testing with a terminal program, the 34401A responds fine to the ++loc command, and goes to local.

In TestController, I expect when using [LOC], that a ++loc is sent to the meter (and intercepted by the GPIB controller). But this is not the case. Nothing is sent. And nothing appears in the debug log...

I wrote a as small as possible definition for testing, and it seems that none of the TC GPIB commands are working. (I tried  [CLR], [LLO] and  [LOC] ). Example: #finalCmd [LOC];  or  #finalCmd [LOC];[500];
So these findings are in line with the post of dl6lr above...

Can these commands only be used with the ASCII driver, or is something broken? I was testing with a AR488.

regards, Gertjan.
« Last Edit: October 09, 2023, 04:45:24 pm by Gertjan »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf