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

yuhar and 1 Guest are viewing this topic.

Offline wolfy007

  • Regular Contributor
  • *
  • Posts: 228
  • Country: au
  • Back into electronics again, as a hobby this time.
Re: 3458a logging via Windows app.....revisited
« Reply #175 on: March 29, 2019, 06:05:23 am »
Just a quick update on changing the VISA version used, I did it manually on Windows8.1pro (because Windows10 sux  >:D ) as follows;

I had installed some National Instruments software to control a couple oscilloscopes last year, so I checked the details of the visa32.dll library(right click on file and select properties) in the \Windows\sysWOW64 directory. The  file details of the one already in there indicates the author as National Instruments. So I renamed it visa32.dll.NIbak, and since there was another visa32.dll.bak file in there, I checked its details and found it was a Keysight file and renamed it visa32.dll.

If there isnt another visa32 file in sysWOW64, rerun the Keysight IO installer again to repair the install (after renaming if needed) and it should put the Keysight visa32.dll in there.

Hope that helps.

PS: You could use 'C:\Program Files\Keysight\IO Libraries Suite' to check whats installed regarding VISA (and other software). You could also use the KeysightConnectionExpert to choose VISA version. Once open, click on the 'gear' icon in the top right of the ConnectionExpert window and select 'Tools', then select 'Visa Conflict Manager'. From this you should be able to choose your VISA preference.
« Last Edit: March 29, 2019, 06:24:50 am by wolfy007 »
 
The following users thanked this post: IanJ

Offline IanJTopic starter

  • Supporter
  • ****
  • Posts: 1664
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #176 on: March 29, 2019, 09:16:47 pm »
Hi all,

FWIW......on my Win10 PC.....

C:\windows\SysWOW64 = Keysight DLL
C:\windows\Systm32 = IVI Foundation DLL

Can confirm the copy in SysWOW64 is the one used by the GPIB app.....the other doesn't work.

Also, if you copy the Keysight DLL to the GPIB app folder then no matter what DLL is in the SysWOW64 folder doesn't matter......so I guess protects the app from further issues.

Note: Found the following in my SysWOW64 folder........Hmmmm!
VISA_Shared_CleanupUtility.exe

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 #177 on: March 31, 2019, 12:48:19 pm »
Ian,

Can confirm the copy in SysWOW64 is the one used by the GPIB app.....the other doesn't work.

SysWOW64 is for 32-bit dlls and C:\windows\System32 for 64-bit dlls (no error here, I don't know how MS came up with this sort of inverted naming), therefore if you compile your app in 32 bit (compiler target CPU set to x86) then it will only search for dlls in the SysWOW64 folder.
For Visa dll names it is confusing too. So there is a Visa32.dll (32 bit) in SysWOW64 and Visa64.dll (64 bit) in system32, but there is also a "Visa32.dll" in the system32 folder and this one appears to contain a 64 bit version...  :-//  (so the latter seems to be there just to avoid changing the dll names in the code when switching your app from 32 bit to 64 bit ?).   

Pawel
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: 3458a logging via Windows app.....revisited
« Reply #178 on: April 08, 2019, 12:06:11 pm »
With the correct meter setup, state "F1R0Z0N3T3D3" to clear the presentation and fix the range, I can peruse at around 60 ms interims. Alright for what I will in general do, yet not record breaking speed. How quick is your program?

I think the speed is more limited by 1) the response time of your meter, 2) my IODevice library, than Ian's code.
As for the library, by default it uses polling every few tens of ms hence the minimum delay. But the library can handle  asynchronous callbacks on SRQ therefore you can go as fast as your device permits (if your device is able to set SRQ on the "data ready" status), in Ian's source code handling SRQ can be activated with the call to "setnotify",  in Formtest.vb you can uncomment lines like:
            'uncomment this to use SRQ notifying on device1 :
            'setnotify(dev1)

With this and using HiSLIP I could sometimes get a response within 1-2 ms.  VXI11 is much slower, as for gpib it greatly depends on the gpib board but I did not study it in detail.
 
 

Offline branadic

  • Super Contributor
  • ***
  • Posts: 2413
  • Country: de
  • Sounds like noise
Re: 3458a logging via Windows app.....revisited
« Reply #179 on: April 23, 2019, 06:48:33 pm »
Hi Ian,

a feedback from me. I today received one of those 82357B clones and without touching the driver this one is working with your software without problems. I again checked with original Agilent 82357A but this resulted in the same error as before. Hopefully that helps somewhat.

-branadic-
Computers exist to solve problems that we wouldn't have without them. AI exists to answer questions, we wouldn't ask without it.
 

Offline IanJTopic starter

  • Supporter
  • ****
  • Posts: 1664
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #180 on: April 24, 2019, 05:16:22 pm »
Hi all,

An update to V1.45, download in post #1 (I will update the source code soon).

Dogratian the manufacturer of the Temp/Humidity sensor I have used in this project has released a higher spec model (I begged him!) and which has 0.01 digit resolution on the temperature & humidity. It's called the USB-TnH (SHT30) and so I have now included this in the code.
There was also a wee bug in the existing temp/humidty interface which would only have been apparent if you has tried to select anything other than the USB-TnH SHT10 V2.00 model.

Dogratian's webpage here for the SHT30:-
http://www.dogratian.com/products/index.php/menu-sensors/menu-usb-tnh-type-a-sht30

Thanks,

Ian.




Branadic, not really sure whats going on there with the 82357A.......maybe because it's an old device!

Ian.
« Last Edit: April 24, 2019, 05:27:07 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 maginnovision

  • Super Contributor
  • ***
  • Posts: 1965
  • Country: us
Re: 3458a logging via Windows app.....revisited
« Reply #181 on: May 04, 2019, 07:19:20 am »
I'm not sure if I'm missing something. I'm trying to use this with my Datron 1082. How would I set this up to just read the response for a sample? Using Keysight Interactive IO if I just hammer the read response button I get a sample every time.
 

Offline IanJTopic starter

  • Supporter
  • ****
  • Posts: 1664
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #182 on: May 05, 2019, 07:11:30 pm »
I'm not sure if I'm missing something. I'm trying to use this with my Datron 1082. How would I set this up to just read the response for a sample? Using Keysight Interactive IO if I just hammer the read response button I get a sample every time.

Hi,

If you mean how do you config this app to grap data from your 1082 then you'll first need to to set an interface and address of your 1082 then formulate the, as a bare minimum, then AT RUN entry to grap the actual sample.
If you click on NOTEPAD on the app you'll get a few examples for various devices.

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 #183 on: May 05, 2019, 10:45:59 pm »
Using Keysight Interactive IO if I just hammer the read response button I get a sample every time.

This is not clear: do you mean there is no command to send, i.e. it is configured as "talk only" device?
 

Offline maginnovision

  • Super Contributor
  • ***
  • Posts: 1965
  • Country: us
Re: 3458a logging via Windows app.....revisited
« Reply #184 on: May 05, 2019, 11:00:21 pm »
Well it does work in sending data as I can config the meter just fine but the program seems to be trying to read a flag which may or may not be valid and throws an error. I can not get any response from any command. Using the Keysight interactive IO works as expected be it returning data from a command or just doing a raw read(which is how it shows up in the Keysight logging program).  Actually, if it tries to run through more than 2 or 3 "AT RUN"s the meter resets. If you're interested I can get the actual reported error, if not I'll write a program for it later.

Using Keysight Interactive IO if I just hammer the read response button I get a sample every time.

This is not clear: do you mean there is no command to send, i.e. it is configured as "talk only" device?

I have tried as talker only and not. Talker only is not as useful though since I can't remotely set it up. I don't have the 1081 manual but the 1071 says it should trigger SRQ for each sample. Keysight interactive IO seems to be issuing a raw read for the VISA interface and that works but send and receive also works.

Quick edit: from memory the error had to do with MAV. Possible bit not set? Again I can verify later if either of you would like me to.
« Last Edit: May 05, 2019, 11:06:15 pm by maginnovision »
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: 3458a logging via Windows app.....revisited
« Reply #185 on: May 06, 2019, 08:30:25 am »
Quick edit: from memory the error had to do with MAV. Possible bit not set? Again I can verify later if either of you would like me to.

If the message is "MAV bit not set" then it is clear: your meter is not quite compliant with the 488.2 specification on the meaning of status byte bits. I explain. Polling the status byte is used here to check if the device is ready to send response, according to 488.2 this information is coded in the "Message Available" bit of the status byte, the bit 5 (so the default mask used is 16). Keysight interactive IO works because it does not use any information from the status byte: when you hit "read" it calls the raw low-level read function which waits until it gets response.  But then once a "read" is issued the whole gpib bus will remain blocked until your meter is done with the measurement - very annoying if you have more than one devices connected, especially with high NPLC where it can take seconds to respond.  This software uses periodic polls to check if the data is available, before calling "read", in this way the bus remains available and the program is able to query two (or more) devices simultaneously.  This is the default configuration but it can be easily disabled on per-device basis (you may do it yourself or ask Ian to add checkboxes controlling the "enablepoll" flag for each device).  For a more elaborate version, the MAV masks can also be set individually for each device.   
« Last Edit: May 06, 2019, 08:33:46 am by pwlps »
 

Offline maginnovision

  • Super Contributor
  • ***
  • Posts: 1965
  • Country: us
Re: 3458a logging via Windows app.....revisited
« Reply #186 on: May 06, 2019, 08:47:34 am »
Quick edit: from memory the error had to do with MAV. Possible bit not set? Again I can verify later if either of you would like me to.

If the message is "MAV bit not set" then it is clear: your meter is not quite compliant with the 488.2 specification on the meaning of status byte bits. I explain. Polling the status byte is used here to check if the device is ready to send response, according to 488.2 this information is coded in the "Message Available" bit of the status byte, the bit 5 (so the default mask used is 16). Keysight interactive IO works because it does not use any information from the status byte: when you hit "read" it calls the raw low-level read function which waits until it gets response.  But then once a "read" is issued the whole gpib bus will remain blocked until your meter is done with the measurement - very annoying if you have more than one devices connected, especially with high NPLC where it can take seconds to respond.  This software uses periodic polls to check if the data is available, before calling "read", in this way the bus remains available and the program is able to query two (or more) devices simultaneously.  This is the default configuration but it can be easily disabled on per-device basis (you may do it yourself or ask Ian to add checkboxes controlling the "enablepoll" flag for each device).  For a more elaborate version, the MAV masks can also be set individually for each device.

No it's much too old to conform to 488.2. It uses bit 6(7:0) of status byte to indicate SRQ. I haven't used visual basic since VB6 but maybe I'll look into it or just write something in C++. Thanks for responding.
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: 3458a logging via Windows app.....revisited
« Reply #187 on: May 06, 2019, 09:20:25 am »
I haven't used visual basic since VB6 but maybe I'll look into it or just write something in C++.

It is very easy to modify it in Ian's source code. In Formtest.vb, in the "create device 1" button handler sub "btncreate1_Click" you will find some hints:
Code: [Select]
            'dev1.enablepoll = False  'uncomment this if a device does not support polling ("poll timeout" is signalled)
            'dev1.MAVmask = ...  'set a different mask if your device supports polling but its status flags do not comply with 488.2

If you just uncomment "dev1.enablepoll = False" it will work exactly like Keysight interactive IO.
« Last Edit: May 06, 2019, 09:23:54 am by pwlps »
 

Offline maginnovision

  • Super Contributor
  • ***
  • Posts: 1965
  • Country: us
Re: 3458a logging via Windows app.....revisited
« Reply #188 on: May 06, 2019, 09:41:40 am »
I haven't used visual basic since VB6 but maybe I'll look into it or just write something in C++.

It is very easy to modify it in Ian's source code. In Formtest.vb, in the "create device 1" button handler sub "btncreate1_Click" you will find some hints:
Code: [Select]
            'dev1.enablepoll = False  'uncomment this if a device does not support polling ("poll timeout" is signalled)
            'dev1.MAVmask = ...  'set a different mask if your device supports polling but its status flags do not comply with 488.2

If you just uncomment "dev1.enablepoll = False" it will work exactly like Keysight interactive IO.

Thanks for the hint. I'll probably have to do a little more to implement the checking of SRQ byte and I also have 5 devices to connect to. Nothing too major. I already have a C++/OpenGL framework I wrote for my autonomous car though that would work well for this, just need to build a small UI and modify graphing for multimeters instead of maps.
 

Offline IanJTopic starter

  • Supporter
  • ****
  • Posts: 1664
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #189 on: May 06, 2019, 10:23:42 pm »
I haven't used visual basic since VB6 but maybe I'll look into it or just write something in C++.

It is very easy to modify it in Ian's source code. In Formtest.vb, in the "create device 1" button handler sub "btncreate1_Click" you will find some hints:
Code: [Select]
            'dev1.enablepoll = False  'uncomment this if a device does not support polling ("poll timeout" is signalled)
            'dev1.MAVmask = ...  'set a different mask if your device supports polling but its status flags do not comply with 488.2

If you just uncomment "dev1.enablepoll = False" it will work exactly like Keysight interactive IO.

If this something that is likely to come up again I could always update my app and add a check box for this......Thinking about it I have a Racal-Dana Freq Counter that I can't get to work, I wonder if this is the same problem?

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 #190 on: May 07, 2019, 06:07:57 am »
I already have a C++/OpenGL framework I wrote for my autonomous car ...

Wow, would be nice to see this project too :)
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: 3458a logging via Windows app.....revisited
« Reply #191 on: May 07, 2019, 06:18:26 am »
If this something that is likely to come up again I could always update my app and add a check box for this......Thinking about it I have a Racal-Dana Freq Counter that I can't get to work, I wonder if this is the same problem?

As far as I remember I didn't have any problems with Racal-Dana (model 1998).

More generally, disabling the polling function is only necessary when you see a message "poll timeout".

 

Offline HighVoltage

  • Super Contributor
  • ***
  • Posts: 5504
  • Country: de
Re: 3458a logging via Windows app.....revisited
« Reply #192 on: June 03, 2019, 04:13:57 pm »
I am starting on a freshly installed Win7 Pro laptop, to use this software for the first time.
What version of Visual Studio should I install?
Is there a link to an offline installer, since that laptop will not go online?
Thanks
There are 3 kinds of people in this world, those who can count and those who can not.
 

Offline IanJTopic starter

  • Supporter
  • ****
  • Posts: 1664
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #193 on: June 05, 2019, 03:52:25 pm »
I am starting on a freshly installed Win7 Pro laptop, to use this software for the first time.
What version of Visual Studio should I install?
Is there a link to an offline installer, since that laptop will not go online?
Thanks

Hi,

If you just want to run/use the software then you don't need to install VS, just download the binary in post #1 and install.

If you want to work on the source code then it was developed on VS Express 2015, but later versions should be ok also.

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 branadic

  • Super Contributor
  • ***
  • Posts: 2413
  • Country: de
  • Sounds like noise
Re: 3458a logging via Windows app.....revisited
« Reply #194 on: June 15, 2019, 10:58:46 am »
Hi Ian,

got the app running on a Samsung Netbook, that I had laying around. What is annoying is the static window. Would have been better programming it dynamic so that it fit's the resolution of the system. Even with an external monitor I can't see everything (1024 x 800).

-branadic-
Computers exist to solve problems that we wouldn't have without them. AI exists to answer questions, we wouldn't ask without it.
 

Offline IanJTopic starter

  • Supporter
  • ****
  • Posts: 1664
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #195 on: July 10, 2019, 07:23:58 pm »
Hi,

Small update to the EXE (see version 1.46), I have been playing with Temco graph )PPM/DegC) on Playback.
The formula I have coded in I think is still not perfect but it is better than the last one.

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 IanJTopic starter

  • Supporter
  • ****
  • Posts: 1664
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #196 on: July 10, 2019, 07:26:35 pm »
Hi Ian,

got the app running on a Samsung Netbook, that I had laying around. What is annoying is the static window. Would have been better programming it dynamic so that it fit's the resolution of the system. Even with an external monitor I can't see everything (1024 x 800).

-branadic-

Hi,

I'm not a programmer, I just hack my way around VB really......so thats why it's all fixed on one form for the most part. I just concentrated on getting it working rather than bells n whistles.

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 niner_007

  • Frequent Contributor
  • **
  • Posts: 256
  • Country: us
Re: 3458a logging via Windows app.....revisited
« Reply #197 on: July 20, 2019, 05:57:48 am »
IanJ, Hi! :) I respect your work, and you got really cool projects going, I have the PDVS, really great device!

I'm a software engineer, devs tools (IDEs, libraries, compilers etc.), and I do quite a bit of UI. I understand that this app works for you, but I have a few recommendations, below. If you ever need help with coding, send me a message I'll be happy to help. If not done already, I recommend putting your app on github, so others can fork/contribute.

- cleanup the UI, remove everything from the main UI, and only keep the graph/chart with data, and any other statistics. don't keep anything else on the main GUI
- pick a really good font, for data visualization involving text, the font is everything
- have a separate modal dialog for configuring the chart, with a button to get to it, make it easy to get to it from near the chart itself
- don't keep any of the device coniguration on the main menu; it causes information overload and it's unnecessary to be there all the time
it also doesn't scale, what if you have 5 x 3458A? what if you have 15 x temp sensors?
- have a main menu, from which you can get the device list, and a device configuration
- have a device list, as a modal dialog, a List Box or List View, where you'd keep an entry for each device
- you can have it as a small list (icons) on the main menu at the bottom as well, like the Keysight Bench etc.
- from the device list get to the setting of any of the devices in the list
- for a device, store the commands etc. as a script, on disk, and persist it across sessions

« Last Edit: July 21, 2019, 07:42:53 am by niner_007 »
 

Offline IanJTopic starter

  • Supporter
  • ****
  • Posts: 1664
  • Country: scotland
  • Full time EE & Youtuber
    • IanJohnston.com
Re: 3458a logging via Windows app.....revisited
« Reply #198 on: July 21, 2019, 06:54:28 pm »
IanJ, Hi! :) I respect your work, and you got really cool projects going, I have the PDVS, really great device!

I'm a software engineer, devs tools (IDEs, libraries, compilers etc.), and I do quite a bit of UI. I understand that this app works for you, but I have a few recommendations, below. If you ever need help with coding, send me a message I'll be happy to help. If not done already, I recommend putting your app on github, so others can fork/contribute.

- cleanup the UI, remove everything from the main UI, and only keep the graph/chart with data, and any other statistics. don't keep anything else on the main GUI
- pick a really good font, for data visualization involving text, the font is everything
- have a separate modal dialog for configuring the chart, with a button to get to it, make it easy to get to it from near the chart itself
- don't keep any of the device coniguration on the main menu; it causes information overload and it's unnecessary to be there all the time
it also doesn't scale, what if you have 5 x 3458A? what if you have 15 x temp sensors?
- have a main menu, from which you can get the device list, and a device configuration
- have a device list, as a modal dialog, a List Box or List View, where you'd keep an entry for each device
- you can have it as a small list (icons) on the main menu at the bottom as well, like the Keysight Bench etc.
- from the device list get to the setting of any of the devices in the list
- for a device, store the commands etc. as a script, on disk, and persist it across sessions

Hi,

Thanks for your input.......and I agree the UI could be a lot better.....but here's the thing....I am not a software engineer  :palm: I basically just hacked it together in a way that got it working in the fastest/simplest way for myself and based on Pawel initial GPIB code. I then released the EXE's and source code into the wild (see post #1).

The app does everything I need it to do for me so I probably won't be doing many more mods (except just the PPM Tempco calc needs a little work when I get time). I use the app all the time at the moment, both 3458A logging and generating Playback graphs......see the graphs at the foot of this page (my new PDVS2mini):
https://www.ianjohnston.com/index.php/onlineshop/handheld-precision-digital-voltage-source-2-mini-detail

The best thing about the app is Pawel's GPIB code......it is quite simply utterly reliable (usually an issue in Wondows). It would be great for somebody else to take the source code and develop it further......I know there is one person who modified it for 6 device logging if I remember correctly.

PS...the best thing is that there is no Excel req'd (my pet hate!).

Thanks again,

Ian.
« Last Edit: July 21, 2019, 06:56:32 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 niner_007

  • Frequent Contributor
  • **
  • Posts: 256
  • Country: us
Re: 3458a logging via Windows app.....revisited
« Reply #199 on: July 21, 2019, 08:17:43 pm »
IanJ, completely understandable
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf