Author Topic: Program that can log/control many multimeters and other devices.  (Read 1557313 times)

flash2b, erlais and 264 Guests are viewing this topic.

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4795
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4750 on: September 30, 2025, 03:47:00 pm »
The selector is what determines the column definition currently (unless there isn't a selector defined). With a selector defined, the column definition is dependent on the Unit / Mode selector. For example, If I have 3 options chosen for measurements, those 3 options are what gets logged. If I select 3 different options, then those 3 wouldn't have matching columns anyway if I try to load data from a CSV.

When loading CSV files it will match on all columns, not only enabled columns, it will even match on disabled equipment (That is second scan).
 
The following users thanked this post: KungFuJosh

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8222
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4751 on: September 30, 2025, 04:25:24 pm »
Here's an example if why I would prefer the variable column names. With a variable column name, I could do each option as I posted previously with a simple variable read added to the 7 column names. Without variable column names, each of 8 measurement channels will require the following (and eventually more when additional options like dBm are added):

Set variables changes (140 lines):
Code: [Select]
if (type=="VMIN")
    if (unit1result=="V")
    var meas1Unit="VMIN-V1";
    elseif (unit1result=="A")
    var meas1Unit="VMIN-A1";
endif
elseif (type=="VMAX")
    if (unit1result=="V")
    var meas1Unit="VMAX-V1";
    elseif (unit1result=="A")
    var meas1Unit="VMAX-A1";
endif
elseif (type=="VPP")
    if (unit1result=="V")
    var meas1Unit="VPP-V1";
    elseif (unit1result=="A")
    var meas1Unit="VPP-A1";
endif
elseif (type=="VBASe")
    if (unit1result=="V")
    var meas1Unit="VBASe-V1";
    elseif (unit1result=="A")
    var meas1Unit="VBASe-A1";
endif
elseif (type=="VTOP")
    if (unit1result=="V")
    var meas1Unit="VTOP-V1";
    elseif (unit1result=="A")
    var meas1Unit="VTOP-A1";
endif
elseif (type=="VAMP")
    if (unit1result=="V")
    var meas1Unit="VAMP-V1";
    elseif (unit1result=="A")
    var meas1Unit="VAMP-A1";
endif
elseif (type=="VLOWer")
    if (unit1result=="V")
    var meas1Unit="VLOWer-V1";
    elseif (unit1result=="A")
    var meas1Unit="VLOWer-A1";
endif
elseif (type=="VUPPer")
    if (unit1result=="V")
    var meas1Unit="VUPPer-V1";
    elseif (unit1result=="A")
    var meas1Unit="VUPPer-A1";
endif
elseif (type=="VMID")
    if (unit1result=="V")
    var meas1Unit="VMID-V1";
    elseif (unit1result=="A")
    var meas1Unit="VMID-A1";
endif
elseif (type=="VAVG")
    if (unit1result=="V")
    var meas1Unit="VAVG-V1";
    elseif (unit1result=="A")
    var meas1Unit="VAVG-A1";
endif
elseif (type=="VRMS")
    if (unit1result=="V")
    var meas1Unit="VRMS-V1";
    elseif (unit1result=="A")
    var meas1Unit="VRMS-A1";
endif
elseif (type=="VSDeviation")
    if (unit1result=="V")
    var meas1Unit="VSDeviation-V1";
    elseif (unit1result=="A")
    var meas1Unit="VSDeviation-A1";
endif
elseif (type=="VPPReshoot")
    if (unit1result=="V")
    var meas1Unit="VPPReshoot-V1";
    elseif (unit1result=="A")
    var meas1Unit="VPPReshoot-A1";
endif
elseif (type=="VNPReshoot")
    if (unit1result=="V")
    var meas1Unit="VNPReshoot-V1";
    elseif (unit1result=="A")
    var meas1Unit="VNPReshoot-A1";
endif
elseif (type=="VPOVershoot")
    if (unit1result=="V")
    var meas1Unit="VPOVershoot-V1";
    elseif (unit1result=="A")
    var meas1Unit="VPOVershoot-A1";
endif
elseif (type=="VNOVershoot")
    if (unit1result=="V")
    var meas1Unit="VNOVershoot-V1";
    elseif (unit1result=="A")
    var meas1Unit="VNOVershoot-A1";
endif
elseif (type=="VPARea")
    var meas1Unit="VPARea1";
elseif (type=="VNARea")
    var meas1Unit="VNARea1";
elseif (type=="VAARea")
    var meas1Unit="VAARea1";
elseif (type=="VNAArea")
    var meas1Unit="VNAArea1";
elseif (type=="VPPArea")
    var meas1Unit="VPPArea1";
elseif (type=="VNPArea")
    var meas1Unit="VNPArea1";
elseif (type=="VAPArea")
    var meas1Unit="VAPArea1";
elseif (type=="VNAPArea")
    var meas1Unit="VNAPArea1";
elseif (type=="HRTime")
    var meas1Unit="HRTime1";
elseif (type=="HFTime")
    var meas1Unit="HFTime1";
elseif (type=="HPERiod")
    var meas1Unit="HPERiod1";
elseif (type=="HHWidth")
    var meas1Unit="HHWidth1";
elseif (type=="HLWidth")
    var meas1Unit="HLWidth1";
elseif (type=="HFReq")
    var meas1Unit="HFReq1";
elseif (type=="HHDuty")
    var meas1Unit="HHDuty1";
elseif (type=="HLDuty")
    var meas1Unit="HLDuty1";
elseif (type=="RECount")
    var meas1Unit="RECount1";
elseif (type=="FECount")
    var meas1Unit="FECount1";
elseif (type=="PPCount")
    var meas1Unit="PPCount1";
elseif (type=="NPCount")
    var meas1Unit="NPCount1";
elseif (type=="")
    var meas1Unit="None";
elseif (type=="None")
    var meas1Unit="None";

#value definitions (52 lines for testing, will edit column names later):
Code: [Select]
#value M1_VMIN V SI VMIN-V1
#value M1_VMIN A SI VMIN-A1
#value M1_VMAX V SI VMAX-V1
#value M1_VMAX A SI VMAX-A1
#value M1_VPP V SI VPP-V1
#value M1_VPP A SI VPP-A1
#value M1_VBASe V SI VBASe-V1
#value M1_VBASe A SI VBASe-A1
#value M1_VTOP V SI VTOP-V1
#value M1_VTOP A SI VTOP-A1
#value M1_VAMP V SI VAMP-V1
#value M1_VAMP A SI VAMP-A1
#value M1_VLOWer V SI VLOWer-V1
#value M1_VLOWer A SI VLOWer-A1
#value M1_VUPPer V SI VUPPer-V1
#value M1_VUPPer A SI VUPPer-A1
#value M1_VMID V SI VMID-V1
#value M1_VMID A SI VMID-A1
#value M1_VAVG V SI VAVG-V1
#value M1_VAVG A SI VAVG-A1
#value M1_VRMS V SI VRMS-V1
#value M1_VRMS A SI VRMS-A1
#value M1_VSDeviation V SI VSDeviation-V1
#value M1_VSDeviation A SI VSDeviation-A1
#value M1_VPPReshoot V SI VPPReshoot-V1
#value M1_VPPReshoot A SI VPPReshoot-A1
#value M1_VNPReshoot V SI VNPReshoot-V1
#value M1_VNPReshoot A SI VNPReshoot-A1
#value M1_VPOVershoot V SI VPOVershoot-V1
#value M1_VPOVershoot A SI VPOVershoot-A1
#value M1_VNOVershoot V SI VNOVershoot-V1
#value M1_VNOVershoot A SI VNOVershoot-A1
#value M1_VPARea Vs SI VPARea1
#value M1_VNARea Vs SI VNARea1
#value M1_VAARea Vs SI VAARea1
#value M1_VNAArea Vs SI VNAArea1
#value M1_VPPArea Vs SI VPPArea1
#value M1_VNPArea Vs SI VNPArea1
#value M1_VAPArea Vs SI VAPArea1
#value M1_VNAPArea Vs SI VNAPArea1
#value M1_HRTime s SI HRTime1
#value M1_HFTime s SI HFTime1
#value M1_HPERiod s SI HPERiod1
#value M1_HHWidth s SI HHWidth1
#value M1_HLWidth s SI HLWidth1
#value M1_HFReq Hz SI HFReq1
#value M1_HHDuty % D4 HHDuty1
#value M1_HLDuty % D4 HLDuty1
#value M1_RECount _ SI RECount1
#value M1_FECount _ SI FECount1
#value M1_PPCount _ SI PPCount1
#value M1_NPCount _ SI NPCount1

And this will be added to each measurement command:
Code: [Select]
#askValues [Mode:VMIN-V1,VMIN-A1,VMAX-V1,VMAX-A1,VPP-V1,VPP-A1,VBASe-V1,VBASe-A1,VTOP-V1,VTOP-A1,VAMP-V1,VAMP-A1,VLOWer-V1,VLOWer-A1,VUPPer-V1,VUPPer-A1,VMID-V1,VMID-A1,VAVG-V1,VAVG-A1,VRMS-V1,VRMS-A1,VSDeviation-V1,VSDeviation-A1,VPPReshoot-V1,VPPReshoot-A1,VNPReshoot-V1,VNPReshoot-A1,VPOVershoot-V1,VPOVershoot-A1,VNOVershoot-V1,VNOVershoot-A1,VPARea1,VNARea1,VAARea1,VNAArea1,VPPArea1,VNPArea1,VAPArea1,VNAPArea1,HRTime1,HFTime1,HPERiod1,HHWidth1,HLWidth1,HFReq1,HHDuty1,HLDuty1,RECount1,FECount1,PPCount1,NPCount,None]DynamicM1?

I tested it and it works, but now I have to add it to each of the other 7 channels.



When loading CSV files it will match on all columns, not only enabled columns, it will even match on disabled equipment (That is second scan).

So, if the variables are defined, why couldn't it still do that with variable column names? ;)

Thanks,
Josh
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4795
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4752 on: September 30, 2025, 04:42:33 pm »
Here's an example if why I would prefer the variable column names. With a variable column name, I could do each option as I posted previously with a simple variable read added to the 7 column names. Without variable column names, each of 8 measurement channels will require the following (and eventually more when additional options like dBm are added):

That was a long definition.

When loading CSV files it will match on all columns, not only enabled columns, it will even match on disabled equipment (That is second scan).

So, if the variables are defined, why couldn't it still do that with variable column names? ;)

Because the variable is not defined when TC loads a CSV file.
 
The following users thanked this post: KungFuJosh

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8222
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4753 on: September 30, 2025, 04:44:46 pm »
lol, I forgot this too:
Code: [Select]
#askValuesReadFormat [Mode:VMIN-V1,VMIN-A1,VMAX-V1,VMAX-A1,VPP-V1,VPP-A1,VBASe-V1,VBASe-A1,VTOP-V1,VTOP-A1,VAMP-V1,VAMP-A1,VLOWer-V1,VLOWer-A1,VUPPer-V1,VUPPer-A1,VMID-V1,VMID-A1,VAVG-V1,VAVG-A1,VRMS-V1,VRMS-A1,VSDeviation-V1,VSDeviation-A1,VPPReshoot-V1,VPPReshoot-A1,VNPReshoot-V1,VNPReshoot-A1,VPOVershoot-V1,VPOVershoot-A1,VNOVershoot-V1,VNOVershoot-A1,VPARea1,VNARea1,VAARea1,VNAArea1,VPPArea1,VNPArea1,VAPArea1,VNAPArea1,HRTime1,HFTime1,HPERiod1,HHWidth1,HLWidth1,HFReq1,HHDuty1,HLDuty1,RECount1,FECount1,PPCount1,NPCount1]F[Mode:VMIN-V2,VMIN-A2,VMAX-V2,VMAX-A2,VPP-V2,VPP-A2,VBASe-V2,VBASe-A2,VTOP-V2,VTOP-A2,VAMP-V2,VAMP-A2,VLOWer-V2,VLOWer-A2,VUPPer-V2,VUPPer-A2,VMID-V2,VMID-A2,VAVG-V2,VAVG-A2,VRMS-V2,VRMS-A2,VSDeviation-V2,VSDeviation-A2,VPPReshoot-V2,VPPReshoot-A2,VNPReshoot-V2,VNPReshoot-A2,VPOVershoot-V2,VPOVershoot-A2,VNOVershoot-V2,VNOVershoot-A2,VPARea2,VNARea2,VAARea2,VNAArea2,VPPArea2,VNPArea2,VAPArea2,VNAPArea2,HRTime2,HFTime2,HPERiod2,HHWidth2,HLWidth2,HFReq2,HHDuty2,HLDuty2,RECount2,FECount2,PPCount2,NPCount2]F[Mode:VMIN-V3,VMIN-A3,VMAX-V3,VMAX-A3,VPP-V3,VPP-A3,VBASe-V3,VBASe-A3,VTOP-V3,VTOP-A3,VAMP-V3,VAMP-A3,VLOWer-V3,VLOWer-A3,VUPPer-V3,VUPPer-A3,VMID-V3,VMID-A3,VAVG-V3,VAVG-A3,VRMS-V3,VRMS-A3,VSDeviation-V3,VSDeviation-A3,VPPReshoot-V3,VPPReshoot-A3,VNPReshoot-V3,VNPReshoot-A3,VPOVershoot-V3,VPOVershoot-A3,VNOVershoot-V3,VNOVershoot-A3,VPARea3,VNARea3,VAARea3,VNAArea3,VPPArea3,VNPArea3,VAPArea3,VNAPArea3,HRTime3,HFTime3,HPERiod3,HHWidth3,HLWidth3,HFReq3,HHDuty3,HLDuty3,RECount3,FECount3,PPCount3,NPCount3]F[Mode:VMIN-V4,VMIN-A4,VMAX-V4,VMAX-A4,VPP-V4,VPP-A4,VBASe-V4,VBASe-A4,VTOP-V4,VTOP-A4,VAMP-V4,VAMP-A4,VLOWer-V4,VLOWer-A4,VUPPer-V4,VUPPer-A4,VMID-V4,VMID-A4,VAVG-V4,VAVG-A4,VRMS-V4,VRMS-A4,VSDeviation-V4,VSDeviation-A4,VPPReshoot-V4,VPPReshoot-A4,VNPReshoot-V4,VNPReshoot-A4,VPOVershoot-V4,VPOVershoot-A4,VNOVershoot-V4,VNOVershoot-A4,VPARea4,VNARea4,VAARea4,VNAArea4,VPPArea4,VNPArea4,VAPArea4,VNAPArea4,HRTime4,HFTime4,HPERiod4,HHWidth4,HLWidth4,HFReq4,HHDuty4,HLDuty4,RECount4,FECount4,PPCount4,NPCount4]F[Mode:VMIN-V5,VMIN-A5,VMAX-V5,VMAX-A5,VPP-V5,VPP-A5,VBASe-V5,VBASe-A5,VTOP-V5,VTOP-A5,VAMP-V5,VAMP-A5,VLOWer-V5,VLOWer-A5,VUPPer-V5,VUPPer-A5,VMID-V5,VMID-A5,VAVG-V5,VAVG-A5,VRMS-V5,VVRMS-V5,VSDeviation-V5,VSDeviation-A5,VPPReshoot-V5,VPPReshoot-A5,VNPReshoot-V5,VNPReshoot-A5,VPOVershoot-V5,VPOVershoot-A5,VNOVershoot-V5,VNOVershoot-A5,VPARea5,VNARea5,VAARea5,VNAArea5,VPPArea5,VNPArea5,VAPArea5,VNAPArea5,HRTime5,HFTime5,HPERiod5,HHWidth5,HLWidth5,HFReq5,HHDuty5,HLDuty5,RECount5,FECount5,PPCount5,NPCount5]F[Mode:VMIN-V6,VMIN-A6,VMAX-V6,VMAX-A6,VPP-V6,VPP-A6,VBASe-V6,VBASe-A6,VTOP-V6,VTOP-A6,VAMP-V6,VAMP-A6,VLOWer-V6,VLOWer-A6,VUPPer-V6,VUPPer-A6,VMID-V6,VMID-A6,VAVG-V6,VAVG-A6,VRMS-V6,VRMS-A6,VSDeviation-V6,VSDeviation-A6,VPPReshoot-V6,VPPReshoot-A6,VNPReshoot-V6,VNPReshoot-A6,VPOVershoot-V6,VPOVershoot-A6,VNOVershoot-V6,VNOVershoot-A6,VPARea6,VNARea6,VAARea6,VNAArea6,VPPArea6,VNPArea6,VAPArea6,VNAPArea6,HRTime6,HFTime6,HPERiod6,HHWidth6,HLWidth6,HFReq6,HHDuty6,HLDuty6,RECount6,FECount6,PPCount6,NPCount6]F[Mode:VMIN-V7,VMIN-A7,VMAX-V7,VMAX-A7,VPP-V7,VPP-A7,VBASe-V7,VBASe-A7,VTOP-V7,VTOP-A7,VAMP-V7,VAMP-A7,VLOWer-V7,VLOWer-A7,VUPPer-V7,VUPPer-A7,VMID-V7,VMID-A7,VAVG-V7,VAVG-A7,VRMS-V7,VRMS-A7,VSDeviation-V7,VSDeviation-A7,VPPReshoot-V7,VPPReshoot-A7,VNPReshoot-V7,VNPReshoot-A7,VPOVershoot-V7,VPOVershoot-A7,VNOVershoot-V7,VNOVershoot-A7,VPARea7,VNARea7,VAARea7,VNAArea7,VPPArea7,VNPArea7,VAPArea7,VNAPArea7,HRTime7,HFTime7,HPERiod7,HHWidth7,HLWidth7,HFReq7,HHDuty7,HLDuty7,RECount7,FECount7,PPCount7,NPCount7]F[Mode:VMIN-V8,VMIN-A8,VMAX-V8,VMAX-A8,VPP-V8,VPP-A8,VBASe-V8,VBASe-A8,VTOP-V8,VTOP-A8,VAMP-V8,VAMP-A8,VLOWer-V8,VLOWer-A8,VUPPer-V8,VUPPer-A8,VMID-V8,VMID-A8,VAVG-V8,VAVG-A8,VRMS-V8,VRMS-A8,VSDeviation-V8,VSDeviation-A8,VPPReshoot-V8,VPPReshoot-A8,VNPReshoot-V8,VNPReshoot-A8,VPOVershoot-V8,VPOVershoot-A8,VNOVershoot-V8,VNOVershoot-A8,VPARea8,VNARea8,VAARea8,VNAArea8,VPPArea8,VNPArea8,VAPArea8,VNAPArea8,HRTime8,HFTime8,HPERiod8,HHWidth8,HLWidth8,HFReq8,HHDuty8,HLDuty8,RECount8,FECount8,PPCount8,NPCount8]F
Anyway, it's all tested and works now, but it added like 40K to the driver file.  :-DD

Now, to decide if I want to make the column names prettier.  |O

Thanks,
Josh
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8222
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4754 on: September 30, 2025, 04:46:49 pm »
Because the variable is not defined when TC loads a CSV file.

"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4795
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4755 on: September 30, 2025, 04:47:54 pm »
I've an UT-71B and used an USB-UART (with FTC232R chip) and made
connection as seen in the picture to make an Serial unit from an HID (UT-D040) Unit.
Ground is pin 8 and pin 3 is transmit on the CH9325 chip.
I didn't connect to pin 8, normal ground
is the same. In my case I left the original cable
as it was, so it works both, COM and HID.

Nice, it looks like there is some electronic to handle the communication leds, I wonder how much is necessary.

Anyway I have ordered a UT61E+ on Aliexpress and will see if I can get the library to work with it.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4795
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4756 on: September 30, 2025, 04:51:54 pm »
Because the variable is not defined when TC loads a CSV file.



 ;D

It will never be, loading a CSV file can be independent of loaded definitions. It has to work that way.
TC has a fallback solution: No unit and two decimal places, but I prefer to avoid that when possible.
 

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8222
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4757 on: September 30, 2025, 05:03:49 pm »
loading a CSV file can be independent of loaded definitions. It has to work that way.

Of course! But a CSV file could have that information defined within it. For example, if the variable column name is defined as a static column name in the CSV file, then there's no issue, is there?

I've already done the work, so it doesn't matter right now, but it seems like it would be a more efficient way to handle this sort of thing in the future. If definitions could have a single #value line for each channel/unit with a variable selector and variable column name, that could simplify the coding and increase efficiency.

My driver file is now over 5400 lines and 147KB, and having nearly 1/3 of that 147KB specific to switching column names is crazy.

Thanks,
Josh
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4795
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4758 on: September 30, 2025, 05:15:18 pm »
loading a CSV file can be independent of loaded definitions. It has to work that way.

Of course! But a CSV file could have that information defined within it. For example, if the variable column name is defined as a static column name in the CSV file, then there's no issue, is there?

I've already done the work, so it doesn't matter right now, but it seems like it would be a more efficient way to handle this sort of thing in the future. If definitions could have a single #value line for each channel/unit with a variable selector and variable column name, that could simplify the coding and increase efficiency.

Not a simple CSV file, it must support comments for that and I have no idea how many applications can handle that.
And what about TAB file, TC support them equally with CSV files.

My driver file is now over 5400 lines and 147KB, and having nearly 1/3 of that 147KB specific to switching column names is crazy.

You could sort of optimize this type of statments;
elseif (type=="VPARea")
    var meas1Unit="VPARea1";

with listIndex() and getElement(), but because you have more in a lot of the if statements and already made it, it is probably not wort it.
 
The following users thanked this post: KungFuJosh

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4795
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4759 on: September 30, 2025, 05:55:37 pm »
Here's an example if why I would prefer the variable column names. With a variable column name, I could do each option as I posted previously with a simple variable read added to the 7 column names. Without variable column names, each of 8 measurement channels will require the following (and eventually more when additional options like dBm are added):

Set variables changes (140 lines):
Code: [Select]
if (type=="VMIN")
    if (unit1result=="V")
    var meas1Unit="VMIN-V1";
    elseif (unit1result=="A")
    var meas1Unit="VMIN-A1";
endif
elseif (type=="VMAX")
    if (unit1result=="V")
    var meas1Unit="VMAX-V1";
    elseif (unit1result=="A")
    var meas1Unit="VMAX-A1";
endif

I noticed you have a var declaration in each if:
var meas1Unit="VMAX-A1";

Why not declare it before the if and then just assign in the if:
var meas1Unit;
if (type=="VMIN")
    if (unit1result=="V") meas1Unit="VMIN-V1";
    elseif (unit1result=="A") meas1Unit="VMIN-A1";
    endif

It gives slightly faster execution.
 
The following users thanked this post: KungFuJosh

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8222
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4760 on: September 30, 2025, 06:57:05 pm »
Maybe, I was a little lazy automating the replacement, but it was all more efficient like this when I had it combined:
Code: [Select]
if (type=="VMIN" || type=="VMAX" || type=="VPP" || type=="VBASe" || type=="VTOP" ||
    type=="VAMP" || type=="VLOWer" || type=="VUPPer" || type=="VMID" || type=="VAVG" ||
    type=="VRMS" || type=="VSDeviation" || type=="VPPReshoot" || type=="VNPReshoot" ||
    type=="VPOVershoot" || type=="VNOVershoot")
    if (unit1result=="V")
    var meas1Unit="V1";
    elseif (unit1result=="A")
    var meas1Unit="A1";
endif
elseif (type=="VPARea" || type=="VNARea" || type=="VAARea" || type=="VNAArea" ||
           type=="VPPArea" || type=="VNPArea" || type=="VAPArea" || type=="VNAPArea")
    var meas1Unit="Vs1";
elseif (type=="HRTime" || type=="HFTime" || type=="HPERiod" || type=="HHWidth" ||
           type=="HLWidth")
    var meas1Unit="s1";
elseif (type=="HFReq")
    var meas1Unit="Hz1";
elseif (type=="HHDuty" || type=="HLDuty")
    var meas1Unit="Percent1";
elseif (type=="RECount" || type=="FECount" || type=="PPCount" || type=="NPCount" || type=="")
    var meas1Unit="noU1";
elseif (type=="None")
    var meas1Unit="None";

I don't know how much more efficient that would be anyway, whether it's two elseifs or a sub if statement.  :-//
« Last Edit: September 30, 2025, 07:03:18 pm by KungFuJosh »
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4795
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4761 on: September 30, 2025, 08:00:03 pm »
Maybe, I was a little lazy automating the replacement, but it was all more efficient like this when I had it combined:
Code: [Select]
if (type=="VMIN" || type=="VMAX" || type=="VPP" || type=="VBASe" || type=="VTOP" ||
    type=="VAMP" || type=="VLOWer" || type=="VUPPer" || type=="VMID" || type=="VAVG" ||
    type=="VRMS" || type=="VSDeviation" || type=="VPPReshoot" || type=="VNPReshoot" ||
    type=="VPOVershoot" || type=="VNOVershoot")
    if (unit1result=="V")
    var meas1Unit="V1";
    elseif (unit1result=="A")
    var meas1Unit="A1";
endif
elseif (type=="VPARea" || type=="VNARea" || type=="VAARea" || type=="VNAArea" ||
           type=="VPPArea" || type=="VNPArea" || type=="VAPArea" || type=="VNAPArea")
    var meas1Unit="Vs1";
elseif (type=="HRTime" || type=="HFTime" || type=="HPERiod" || type=="HHWidth" ||
           type=="HLWidth")
    var meas1Unit="s1";
elseif (type=="HFReq")
    var meas1Unit="Hz1";
elseif (type=="HHDuty" || type=="HLDuty")
    var meas1Unit="Percent1";
elseif (type=="RECount" || type=="FECount" || type=="PPCount" || type=="NPCount" || type=="")
    var meas1Unit="noU1";
elseif (type=="None")
    var meas1Unit="None";

I don't know how much more efficient that would be anyway, whether it's two elseifs or a sub if statement.  :-//

Fewer elements will make it execute faster.
The script language uses a tokennizer and then feed the tokens directly into a execution engine, i.e. each element takes some time to parse and then to execute. I can store the tokens and later feed them into the execution engine, it will about double the speed, but each element must still be processed and makes error messages crap.
« Last Edit: September 30, 2025, 08:01:43 pm by HKJ »
 
The following users thanked this post: KungFuJosh

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8222
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4762 on: September 30, 2025, 09:24:44 pm »
Fewer elements will make it execute faster.
The script language uses a tokennizer and then feed the tokens directly into a execution engine, i.e. each element takes some time to parse and then to execute. I can store the tokens and later feed them into the execution engine, it will about double the speed, but each element must still be processed.

We're talking about the difference between:
Option 1:
Code: [Select]
if (type=="VMIN")
    if (unit1result=="V") var meas1Unit="VMIN-V1";
    elseif (unit1result=="A") var meas1Unit="VMIN-A1";
    endif

and

Option 2:
Code: [Select]
var meas1Unit;
if (type=="VMIN")
    if (unit1result=="V") meas1Unit="VMIN-V1";
    elseif (unit1result=="A") meas1Unit="VMIN-A1";
    endif

That's the part I don't understand regarding the difference in execution time. The net difference is one less var and one extra meas1Unit. I'll take your word for it that one way is faster than the other for a single choice like that. ;)

Thanks,
Josh
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4795
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4763 on: September 30, 2025, 09:41:27 pm »
That's the part I don't understand regarding the difference in execution time. The net difference is one less var and one extra meas1Unit. I'll take your word for it that one way is faster than the other for a single choice like that. ;)

It is not way faster, but I expect it is faster.
The tokennizer will turn something like:
 var meas1Unit="VMIN-V1";
into:
  symbol symbol assign string
Most with parameters and note that it has to do that for all the if statements all the way down each time.
By getting rid of the var there is one element less.
The execution unit has to process all tokens, it can deal with the ignored part of the if statement fairly fast, but it has to do some  minimal processing on each.
 
The following users thanked this post: KungFuJosh

Offline w.v.s.

  • Frequent Contributor
  • **
  • Posts: 410
  • Country: de
Re: Program that can log/control many multimeters and other devices.
« Reply #4764 on: September 30, 2025, 10:03:10 pm »
Hello, I've asked the question already in an other thread, but I found this one could also fit well to it.

When I fetch binary data (SREAL) from my Keithley 2001, It is sent without the header (#0), which is described in the manual (and which is sent by my other Keithley devices).

I've found someone, who reports on two meters with the same behavior:
https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Keithley-2001-ieee754-format-readings-are-missing-quot-0-quot/td-p/302680

I first thought my firmware might be so old and the header might have been added at a later time, but even if i look into the oldest 2001 manuals, which I could find in the web (Revision B from 1992), the '#0' header is mentioned. Do you receive the '#0' header with your 2001s and which firmware are you running? Here are the SCPI-commands required to get the infos:
Code: [Select]
*IDN?
FORMAT SRE
FETCH?
Fist two letters in the fetch-answer should be the header. The answer to the *IDN? contains the firmware version.

Is this behavior known and if yes, for every version of the 2001? If they differ, how do you handle the variants?
« Last Edit: September 30, 2025, 10:05:57 pm by w.v.s. »
 

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8222
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4765 on: September 30, 2025, 10:30:48 pm »
Hello, I've asked the question already in an other thread, but I found this one could also fit well to it.
...
Is this behavior known and if yes, for every version of the 2001? If they differ, how do you handle the variants?

You're only sort of in the wrong thread to ask that. AFAIK there's currently only a driver for the K2000, not the K2001. You could probably adapt the driver from the K2000 to the K2001, but that would require a little work on your part (but not a lot considering the driver file size).

I don't know the direct answer to your question, but I do know TestController can filter the *IDN? and other responses to make them functionally useful in TestController for logging and remote control. Outside of TestController, it's probably not really relevant.

Thanks,
Josh
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Offline w.v.s.

  • Frequent Contributor
  • **
  • Posts: 410
  • Country: de
Re: Program that can log/control many multimeters and other devices.
« Reply #4766 on: September 30, 2025, 10:43:10 pm »
Thank you for the answer! I thought all Keithley 20xx were supported, since they are quite common and for basic functionality you can do a lot of re-use.
 

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8222
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4767 on: September 30, 2025, 11:31:13 pm »
Thank you for the answer! I thought all Keithley 20xx were supported, since they are quite common and for basic functionality you can do a lot of re-use.

In theory, maybe. But every single device has a *IDN? response. Every *IDN? response needs to be defined for TC to recognize a device with its specific *IDN. Sometimes, that *IDN? response needs to be edited to be useful (you can see examples of this if you download TC and peruse the device definition driver files).

Typically, it's something like:
Manufacturer,Model,Serial,Firmware

All TC needs is:
Manufacturer,Model,

This is an example from the driver I'm currently working in:
#idString Batronix,Magnova,
#name Batronix Magnova
#handle Magnova

You can edit the K2000 file with the correct info from your K2001, and save it as a new file to test it out. It gets a little trickier if there are multiple versions of a device, then you need to learn about #meta and #metadef and replacetext and stuff to coordinate that. So, make your own file just for the K2001 and keep it simple to start with. ;)

Thanks,
Josh

ETA/PS. If you have two devices with the same *IDN? response, but one has a weird prefix, you can edit out the prefix so they'd be functionally the same.
« Last Edit: September 30, 2025, 11:33:03 pm by KungFuJosh »
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8222
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4768 on: October 01, 2025, 03:49:04 am »
I changed it to this, and it works:
Code: [Select]
var meas1Unit;
if (type=="VMIN")
if (unit1result=="V") meas1Unit="VMIN-V1";
elseif (unit1result=="A") meas1Unit="VMIN-A1";
endif
elseif (type=="VMAX")
if (unit1result=="V") meas1Unit="VMAX-V1";
elseif (unit1result=="A") meas1Unit="VMAX-A1";
endif
elseif (type=="VPP")
if (unit1result=="V") meas1Unit="VPP-V1";
elseif (unit1result=="A") meas1Unit="VPP-A1";
endif
elseif (type=="VBASe")
if (unit1result=="V") meas1Unit="VBASe-V1";
elseif (unit1result=="A") meas1Unit="VBASe-A1";
endif
elseif (type=="VTOP")
if (unit1result=="V") meas1Unit="VTOP-V1";
elseif (unit1result=="A") meas1Unit="VTOP-A1";
endif
elseif (type=="VAMP")
if (unit1result=="V") meas1Unit="VAMP-V1";
elseif (unit1result=="A") meas1Unit="VAMP-A1";
endif
elseif (type=="VLOWer")
if (unit1result=="V") meas1Unit="VLOWer-V1";
elseif (unit1result=="A") meas1Unit="VLOWer-A1";
endif
elseif (type=="VUPPer")
if (unit1result=="V") meas1Unit="VUPPer-V1";
elseif (unit1result=="A") meas1Unit="VUPPer-A1";
endif
elseif (type=="VMID")
if (unit1result=="V") meas1Unit="VMID-V1";
elseif (unit1result=="A") meas1Unit="VMID-A1";
endif
elseif (type=="VAVG")
if (unit1result=="V") meas1Unit="VAVG-V1";
elseif (unit1result=="A") meas1Unit="VAVG-A1";
endif
elseif (type=="VRMS")
if (unit1result=="V") meas1Unit="VRMS-V1";
elseif (unit1result=="A") meas1Unit="VRMS-A1";
endif
elseif (type=="VSDeviation")
if (unit1result=="V") meas1Unit="VSDeviation-V1";
elseif (unit1result=="A") meas1Unit="VSDeviation-A1";
endif
elseif (type=="VPPReshoot")
if (unit1result=="V") meas1Unit="VPPReshoot-V1";
elseif (unit1result=="A") meas1Unit="VPPReshoot-A1";
endif
elseif (type=="VNPReshoot")
if (unit1result=="V") meas1Unit="VNPReshoot-V1";
elseif (unit1result=="A") meas1Unit="VNPReshoot-A1";
endif
elseif (type=="VPOVershoot")
if (unit1result=="V") meas1Unit="VPOVershoot-V1";
elseif (unit1result=="A") meas1Unit="VPOVershoot-A1";
endif
elseif (type=="VNOVershoot")
if (unit1result=="V") meas1Unit="VNOVershoot-V1";
elseif (unit1result=="A") meas1Unit="VNOVershoot-A1";
endif
elseif (type=="VPARea") meas1Unit="VPARea1";
elseif (type=="VNARea") meas1Unit="VNARea1";
elseif (type=="VAARea") meas1Unit="VAARea1";
elseif (type=="VNAArea") meas1Unit="VNAArea1";
elseif (type=="VPPArea") meas1Unit="VPPArea1";
elseif (type=="VNPArea") meas1Unit="VNPArea1";
elseif (type=="VAPArea") meas1Unit="VAPArea1";
elseif (type=="VNAPArea") meas1Unit="VNAPArea1";
elseif (type=="HRTime") meas1Unit="HRTime1";
elseif (type=="HFTime") meas1Unit="HFTime1";
elseif (type=="HPERiod") meas1Unit="HPERiod1";
elseif (type=="HHWidth") meas1Unit="HHWidth1";
elseif (type=="HLWidth") meas1Unit="HLWidth1";
elseif (type=="HFReq") meas1Unit="HFReq1";
elseif (type=="HHDuty") meas1Unit="HHDuty1";
elseif (type=="HLDuty") meas1Unit="HLDuty1";
elseif (type=="RECount") meas1Unit="RECount1";
elseif (type=="FECount") meas1Unit="FECount1";
elseif (type=="PPCount") meas1Unit="PPCount1";
elseif (type=="NPCount") meas1Unit="NPCount1";
elseif (type=="") meas1Unit="None";
elseif (type=="None") meas1Unit="None";
endif

Thanks,
Josh
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4795
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4769 on: October 01, 2025, 09:46:44 am »
I changed it to this, and it works:

If you want to know how fast it executes, place this line at the start:
var startTime=seconds();

And this line at the end:
printLog("Time used "+(1000*(seconds()-startTime))+" ms");


On my computer first run is about 4.3ms and subsequent runs are about 1.2ms (I matched at a entry near the bottom, to get as many comparisons as possible).



Note: The function seconds() uses the Java function nanoTime, that has the best resolution possible on the actual computer.
« Last Edit: October 01, 2025, 09:53:32 am by HKJ »
 
The following users thanked this post: KungFuJosh

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8222
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4770 on: October 01, 2025, 02:20:53 pm »
Between those changes for 8 channels and a couple other changes I made, the file went from 149K to 144K. I was thinking too small when I thought it wouldn't be that much of a difference. ;)

Thanks,
Josh
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Offline w.v.s.

  • Frequent Contributor
  • **
  • Posts: 410
  • Country: de
Re: Program that can log/control many multimeters and other devices.
« Reply #4771 on: October 01, 2025, 02:22:34 pm »
did it really shrink?
 

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8222
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4772 on: October 01, 2025, 02:38:55 pm »
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4795
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4773 on: October 01, 2025, 02:49:26 pm »
Between those changes for 8 channels and a couple other changes I made, the file went from 149K to 144K. I was thinking too small when I thought it wouldn't be that much of a difference. ;)

You could shrink it more and also make it faster, by defining the code as a function (That would  tokennize the code, thus make it faster) and use the same function for all channels (Use parameters to send the parameters to it and assign the return value from the function to the correct channel).

That would add a bit of string manipulation, but nothing fancy: measUnit="VSDeviation-V"+channelNo;

I have never tried to use functions in TC, but I expect it will work (The script/programming is general code I also use for other projects).
« Last Edit: October 01, 2025, 03:15:58 pm by HKJ »
 
The following users thanked this post: KungFuJosh

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8222
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4774 on: October 01, 2025, 03:52:17 pm »
It's not a bad idea, but probably not worth the time it would take to update it. It's already very fast, and there's a little more to each of the commands. Maybe if I want to procrastinate something else I'll spend the time. ;)

This is the type/acquisition command set for M1:
Code: [Select]
; ******** MEASUREMENT ACQUISITION ********
#scpiCmd DynamicM1? #pgm#
var fullCommand=":MEAS:"+meas1Type+":CURR? ";
var result=deviceRead(handle, fullCommand+meas1Chan);
print(result);

; ******** MEASUREMENT TYPE 1 ********
#scpiCmd MeasType1 #pgm#
var type=value;
var meas1Type=value;
var fullunit1Command=meas1Chan+":UNIT?";
var unit1result=deviceRead(handle, fullunit1Command);
var meas1Unit;
if (type=="VMIN")
if (unit1result=="V") meas1Unit="VMIN-V1";
elseif (unit1result=="A") meas1Unit="VMIN-A1";
endif
elseif (type=="VMAX")
if (unit1result=="V") meas1Unit="VMAX-V1";
elseif (unit1result=="A") meas1Unit="VMAX-A1";
endif
elseif (type=="VPP")
if (unit1result=="V") meas1Unit="VPP-V1";
elseif (unit1result=="A") meas1Unit="VPP-A1";
endif
elseif (type=="VBASe")
if (unit1result=="V") meas1Unit="VBASe-V1";
elseif (unit1result=="A") meas1Unit="VBASe-A1";
endif
elseif (type=="VTOP")
if (unit1result=="V") meas1Unit="VTOP-V1";
elseif (unit1result=="A") meas1Unit="VTOP-A1";
endif
elseif (type=="VAMP")
if (unit1result=="V") meas1Unit="VAMP-V1";
elseif (unit1result=="A") meas1Unit="VAMP-A1";
endif
elseif (type=="VLOWer")
if (unit1result=="V") meas1Unit="VLOWer-V1";
elseif (unit1result=="A") meas1Unit="VLOWer-A1";
endif
elseif (type=="VUPPer")
if (unit1result=="V") meas1Unit="VUPPer-V1";
elseif (unit1result=="A") meas1Unit="VUPPer-A1";
endif
elseif (type=="VMID")
if (unit1result=="V") meas1Unit="VMID-V1";
elseif (unit1result=="A") meas1Unit="VMID-A1";
endif
elseif (type=="VAVG")
if (unit1result=="V") meas1Unit="VAVG-V1";
elseif (unit1result=="A") meas1Unit="VAVG-A1";
endif
elseif (type=="VRMS")
if (unit1result=="V") meas1Unit="VRMS-V1";
elseif (unit1result=="A") meas1Unit="VRMS-A1";
endif
elseif (type=="VSDeviation")
if (unit1result=="V") meas1Unit="VSDeviation-V1";
elseif (unit1result=="A") meas1Unit="VSDeviation-A1";
endif
elseif (type=="VPPReshoot")
if (unit1result=="V") meas1Unit="VPPReshoot-V1";
elseif (unit1result=="A") meas1Unit="VPPReshoot-A1";
endif
elseif (type=="VNPReshoot")
if (unit1result=="V") meas1Unit="VNPReshoot-V1";
elseif (unit1result=="A") meas1Unit="VNPReshoot-A1";
endif
elseif (type=="VPOVershoot")
if (unit1result=="V") meas1Unit="VPOVershoot-V1";
elseif (unit1result=="A") meas1Unit="VPOVershoot-A1";
endif
elseif (type=="VNOVershoot")
if (unit1result=="V") meas1Unit="VNOVershoot-V1";
elseif (unit1result=="A") meas1Unit="VNOVershoot-A1";
endif
elseif (type=="VPARea") meas1Unit="VPARea1";
elseif (type=="VNARea") meas1Unit="VNARea1";
elseif (type=="VAARea") meas1Unit="VAARea1";
elseif (type=="VNAArea") meas1Unit="VNAArea1";
elseif (type=="VPPArea") meas1Unit="VPPArea1";
elseif (type=="VNPArea") meas1Unit="VNPArea1";
elseif (type=="VAPArea") meas1Unit="VAPArea1";
elseif (type=="VNAPArea") meas1Unit="VNAPArea1";
elseif (type=="HRTime") meas1Unit="HRTime1";
elseif (type=="HFTime") meas1Unit="HFTime1";
elseif (type=="HPERiod") meas1Unit="HPERiod1";
elseif (type=="HHWidth") meas1Unit="HHWidth1";
elseif (type=="HLWidth") meas1Unit="HLWidth1";
elseif (type=="HFReq") meas1Unit="HFReq1";
elseif (type=="HHDuty") meas1Unit="HHDuty1";
elseif (type=="HLDuty") meas1Unit="HLDuty1";
elseif (type=="RECount") meas1Unit="RECount1";
elseif (type=="FECount") meas1Unit="FECount1";
elseif (type=="PPCount") meas1Unit="PPCount1";
elseif (type=="NPCount") meas1Unit="NPCount1";
elseif (type=="") meas1Unit="None";
elseif (type=="None") meas1Unit="None";
endif
var allModes=meas1Unit+","+meas2Unit+","+meas3Unit+","+meas4Unit+","+meas5Unit+","+meas6Unit+","+meas7Unit+","+meas8Unit
#scpiCmd getMeasType1? none?
:readmath: meas1Type
#scpiCmd getMeasUnit1? none?
:readmath: meas1Unit

#value:
Code: [Select]
; ******** #VALUE ********
; Format: #value ColumnName Unit Format {Selector}
#value M1_Minimum V SI VMIN-V1
#value M1_Minimum A SI VMIN-A1
#value M1_Maximum V SI VMAX-V1
#value M1_Maximum A SI VMAX-A1
#value M1_Peak_to_Peak V SI VPP-V1
#value M1_Peak_to_Peak A SI VPP-A1
#value M1_Base V SI VBASe-V1
#value M1_Base A SI VBASe-A1
#value M1_Top V SI VTOP-V1
#value M1_Top A SI VTOP-A1
#value M1_Amplitude V SI VAMP-V1
#value M1_Amplitude A SI VAMP-A1
#value M1_Lower V SI VLOWer-V1
#value M1_Lower A SI VLOWer-A1
#value M1_Upper V SI VUPPer-V1
#value M1_Upper A SI VUPPer-A1
#value M1_Middle V SI VMID-V1
#value M1_Middle A SI VMID-A1
#value M1_Average V SI VAVG-V1
#value M1_Average A SI VAVG-A1
#value M1_RMS V SI VRMS-V1
#value M1_RMS A SI VRMS-A1
#value M1_Std_Deviation V SI VSDeviation-V1
#value M1_Std_Deviation A SI VSDeviation-A1
#value M1_Pos_Preshoot V SI VPPReshoot-V1
#value M1_Pos_Preshoot A SI VPPReshoot-A1
#value M1_Neg_Preshoot V SI VNPReshoot-V1
#value M1_Neg_Preshoot A SI VNPReshoot-A1
#value M1_Pos_Overshoot V SI VPOVershoot-V1
#value M1_Pos_Overshoot A SI VPOVershoot-A1
#value M1_Neg_Overshoot V SI VNOVershoot-V1
#value M1_Neg_Overshoot A SI VNOVershoot-A1
#value M1_Pos_Area Vs SI VPARea1
#value M1_Neg_Area Vs SI VNARea1
#value M1_|Area| Vs SI VAARea1
#value M1_Area Vs SI VNAArea1
#value M1_Pos_Period_Area Vs SI VPPArea1
#value M1_Neg_Period_Area Vs SI VNPArea1
#value M1_|Period_Area| Vs SI VAPArea1
#value M1_Period_Area Vs SI VNAPArea1
#value M1_Rise_Time s SI HRTime1
#value M1_Fall_Time s SI HFTime1
#value M1_Period s SI HPERiod1
#value M1_High_Width s SI HHWidth1
#value M1_Low_Width s SI HLWidth1
#value M1_Frequency Hz SI HFReq1
#value M1_High_Duty % D4 HHDuty1
#value M1_Low_Duty % D4 HLDuty1
#value M1_Rising_Edge_Count _ SI RECount1
#value M1_Falling_Edge_Count _ SI FECount1
#value M1_Pos_Pulse_Count _ SI PPCount1
#value M1_Neg_Pulse_Count _ SI NPCount1

#askValuesReadFormat [Mode:VMIN-V1,VMIN-A1,VMAX-V1,VMAX-A1,VPP-V1,VPP-A1,VBASe-V1,VBASe-A1,VTOP-V1,VTOP-A1,VAMP-V1,VAMP-A1,VLOWer-V1,VLOWer-A1,VUPPer-V1,VUPPer-A1,VMID-V1,VMID-A1,VAVG-V1,VAVG-A1,VRMS-V1,VRMS-A1,VSDeviation-V1,VSDeviation-A1,VPPReshoot-V1,VPPReshoot-A1,VNPReshoot-V1,VNPReshoot-A1,VPOVershoot-V1,VPOVershoot-A1,VNOVershoot-V1,VNOVershoot-A1,VPARea1,VNARea1,VAARea1,VNAArea1,VPPArea1,VNPArea1,VAPArea1,VNAPArea1,HRTime1,HFTime1,HPERiod1,HHWidth1,HLWidth1,HFReq1,HHDuty1,HLDuty1,RECount1,FECount1,PPCount1,NPCount1]F[Mode:VMIN-V2,VMIN-A2,VMAX-V2,VMAX-A2,VPP-V2,VPP-A2,VBASe-V2,VBASe-A2,VTOP-V2,VTOP-A2,VAMP-V2,VAMP-A2,VLOWer-V2,VLOWer-A2,VUPPer-V2,VUPPer-A2,VMID-V2,VMID-A2,VAVG-V2,VAVG-A2,VRMS-V2,VRMS-A2,VSDeviation-V2,VSDeviation-A2,VPPReshoot-V2,VPPReshoot-A2,VNPReshoot-V2,VNPReshoot-A2,VPOVershoot-V2,VPOVershoot-A2,VNOVershoot-V2,VNOVershoot-A2,VPARea2,VNARea2,VAARea2,VNAArea2,VPPArea2,VNPArea2,VAPArea2,VNAPArea2,HRTime2,HFTime2,HPERiod2,HHWidth2,HLWidth2,HFReq2,HHDuty2,HLDuty2,RECount2,FECount2,PPCount2,NPCount2]F[Mode:VMIN-V3,VMIN-A3,VMAX-V3,VMAX-A3,VPP-V3,VPP-A3,VBASe-V3,VBASe-A3,VTOP-V3,VTOP-A3,VAMP-V3,VAMP-A3,VLOWer-V3,VLOWer-A3,VUPPer-V3,VUPPer-A3,VMID-V3,VMID-A3,VAVG-V3,VAVG-A3,VRMS-V3,VRMS-A3,VSDeviation-V3,VSDeviation-A3,VPPReshoot-V3,VPPReshoot-A3,VNPReshoot-V3,VNPReshoot-A3,VPOVershoot-V3,VPOVershoot-A3,VNOVershoot-V3,VNOVershoot-A3,VPARea3,VNARea3,VAARea3,VNAArea3,VPPArea3,VNPArea3,VAPArea3,VNAPArea3,HRTime3,HFTime3,HPERiod3,HHWidth3,HLWidth3,HFReq3,HHDuty3,HLDuty3,RECount3,FECount3,PPCount3,NPCount3]F[Mode:VMIN-V4,VMIN-A4,VMAX-V4,VMAX-A4,VPP-V4,VPP-A4,VBASe-V4,VBASe-A4,VTOP-V4,VTOP-A4,VAMP-V4,VAMP-A4,VLOWer-V4,VLOWer-A4,VUPPer-V4,VUPPer-A4,VMID-V4,VMID-A4,VAVG-V4,VAVG-A4,VRMS-V4,VRMS-A4,VSDeviation-V4,VSDeviation-A4,VPPReshoot-V4,VPPReshoot-A4,VNPReshoot-V4,VNPReshoot-A4,VPOVershoot-V4,VPOVershoot-A4,VNOVershoot-V4,VNOVershoot-A4,VPARea4,VNARea4,VAARea4,VNAArea4,VPPArea4,VNPArea4,VAPArea4,VNAPArea4,HRTime4,HFTime4,HPERiod4,HHWidth4,HLWidth4,HFReq4,HHDuty4,HLDuty4,RECount4,FECount4,PPCount4,NPCount4]F[Mode:VMIN-V5,VMIN-A5,VMAX-V5,VMAX-A5,VPP-V5,VPP-A5,VBASe-V5,VBASe-A5,VTOP-V5,VTOP-A5,VAMP-V5,VAMP-A5,VLOWer-V5,VLOWer-A5,VUPPer-V5,VUPPer-A5,VMID-V5,VMID-A5,VAVG-V5,VAVG-A5,VRMS-V5,VVRMS-V5,VSDeviation-V5,VSDeviation-A5,VPPReshoot-V5,VPPReshoot-A5,VNPReshoot-V5,VNPReshoot-A5,VPOVershoot-V5,VPOVershoot-A5,VNOVershoot-V5,VNOVershoot-A5,VPARea5,VNARea5,VAARea5,VNAArea5,VPPArea5,VNPArea5,VAPArea5,VNAPArea5,HRTime5,HFTime5,HPERiod5,HHWidth5,HLWidth5,HFReq5,HHDuty5,HLDuty5,RECount5,FECount5,PPCount5,NPCount5]F[Mode:VMIN-V6,VMIN-A6,VMAX-V6,VMAX-A6,VPP-V6,VPP-A6,VBASe-V6,VBASe-A6,VTOP-V6,VTOP-A6,VAMP-V6,VAMP-A6,VLOWer-V6,VLOWer-A6,VUPPer-V6,VUPPer-A6,VMID-V6,VMID-A6,VAVG-V6,VAVG-A6,VRMS-V6,VRMS-A6,VSDeviation-V6,VSDeviation-A6,VPPReshoot-V6,VPPReshoot-A6,VNPReshoot-V6,VNPReshoot-A6,VPOVershoot-V6,VPOVershoot-A6,VNOVershoot-V6,VNOVershoot-A6,VPARea6,VNARea6,VAARea6,VNAArea6,VPPArea6,VNPArea6,VAPArea6,VNAPArea6,HRTime6,HFTime6,HPERiod6,HHWidth6,HLWidth6,HFReq6,HHDuty6,HLDuty6,RECount6,FECount6,PPCount6,NPCount6]F[Mode:VMIN-V7,VMIN-A7,VMAX-V7,VMAX-A7,VPP-V7,VPP-A7,VBASe-V7,VBASe-A7,VTOP-V7,VTOP-A7,VAMP-V7,VAMP-A7,VLOWer-V7,VLOWer-A7,VUPPer-V7,VUPPer-A7,VMID-V7,VMID-A7,VAVG-V7,VAVG-A7,VRMS-V7,VRMS-A7,VSDeviation-V7,VSDeviation-A7,VPPReshoot-V7,VPPReshoot-A7,VNPReshoot-V7,VNPReshoot-A7,VPOVershoot-V7,VPOVershoot-A7,VNOVershoot-V7,VNOVershoot-A7,VPARea7,VNARea7,VAARea7,VNAArea7,VPPArea7,VNPArea7,VAPArea7,VNAPArea7,HRTime7,HFTime7,HPERiod7,HHWidth7,HLWidth7,HFReq7,HHDuty7,HLDuty7,RECount7,FECount7,PPCount7,NPCount7]F[Mode:VMIN-V8,VMIN-A8,VMAX-V8,VMAX-A8,VPP-V8,VPP-A8,VBASe-V8,VBASe-A8,VTOP-V8,VTOP-A8,VAMP-V8,VAMP-A8,VLOWer-V8,VLOWer-A8,VUPPer-V8,VUPPer-A8,VMID-V8,VMID-A8,VAVG-V8,VAVG-A8,VRMS-V8,VRMS-A8,VSDeviation-V8,VSDeviation-A8,VPPReshoot-V8,VPPReshoot-A8,VNPReshoot-V8,VNPReshoot-A8,VPOVershoot-V8,VPOVershoot-A8,VNOVershoot-V8,VNOVershoot-A8,VPARea8,VNARea8,VAARea8,VNAArea8,VPPArea8,VNPArea8,VAPArea8,VNAPArea8,HRTime8,HFTime8,HPERiod8,HHWidth8,HLWidth8,HFReq8,HHDuty8,HLDuty8,RECount8,FECount8,PPCount8,NPCount8]F
#modeFromVar allModes

This is currently the code for selecting Channel/Type:
Code: [Select]
; ******** Dynamic Measurement 1 ********
#scpiCmd MeasChan1 none
:setvar: meas1Chan=inputValue
#scpiCmd getMeasChan1? none?
:readmath: meas1Chan
#cmdSetup combobox M1_Channel Measure
:read: getMeasChan1?
:write: MeasChan1 (value)
:update: M1_Channel,Measurement
:string:
CH1 CHAN1
CH2 CHAN2
CH3 CHAN3
CH4 CHAN4
DO DIG0
D1 DIG1
D2 DIG2
D3 DIG3
D4 DIG4
D5 DIG5
D6 DIG6
D7 DIG7
D8 DIG8
D9 DIG9
D10 DIG10
D11 DIG11
D12 DIG12
D13 DIG13
D14 DIG14
D15 DIG15
:tip: Select measurement source.
#cmdSetup comboboxHot M1_Type Measure
:read: getMeasType1?
:write: MeasType1
:update: M1_Type,Measurement
:string:
None None
V_Min VMIN
V_Max VMAX
V_PP VPP
V_Base VBASe
V_Top VTOP
V_AMP VAMP
V_Lower VLOWer
V_Upper VUPPer
V_MID VMID
V_AVG VAVG
V_RMS VRMS
V_SD VSDeviation
Pos_Preshoot VPPReshoot
Neg_Preshoot VNPReshoot
Pos_Overshoot VPOVershoot
Neg_Overshoot VNOVershoot
Pos_Area VPARea
Neg_Area VNARea
|Area| VAARea
Area VNAArea
Pos_Period_Area VPPArea
Neg_Period_Area VNPArea
|Period_Area| VAPArea
Period_Area VNAPArea
Time_Rise HRTime
Time_Fall HFTime
Period HPERiod
Frequency HFReq
Pos_Width HHWidth
Neg_Width HLWidth
Pos_Duty HHDuty
Neg_Duty HLDuty
Pos_Edge_Count RECount
Neg_Edge_Count FECount
Pos_Pulse_Count PPCount
Neg_Pulse_Count NPCount
:tip: Select measurement type.


There's a couple unimportant inconsistencies I haven't decided on in there. Like Pos Edge vs. Rising Edge. Whatever. ;)

Thanks,
Josh
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf