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
If InStr(inst_value, "E-08") <> 0 Then ' 0.00001mV
inst_valueFinal = inst_valueF / 100000000
GoodRead = True
End If
If InStr(inst_value, "E-03") <> 0 Then ' 1mV
inst_valueFinal = inst_valueF / 1000
GoodRead = True
End If
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
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
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
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.
Lastrownum = Sheets("Datalog").[C8].Value
Dim Lastrownum As Long
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
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
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.
hp3458a.write ("ACAL DCV")
delay(140 seconds)
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
ShellRun (TempExePath & "get_pa_msw.exe -d COM10:115200,N,8,1 -a")