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

0 Members and 20 Guests are viewing this topic.

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3896
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5550 on: January 23, 2026, 08:16:29 pm »
Why after "#Log 1" must follow the "#haslogged" or a "#delay" and not directly the rest definitions? What is the purpose of "haslogged/delay" after "#Log 1"?
Because I am not expert in programming... with "The treat will be stuck" what you mean... I don't know what is treat... maybe thread?
Code: [Select]
#Log 1
#haslogged

The #haslogged is to be sure the log system has initialized and logged a value, because TC is multi threaded things can happen at the same time. To be sure stuff is processed in the right sequence you have to use some commands to synchronize stuff. The #haslogged will stop the script until TC has logged a actual line in the table, this means doing stuff after that command that depends on that will always work correctly.
Sorry about my spelling, I am not a native English speaker and I has a tendency to not read my post before pressing the POST button, this means I frequently has spelling errors.
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 5938
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #5551 on: January 24, 2026, 04:48:50 am »
I suppose I'll have a definition for the Keithley 2700/2701/2750 available soon. ;)
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Offline MrPete

  • Regular Contributor
  • *
  • Posts: 66
  • Country: us
Re: Program that can log/control many multimeters and other devices.
« Reply #5552 on: January 24, 2026, 08:33:10 am »
Seemingly sinple question, that I have not solved...

How do I reference another Math formula value in a second Math formula?

Simple example

v1  Formula 63
v2 Formula Math.v1-5

That doesn't work. What does work?
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3896
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5553 on: January 24, 2026, 09:18:08 am »
I suppose I'll have a definition for the Keithley 2700/2701/2750 available soon. ;)

Sounds good.

When you are using the same scale for all meters you can combine them. Right click on the chart and select layout.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3896
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5554 on: January 24, 2026, 09:19:06 am »
How do I reference another Math formula value in a second Math formula?

You cannot.
 
The following users thanked this post: MrPete

Offline MrPete

  • Regular Contributor
  • *
  • Posts: 66
  • Country: us
Re: Program that can log/control many multimeters and other devices.
« Reply #5555 on: January 24, 2026, 05:18:13 pm »
@HKJ what can I do to help diagnose a TestController memory leak?

I have two situations that lock up TC / javaw with an obvious memory overflow (using SysInternals Process Explorer to examine Private Bytes / Working Set size

Pretty simple:
* Load a CSV into Table
* Enable a predefined Math formula
* Go to current and view the value
* Repeat

Result
After about ten rounds, the javaw.exe memory footprint has grown from ~150MB to over 330MB, and TC is no longer responsive. Can't close it, etc. Have to kill the process

More complex

I have a variant of pukker's battery test script.
* Run script
* Press Reset

Repeat 4 times ok, 5th time TC is not responsive. Memory footprint again too big.

NO errors or messages in Debug window
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3896
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5556 on: January 24, 2026, 05:30:55 pm »
@HKJ what can I do to help diagnose a TestController memory leak?

I have two situations that lock up TC / javaw with an obvious memory overflow (using SysInternals Process Explorer to examine Private Bytes / Working Set size

I will have to look at it.
I doubt it is a memory leak, Java do generally not leak memory, but it might be a hung thread (And the thread may hold the memory).

Using 330MB is not that bad (At least on my computer with 32GB/64GB), but TC slowing down is bad.
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 5938
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #5557 on: January 24, 2026, 08:42:45 pm »
When you are using the same scale for all meters you can combine them. Right click on the chart and select layout.

I know, but I was being lazy because of the way the names get combined on the chart. All the names in the layout list need to be edited so they fit on screen. Which I did now, and saved as a layout script. ;)
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 5938
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #5558 on: January 24, 2026, 10:05:11 pm »
When you are using the same scale for all meters you can combine them. Right click on the chart and select layout.

I know, but I was being lazy because of the way the names get combined on the chart. All the names in the layout list need to be edited so they fit on screen. Which I did now, and saved as a layout script. ;)

D'oh! The Layout Script doesn't save some important stuff. Can the chart Layout settings be included in that script, along with the sequence (colors) of devices?
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 
The following users thanked this post: 2X

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3896
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5559 on: January 24, 2026, 10:11:10 pm »
D'oh! The Layout Script doesn't save some important stuff. Can the chart Layout settings be included in that script, along with the sequence (colors) of devices?

You are welcome to combine the two scripts, but be aware not all chart settings can be applied before there is data in the table. You can look at the example I gave 2X with his curve settings.
You can add and remove as you wish with scripts, that is sort of the idea with all the configuration being in scripts.
 
The following users thanked this post: 2X

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 351
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5560 on: January 25, 2026, 07:01:07 am »
It would be more logical that when combining curves, the Y axis is set to black as a color (instead of red).
They say attention is a shovel. It's time to dig 'em out.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3896
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5561 on: January 25, 2026, 10:05:04 am »
It would be more logical that when combining curves, the Y axis is set to black as a color (instead of red).

A combined axis is not set to any specific color, but maintains the color of the controlling curve.
 
The following users thanked this post: 2X

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 351
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5562 on: January 25, 2026, 11:48:26 am »
Why is a #cmdSetup infoAsk not properly left-aligned like comboboxHot or buttons ?

They say attention is a shovel. It's time to dig 'em out.
 

Offline 2X

  • Frequent Contributor
  • **
  • Posts: 634
  • Country: gr
Re: Program that can log/control many multimeters and other devices.
« Reply #5563 on: January 25, 2026, 11:56:56 am »
When you are using the same scale for all meters you can combine them. Right click on the chart and select layout.

I know, but I was being lazy because of the way the names get combined on the chart. All the names in the layout list need to be edited so they fit on screen. Which I did now, and saved as a layout script. ;)

D'oh! The Layout Script doesn't save some important stuff. Can the chart Layout settings be included in that script, along with the sequence (colors) of devices?

My complete code about waveforms colors:
Code: [Select]
; ========================== Other Menu Steup ================================
; Create "Other" menu button
#otherList
menuItem[0]="RTB20004 Display Voltmeters.txt";
menuItem[1]="RTB20004 Chart Colours.txt";

#otherText
if (name=="RTB20004 Display Voltmeters.txt")
runScriptAsync("""#CLOSEALL
\x23ShowPopupSystem GridPanel 77 20 1092 321
\x23GridPanel 1 4
\x23GridPanel Readout RTB2004.DVM1_Voltage dh CH1_COLOR DVMS_BACKROUND_COLOR
\x23GridPanel Readout RTB2004.DVM2_Voltage dh CH2_COLOR DVMS_BACKROUND_COLOR
\x23GridPanel Readout RTB2004.DVM3_Voltage dh CH3_COLOR DVMS_BACKROUND_COLOR
\x23GridPanel Readout RTB2004.DVM4_Voltage dh CH4_COLOR DVMS_BACKROUND_COLOR
""");

elseif(name=="RTB20004 Chart Colours.txt")

if !isLogging( )
runScriptAsync("""#delay 0
\x23Log 1
\x23haslogged
\x23ChartCurves RTB2004.DVM1_Voltage RTB2004.DVM2_Voltage RTB2004.DVM3_Voltage RTB2004.DVM4_Voltage
\x23ChartBackground black black - white -
\x23ChartColors CH1_COLOR CH2_COLOR CH3_COLOR CH4_COLOR (0,156,0) (230,230,30) cyan (0,80,156) lime (0,0,156)
""");
endif;

endif;
; ------------------------------------------------------------------------
 
The following users thanked this post: KungFuJosh

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3896
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5564 on: January 25, 2026, 11:59:01 am »
Why is a #cmdSetup infoAsk not properly left-aligned like comboboxHot or buttons ?

It has a text field to the left.
I could have put a minimum length on the text field to make it more obvious.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3896
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5565 on: January 25, 2026, 12:06:23 pm »
My complete code about waveforms colors:
Code: [Select]
; ========================== Other Menu Steup ================================
elseif(name=="RTB20004 Chart Colours.txt")
if !isLogging( )
runScriptAsync("""#delay 0
\x23Log 1
\x23haslogged
\x23ChartCurves RTB2004.DVM1_Voltage RTB2004.DVM2_Voltage RTB2004.DVM3_Voltage RTB2004.DVM4_Voltage
\x23ChartBackground black black - white -
\x23ChartColors CH1_COLOR CH2_COLOR CH3_COLOR CH4_COLOR (0,156,0) (230,230,30) cyan (0,80,156) lime (0,0,156)
""");
endif;

endif;
; ------------------------------------------------------------------------

I would have made it this way;
Code: [Select]
elseif(name=="RTB20004 Chart Colours.txt")
runScriptAsync("""#delay 0
                        \x23if !isLogging( )
\x23Log 1
\x23haslogged
                        \x23endif
\x23ChartCurves RTB2004.DVM1_Voltage RTB2004.DVM2_Voltage RTB2004.DVM3_Voltage RTB2004.DVM4_Voltage
\x23ChartBackground black black - white -
\x23ChartColors CH1_COLOR CH2_COLOR CH3_COLOR CH4_COLOR (0,156,0) (230,230,30) cyan (0,80,156) lime (0,0,156)
""");
endif;

It works slightly different from your example.
 
The following users thanked this post: 2X, KungFuJosh

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 351
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5566 on: January 25, 2026, 12:07:30 pm »
Why is a #cmdSetup infoAsk not properly left-aligned like comboboxHot or buttons ?

It has a text field to the left.
I could have put a minimum length on the text field to make it more obvious.

I will look better if the text field is still empty, the button is properly left-aligned. The "Get" button will be resized anyway when it is pressed.

(but I think you mean the opposite, so make it more obvious that a text will appear after pressing the button ?)
« Last Edit: January 25, 2026, 12:14:27 pm by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Offline 2X

  • Frequent Contributor
  • **
  • Posts: 634
  • Country: gr
Re: Program that can log/control many multimeters and other devices.
« Reply #5567 on: January 25, 2026, 12:08:32 pm »
Here is my final definition file for my RTB24 (RTB2004) oscilloscope. HKJ take a look if you beleive I can make something better and I hope to included in a newer version of Test Controller.
I tested for two days and works fine for me at least.

I don't know if it possible or easy to be done but it would be nice if in a future version of a TC there was a way when the TC finds a device under the name and serial number of the device to display na text like a mini manual/instructions (something like the "#notes" at Load divices) and also a way to define what color will have each wave by the name of the waveform and not by the sequence.
Many thanks again to HKJ for the help and for his amazing job to make the Test Controller to be so versatile.
 

Offline 2X

  • Frequent Contributor
  • **
  • Posts: 634
  • Country: gr
Re: Program that can log/control many multimeters and other devices.
« Reply #5568 on: January 25, 2026, 12:10:32 pm »
My complete code about waveforms colors:
Code: [Select]
; ========================== Other Menu Steup ================================
elseif(name=="RTB20004 Chart Colours.txt")
if !isLogging( )
runScriptAsync("""#delay 0
\x23Log 1
\x23haslogged
\x23ChartCurves RTB2004.DVM1_Voltage RTB2004.DVM2_Voltage RTB2004.DVM3_Voltage RTB2004.DVM4_Voltage
\x23ChartBackground black black - white -
\x23ChartColors CH1_COLOR CH2_COLOR CH3_COLOR CH4_COLOR (0,156,0) (230,230,30) cyan (0,80,156) lime (0,0,156)
""");
endif;

endif;
; ------------------------------------------------------------------------

I would have made it this way;
Code: [Select]
elseif(name=="RTB20004 Chart Colours.txt")
runScriptAsync("""#delay 0
                        \x23if !isLogging( )
\x23Log 1
\x23haslogged
                        \x23endif
\x23ChartCurves RTB2004.DVM1_Voltage RTB2004.DVM2_Voltage RTB2004.DVM3_Voltage RTB2004.DVM4_Voltage
\x23ChartBackground black black - white -
\x23ChartColors CH1_COLOR CH2_COLOR CH3_COLOR CH4_COLOR (0,156,0) (230,230,30) cyan (0,80,156) lime (0,0,156)
""");
endif;

It works slightly different from your example.
what is the different to include the "if !isLogging( )" inside the "runScriptAsync"?
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3896
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5569 on: January 25, 2026, 12:15:36 pm »
I will look better if the text field is still empty, the button is properly left-aligned. The "Get" button will be resized anyway when it is pressed.

A empty text field is not zero width and I don't want to edit the layout "on the fly".
 
The following users thanked this post: 2X

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3896
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5570 on: January 25, 2026, 12:18:54 pm »
what is the different to include the "if !isLogging( )" inside the "runScriptAsync"?

The one inside do not cover setting the actual colors and options, i.e. they will always be performed.

A even better if statement is:

#if (!isLogging() && tableRows()==0)

Then it would not start logging if there tableRows are data in table.
 
The following users thanked this post: 2X

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3896
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5571 on: January 25, 2026, 12:31:11 pm »
Here is my final definition file for my RTB24 (RTB2004) oscilloscope. HKJ take a look if you beleive I can make something better and I hope to included in a newer version of Test Controller.
I tested for two days and works fine for me at least.

I have added it to TC and will update it if you post a update.

I don't know if it possible or easy to be done but it would be nice if in a future version of a TC there was a way when the TC finds a device under the name and serial number of the device to display na text like a mini manual/instructions (something like the "#notes" at Load divices) and also a way to define what color will have each wave by the name of the waveform and not by the sequence.
Many thanks again to HKJ for the help and for his amazing job to make the Test Controller to be so versatile.

I do not want a lot of notes popping up when loading devices. It is possible to include a weblink in the definition.

TC is designed to work with many devices at a time, having a single device taking over TC is not really smart. As long as it is an option like your definition it is acceptable.
 
The following users thanked this post: 2X

Offline 2X

  • Frequent Contributor
  • **
  • Posts: 634
  • Country: gr
Re: Program that can log/control many multimeters and other devices.
« Reply #5572 on: January 25, 2026, 12:36:14 pm »
what is the different to include the "if !isLogging( )" inside the "runScriptAsync"?

The one inside do not cover setting the actual colors and options, i.e. they will always be performed.

A even better if statement is:

#if (!isLogging() && tableRows()==0)

Then it would not start logging if there tableRows are data in table.

I beleive now is bettter:

Code: [Select]
; ========================== Other Menu Steup ================================
; Create "Other" menu button
#otherList
menuItem[0]="RTB20004 Display Voltmeters.txt";
menuItem[1]="RTB20004 Chart Colours.txt";

#otherText
if (name=="RTB20004 Display Voltmeters.txt")
runScriptAsync("""#CLOSEALL
\x23ShowPopupSystem GridPanel 77 20 1092 321
\x23GridPanel 1 4
\x23GridPanel Readout RTB2004.DVM1_Voltage dh CH1_COLOR DVMS_BACKROUND_COLOR
\x23GridPanel Readout RTB2004.DVM2_Voltage dh CH2_COLOR DVMS_BACKROUND_COLOR
\x23GridPanel Readout RTB2004.DVM3_Voltage dh CH3_COLOR DVMS_BACKROUND_COLOR
\x23GridPanel Readout RTB2004.DVM4_Voltage dh CH4_COLOR DVMS_BACKROUND_COLOR
""");

elseif(name=="RTB20004 Chart Colours.txt")
if (!isLogging() && tableRows()==0)
runScriptAsync("""#delay 0
\x23Log 1
\x23haslogged
\x23ChartCurves RTB2004.DVM1_Voltage RTB2004.DVM2_Voltage RTB2004.DVM3_Voltage RTB2004.DVM4_Voltage
\x23ChartBackground black black - white -
\x23ChartColors CH1_COLOR CH2_COLOR CH3_COLOR CH4_COLOR (0,156,0) (230,230,30) cyan (0,80,156) lime (0,0,156)
""");
endif;

endif;
; ------------------------------------------------------------------------

Tell me if it is OK and I will upload this definition file in my previous post.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3896
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5573 on: January 25, 2026, 12:42:02 pm »
I beleive now is bettter:

Tell me if it is OK and I will upload this definition file in my previous post.

Again, placing the if outside meas it only works before you start logging.

You post the updated version when you have tested.
I would test 3 conditions:
1) Device just loaded
2) After logging has been started manually
3) When logging is finished and the table contains data.

Can it set the colors in all 3 cases.
 
The following users thanked this post: 2X

Offline 2X

  • Frequent Contributor
  • **
  • Posts: 634
  • Country: gr
Re: Program that can log/control many multimeters and other devices.
« Reply #5574 on: January 25, 2026, 08:48:39 pm »
I beleive now is bettter:

Tell me if it is OK and I will upload this definition file in my previous post.

Again, placing the if outside meas it only works before you start logging.

You post the updated version when you have tested.
I would test 3 conditions:
1) Device just loaded
2) After logging has been started manually
3) When logging is finished and the table contains data.

Can it set the colors in all 3 cases.

1) Device just loaded
2) After logging has been started manually
3) When logging is finished and the table contains data.

Please take a look at the below video:
https://jumpshare.com/share/VTOq46O8beZw2sMRML9t


 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf