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

yuhar and 2 Guests are viewing this topic.

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1024
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Windows app.....revisited
« Reply #300 on: November 06, 2020, 11:25:44 pm »
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.

Thanks @pwlps. Is your 'DSR high' software implementation now part of V2.1?
an electronics nut from wayback...
 

Online IanJTopic starter

  • Supporter
  • ****
  • Posts: 1723
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #301 on: November 06, 2020, 11:32:54 pm »
Hi

Yes, I included the new DLL in v2.1, both the quick and full downloads.

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 enut11

  • Super Contributor
  • ***
  • Posts: 1024
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Windows app.....revisited
« Reply #302 on: November 07, 2020, 12:56:02 am »
Thanks IanJ
Doing a crash course on RS232 interfacing and it is a minefield! I am NOT a programmer :-[

What has come up more than once in my readings:
34401A must be in remote mode SYST:REM
Commands MUST be followed by carriage return Ctrl M and line feed Ctrl J. I don't know how to do this in your logging program?
enut11
an electronics nut from wayback...
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: 3458a logging via Windows app.....revisited
« Reply #303 on: November 07, 2020, 02:56:58 am »
Is your 'DSR high' software implementation now part of V2.1?

Ian implemented it but you will be the first to test it with the "com port" interface (I did not have time yesterday, I only added two lines based on the documentation, if you have problems I can test it over the weekend with another RS232 device but I don't have a 34401). 

Quote
34401A must be in remote mode SYST:REM
Command to put in "at start". Edit : "Pre Run"

Quote
Commands MUST be followed by carriage return Ctrl M and line feed Ctrl J. I don't know how to do this in your logging program?
They are, this is the meaning of CRLF in the address: CR=carriage return, LF=line feed.
« Last Edit: November 07, 2020, 12:43:08 pm by pwlps »
 

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1024
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Windows app.....revisited
« Reply #304 on: November 07, 2020, 03:22:45 am »
Hi, @pwlps
Interesting, the initial connection string ensures that CR and LF are applied to all subsequent commands?

Now, how do I save the ADDRESS 'COM3:9600,E,7,2,CRLF'
At the moment the program starts with COM1:xxxxxxxxx settings, even if I 'Save Settings'
« Last Edit: November 07, 2020, 03:29:28 am by enut11 »
an electronics nut from wayback...
 

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1024
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Windows app.....revisited
« Reply #305 on: November 07, 2020, 04:04:26 am »
Well, I have managed to squeeze data out of the 34401A via RS232-USB.

As you can see there is minimal pre-run commands and the data rolls in for graphing/saving. :)

Next step is to be able to set up specific meter configurations.
an electronics nut from wayback...
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: 3458a logging via Windows app.....revisited
« Reply #306 on: November 07, 2020, 07:42:32 am »
Congratulations! But I see you also changed the parity settings so I don't know finally if it was the DSR high that solved the problem in your case (DSR can be physically set high in the cable too).  Still it won't hurt to keep it like this, in this version both CTS and DSR are held high in case a device expects hardware handshaking like yours. Setting both CTS and DSR high is important because many cables tie them together.

Edit: If someone is able to explain me why RS232 has been originally devised with two pairs (CTS/RTS and DSR/DTR) of hanshake lines then I offer him a beer !  :)

Interesting, the initial connection string ensures that CR and LF are applied to all subsequent commands?
Yes, the terminator string is part of the serial connection configuration. It isn't really an "address" part but it was practical to append it there so users won't forget to set it. It works both ways: on the input side it ensures that the port driver will wait until a CRLF appears in the input buffer before handing the response to the app.

Quote
Now, how do I save the ADDRESS 'COM3:9600,E,7,2,CRLF'
At the moment the program starts with COM1:xxxxxxxxx settings, even if I 'Save Settings'

This is Ian's  ;)  I only wrote the communication library, not the actual app using it.
« Last Edit: November 07, 2020, 01:49:06 pm by pwlps »
 
The following users thanked this post: enut11

Online IanJTopic starter

  • Supporter
  • ****
  • Posts: 1723
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #307 on: November 07, 2020, 10:12:36 am »
Now, how do I save the ADDRESS 'COM3:9600,E,7,2,CRLF'
At the moment the program starts with COM1:xxxxxxxxx settings, even if I 'Save Settings'

Identical code for Dev 2 and Dev 1 yet Dev 1 had a little wierdness.......but I realized what it was. The Interface type must be retrieved first then the other parameters after.
Should be fixed now, see the latest Version V2.20 in post #1.

As you mentioned earlier. Temperature/Humidity interface type is not saved.

Note to all: In V2.20 there is also a lot of changes for the PDVS2mini section of the app (just saying!). For info I use this app to automate calibration of my PDVS2mini's that I produce and it's always been a grind to sit with them pressing buttons adjusting the Cal infront of my 3458A. Now, I just connect up the PDVS2mini and my 3458A via GPIB and hit a button and it runs through complete calibration. NB. The PDVS2mini is controlled via an isolated FTDI converter to avoid ground loops etc.
At the end I can hit SAVE TO EEPROM and then hit the PRINT CERT button on the app and it auto-generates a MS. Word document all complete.
This will save me hours and hours..........and it's thanks to Pawel's great work on the comms library.

Have fun!

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, wolfy007, pwlps, Grandchuck

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1024
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Windows app.....revisited
« Reply #308 on: November 07, 2020, 08:29:15 pm »
Well, I am a very happy vegemite (Aussie term) :)

For the first time I am able to simultaneously log, from my ovenised LM399, 10v, Vz, temperature and humidity! WOW

Thanks to @IanJ and @pwlps and anyone else who contributed to this data logging utility. Well done. :-+ :-+

Also, I am extremely grateful at the timely responses I received as I struggled to get my meters connected and working.

What a great environment this Forum is. So thanks also to DJ for hosting it.
enut11
an electronics nut from wayback...
 
The following users thanked this post: IanJ

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1024
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Windows app.....revisited
« Reply #309 on: November 07, 2020, 08:49:32 pm »
My new data logging setup. Ref #7 has been cooking in the oven for several months and now needs the 10.0v trimmed.

The SHT30 temp logger is a great device - simply plug-and-play. Then, using Win 10 Device Manager, query the COM port number and enter into Ian's program.

Thanks guys
« Last Edit: November 07, 2020, 08:53:00 pm by enut11 »
an electronics nut from wayback...
 
The following users thanked this post: wolfy007

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1024
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Windows app.....revisited
« Reply #310 on: November 08, 2020, 07:21:31 pm »
Well, another plus for Win 10 App. I have not found any modern software that talks to my HP 3456A DMM but  it connects and logs data via the App which is great.

The 3456A has a GPIB-USB interface. The ADDRESS I use is GPIB0::22::INSTR and logging command is :READ? and nothing else. It works, again with the option of temp and humidity. :)
an electronics nut from wayback...
 

Online IanJTopic starter

  • Supporter
  • ****
  • Posts: 1723
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #311 on: November 08, 2020, 09:00:29 pm »
Well, another plus for Win 10 App. I have not found any modern software that talks to my HP 3456A DMM but  it connects and logs data via the App which is great.

The 3456A has a GPIB-USB interface. The ADDRESS I use is GPIB0::22::INSTR and logging command is :READ? and nothing else. It works, again with the option of temp and humidity. :)

Thats great!

Of all my test equipment, there is just one device which I have trouble getting data back from although I can send to it no problem........I do need to look at it again sometime.
Racal-Dana 1991 Universal Counter (GPIB connector).

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: 1024
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Windows app.....revisited
« Reply #312 on: November 09, 2020, 03:09:31 am »
Hi Ian
I hope you solve the Racal 1991 communication problem as I have a Racal 1992 and they are very similar .

Now that I can log data, the next step was to check out the PLAYBACK function. This is a surprisingly useful utility with lots of options for analysing the csv data file. A nice feature is the 'PPM' switch which allows you to set an offset from which you can observe deviation at a very fine level. Great.
enut11
an electronics nut from wayback...
 

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1024
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Windows app.....revisited
« Reply #313 on: November 09, 2020, 06:31:50 am »
The HP 3456A is a pre SCPI device and HP had a set of simple codes to program the meter. Eg, entering '6 STG' (no quotes) puts the DMM into 6 digit mode.

It is interesting that the :READ? command that I copied from the 34401A command set still works for the 3456A but it does not appear in the HP docs.
an electronics nut from wayback...
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: 3458a logging via Windows app.....revisited
« Reply #314 on: November 09, 2020, 09:08:00 am »
Of all my test equipment, there is just one device which I have trouble getting data back from although I can send to it no problem........I do need to look at it again sometime.
Racal-Dana 1991 Universal Counter (GPIB connector).

I was using it several years ago and could read data via gpib.  I can look at my old code if you are interested. But it was borrowed from another lab so I don't have it anymore and can't do any testing now.  I later bought a 53131A and prefer it because it is much faster even at high resolution (it's apparently more than just reciprocal counting, seems to be an old HP trick but I did not try to understand how it works). 
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: 3458a logging via Windows app.....revisited
« Reply #315 on: November 09, 2020, 09:20:21 am »
The HP 3456A is a pre SCPI device and HP had a set of simple codes to program the meter. Eg, entering '6 STG' (no quotes) puts the DMM into 6 digit mode.

It is interesting that the :READ? command that I copied from the 34401A command set still works for the 3456A but it does not appear in the HP docs.

I also noticed that the status byte coding is pre-488, "data ready" is coded in bit 2 (is bit 4 in 4882). To avoid "poll timeout" errors the STB mask should be set accordingly (i.e. 4 instead of the default 16) but I don't know if Ian's app allows it. If you don't see a "poll timeout" maybe it means that Ian has now disabled polling in his app ?
« Last Edit: November 09, 2020, 09:32:47 am by pwlps »
 

Online IanJTopic starter

  • Supporter
  • ****
  • Posts: 1723
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #316 on: November 09, 2020, 10:32:55 am »
The HP 3456A is a pre SCPI device and HP had a set of simple codes to program the meter. Eg, entering '6 STG' (no quotes) puts the DMM into 6 digit mode.

It is interesting that the :READ? command that I copied from the 34401A command set still works for the 3456A but it does not appear in the HP docs.

I also noticed that the status byte coding is pre-488, "data ready" is coded in bit 2 (is bit 4 in 4882). To avoid "poll timeout" errors the STB mask should be set accordingly (i.e. 4 instead of the default 16) but I don't know if Ian's app allows it. If you don't see a "poll timeout" maybe it means that Ian has now disabled polling in his app ?

I will add in these options, I actually never added them on the GUI, I just played with them by hardcoding when I was playing with the BB3 PSU.

V2.3 coming today.

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 #317 on: November 09, 2020, 11:03:23 am »
I will add in these options, I actually never added them on the GUI, I just played with them by hardcoding when I was playing with the BB3 PSU.

The most general option would be a textbox to set the STB mask and a checkbox to enable polling, or if you don't have much room left you could say/code by convention that  if the mask is set to zero the polling will be disabled.

NB. Polling is important if there is more than one device on the same gpib bus (cable) and especially when NPLC is set high so that it takes some time to get the response. With polling disabled it will work too but may compromise the simultaneous reading of several devices because the bus gets "busy" once a read is initiated (I explain it at lengths in my codeproject article).  So the polling option may be critical or not depending on the configuration.
« Last Edit: November 09, 2020, 11:07:19 am by pwlps »
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: 3458a logging via Windows app.....revisited
« Reply #318 on: November 09, 2020, 11:27:59 am »
Of all my test equipment, there is just one device which I have trouble getting data back from although I can send to it no problem........I do need to look at it again sometime.
Racal-Dana 1991 Universal Counter (GPIB connector).

I was using it several years ago and could read data via gpib.  I can look at my old code if you are interested. But it was borrowed from another lab so I don't have it anymore and can't do any testing now.  I later bought a 53131A and prefer it because it is much faster even at high resolution (it's apparently more than just reciprocal counting, seems to be an old HP trick but I did not try to understand how it works).

The command to read frequency from RacalDana was "FA".  I didn't use STB polling at that time so I can't tell if it works or should be disabled.
Edit: actually I don't remember if the model was 1991 or later.
« Last Edit: November 09, 2020, 12:07:17 pm by pwlps »
 

Online IanJTopic starter

  • Supporter
  • ****
  • Posts: 1723
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #319 on: November 09, 2020, 12:15:07 pm »
Hi all,

V2.3 available in post #1.

I have added the Enable polling checkbox & STB Mask entry. Also, if the Mask is set to zero the polling automatically disables.
These options are read when the RUN button is hit, so if you make changes you have to hit STOP first. Also, for the moment, these settings are not stored as part of the profiles.
I can't readily test these.....so hopefully they are ok.

PS. There's plenty of room on the GUI.......I'm Scottish, so squeezing every last drop is in my DNA.....:-)

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

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: 3458a logging via Windows app.....revisited
« Reply #320 on: November 09, 2020, 12:39:16 pm »
.......I'm Scottish, so squeezing every last drop is in my DNA.....:-)

We agree here ;D
 

Online IanJTopic starter

  • Supporter
  • ****
  • Posts: 1723
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #321 on: November 13, 2020, 09:40:09 pm »
Hi all,

Version 2.61 available for download in post #1.

- Bug fix on the Playback Chart X-scale dynamic display (wasn't reading correctly when zooming in on the graph).
- Tidy up of the GUI

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: wolfy007

Online IanJTopic starter

  • Supporter
  • ****
  • Posts: 1723
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #322 on: November 14, 2020, 01:51:42 am »
Hi all,

If anyone is using a Racal-Dana 1991 or 1992 universal counter successfully with this software can you let me know.
I can't read from my 1991 although I can send it commands. I get an EOI error.
From what I have found out there are two versions of GPIB boards fitted inside these units and looks like I have the type that doesnt work. No EOI functionality.

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 #323 on: November 14, 2020, 05:52:09 am »
If anyone is using a Racal-Dana 1991 or 1992 universal counter successfully with this software can you let me know.
I can't read from my 1991 although I can send it commands. I get an EOI error.
From what I have found out there are two versions of GPIB boards fitted inside these units and looks like I have the type that doesnt work. No EOI functionality.

I don't remember having any such problems with the model I was using but I found this thread

https://www.eevblog.com/forum/testgear/racal-dana-1992-gpib-not-connecting/

so it seems indeed that some of them don't understand EOI and can only use a terminator character. Visa can handle that in principle but it will need some changes in the configuration and result codes handling (didn't have time yet to study the manual for details).  I don't want to tinker with the actual Visa class code but can just subclass it to make a quick "no-EOI" version that you could incorporate into the dll.   Maybe not today :)
 

Online IanJTopic starter

  • Supporter
  • ****
  • Posts: 1723
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #324 on: November 15, 2020, 05:33:50 pm »
Hi all,

Version 2.80 available for download in post #1.

- New LEFT/RIGHT controls on the Playback Chart (allowing smaller movements).

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
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf