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

Geoff-AU and 255 Guests are viewing this topic.

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5475 on: January 19, 2026, 08:23:11 pm »
@HKJ I have found a few niggly issues, maybe some are real bugs ;)

1) Time display in the table

a) "Time" column -- I can't see full resolution seconds.

* Right now it displays as mm:ss.s
* Right click gives no options. I was hoping I could expand to the full millisecond resolution but no. (For speedy measurements, this can help a LOT!)
* Yes, I can create a new Math formula with minutes*60 and this works... but why waste the space when the Time column always exists :)

It generally looks fine on my screen. Time do not show more than 0.1 second resolution, that is generally enough.


b) DateTime column -- no options, and it is a strange format

* Right now it is dd/mm-yyyy hh:mm:ss -- that doesn't match ANY standard timestamp text format ;)
* AND, AFAIK there is no way to tweak this?
* Could we at least have a few right-click options eventually? FWIW, here are a few standard formats:
    ISO 8601 extended:   yyyy-mm-ddThh:mm:ss
    Same, with fractional: yyyy-mm-ddThh:mm:ss.sss
    Windows, Universal Sortable: yyyy-mm-dd hh:mm:ssZ  (assumes UTC conversion but oh well ;) )

   I'd be quite happy with yyyy-mm-dd hh:mm:ss with or without ss.sss :)

It might not be a standard format, but is often used around here.
I guess adding a few other format options would be possible.


2. Math columns Enable/Disable and Table

* Starting situation: no math column enabled, and none in Table (but some lines are logged, so there IS a table!)
* Create a new math column (in my case, "seconds", formula: minutes*60.0) and enable it
* It's in the table -- all is well so far. (I played with the number of visible digits, settling on D3)

Now for a few BUGs...
* Back to Math: I changed the label from "seconds" to "s"
* Look at Table: now there are TWO Math columns. Math.seconds and Math.s
* Turn Math off/on in Table. No difference
* Disable the Math formula  -- both columns are still in Table.
* (Close and re-open TC, now it is clean)

A created math column do never get removed, but you can do it in the export menu (Note: It has a special option to automatic reload the table).
A math column is treated as any other (logged) data column.

3. Ran into an anomaly in my Mode definitions, while trying to make it visually understandable...

I inserted spaces so the mode codes would be aligned with the two columns I created for the Mode popup.

Turns out, extra spaces break the #cmdMode code! It thinks all modes are blank :()
Code: [Select]
; THIS IS BROKEN
;#cmdModeLayout 2 4
;#cmdMode CV     CV  MODE 0;[50];FUNC VOLT;[50]
;#cmdMode    BAT BAT MODE 4;[50]
;#cmdMode CC     CC  MODE 0;[50];FUNC CURR;[50]
;#cmdMode    CCD CCD MODE 0;[50];FUNC DYN;[50]
;#cmdMode CR     CR  MODE 0;[50];FUNC RES;[50]
;#cmdMode    OCP OCP MODE 2;[50];
;#cmdMode CP     CP  MODE 0;[50];FUNC POW;[50]
;#cmdMode    OPP OPP MODE 3;[50]

; THIS WORKS FINE
#cmdModeLayout 2 4
#cmdMode CV CV MODE 0;[50];FUNC VOLT;[50]
#cmdMode BAT BAT MODE 4;[50]
#cmdMode CC CC MODE 0;[50];FUNC CURR;[50]
#cmdMode CCD CCD MODE 0;[50];FUNC DYN;[50]
#cmdMode CR CR MODE 0;[50];FUNC RES;[50]
#cmdMode OCP OCP MODE 2;[50];
#cmdMode CP CP MODE 0;[50];FUNC POW;[50]
#cmdMode OPP OPP MODE 3;[50]

I may have to look at my space handling.
 

Offline MrPete

  • Regular Contributor
  • *
  • Posts: 152
  • Country: us
Re: Program that can log/control many multimeters and other devices.
« Reply #5476 on: January 19, 2026, 09:00:40 pm »
@HKJ I have found a few niggly issues, maybe some are real bugs ;)

1) Time display in the table

a) "Time" column -- I can't see full resolution seconds.

* Right now it displays as mm:ss.s
* Right click gives no options. I was hoping I could expand to the full millisecond resolution but no. (For speedy measurements, this can help a LOT!)
* Yes, I can create a new Math formula with minutes*60 and this works... but why waste the space when the Time column always exists :)

It generally looks fine on my screen. Time do not show more than 0.1 second resolution, that is generally enough.

Please consider: TC supports logging at .03 and .01 seconds. I can easily create a log with 3+ rows all showing identical time to 0.1 second resolution.
For that pragmatic reason, and because I am interested in optimizing device interaction to speed up read rates... I'd love to be able to see full resolution time, at least sometimes!
 

Offline 2X

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: gr
Re: Program that can log/control many multimeters and other devices.
« Reply #5477 on: January 20, 2026, 08:16:48 am »
There is a way to include the below commands (the proper name is commands or definitions?) in my definintion file and when I press "Log" the GridPanel will auto open/popup?
The below commands work only If write them at command line of the Test Controller or if place them on a .txt file and press the button “Load and run” (this .txt is called a script file?).

#ShowPopupSystem GridPanel 77 20 1092 321
#GridPanel 1 4
#GridPanel Readout RTB2004.DVM1_Voltage
#GridPanel Readout RTB2004.DVM2_Voltage
#GridPanel Readout RTB2004.DVM3_Voltage
#GridPanel Readout RTB2004.DVM4_Voltage

You can save them as a menu options.

If you want them included it is possible with the "Other" functions

For a example on using that see "Enova Gyrfalcon S4000 Pro" definition, it do all kind of stuff from the "Other" menu.

From the "Enova Gyrfalcon S4000 Pro" definition file I found the below commands.
The “Other” Menu I believe is the  #cmdSetup (I found the below pdf but I can’t understand how to display a value only). In order to display just a measurement, I believe is the “;#cmdSetup number Precharge_To_Fast_Charge_Voltage”, but when I place it in the definition file the definition file isn’t loaded from the Test Controller.
What am I missing?

when I place it in the definition file the definition file isn’t loaded from the Test Controller:
#cmdSetup color - Global_Settings (this
(144,238,144)
when I place it in the definition file the definition file isn’t loaded from the Test Controller:
#cmdSetup number Precharge_To_Fast_Charge_Voltage

It creates a combobox  and a button:
#cmdSetup combobox Delta_Peak_Voltage CH1_Super_Controller
It creates a button:
#cmdSetup button Save_Program Configurator

https://lygte-info.dk/pic/Projects/TestController/UserScripts1/UserConfigHints.pdf
 

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 949
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5478 on: January 20, 2026, 08:59:25 am »
The #cmdSetup statements create a control of a certain type. This is documented on https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html#Configuration_menu.

Bottom line is that it needs a SCPI command to function. SCPI commands are generally equipment specific, so a command from a power meter cannot be used on a scope. Even SCPI command for a scope can generally not be used on another scope of a different brand or even the same brand and a different type.

So what you need to do is read the documentation from your device you want to interface with, in your case the RTB. Identify which SCPI command you can use to achieve what you want. Then start writing the statements of you definition and select the controls that fit your needs the best. For inspiration it is the best to look at a similar device, so in your case a scope. But you cannot just copy this over and expect it to work. It will take time and practice to create a definition and you can to align it to what the device can offer and how TestController wants to have it coded.
They say attention is a shovel. It's time to dig 'em out.
 
The following users thanked this post: 2X

Offline 2X

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: gr
Re: Program that can log/control many multimeters and other devices.
« Reply #5479 on: January 20, 2026, 09:38:03 am »
1. There is a way to run the new changes where I make on the definition file without closing and reopen the Test Controller?
2. With the below I can read the values from the DVMs but how can I make them to auto displayed in mV or in V like on the columns with “SI” (#value DVM1_Voltage V SI - maybe I can read values directly from each column?)

#cmdSetup info DVM1
:read: DVM1:RESult?
V
Volt

#cmdSetup info DVM2
:read: DVM2:RESult?
V
Volt

#cmdSetup info DVM3
:read: DVM3:RESult?
V
Volt

#cmdSetup info DVM4
:read: DVM4:RESult?
V
Volt


3. On the “Control info” there is a way to change the text size, color etc or all of these parameters are fixed? I would like to create a layout like this on the Grid Panel (Picture: GridPanel DVMs - only displaying values… no buttons etc.)
 https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html#Control_info


« Last Edit: January 20, 2026, 09:40:12 am by 2X »
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5480 on: January 20, 2026, 10:48:12 am »
1. There is a way to run the new changes where I make on the definition file without closing and reopen the Test Controller?

No.
TC is fairly quick to restart and you can make it even quicker by having a empty devices folder for it. You will, of course, have to restore the device folder before you can use TC for anything else.

2. With the below I can read the values from the DVMs but how can I make them to auto displayed in mV or in V like on the columns with “SI” (#value DVM1_Voltage V SI - maybe I can read values directly from each column?)
3. On the “Control info” there is a way to change the text size, color etc or all of these parameters are fixed? I would like to create a layout like this on the Grid Panel (Picture: GridPanel DVMs - only displaying values… no buttons etc.)
 https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html#Control_info

Check the tags, especially :format: and :labelformat:
 

Offline 2X

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: gr
Re: Program that can log/control many multimeters and other devices.
« Reply #5481 on: January 20, 2026, 01:17:35 pm »
1. There is a way to run the new changes where I make on the definition file without closing and reopen the Test Controller?

No.
TC is fairly quick to restart and you can make it even quicker by having a empty devices folder for it. You will, of course, have to restore the device folder before you can use TC for anything else.

2. With the below I can read the values from the DVMs but how can I make them to auto displayed in mV or in V like on the columns with “SI” (#value DVM1_Voltage V SI - maybe I can read values directly from each column?)
3. On the “Control info” there is a way to change the text size, color etc or all of these parameters are fixed? I would like to create a layout like this on the Grid Panel (Picture: GridPanel DVMs - only displaying values… no buttons etc.)
 https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html#Control_info

Check the tags, especially :format: and :labelformat:


I manage to display the values in Si system and change the color of displayed values.
1. Can I change the typeface from all the displayed values & text in the “SetupWindow”.
2. Can I change the background color from the “SetupWindow”.
3. On the “SetupWindow” the displayed values are not the current values. Only each time when I press the “Setup” button the values are updated. How can I make it when I press the “Log” to display the current values like on the “Current Values” TAB?

; ========================== Other Menu Setup ================================
#metadef
;(0,255,0): (R, G, B) RGB colour code
#replaceText CH1_COLOR (255,255,0) ;yellow
#replaceText CH2_COLOR (0,255,0) ;green
#replaceText CH3_COLOR (255,128,0) ;orange
#replaceText CH4_COLOR (150,150,255) ;blue


;#cmdSetup color (this is not working)
;(25,32,36) (this is not working)
;:bgcolor: CH1_COLOR (this is not working)



#cmdSetup info DVM1
:read: DVM1:RESult?
:format: SI
:labelformat: bold ++++ CH1_COLOR
V
Volt

#cmdSetup info DVM2
:read: DVM2:RESult?
:format: SI
:labelformat: bold ++++ CH2_COLOR
V
Volt

#cmdSetup info DVM3
:read: DVM3:RESult?
:format: SI
:labelformat: bold ++++ CH3_COLOR
V
Volt

#cmdSetup info DVM4
:read: DVM4:RESult?
:format: SI
:labelformat: bold ++++ CH4_COLOR
V
Volt 

 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5482 on: January 20, 2026, 01:55:07 pm »
I manage to display the values in Si system and change the color of displayed values.
1. Can I change the typeface from all the displayed values & text in the “SetupWindow”.
2. Can I change the background color from the “SetupWindow”.
3. On the “SetupWindow” the displayed values are not the current values. Only each time when I press the “Setup” button the values are updated. How can I make it when I press the “Log” to display the current values like on the “Current Values” TAB?

; ========================== Other Menu Setup ================================]

This is not the "Other menu", setup is not designed to update live values. The other menu looks like this:

Code: [Select]
;*****************************************************************
;Other
;*****************************************************************
#otherList
    menuItem[0]="Display voltmeters.txt";


#otherText
if (name=="Display voltmeters.txt")
runScriptAsync("#ShowPopupSystem GridPanel 77 20 1092 321\n#GridPanel 1 4\n#GridPanel Readout RTB2004.DVM1_Voltage\n#GridPanel Readout RTB2004.DVM2_Voltage\n#GridPanel Readout RTB2004.DVM3_Voltage\n#GridPanel Readout RTB2004.DVM4_Voltage");
endif;

Try pasting it into your definition file.
Note: I have not tested it.
 
The following users thanked this post: 2X

Offline 2X

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: gr
Re: Program that can log/control many multimeters and other devices.
« Reply #5483 on: January 20, 2026, 07:34:30 pm »
I manage to display the values in Si system and change the color of displayed values.
1. Can I change the typeface from all the displayed values & text in the “SetupWindow”.
2. Can I change the background color from the “SetupWindow”.
3. On the “SetupWindow” the displayed values are not the current values. Only each time when I press the “Setup” button the values are updated. How can I make it when I press the “Log” to display the current values like on the “Current Values” TAB?

; ========================== Other Menu Setup ================================]




This is not the "Other menu", setup is not designed to update live values. The other menu looks like this:

Code: [Select]
;*****************************************************************
;Other
;*****************************************************************
#otherList
    menuItem[0]="Display voltmeters.txt";


#otherText
if (name=="Display voltmeters.txt")
runScriptAsync("#ShowPopupSystem GridPanel 77 20 1092 321\n#GridPanel 1 4\n#GridPanel Readout RTB2004.DVM1_Voltage\n#GridPanel Readout RTB2004.DVM2_Voltage\n#GridPanel Readout RTB2004.DVM3_Voltage\n#GridPanel Readout RTB2004.DVM4_Voltage");
endif;

Try pasting it into your definition file.
Note: I have not tested it.



It worked flawless.
Besides I tried to make it with wrong way I learn many things where I beleive I will need for future. Also, thanks and to @flash2b.
1. I searched at the below links but I could't find a way to change the backround and the color, typeface from the text/measurement values.
For example I tryied the below but didn't worked.

:bgcolor: red - didn't worked
:bgcolor: Color for the background, can be a name or (r,g,b) values. This can be used with the color control

#POPUPCOLOR "prompt" varName{ tip} - this I can't manage to make the correct syntax
(0,255,10)


https://lygte-info.dk/project/TestControllerScriptCommands%20UK.html##POPUPCOLOR_

https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html##otherList

https://lygte-info.dk/project/TestControllerPopupGridPanel%20UK.html#Panels


2. There is a way the popup window from the other menu to stays always in foreground and not goes to background when I click for instance at “Table” tab?

« Last Edit: January 20, 2026, 07:36:49 pm by 2X »
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5484 on: January 20, 2026, 07:42:25 pm »
1. I searched at the below links but I could't find a way to change the backround and the color, typeface from the text/measurement values.
For example I tryied the below but didn't worked.

:bgcolor: red - didn't worked
:bgcolor: Color for the background, can be a name or (r,g,b) values. This can be used with the color control

#POPUPCOLOR "prompt" varName{ tip} - this I can't manage to make the correct syntax
(0,255,10)


https://lygte-info.dk/project/TestControllerScriptCommands%20UK.html##POPUPCOLOR_

https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html##otherList

https://lygte-info.dk/project/TestControllerPopupGridPanel%20UK.html#Panels

Not all colors can be changed.
POPUPCOLOR is for designing you own popups from script, it do not change any color.
There is a long list of popup... script commands for designing your own popup for input, it is mostly for use with your own control scripts.

2. There is a way the popup window from the other menu to stays always in foreground and not goes to background when I click for instance at “Table” tab?

Gridpanel has a checkmark in it right click menu.
The setup menus can be locked "on top" from the popup menu "Devices..."
 
The following users thanked this post: 2X

Offline 2X

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: gr
Re: Program that can log/control many multimeters and other devices.
« Reply #5485 on: January 20, 2026, 07:53:03 pm »
1. I searched at the below links but I could't find a way to change the backround and the color, typeface from the text/measurement values.
For example I tryied the below but didn't worked.

:bgcolor: red - didn't worked
:bgcolor: Color for the background, can be a name or (r,g,b) values. This can be used with the color control

#POPUPCOLOR "prompt" varName{ tip} - this I can't manage to make the correct syntax
(0,255,10)


https://lygte-info.dk/project/TestControllerScriptCommands%20UK.html##POPUPCOLOR_

https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html##otherList

https://lygte-info.dk/project/TestControllerPopupGridPanel%20UK.html#Panels

Not all colors can be changed.
POPUPCOLOR is for designing you own popups from script, it do not change any color.
There is a long list of popup... script commands for designing your own popup for input, it is mostly for use with your own control scripts.

2. There is a way the popup window from the other menu to stays always in foreground and not goes to background when I click for instance at “Table” tab?

Gridpanel has a checkmark in it right click menu.
The setup menus can be locked "on top" from the popup menu "Devices..."


There is a way to create my own popup window and included/embedded on the definition file or has to be necessarily a seperate script file (maybe this command "runScriptAsync" you used)?
If yes where I can see the commands or an example to make it?
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5486 on: January 20, 2026, 08:03:01 pm »
There is a way to create my own popup window and included/embedded on the definition file or has to be necessarily a seperate script file (maybe this command "runScriptAsync" you used)?
If yes where I can see the commands or an example to make it?

Yes, you use the runScriptAsync()
Here is the command list: https://lygte-info.dk/project/TestControllerScriptCommands UK.html
It is generally possible to do multiline strings with """ (Triple quotes), but I am not sure it works in a definition, because all script command start with # and they have meaning inside a definition.
But you can do for each line (You have to start with a "" (Empty string) on the first line:
+"#script command\n"
 
The following users thanked this post: 2X

Offline 2X

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: gr
Re: Program that can log/control many multimeters and other devices.
« Reply #5487 on: January 20, 2026, 09:08:59 pm »
There is a way to create my own popup window and included/embedded on the definition file or has to be necessarily a seperate script file (maybe this command "runScriptAsync" you used)?
If yes where I can see the commands or an example to make it?

Yes, you use the runScriptAsync()
Here is the command list: https://lygte-info.dk/project/TestControllerScriptCommands UK.html
It is generally possible to do multiline strings with """ (Triple quotes), but I am not sure it works in a definition, because all script command start with # and they have meaning inside a definition.
But you can do for each line (You have to start with a "" (Empty string) on the first line:
+"#script command\n"

Now I believe I mess it up... It didn't display the button "Other" menu at all.
Code: [Select]
#otherText
if (name=="Display voltmeters.txt")

#otherText
if (name=="Display voltmeters.txt")
runScriptAsync(""( )
  +"#CLOSEALL\n
#ShowPopupSystem GridPanel 77 20 1092 321\n
#GridPanel Readout RTB2004.DVM1_Voltage\n
#READOUT {RTB2004.DVM1_Voltage {10 10 {+++ {red {white 0 {SI}}}}}}")
endif;

I tried also this but I don't beleive the TC controller will "auto" run this (witout pressing any button):
Code: [Select]
runScriptAsync(""( )
  +"#CLOSEALL\n
#ShowPopupSystem GridPanel 77 20 1092 321\n
#GridPanel Readout RTB2004.DVM1_Voltage\n
#READOUT {RTB2004.DVM1_Voltage {10 10 {+++ {red {white 0 {SI}}}}}}")

https://lygte-info.dk/project/TestControllerScriptCommands%20UK.html#Popup_windows
« Last Edit: January 20, 2026, 09:13:43 pm by 2X »
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5488 on: January 20, 2026, 09:29:17 pm »
Now I believe I mess it up... It didn't display the button "Other" menu at all.
Code: [Select]
#otherText
if (name=="Display voltmeters.txt")

#otherText
if (name=="Display voltmeters.txt")
runScriptAsync(""( )
  +"#CLOSEALL\n
#ShowPopupSystem GridPanel 77 20 1092 321\n
#GridPanel Readout RTB2004.DVM1_Voltage\n
#READOUT {RTB2004.DVM1_Voltage {10 10 {+++ {red {white 0 {SI}}}}}}")
endif;

This line creates the other menu:

#otherList
    menuItem[0]="Display voltmeters.txt";

More entries can be created by:
    menuItem[1]="....txt";
    menuItem[2]="....txt";

The extension  .txt defined what section to call, the .txt is #otherText, but there are a few other with different purposes.

I tried also this but I don't beleive the TC controller will "auto" run this (witout pressing any button):
Code: [Select]
runScriptAsync(""( )
  +"#CLOSEALL\n
#ShowPopupSystem GridPanel 77 20 1092 321\n
#GridPanel Readout RTB2004.DVM1_Voltage\n
#READOUT {RTB2004.DVM1_Voltage {10 10 {+++ {red {white 0 {SI}}}}}}")

https://lygte-info.dk/project/TestControllerScriptCommands%20UK.html#Popup_windows

Nothing from the other menu autoruns, you have to select a menu entry first.
Technically it is possible to autorun a script when a device is loaded, but I do not recommend it.
 
The following users thanked this post: 2X

Offline 2X

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: gr
Re: Program that can log/control many multimeters and other devices.
« Reply #5489 on: January 20, 2026, 10:20:04 pm »
Quote
This line creates the other menu:

#otherList
    menuItem[0]="Display voltmeters.txt";

More entries can be created by:
    menuItem[1]="....txt";
    menuItem[2]="....txt";

The extension  .txt defined what section to call, the .txt is #otherText, but there are a few other with different purposes.


I correct the code and now is displayed the "Other" menu (Picture: Other Menu Button) but the popup window don't open when I press the "Display voltmeters". Did you find something wrong in the code?
Code: [Select]
#otherList
menuItem[0]="Display voltmeters.txt";

#otherText
if (name=="Display voltmeters.txt")
runScriptAsync(""( )
  +"#CLOSEALL\n
#ShowPopupSystem GridPanel 77 20 1092 321\n
#GridPanel Readout RTB2004.DVM1_Voltage\n
#READOUT {RTB2004.DVM1_Voltage {10 10 {+++ {red {white 0 {SI}}}}}}");
endif;
« Last Edit: January 20, 2026, 10:22:48 pm by 2X »
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5490 on: January 21, 2026, 12:17:16 pm »
correct the code and now is displayed the "Other" menu (Picture: Other Menu Button) but the popup window don't open when I press the "Display voltmeters". Did you find something wrong in the code?
Code: [Select]
#otherList
menuItem[0]="Display voltmeters.txt";

#otherText
if (name=="Display voltmeters.txt")
runScriptAsync(""( )
  +"#CLOSEALL\n
#ShowPopupSystem GridPanel 77 20 1092 321\n
#GridPanel Readout RTB2004.DVM1_Voltage\n
#READOUT {RTB2004.DVM1_Voltage {10 10 {+++ {red {white 0 {SI}}}}}}");
endif;

A few details:

Code: [Select]
#otherText
if (name=="Display voltmeters.txt")
runScriptAsync(""
+"#CLOSEALL\n"
+"#ShowPopupSystem GridPanel 77 20 1092 321\n"
+"#GridPanel Readout RTB2004.DVM1_Voltage\n"
+"#READOUT RTB2004.DVM1_Voltage 10 10 +++ red white 0 SI");
endif;

Alternate version:

Code: [Select]
#otherText
if (name=="Display voltmeters.txt")
runScriptAsync("""
\x23CLOSEALL
\x23ShowPopupSystem GridPanel 77 20 1092 321
\x23GridPanel Readout RTB2004.DVM1_Voltage
\x23READOUT RTB2004.DVM1_Voltage 10 10 +++ red white 0 SI
""");
endif;

Neither is tested.
« Last Edit: January 21, 2026, 12:25:27 pm by HKJ »
 
The following users thanked this post: 2X

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 949
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5491 on: January 21, 2026, 04:58:22 pm »
I have implemented some #interface commands into my definition.



I have used other PS definitions to gather what was implemented there. There in no list on: https://lygte-info.dk/project/TestControllerPopupTestInterface%20UK.html or https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html#Definition_of_set....

Is there a 'golden' standard per type ?

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

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5492 on: January 21, 2026, 06:12:08 pm »
I have implemented some #interface commands into my definition.

I have used other PS definitions to gather what was implemented there. There in no list on: https://lygte-info.dk/project/TestControllerPopupTestInterface%20UK.html or https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html#Definition_of_set....

Is there a 'golden' standard per type ?

Not really, but TC uses some of them.
The ones TC uses (That I can remember)  are:
setOn()
setCurrent(), getCurrent()
setVoltage(), getVoltage()

The current/voltage are mostly for power supplies and loads (On of the functions is that TC can run a couple of loads in parallel and it will set the current for them).

 

Offline 2X

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: gr
Re: Program that can log/control many multimeters and other devices.
« Reply #5493 on: January 21, 2026, 10:33:03 pm »
Quote
A few details:

Code: [Select]
#otherText
if (name=="Display voltmeters.txt")
runScriptAsync(""
+"#CLOSEALL\n"
+"#ShowPopupSystem GridPanel 77 20 1092 321\n"
+"#GridPanel Readout RTB2004.DVM1_Voltage\n"
+"#READOUT RTB2004.DVM1_Voltage 10 10 +++ red white 0 SI");
endif;

Alternate version:

Code: [Select]
#otherText
if (name=="Display voltmeters.txt")
runScriptAsync("""
\x23CLOSEALL
\x23ShowPopupSystem GridPanel 77 20 1092 321
\x23GridPanel Readout RTB2004.DVM1_Voltage
\x23READOUT RTB2004.DVM1_Voltage 10 10 +++ red white 0 SI
""");
endif;

Neither is tested.

The below code is working fine. The second code didn't work.
Also, with "#READOUT RTB2004.DVM1_Voltage 10 10 +++ red white 0 SI");" I can't change the color of the text or from the backround. Do you know what am I missing? Also, there is a way to change the font type to bold or italic and the typeface to Arial, Times New Roman etc?
I would like your opinion why do you beleive the second code didn't work (the popup window didn't open at all)?

Code: [Select]
#otherText
if (name=="Display voltmeters.txt")
runScriptAsync(""
+"#CLOSEALL\n"
+"#ShowPopupSystem GridPanel 77 20 1092 321\n"
+"#GridPanel 1 4\n" ;I add this line
+"#GridPanel Readout RTB2004.DVM1_Voltage\n"
+"#READOUT RTB2004.DVM1_Voltage 10 10 +++ red white 0 SI");
endif;
« Last Edit: January 21, 2026, 10:34:46 pm by 2X »
 

Offline jmurray

  • Regular Contributor
  • *
  • Posts: 73
  • Country: au
Re: Program that can log/control many multimeters and other devices.
« Reply #5494 on: January 22, 2026, 03:18:37 am »
Hi HKJ,

You might have explained this previously, but I can't recall or find it:

The definition of generic interface commands is a useful feature in writing scripts that might just need an instrument that meets the necessary criteria, as opposed to a specific instrument.
However, why is it that when using an interface command from a script or a command line, the software insists on issuing an #askValues in the background, querying the measurement values of every currently connected instrument?
For example, if I use a getCurrent(<electronic load>) command to check the set constant current of an electronic load, Test Controller will force a measurement operation on every connected instrument, despite not needing any of that information.

Is this absolutely necessary? It seems like a significant inefficiency, particularly when trying to implement high speed operations.
It would seem a shame to not be able to leverage the generic interface API and instead have to write everything in explicit, instrument-specific SCPI commands.
 

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 949
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5495 on: January 22, 2026, 08:45:12 am »
The generic interface is more targetted to PSU's and Load's. Furthermore Resistance is labeled as "Some resistance, either a set point for get/set or actual value for read." which is not a resistance like DCR or R using an LCR.

I wonder what I need to set the read..... to for my LCR. It is more like a DMM/BMM however when outputting multiple values I recond it is like #interface readValue1 .. #interface readValue4 since it is hard to label it to a Value due to all the modes.
They say attention is a shovel. It's time to dig 'em out.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5496 on: January 22, 2026, 10:43:48 am »
The below code is working fine. The second code didn't work.

Because I made a silly mistake, it has to be:

runScriptAsync("""\x34CLOSEALL

The first command must be right after the """"
And in fact you do not need the \x34 on that command:
runScriptAsync("""\#CLOSEALL

Is fine, you only need the \x34 to avoid putting a # at the start of a line, because that has special meaning in a definition.

Also, with "#READOUT RTB2004.DVM1_Voltage 10 10 +++ red white 0 SI");" I can't change the color of the text or from the backround. Do you know what am I missing? Also, there is a way to change the font type to bold or italic and the typeface to Arial, Times New Roman etc?
I would like your opinion why do you beleive the second code didn't work (the popup window didn't open at all)?

Generally I uses TC to generate the code for the popups. I.e. open the readout and configure it, then right click in the log window and select "Generate script, Layout, In log Window". You can then pick a correctly formed statement for opening the readout the way you configured it.

 
The following users thanked this post: 2X

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5497 on: January 22, 2026, 10:49:11 am »
Hi HKJ,

You might have explained this previously, but I can't recall or find it:

The definition of generic interface commands is a useful feature in writing scripts that might just need an instrument that meets the necessary criteria, as opposed to a specific instrument.
However, why is it that when using an interface command from a script or a command line, the software insists on issuing an #askValues in the background, querying the measurement values of every currently connected instrument?
For example, if I use a getCurrent(<electronic load>) command to check the set constant current of an electronic load, Test Controller will force a measurement operation on every connected instrument, despite not needing any of that information.

Is this absolutely necessary? It seems like a significant inefficiency, particularly when trying to implement high speed operations.
It would seem a shame to not be able to leverage the generic interface API and instead have to write everything in explicit, instrument-specific SCPI commands.

The script do not issue a read every time, TC has a timelimit on it. You can try doing a loop and you will see that the reading only happens a couple of times each second (Depending on how fast devices respond), but the loop may run 1000 of times.
It is done to be sure any variables with device values are updated, i.e. you can read/test on them and be sure they reflect the current device value
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5498 on: January 22, 2026, 10:54:13 am »
The generic interface is more targetted to PSU's and Load's. Furthermore Resistance is labeled as "Some resistance, either a set point for get/set or actual value for read." which is not a resistance like DCR or R using an LCR.

The purpose of the generic interface is to be able to use different brands devices with the same script. This put a limit to what is practical to do with generic functions, more device specific stuff is usually not really applicable for cross brand scripts.
I it fine to implement functions to control these device specific things, the functions are easier to use than generic SCPI request when using the programming language.

I wonder what I need to set the read..... to for my LCR. It is more like a DMM/BMM however when outputting multiple values I recond it is like #interface readValue1 .. #interface readValue4 since it is hard to label it to a Value due to all the modes.

Using readValue() for the main value and readValue1()... for the other values is exactly how to do it.

« Last Edit: January 22, 2026, 10:55:47 am by HKJ »
 

Offline 2X

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: gr
Re: Program that can log/control many multimeters and other devices.
« Reply #5499 on: January 22, 2026, 11:32:57 am »
Quote
Generally I uses TC to generate the code for the popups. I.e. open the readout and configure it, then right click in the log window and select "Generate script, Layout, In log Window". You can then pick a correctly formed statement for opening the readout the way you configured it.

What is the difference between the
runScriptAsync(""
+"#CLOSEALL\n"”
+"#ShowPopupSystem GridPanel 77 20 1092 321\n"


and the
runScriptAsync("""\#CLOSEALL
\x23ShowPopupSystem GridPanel 77 20 1092 321


The “\x23” what is essentially and has any advantage or disadvantage over the “+"#”?



#metadef
; The empty #metadef will use the #meta exactly as it is, you can then fill or add other #metadef that overrides what needs to be changed for other devices.
;(0,255,0): (R, G, B) RGB colour code
#replaceText CH1_COLOR (255,255,0) ;yellow
#otherList
   menuItem[0]="Display voltmeters.txt";

#otherText
if (name=="Display voltmeters.txt")
runScriptAsync(""
+"#CLOSEALL\n"
+"#ShowPopupSystem GridPanel 77 20 1092 321\n"
+"#GridPanel Readout RTB2004.DVM1_Voltage - CH1_COLOR\n"); ;the other menu not open at all
+"#GridPanel Readout RTB2004.DVM1_Voltage - (25,32,36)\n"); works fine

endif;

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf