Author Topic: WinGPIB - Windows GPIB App (multi-purpose)  (Read 227941 times)

0 Members and 1 Guest are viewing this topic.

Online IanJTopic starter

  • Supporter
  • ****
  • Posts: 1695
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #275 on: November 03, 2020, 07:08:25 pm »
Thanks @IanJ
1) Are you saying the file 'GPIBchannels.txt' is information only and not used by the program?
2) 34461A logging now works but I still get an error message although it does not stop the logging. It may be one of the commands in the boxes.
3) Temperature: I have an SHT30 device but it does not appear in the INTERFACE drop-down list so am using the SHT10 option.
4) Still having problems connecting to my 34401A via CH340 RS232-USB interface. Also, the COM port does not save and I have to re-enter every time I start the program

Yes, GPIBchannels.txt is just for info........a notepad! It was a quick and easy way to keep everything all together without having to save off different profiles for different instruments etc......plus it's good to be able to write down useful SCPI/GPIB commands when you have a memory like mine!

Post the 34461A commands you are using and maybe I'll spot the problem.

SHT30 was added fairly recently so maybe you are using an older version. It was me that talked Dogratian to make a higher resolution model....:-)

I have never actually tried using the "COM port" option actually. It's possible there's a bug in saving the port info......I'll have a look this weekend and fix it if there is a problem, I need to have SAVE work with some of the checkboxes anyways.

Ian.
Ian Johnston - Original designer of the PDVS2mini || Author of the free WinGPIB app.
Website - www.ianjohnston.com
YT Channel (electronics repairs & projects): www.youtube.com/user/IanScottJohnston, Twitter (X): https://twitter.com/IanSJohnston
 

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1012
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Windows app.....revisited
« Reply #276 on: November 03, 2020, 07:21:09 pm »
Here is a screen shot. I am attempting to connect a 34401A via COM3 and the 34461A via Visa USB.

Cannot get data response from 34401A
34461A works despite an error message
an electronics nut from wayback...
 

Online IanJTopic starter

  • Supporter
  • ****
  • Posts: 1695
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #277 on: November 03, 2020, 07:42:12 pm »
Here is a screen shot. I am attempting to connect a 34401A via COM3 and the 34461A via Visa USB.

Cannot get data response from 34401A
34461A works despite an error message

You haven't specified a command to run under your 34401A setup, i.e. under "AT RUN" under DEVICE 1.
So, although you have the timer running you are not sending a read to the DMM. The AT RUN command is the command that is sent to the instrument at the specified timer interval.
Hence the "error 0", and possibly why you are getting the MAV BIT error.

Also, and it's maybe my mistake, under your 34461A setup change :READ? to READ?
I.E. drop the leading colon I don't think you need it. It won't cause any problems though.

Ian.
Ian Johnston - Original designer of the PDVS2mini || Author of the free WinGPIB app.
Website - www.ianjohnston.com
YT Channel (electronics repairs & projects): www.youtube.com/user/IanScottJohnston, Twitter (X): https://twitter.com/IanSJohnston
 
The following users thanked this post: enut11

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: 3458a logging via Windows app.....revisited
« Reply #278 on: November 03, 2020, 09:39:39 pm »
You haven't specified a command to run under your 34401A setup, i.e. under "AT RUN" under DEVICE 1.
So, although you have the timer running you are not sending a read to the DMM. The AT RUN command is the command that is sent to the instrument at the specified timer interval.
Hence the "error 0", and possibly why you are getting the MAV BIT error.

Yes, but the message is misleading, I admit: the messages were tailored for gpib/visa and there is no "MAV" in serial communication so the message may be hard to understand.
I had a look at the IODevices library code, the message means it's simply a timeout, the message is issued when no data appears in the input buffer after a timeout delay.  I'm adding this message problem to the todo list of corrections to make in the next release of the library.
« Last Edit: November 04, 2020, 08:49:23 am by pwlps »
 
The following users thanked this post: IanJ

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1012
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Windows app.....revisited
« Reply #279 on: November 04, 2020, 04:29:51 am »
Can someone please explain this command string taken from the 34461A PreRun box in the Windows logging program.

CALC:SMO:RESP MED
VOLT:DC:NPLC 10

I am trying to set up a similar string for the 34401A to capture data
an electronics nut from wayback...
 

Online IanJTopic starter

  • Supporter
  • ****
  • Posts: 1695
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #280 on: November 04, 2020, 08:06:28 am »
Can someone please explain this command string taken from the 34461A PreRun box in the Windows logging program.

CALC:SMO:RESP MED
VOLT:DC:NPLC 10

I am trying to set up a similar string for the 34401A to capture data

1st line is smoothing:
CALCulate:SMOothing:RESPonse {SLOW|MEDium|FAST}

2nd line is to put meter in DCV mode and set and NPLC = 10

For any initial testing I would leave PRE-RUN blank and set the meter up manually (you'll be more familiar) before you connect and get the connection/logging working reliably and then you can play with smoothing or anything else if you want to.
A common problem I see is folks setting a large NPLC then trying to log from the meter too quickly and commands just get queued up.

Ian.
« Last Edit: November 04, 2020, 08:11:18 am by IanJ »
Ian Johnston - Original designer of the PDVS2mini || Author of the free WinGPIB app.
Website - www.ianjohnston.com
YT Channel (electronics repairs & projects): www.youtube.com/user/IanScottJohnston, Twitter (X): https://twitter.com/IanSJohnston
 
The following users thanked this post: enut11

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1012
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Windows app.....revisited
« Reply #281 on: November 04, 2020, 07:49:08 pm »
OK, I can connect to 34401A via CH340 RS232-USB COM3.

With minimal commands and READ?, the operation fails.

The program (V1.44) works as the temp/humid logger on COM9 is being recorded.

What do I do now?
an electronics nut from wayback...
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: 3458a logging via Windows app.....revisited
« Reply #282 on: November 04, 2020, 08:17:35 pm »
OK, I can connect to 34401A via CH340 RS232-USB COM3.

With minimal commands and READ?, the operation fails.

The program (V1.44) works as the temp/humid logger on COM9 is being recorded.

What do I do now?

Your 34401A is not responding. I would first check if it receives commands sending a blind command using the "send async" button (and a command textbox in front of it) , with a command that will have a visible effect on the display e.g. changing the type of measurement, range or similar.  For example switching between CONF:VOLT:AC and CONF:VOLT:DC should show up on the display.
After several errors the IO buffer of your instrument may still hold previous data preventing subsequent commands to be parsed correctly, for this reason it is also good to reset the connection/DMM after an error like this.  Unfortunately the serial connection is very primitive and does not allow to programatically flush the device's IO buffers after an error (as is done here for GPIB, USB and other higher level protocols via Visa), it can thus remain clogged after an error occurs.  For this sole reason I only use serial connection when no better interfaces are available, I would be surprised if this Agilent DMM didn't have other options.
« Last Edit: November 04, 2020, 08:37:43 pm by pwlps »
 
The following users thanked this post: enut11

Online IanJTopic starter

  • Supporter
  • ****
  • Posts: 1695
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #283 on: November 04, 2020, 08:26:34 pm »
As I don't have a 34401A or no other serial COM based instrument I'm not much help......but I did find these comments on another site regarding the 34401A:

  • I normally control my old 34401A via GPIB, so I went into the I/O Menu and changed interface from GPIB to RS232, and confirmed other settings were was 9600, 8, NONE
  • I grabbed an old FTDI RS232 adapter (from before the clone wars) and a null modem cable and hooked it up to my Win 10 PC
  • Connected via Putty, and got the same issue as you - an error on the 34401A
  • Tried via RealTerm (terrible UI, but very powerful for testing things like this) and found I needed to send LF or CRLF not just a CR...  Probably standard for SCPI!
  • Went back to Putty and type *IDN? followed by CTRL-J and it responded as expected

So, not saying you should try all this but what caught my attention was step 1 and the "I/O menu"........is that on the 34401A....?

Ian.

Ian Johnston - Original designer of the PDVS2mini || Author of the free WinGPIB app.
Website - www.ianjohnston.com
YT Channel (electronics repairs & projects): www.youtube.com/user/IanScottJohnston, Twitter (X): https://twitter.com/IanSJohnston
 
The following users thanked this post: enut11

Online IanJTopic starter

  • Supporter
  • ****
  • Posts: 1695
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #284 on: November 04, 2020, 09:17:41 pm »
Hi all,

I have uploaded a new version of the app V2.01 (see post #1) - V2_01_Installation.zip

You can now save and select from 1 of 3 profiles on Device 2.
Below a small screenshot, there are three checkboxes to choose from which will load the settings for:
DEVICE NAME
ADDRESS
INTERFACE
PRE RUN
AT RUN
AT STOP

Use the SAVE SETTINGS button to save any changes you make to the currently loaded profile.

PS. I will add the SAMPLE RATE setting in the next release, and possibly duplicate all my recent mods on Device 2 to Device 1.

« Last Edit: November 04, 2020, 10:47:21 pm by IanJ »
Ian Johnston - Original designer of the PDVS2mini || Author of the free WinGPIB app.
Website - www.ianjohnston.com
YT Channel (electronics repairs & projects): www.youtube.com/user/IanScottJohnston, Twitter (X): https://twitter.com/IanSJohnston
 
The following users thanked this post: wolfy007

Online Andreas

  • Super Contributor
  • ***
  • Posts: 3286
  • Country: de
Re: 3458a logging via Windows app.....revisited
« Reply #285 on: November 04, 2020, 10:27:32 pm »
OK, I can connect to 34401A via CH340 RS232-USB COM3.

With minimal commands and READ?, the operation fails.

Did you plug in the adapter directly to the 34401A (without a null modem adapter?)
With my FTDI-interfaces I need to cross over pins 2+3 when connecting to the 34401A

with best regards

Andreas
 

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1012
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Windows app.....revisited
« Reply #286 on: November 04, 2020, 11:15:46 pm »
OK, I can connect to 34401A via CH340 RS232-USB COM3.

With minimal commands and READ?, the operation fails.

The program (V1.44) works as the temp/humid logger on COM9 is being recorded.

What do I do now?

Your 34401A is not responding. I would first check if it receives commands sending a blind command using the "send async" button (and a command textbox in front of it) , with a command that will have a visible effect on the display e.g. changing the type of measurement, range or similar.  For example switching between CONF:VOLT:AC and CONF:VOLT:DC should show up on the display.
After several errors the IO buffer of your instrument may still hold previous data preventing subsequent commands to be parsed correctly, for this reason it is also good to reset the connection/DMM after an error like this.  Unfortunately the serial connection is very primitive and does not allow to programatically flush the device's IO buffers after an error (as is done here for GPIB, USB and other higher level protocols via Visa), it can thus remain clogged after an error occurs.  For this sole reason I only use serial connection when no better interfaces are available, I would be surprised if this Agilent DMM didn't have other options.

Thanks @pwlps
Yes, the 34401A connects via RS232-USB and responds to CONF:VOLT:DC and CONF:VOLT:AC, switching back and forth between the two states via the 'Send Async' operation.

That is as far as I get without incurring an error message both on the meter and in the program by trying to capture data.
« Last Edit: November 04, 2020, 11:44:07 pm by enut11 »
an electronics nut from wayback...
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: 3458a logging via Windows app.....revisited
« Reply #287 on: November 04, 2020, 11:48:46 pm »
Yes, the 34401A connects via RS232-USB and responds to CONF:VOLT:DC and CONF:VOLT:AC, switching back and forth between the two states via the 'Send Async' operation.

Then I don't see why it shouldn't respond to a "Read?" command.   Did you try it manually ? I mean without starting the acquisition, just type in this command in the textbox in front of the "Query Async" button then press the button.
 

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1012
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Windows app.....revisited
« Reply #288 on: November 05, 2020, 12:04:26 am »
OK, I can connect to 34401A via CH340 RS232-USB COM3.

With minimal commands and READ?, the operation fails.

Did you plug in the adapter directly to the 34401A (without a null modem adapter?)
With my FTDI-interfaces I need to cross over pins 2+3 when connecting to the 34401A

with best regards

Andreas

Hi @Andreas
I cannot remember the pin 2&3 setup I used but I can log data successfully using the 'Agilent DMM Connectivity Utility.exe' program
an electronics nut from wayback...
 

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1012
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Windows app.....revisited
« Reply #289 on: November 05, 2020, 12:22:52 am »
Yes, the 34401A connects via RS232-USB and responds to CONF:VOLT:DC and CONF:VOLT:AC, switching back and forth between the two states via the 'Send Async' operation.

Then I don't see why it shouldn't respond to a "Read?" command.   Did you try it manually ? I mean without starting the acquisition, just type in this command in the textbox in front of the "Query Async" button then press the button.

@pwlps
Yes, it is strange but trying to 'READ?' data via 'Query Async' causes an immediate error.
I also tried to send 'SYST:REM' and that command worked but again following commands to get data fail :-(

Got to go out now but later on I will update to the latest version of the Win 10 logging program and try again.
Thanks to all who have put in suggestions to date.
enut11
« Last Edit: November 05, 2020, 12:26:45 am by enut11 »
an electronics nut from wayback...
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: 3458a logging via Windows app.....revisited
« Reply #290 on: November 05, 2020, 01:39:36 am »
I don't know if it changes anything but the 34401A apparently uses 2 stop bits (rather unusual!), so the address would be COMn,9600,8,N,2,CRLF.
https://web.mit.edu/8.13/8.13d/manuals/agilent-34401a-multimeter-users-guide-242pages.pdf
pages 149 and 152.  Also needs the "system:remote" command, read the following pages.
The DTR/DSR hardware handshake is also weird (usually it is CTS/RTS if any), but it should not be a problem if the correct null-modem cable with handshaking disabled is used, page 151 (unless it is possible to disable it somewhere in the communication menu, I didn't look into that).
RS232 is not quite plug-and-play  :)

Edit:
It is possible that the Agilent Connexion Expert is aware of it and controls the DTR line accordingly. However the library works with handshake disabled and there is no way to control this line in the current program version (I have never seen before any instrument using DTR for handshaking and I think DSR/DTR was intended for modem communication only, curiously it is not even listed in the NET serialport class handshaking modes).  If this is the problem the only immediate solution is to have a cable that physically  disables DTR/DSR as explained on page 151.  Otherwise I can change the serial port configuration to hold the DSR line  permanently high, I can post a modified version later when I have time to do that.
« Last Edit: November 05, 2020, 08:16:17 am by pwlps »
 
The following users thanked this post: enut11

Online IanJTopic starter

  • Supporter
  • ****
  • Posts: 1695
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #291 on: November 05, 2020, 02:03:28 am »
Quote from: enut11
Got to go out now but later on I will update to the latest version of the Win 10 logging program and try again.
Thanks to all who have put in suggestions to date.
enut11

If you wait a few hours I will update post #1 with a "quick install" method for the latest version to save the hassle of running setup.exe etc.

Done.

Ian.
« Last Edit: November 05, 2020, 07:45:37 am by IanJ »
Ian Johnston - Original designer of the PDVS2mini || Author of the free WinGPIB app.
Website - www.ianjohnston.com
YT Channel (electronics repairs & projects): www.youtube.com/user/IanScottJohnston, Twitter (X): https://twitter.com/IanSJohnston
 
The following users thanked this post: enut11

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1012
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Windows app.....revisited
« Reply #292 on: November 05, 2020, 09:21:01 am »
Sorry Ian but I could not get either version of the new 2.01 program to run
an electronics nut from wayback...
 

Online IanJTopic starter

  • Supporter
  • ****
  • Posts: 1695
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #293 on: November 05, 2020, 09:43:20 am »
Sorry Ian but I could not get either version of the new 2.01 program to run

FULL INSTALL METHOD:
Yep, I missed some files on the FULL installation......try download again as I have replaced the zip - V2_01_Installation.zip
You may need to un-install the current version first, you will get a message if you need to do so. If you have to do this and you have edited your GPIBchannels.txt file then grab a copy of it first.

QUICK INSTALL METHOD:
Yes, it can be hit or miss when replacing EXE/DLL's especially over a much older version.

Ian.
Ian Johnston - Original designer of the PDVS2mini || Author of the free WinGPIB app.
Website - www.ianjohnston.com
YT Channel (electronics repairs & projects): www.youtube.com/user/IanScottJohnston, Twitter (X): https://twitter.com/IanSJohnston
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: 3458a logging via Windows app.....revisited
« Reply #294 on: November 05, 2020, 09:53:10 am »
As promissed in my previous post here is a dll version that configures the serial port to hold DTR permanently high, can you try it ?
It should not change anything for other (normal) instruments that are just ignoring this line.
 

Online IanJTopic starter

  • Supporter
  • ****
  • Posts: 1695
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #295 on: November 05, 2020, 12:30:43 pm »
Hi all,

New version V2.02 of the app available (FULL & QUICK), see post #1 (this does NOT include PWLPS test update to the DLL above).
I have fixed a bug in the profile selection checkbox operation.

PS. The source code has been removed from this forum, it's too big to attach to post #1 now. Contact me privately for a copy if you want it.

Ian.
« Last Edit: November 05, 2020, 12:32:48 pm by IanJ »
Ian Johnston - Original designer of the PDVS2mini || Author of the free WinGPIB app.
Website - www.ianjohnston.com
YT Channel (electronics repairs & projects): www.youtube.com/user/IanScottJohnston, Twitter (X): https://twitter.com/IanSJohnston
 

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1012
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Windows app.....revisited
« Reply #296 on: November 05, 2020, 07:35:11 pm »
As promissed in my previous post here is a dll version that configures the serial port to hold DTR permanently high, can you try it ?
It should not change anything for other (normal) instruments that are just ignoring this line.

This is what happened when I tried the DLL in V1.44
an electronics nut from wayback...
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: 3458a logging via Windows app.....revisited
« Reply #297 on: November 05, 2020, 08:00:20 pm »
This is what happened when I tried the DLL in V1.44

Ok, "could not load ..." means there is either a platform (32/64) or NET/dll version conflict somewhere, I think it will be simpler if Ian recompiles the source (I will send it him tomorrow) with his project settings.
 

Online IanJTopic starter

  • Supporter
  • ****
  • Posts: 1695
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #298 on: November 06, 2020, 04:12:07 pm »
This is what happened when I tried the DLL in V1.44

Ok, "could not load ..." means there is either a platform (32/64) or NET/dll version conflict somewhere, I think it will be simpler if Ian recompiles the source (I will send it him tomorrow) with his project settings.

Hi all,

I have updated the .DLL per above, enut11 you can extract the DLL from the V2_10_Quick.zip file in post #1 and give it a go.
I tried the DLL on the latest version of the main app and it runs fine, albeit I could not test the COM functionaility you are interested in getting working.

I have also updated the main app, now Version 2.10, as follows:
- Added profile selection to Dev 1 as well as Dev 2.
- Added optional Terminator checkbox on Dev 1 as well as Dev 2.
- Various tidy up of the GUI, mainly enabling/disabling functions.
- Lots of work on the PDVS2mini side of the app......which will be of no interest to anyone except me!

Screenshot of this monster in operation (expanded interface open). It's currently running via GPIB (3458A) a detailed calibration of one of my PDVS2mini voltage sources via RS232.


Ian.


« Last Edit: November 06, 2020, 04:16:31 pm by IanJ »
Ian Johnston - Original designer of the PDVS2mini || Author of the free WinGPIB app.
Website - www.ianjohnston.com
YT Channel (electronics repairs & projects): www.youtube.com/user/IanScottJohnston, Twitter (X): https://twitter.com/IanSJohnston
 
The following users thanked this post: enut11

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1012
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Windows app.....revisited
« Reply #299 on: November 06, 2020, 09:05:30 pm »
I have now installed V2.1 and appreciate the improvements over 1.44 - thanks for a great program.
The ability to record temperature and humidity along with data is a real advantage over my other software logging solutions.

I can now select SHT-30 USB temp logger :-) but it does not remember this after saving settings :-(

I am able to log to 34461A via Visa USB (still getting 'error' on meter but it logs data anyway).

34401A is much fussier to set up via CH340 RS232-USB. The DMM connects but is reluctant to give any data!
Error reported is per reply above. I will keep fiddling with the SCPI commands in the hope of finding a solution.
enut11
an electronics nut from wayback...
 
The following users thanked this post: IanJ


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf