Author Topic: 3458a logging via Excel macro  (Read 10227 times)

0 Members and 1 Guest are viewing this topic.

Offline enut11

  • Regular Contributor
  • *
  • Posts: 213
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Excel macro
« Reply #50 on: February 12, 2017, 10:51:41 PM »
Hi Bud
When I put a short across the HP3456A input, I get the following output into XL

Value
-7.00000002407108E-10

String from 3456A
-000.0007E-3

ie, there seems to be a difference of x1000 between the 'string' and the 'value' which is recorded.
enut11
an electronics nut from wayback...
 

Offline IanJ

  • Frequent Contributor
  • **
  • Posts: 719
  • Country: scotland
  • Pro EE guy many years ago, now a hobby/home biz.
    • IanJohnston.com
Re: 3458a logging via Excel macro
« Reply #51 on: February 13, 2017, 01:46:10 AM »
Hi Bud
When I put a short across the HP3456A input, I get the following output into XL

Value
-7.00000002407108E-10

String from 3456A
-000.0007E-3

ie, there seems to be a difference of x1000 between the 'string' and the 'value' which is recorded.
enut11

Those are configurable in the macro code.....the macro reads the last 4 digits of the string sent via GPIB and converts to a number and multiplies it by whatever value to get it reading  correct in say VDC..........but E-3 is a bit unfamiliar and doesn't conform to the 4-digits. I'd need to know what was the actual reading on the meter.

Sample:
Code: [Select]
    If InStr(inst_value, "E-08") <> 0 Then    ' 0.00001mV
        inst_valueFinal = inst_valueF / 100000000
        GoodRead = True
    End If

And another example:
Code: [Select]
    If InStr(inst_value, "E-03") <> 0 Then    ' 1mV
        inst_valueFinal = inst_valueF / 1000
        GoodRead = True
    End If

Ian.
Ian Johnston
www.ianjohnston.com
Manufacturer of the PDVS2
 

Offline enut11

  • Regular Contributor
  • *
  • Posts: 213
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Excel macro
« Reply #52 on: February 13, 2017, 05:24:19 AM »
Hi
3456A meter reading with a short was:
-00.0007 -3
'-3' being the exponent indicating millivolts.
enut11

PS1: I did notice that when I edit the string in XL that I have to backspace 4 times to delete what appears to be only 3 characters, ie 'E-3 ', so there must be another hidden character after the 3?

PS2: It is only voltages below 100mV that are affected
« Last Edit: February 13, 2017, 06:25:18 AM by enut11 »
an electronics nut from wayback...
 

Offline IanJ

  • Frequent Contributor
  • **
  • Posts: 719
  • Country: scotland
  • Pro EE guy many years ago, now a hobby/home biz.
    • IanJohnston.com
Re: 3458a logging via Excel macro
« Reply #53 on: February 13, 2017, 07:24:58 AM »
Hi
3456A meter reading with a short was:
-00.0007 -3
'-3' being the exponent indicating millivolts.
enut11

PS1: I did notice that when I edit the string in XL that I have to backspace 4 times to delete what appears to be only 3 characters, ie 'E-3 ', so there must be another hidden character after the 3?

PS2: It is only voltages below 100mV that are affected

Version 16 below has some changes in line with this issue you could copy n paste........I haven't looked at it properly though as I don't have a 3456A.

Ian.
« Last Edit: February 13, 2017, 07:33:10 AM by IanJ »
Ian Johnston
www.ianjohnston.com
Manufacturer of the PDVS2
 
The following users thanked this post: enut11

Offline IanJ

  • Frequent Contributor
  • **
  • Posts: 719
  • Country: scotland
  • Pro EE guy many years ago, now a hobby/home biz.
    • IanJohnston.com
Re: 3458a logging via Excel macro
« Reply #54 on: February 13, 2017, 07:30:30 AM »
Hi all,

New version attached.

1. New user variable on the main screen, an attempt to make sure the macro's stay within the limits of the users version of Excel and the number of row limitations etc. A new HELP sheet explains in a bit more detail.

2. Added an experimental scroll bar below the graph. Set the width of the chart and then scroll around the entire data with that width. Be nice if it was faster, but thats Excel!

Ian.
Ian Johnston
www.ianjohnston.com
Manufacturer of the PDVS2
 
The following users thanked this post: enut11

Offline Bud

  • Super Contributor
  • ***
  • Posts: 1974
  • Country: ca
Re: 3458a logging via Excel macro
« Reply #55 on: February 13, 2017, 07:45:08 AM »
Hi Bud
When I put a short across the HP3456A input, I get the following output into XL

Value
-7.00000002407108E-10

String from 3456A
-000.0007E-3


Try this version (the Graph sheet borrowed from IanJ's work)

More parameters have been implemented, but not all error conditions checked, i.e. range matching the device mode, up to the user to set up parameters properly.
 
The following users thanked this post: enut11

Offline Tony_G

  • Frequent Contributor
  • **
  • Posts: 311
  • Country: us
Re: 3458a logging via Excel macro
« Reply #56 on: February 13, 2017, 08:07:17 AM »
I was having a problem with accidently hitting the stop button multiple times and erroring out. This can be addressed with:

Code: [Select]
Sub StopBtn_Click()

On Error GoTo errHandler

    TimerActive = False
    Sheets("Datalog").[C1].Value = "STOPPED"
    Application.OnTime timetorun, "Refresh", , False    ' kill refresh

    Exit Sub
   
errHandler:
    Resume Next
   
End Sub

Now 'On Error Goto/Resume Next' is a fairly big stick to solve this issue with but I'm not an Excel guy so it was the easiest way to address the issue (which was the second time you click the stop button it tries to unscheduled an activity that has already been unscheduled and therefore it fails).

TonyG
« Last Edit: February 13, 2017, 08:11:54 AM by Tony_G »
 

Offline enut11

  • Regular Contributor
  • *
  • Posts: 213
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Excel macro
« Reply #57 on: February 13, 2017, 01:34:21 PM »

Try this version (the Graph sheet borrowed from IanJ's work)

More parameters have been implemented, but not all error conditions checked, i.e. range matching the device mode, up to the user to set up parameters properly.

Hi Bud. Nice implementation of the XL Sheet for the HP3456A. Works well. Sub 100mV log error solved. Also like the pic of the meter front panel.

Thanks IanJ. I like the instant graph at the end of logging.
enut11
an electronics nut from wayback...
 

Offline Bud

  • Super Contributor
  • ***
  • Posts: 1974
  • Country: ca
Re: 3458a logging via Excel macro
« Reply #58 on: February 13, 2017, 05:25:38 PM »
Happy logging!
 :)
 

Offline IanJ

  • Frequent Contributor
  • **
  • Posts: 719
  • Country: scotland
  • Pro EE guy many years ago, now a hobby/home biz.
    • IanJohnston.com
Re: 3458a logging via Excel macro
« Reply #59 on: February 14, 2017, 03:59:56 AM »
Hi all,

The 82357A GPIB USB interface is doing my nut in (it is a clone!).......so today hooked up a 82350B GPIB PCI interface and happily the 3458a is logging away fine with that. Hopefully it will be reliable and not reveal my connectivity issues have been with my 3458a all along.

The PC I installed it into also has Excel 2016 on it, so will be eager to see any differences.

Home for my 3458a these past few months has been my server cupboard......far more temperature stable than my workshop.
Out of interest the whole underside of the PC/NAS shelf has tin foil (raided from the wife's workshop, I mean kitchen), and with an extra layer under the wifi router.

Ian.
« Last Edit: February 14, 2017, 04:02:38 AM by IanJ »
Ian Johnston
www.ianjohnston.com
Manufacturer of the PDVS2
 

Offline IanJ

  • Frequent Contributor
  • **
  • Posts: 719
  • Country: scotland
  • Pro EE guy many years ago, now a hobby/home biz.
    • IanJohnston.com
Re: 3458a logging via Excel macro
« Reply #60 on: February 14, 2017, 04:50:54 AM »
Hi all,

New version attached.

- Bug fix, wrong data type (int instead of long) meant No. rows were limited and START failed/hung.
- User can now preset 3off variables that relate to their version of Excel limitations. Apparently, 1048576 & 32000 are possibles.

Ian.
Ian Johnston
www.ianjohnston.com
Manufacturer of the PDVS2
 

Offline Tony_G

  • Frequent Contributor
  • **
  • Posts: 311
  • Country: us
Re: 3458a logging via Excel macro
« Reply #61 on: February 14, 2017, 04:52:02 AM »
[Just as I hit submit I see that Ian already posted a fix - Leaving for posterity  ;)]

I've been playing with the macro & my 5440B and there is a bug in the type definitions.

The line:

Code: [Select]
Lastrownum = Sheets("Datalog").[C8].Value

will error out if you change the Last Row Available value to something bigger than 16 bits. To fix this, change the definition to a long:

Code: [Select]
Dim Lastrownum          As Long

Found this because I wanted to capture 24 hours of data at 1 second intervals.

TonyG
 

Offline Bud

  • Super Contributor
  • ***
  • Posts: 1974
  • Country: ca
Re: 3458a logging via Excel macro
« Reply #62 on: February 14, 2017, 05:42:41 PM »
After some fight with the Keysight IO libraries and Agilent clone adapter I was able to add HP 5334A frequency counter, I will share the script after some polishing.

 

Offline Tony_G

  • Frequent Contributor
  • **
  • Posts: 311
  • Country: us
Re: 3458a logging via Excel macro
« Reply #63 on: February 15, 2017, 03:01:08 AM »
I just tried to use _17 and I got a "Can't find project or library" error - Checking the references in Tools->Reference showed that it used an earlier version of the 488.2 Formatted IO library than what I had installed - Just an FYI if someone else runs into this (BTW I'm using the beta of the Keysight IO Libraries, seems pretty good with  new UI that groups things that I use more logically)

Also I'd propose this change again to StopBtn_Click():

Code: [Select]
Sub StopBtn_Click()

On Error GoTo errHandler

    TimerActive = False
    Sheets("Datalog").[C1].Value = "STOPPED"
    Application.OnTime timetorun, "Refresh", , False    ' kill refresh

    Exit Sub

errHandler:
    Resume Next

End Sub

this works around multiple clicks of stop button - You could dig deeper into the error and only trap the one specific to the .OnTime call (1004 I think) if you wanted to be more focused.

TonyG
 

Offline IanJ

  • Frequent Contributor
  • **
  • Posts: 719
  • Country: scotland
  • Pro EE guy many years ago, now a hobby/home biz.
    • IanJohnston.com
Re: 3458a logging via Excel macro
« Reply #64 on: February 15, 2017, 07:26:51 AM »
I just tried to use _17 and I got a "Can't find project or library" error - Checking the references in Tools->Reference showed that it used an earlier version of the 488.2 Formatted IO library than what I had installed - Just an FYI if someone else runs into this (BTW I'm using the beta of the Keysight IO Libraries, seems pretty good with  new UI that groups things that I use more logically)

Also I'd propose this change again to StopBtn_Click():

Code: [Select]
Sub StopBtn_Click()

On Error GoTo errHandler

    TimerActive = False
    Sheets("Datalog").[C1].Value = "STOPPED"
    Application.OnTime timetorun, "Refresh", , False    ' kill refresh

    Exit Sub

errHandler:
    Resume Next

End Sub

this works around multiple clicks of stop button - You could dig deeper into the error and only trap the one specific to the .OnTime call (1004 I think) if you wanted to be more focused.

TonyG

Good idea about multiple stops pressed.

Ian.
Ian Johnston
www.ianjohnston.com
Manufacturer of the PDVS2
 

Offline IanJ

  • Frequent Contributor
  • **
  • Posts: 719
  • Country: scotland
  • Pro EE guy many years ago, now a hobby/home biz.
    • IanJohnston.com
Re: 3458a logging via Excel macro
« Reply #65 on: February 15, 2017, 07:34:04 AM »
Hi all,

New version attached.

1. Multiple STOPS were bringing up and error.....all masked off now so hit it as much as you like it'll be ignored.
2. Pressing RESUME when running i.e. without hitting STOP first also masked off.
3. Pressing STOP or RESUME when the logging hasn't even been started for that session masked off.

The above a bit of a quick hack using flags but seems to work fine.
Flags are great but sometimes a pain....you can end up going round in circles.... :)

Ian.
Ian Johnston
www.ianjohnston.com
Manufacturer of the PDVS2
 

Offline enut11

  • Regular Contributor
  • *
  • Posts: 213
  • Country: au
  • Love building/modifying/restoring test equipment
Re: 3458a logging via Excel macro
« Reply #66 on: February 15, 2017, 01:15:48 PM »
So far I have only been using an early version of this logging spreadsheet modified by Bud to work with the HP3456A. Works well.

However, if IanJ keeps developing it for HP3458A I may have no choice but to get one ;D
an electronics nut from wayback...
 

Offline IanJ

  • Frequent Contributor
  • **
  • Posts: 719
  • Country: scotland
  • Pro EE guy many years ago, now a hobby/home biz.
    • IanJohnston.com
Re: 3458a logging via Excel macro
« Reply #67 on: February 16, 2017, 10:28:45 AM »
Hi all,

I was thinking of adding in some functionality to backup the cal data in the 3458a. There are a few utilities out there but I can't seem to find the GPIB commands to run to then be able to download the file from the 3458a........if anyone knows then I'll look to add this to the macro.

The longer I own my 3458a the longer I keep thinking I should have the cal backed up!

Ian.
Ian Johnston
www.ianjohnston.com
Manufacturer of the PDVS2
 

Offline Pipelie

  • Regular Contributor
  • *
  • Posts: 83
  • Country: cn
Re: 3458a logging via Excel macro
« Reply #68 on: February 16, 2017, 12:38:12 PM »
Hi all,

I was thinking of adding in some functionality to backup the cal data in the 3458a. There are a few utilities out there but I can't seem to find the GPIB commands to run to then be able to download the file from the 3458a........if anyone knows then I'll look to add this to the macro.

The longer I own my 3458a the longer I keep thinking I should have the cal backed up!

Ian.

Hi, IanJ
I think you can find it here:
https://xdevs.com/article/hp3458a_gpib/

https://github.com/bsdphk/pylt/blob/master/hp3458a.py 
http://www.eevblog.com/forum/projects/3458a-calram/
http://on5vl.e-monsite.com/medias/files/program-hp3458a-calram-mread.txt

« Last Edit: February 19, 2017, 10:28:18 PM by Pipelie »
 
The following users thanked this post: quarks

Offline IanJ

  • Frequent Contributor
  • **
  • Posts: 719
  • Country: scotland
  • Pro EE guy many years ago, now a hobby/home biz.
    • IanJohnston.com
Re: 3458a logging via Excel macro
« Reply #69 on: February 18, 2017, 01:29:30 AM »
Hi all,

Found a small bug......will hopefully fix this weekend.

If I am logging away quite nicely, say 2.00000vdc from my hand held voltage source and the batteries die then the output obviously drops to zero......and it looks like at that point the spreadsheet hangs.......almost as if the resultant input voltage to the 3458a is out of range of the parser......but I'm not so sure it is......since I go all the way to E-10.
Could be some other wierdness.

Ian.

UPDATE:
Looks like it has to do with range switching. If I vary my source from 2v to 10v and anywhere in between it's fine, but if I drop to 1v then the spreadsheet hangs.
Looking at the Keysight IO Monitor there's an error logged:
Excel.exe, VISA::viRead, VI_ERROR_TMO
Then it times out, and a viClose.

UPDATE 2:
I see whats happening......if NPLC is set to 50 then 2v is ok, 1v is not. Set NPLC to 10 and all is fine.
I need to sort the NPLC thing!!

Ian.
« Last Edit: February 18, 2017, 05:06:35 AM by IanJ »
Ian Johnston
www.ianjohnston.com
Manufacturer of the PDVS2
 

Offline IanJ

  • Frequent Contributor
  • **
  • Posts: 719
  • Country: scotland
  • Pro EE guy many years ago, now a hobby/home biz.
    • IanJohnston.com
Re: 3458a logging via Excel macro
« Reply #70 on: June 26, 2017, 05:06:36 AM »
Hi all,

Am building a new, much more temperature stable workshop and plan on making good use of the excel macro for some long term testing.

One thing I was hoping to do if indeed the 3458a experts thinks it's appropriate, is to have the macro run ACAl DCV every hour or so automatically. Is this really required to do?.......or is it the case it's not required to do if my workshop is temperature stable 24/7.

If it is appropriate, does anyone know the GPIB syntax for ACAL DCV.......I can't seem to find it.

Thanks,

Ian.
Ian Johnston
www.ianjohnston.com
Manufacturer of the PDVS2
 

Online TiN

  • Super Contributor
  • ***
  • Posts: 2936
  • Country: tw
  • Volt-bolt
    • xDevs.com
Re: 3458a logging via Excel macro
« Reply #71 on: June 26, 2017, 05:36:17 AM »
Code: [Select]
hp3458a.write ("ACAL DCV")
delay(140 seconds)

:). But I'd run ACAL on every 1C of ambient temp change, instead of every hour. It's little point to rerun ACAL if temperature is stable (which is NOT easy to get).
xDevs.com | Have test gear documentation to share? Upload here! No size limits, firmware dumps and teardown photos welcome.
 
The following users thanked this post: IanJ

Offline Flinstone

  • Regular Contributor
  • *
  • Posts: 160
  • Country: be
Re: 3458a logging via Excel macro
« Reply #72 on: June 26, 2017, 05:42:36 AM »
Hello Ian - your Excel macro tool is very useful for VoltNuts and 3458A owners.

For maximum accuracy, KS recommends performing ACAL DCV or ACAL ALL once every 24 hours or when the multimeter's temperature changes by ± 1°C from when it was last externally calibrated or from the last autocal.
It is explained in CH3 - page 49 of 03458-90014 KS manual

Can you consider to add following feature ?
- One of the most time consuming tests is the "ACAL? 72" test where the stability of the A/D converter is tested during several days (service note 18). It would be nice if that test could be embedded - let say over a period between 7 ... 14 days - and with daily intervals of 6 - 12 hours (28 ... 56 test results).

- A loop Counter that halts logging if certain loop count has been reached ?

- Temperature / RH logging that connects with laptop in parallel that monitors room temperature where 3458A or DUT is stored.
  Otherwise people are logging with multiple DMMs and the problem is to synch all DMMs with same start/stop conditions - store all data in same file.
  There are low cost evaluation USB sticks from Silicon Labs and TI - that can be used as HW (development) platform: e.g. SI7051-EVB, a.m.o. ...

If you have questions you can always PM me ...


Thanks
Yabba Dabba Doo !

Flinstone
55 Cobblestone Road
Bedrock
« Last Edit: July 21, 2017, 05:10:06 PM by Flinstone »
 
The following users thanked this post: IanJ

Offline IanJ

  • Frequent Contributor
  • **
  • Posts: 719
  • Country: scotland
  • Pro EE guy many years ago, now a hobby/home biz.
    • IanJohnston.com
Re: 3458a logging via Excel macro
« Reply #73 on: September 03, 2017, 07:48:32 PM »
Hi all,

I have added temperature data logging to the spreadsheet.
Go to the new TEMPer1 tab on the spreadsheet and follow the instructions there.

I have a couple of irons in the fire regarding getting temp logging into the spreadsheet and this is the first attempt that works. It's a bit finnicky to setup up but seems reliable. It's also a bit slow (to change) but as it's a cheap probe I had lying around I thought I'd give it a go.

USB temp probe = TEMPer1 (from PCSensor.com but you can get on Ebay etc)
Uses a free third party app, not the PCSensor app from Thermohid.co.uk
The thermohid app acts as a web server and the Excel spreadsheet picks it up the data from there.

Forgot to mention in the instructions to setup the thermohid app to change the READY EVERY setting on it's main page to say 30secs.

Also, you'll see on the graph below that the temperature seems mega stable at the start......but it is working, I'm just not sure why it seems to be sat at 22.3degC.......my room can't be that good! - Update: The temp sometimes just seems to stick at 22.31, always 22.31, but if you touch the probe with your finger it'll jump it back into operation again. The native app running on it's own does the same thing. I'm guessing a firmware/driver bug!
Update 5/9/17: Appears it's my KVM switch, coz although it's on a different USB port of the PC it somehow has an effect on the TEMPer1 USB comms.

Still working on a much more elegant solution......but for now here is 3458A_19_TEMPer1.

Ian.
« Last Edit: September 06, 2017, 07:20:53 AM by IanJ »
Ian Johnston
www.ianjohnston.com
Manufacturer of the PDVS2
 

Offline Flinstone

  • Regular Contributor
  • *
  • Posts: 160
  • Country: be
Re: 3458a logging via Excel macro
« Reply #74 on: September 03, 2017, 08:12:21 PM »
Hello Ian - do you have any idea if other sensors like "Temper1F", "Temper2" or legacy "Temper" model will also work with your Excel form ?

Fred Flinstone

Thanks
Yabba Dabba Doo !

Flinstone
55 Cobblestone Road
Bedrock
« Last Edit: September 03, 2017, 08:20:22 PM by Flinstone »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf