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

0 Members and 439 Guests are viewing this topic.

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #7350 on: August 26, 2026, 07:23:39 am »
Why are #otherList / #otherText not handled by the meta processor the way #metaSection is? A script that works as an external file cannot be pasted into #otherText unchanged - every line-leading # needs \x23 and every column name containing a space needs \x22.

Because the file processor uses the # as its indicator, there is not much I can do about it, without a big change in the code.

But I wonder about the \x22, " do not have problems inside """ strings, there is also \" that will be processed into "

Personal note: this would let me embed external scripts into definitions far more easily, and I would use the Other menu a lot more often as a result. I suspect the same is true for other authors - the escaping is most of the reason the Other menu is rarely used.

I do not see a big difference between # and \x23, the second is a bit more obscure, but not that hard to type.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #7351 on: August 26, 2026, 09:24:30 am »
With Notepad++

I few suggestions:
In the zip file use two directories called: userDefineLangs and autoCompletion
Drop the "Definition" part of the filenames and the version number part in the zip file.
When I am putting the zip file on my webserver I will be dropping the version number, I do not want to change my webpage, just because a new version arrives and I will probably add NPP to the front of the name (Note: zip file only, not the contents).
« Last Edit: August 26, 2026, 01:56:03 pm by HKJ »
 

Offline SparkyFX

  • Frequent Contributor
  • **
  • Posts: 716
  • Country: de
Re: Program that can log/control many multimeters and other devices.
« Reply #7352 on: August 26, 2026, 09:32:11 am »
When I am putting the zip file on my webserver I will be dropping the version number, I do not want to change my webpage, just because a new version arrives
You could use symlinks to always point to the latest file, the webserver will serve that one.
Support your local planet.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #7353 on: August 26, 2026, 09:34:31 am »
When I am putting the zip file on my webserver I will be dropping the version number, I do not want to change my webpage, just because a new version arrives
You could use symlinks to always point to the latest file, the webserver will serve that one.

It is limited what I can do on the server, I only have FTP access,
 

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 #7354 on: August 26, 2026, 10:05:23 am »
With Notepad++

I few suggestions:
In the zip file use two directories called: userDefineLangs and autoCompletion
Drop the "Definition" part of the filename and the version number part.
When I am putting the zip file on my webserver I will be dropping the version number, I do not want to change my webpage, just because a new version arrives and I will probably add NPP to the front of the name (Note: zip file only, not the contents).

I will make a new version with all your remarks and KungFuJosh included. Not today, however.
They say attention is a shovel. It's time to dig 'em out.
 
The following users thanked this post: KungFuJosh

Offline akapuma

  • Newbie
  • Posts: 1
  • Country: de
    • akapumas Paellachannel
Re: Program that can log/control many multimeters and other devices.
« Reply #7355 on: August 26, 2026, 07:37:26 pm »
Hello,

I hope this is the right place to ‘register’ a new device. I have an ATORCH S1BWP Wi-Fi smart metering socket. It works perfectly with the test controller software if you add the following lines to the ‘ATorchDevices.txt’ file:

#metadef
#idString ATorch,ATorch S1BWP,
#name Atorch S1BWP
#handle S1BWP
#checksum none
#sections AC_DEVICE

Best regards

akapuma
 

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 #7356 on: August 26, 2026, 07:43:49 pm »
I am using:

ChartCurves XACX0440.AI01 XACX0440.AI02 XACX0440.AI03 XACX0440.AI04 "XACX0440.DO DO1" "XACX0440.DO DO2" "XACX0440.DO DO3" "XACX0440.DO DO4"
ChartColors (255,220,0) (0,255,255) (255,0,255) (0,160,255) (255,220,0) (0,255,255) (255,0,255) (0,160,255)

ChartBackground black black (80,80,80) white -

The scale of a digital track is always set to black, there is no control to set it to a color. So in my case the scale of the digital track is invisible, while the curves are colored correctly.

They are visible at the right column on a white or gray background.

Could we just make it that the Logic Scale follows the fontColor for the background, than I would be happy with it. And it will also work on the grey, white whatever background.







« Last Edit: August 26, 2026, 08:26:10 pm by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #7357 on: August 27, 2026, 07:17:06 am »
I hope this is the right place to ‘register’ a new device. I have an ATORCH S1BWP Wi-Fi smart metering socket. It works perfectly with the test controller software if you add the following lines to the ‘ATorchDevices.txt’ file:

It is, I have added it (Thanks).
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #7358 on: August 27, 2026, 07:44:03 am »
The scale of a digital track is always set to black, there is no control to set it to a color. So in my case the scale of the digital track is invisible, while the curves are colored correctly.

They are visible at the right column on a white or gray background.

Could we just make it that the Logic Scale follows the fontColor for the background, than I would be happy with it. And it will also work on the grey, white whatever background.

The digital scale has now got its own setting, this will be in next update.
 
The following users thanked this post: flash2b

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 #7359 on: August 27, 2026, 07:56:39 am »
What will be the setting so I can put it in my def ?
They say attention is a shovel. It's time to dig 'em out.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #7360 on: August 27, 2026, 07:59:38 am »
What will be the setting so I can put it in my def ?

#CHARTBACKGROUND backgroundColor{ bordercolor{ gridcolor{ fontColor{ titleColor {digitalColor}}}}}
   Change color on the different elements in the chart/histogram, except the curves/scales.
   Controls this popup
   backgroundColor is the color behind the curvers
   borderColor is the space around the actual chart where the scales are shown.
   gridColor is the grid in the chart
   fontColor is the X scale, legends and the title on saved charts
   titleColor will override fontcolor for the title.
   digitalColor will override color on digital scale (not curves)

 
The following users thanked this post: flash2b

Offline NoDisintegrations

  • Contributor
  • Posts: 14
  • Country: za
Re: Program that can log/control many multimeters and other devices.
« Reply #7361 on: August 27, 2026, 10:38:47 am »
I currently have a use case where I'm taking two sets of 144 resistance measurements, which I'd like to compare side by side in a spreadsheet, once they're all logged.

For my case, the current auto hold features inevitably end in either extra captures or failures to capture (if I have 3 identical open circuit measurements in a row they need to be logged as 3 separate captures) as I need to do a pin-for-pin comparison between the two data sets. So a button to manually trigger the captures would be ideal.

Is there a command I could bind to an interface button (say temporarily modifying the UT61E definition for the meter I'm using) which would manually trigger a capture event in the auto hold log? i.e. Set the Time in Auto Hold to 60min to effectively disable the auto capture between measurements, then just press the capture button when I'm ready for a value to be logged.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #7362 on: August 27, 2026, 10:48:53 am »
I currently have a use case where I'm taking two sets of 144 resistance measurements, which I'd like to compare side by side in a spreadsheet, once they're all logged.

For my case, the current auto hold features inevitably end in either extra captures or failures to capture (if I have 3 identical open circuit measurements in a row they need to be logged as 3 separate captures) as I need to do a pin-for-pin comparison between the two data sets. So a button to manually trigger the captures would be ideal.

Is there a command I could bind to an interface button (say temporarily modifying the UT61E definition for the meter I'm using) which would manually trigger a capture event in the auto hold log? i.e. Set the Time in Auto Hold to 60min to effectively disable the auto capture between measurements, then just press the capture button when I'm ready for a value to be logged.

Advanced log, mode: Single on command

To use it you start logging and open the "Log trigger" popup

It can also be triggered from a script command.
 
The following users thanked this post: NoDisintegrations

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 #7363 on: August 27, 2026, 11:27:06 am »
Notepad++ syntax highlighting for TestController definition files - v1.03

Definition files are plain text, so Notepad++ shows them as one grey wall. This pack teaches Notepad++ the definition language: directives, tags, control types, Modbus register types, calculator functions and meta tokens all get their own color, and #metadef blocks fold.



What is in the pack

  • Two User Defined Language files - one tuned for a light Notepad++ theme, one for a dark theme. Install one, not both.
  • One autocompletion file with 273 entries, shared by both themes.
  • A readme with step by step install, and how to remove an older version first.

What gets colored

  • Every #directive
  • Every :tag:
  • Control types - advNumber, toggleButton, numberDual, indicator and the rest
  • Modbus register types - holding, input, coil, dInput - and the tx / rx block commands
  • Calculator functions, with parameter hints on the opening bracket
  • Meta substitution tokens - MODELVAL, AIVAL, SCALEMINVAL and friends
  • Units directly on numbers - mA, µF, MΩ, °C, dBm, kHz ...
  • Hex constants, quoted strings, and ; comments



Folding a #metadef block

New in this version: a #metadef block is a fold point. Click the minus in the fold margin and the whole block collapses to its first line.

Code: [Select]
#metadef XACX0440
    ; replacetext, values, other menu entries ...
#meta

On a multi-model definition this makes a real difference - you can collapse the models you are not working on and keep the one you are editing on screen.

It finds your broken quotes

A useful side effect. If a line has an unmatched ", everything below it colors as string content until the next stray quote. That is instantly visible, where in a plain editor it just means TC quietly misbehaves. One user opened his definition in it and found ten places where a quote was wrong.



Notes

  • Definition files have no fixed extension, so nothing is auto-bound. Pick Language > TestController Definition by hand the first time.
  • for ... endfor is deliberately not folded. Notepad++ matches folding keywords inside longer words, so for would break the coloring of formatDouble, formatSI, :format: and every other format* name. if, while and foreach do fold.
  • To check which version you have installed, paste UDL_v1.03_written_by_Flash2b into a file - it is highlighted as a keyword.
  • The colors are a starting point, not a decree. Change any of them in Language > User Defined Language > Define your language...

Thanks

To HKJ for hosting it and for the packaging suggestions that shaped how this is distributed, and to KungFuJosh whose comments are incorporated in this version. Both sets of feedback made it a better pack than the one I first posted.

Download

* TestController-Notepad++ UDL pack.zip (8.54 kB - downloaded 15 times.)

Feedback welcome - if a directive, tag or function is missing a color, post it and I will add it.
They say attention is a shovel. It's time to dig 'em out.
 
The following users thanked this post: KungFuJosh

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #7364 on: August 27, 2026, 11:48:42 am »
Notepad++ syntax highlighting for TestController definition files - v1.03

Definition files are plain text, so Notepad++ shows them as one grey wall. This pack teaches Notepad++ the definition language: directives, tags, control types, Modbus register types, calculator functions and meta tokens all get their own color, and #metadef blocks fold.

I have made a new page with user tools and information:
https://lygte-info.dk/project/TestControllerUserToolsInfo%20UK.html

It do also contain a few links for Cyclotron stuff.
 
The following users thanked this post: flash2b, Cyclotron

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 #7365 on: August 27, 2026, 12:03:28 pm »
The download link on the User Tools page gives "Not Found". The href resolves relative to /project/ instead of pointing at /pic/Projects/TestController/UserDocTools/.

Also please take the zip from the attachment on my latest post, not an earlier one.

I reposted 1.03 after fixing a bug, so both UDL files should be 7827 bytes. If they read 7729 it is the old build.
« Last Edit: August 27, 2026, 12:06:46 pm by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #7366 on: August 27, 2026, 12:08:20 pm »
The download link on the User Tools page gives "Not Found". The href resolves relative to /project/ instead of pointing at /pic/Projects/TestController/UserDocTools/.

Also please take the zip from the attachment on my latest post, not an earlier one.

I reposted 1.03 after fixing a bug, so both UDL files should be 7827 bytes. If they read 7729 it is the old build.

// inside a URL do not work (typo) and I have updated the file.
 
The following users thanked this post: flash2b

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8225
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #7367 on: August 27, 2026, 04:27:58 pm »
@flash2b, this looks great- thanks for all the work on it!

For a future version, consider adding period . to keywords2. I added it manually for my local copy. ;)

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

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 #7368 on: August 27, 2026, 05:10:18 pm »
I put it on the back burner.  The whole thing took much more time than anticipated but I wanted to be as accessible as possible. It is very easy to make one mistake that even the Java exception will not catch. I've had my share of those. Now at least we have some help making less mistakes. But of course the whole thing does not see if I store a value for CH1 into a variable of channel CH2. The #pgm# blocks which I use very often working on Modbus devices, is the main supplier of bugs.

Glad that it landed so positive.
They say attention is a shovel. It's time to dig 'em out.
 
The following users thanked this post: KungFuJosh

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 #7369 on: August 27, 2026, 06:43:45 pm »
I am adding an Other menu to my definitions that sets the chart curves, colors and fixed scales in one click. It works well, but I have a problem on devices with a #cmdMode menu.

On those, only one column carries data at a time. To chart the right column the script needs to know which mode the meter is in, and I cannot find a way to ask:

- deviceRead is not a script command inside runScriptAsync
- #SCRIPTINTERFACE only declares a required interface for a ScriptLibrary file   and is ignored at run time
- moving the script to the ScriptLibrary is not an option, then it no longer ships inside the definition

So I end up with one menu item per mode. On my Eletechsup PT21x01 that is four items (Temperature Normal/Dark, Resistance Normal/Dark) where two would do, and it grows with the number of modes.

Two ways it could be solved, whichever is easier for you:

1. A script command that returns the current mode of a device, so it can be  used in an #if, something like  #DeviceMode handle

2. Allowing the calculator function deviceMode() to be used in the #otherFunc body, outside the runScriptAsync string

Either one would let a single menu item follow the mode. Three more of my temperature definitions have the same #cmdMode structure, so it is not a one-off.
They say attention is a shovel. It's time to dig 'em out.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #7370 on: August 27, 2026, 06:49:28 pm »
I am adding an Other menu to my definitions that sets the chart curves, colors and fixed scales in one click. It works well, but I have a problem on devices with a #cmdMode menu.

On those, only one column carries data at a time. To chart the right column the script needs to know which mode the meter is in, and I cannot find a way to ask:

What a about a function that ask if device is in a specific mode:

https://lygte-info.dk/project/TestControllerFunctions%20UK.html#isDeviceMode
« Last Edit: August 27, 2026, 06:59:46 pm by HKJ »
 

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 #7371 on: August 27, 2026, 06:54:03 pm »
Can this be used in xxx or do it need txt ?
They say attention is a shovel. It's time to dig 'em out.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #7372 on: August 27, 2026, 06:59:28 pm »
Can this be used in xxx or do it need txt ?

I assume it can be used anywhere, the handle is a parameter.
 
The following users thanked this post: flash2b

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4796
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #7373 on: August 28, 2026, 06:55:45 am »
Notepad++ syntax highlighting for TestController definition files - v1.03

I played a bit around with it and am not impressed with the folding of #metadef.
It looks like it is a limit in notepad++, it needs a terminating word for each section or it believe it is nested.

Doing this:
            <Keywords name="Folders in comment, open">#idString</Keywords>
            <Keywords name="Folders in comment, middle" />
            <Keywords name="Folders in comment, close">#metadef #meta</Keywords>

Made it look this way:



This way to defined the folding has some issues:
1) It depends on the user following convection, not actual requirements.
2) It do not exactly match one block, but is one line off.
3) The fold all keys in notepad++ do not work correctly, (due to one #metadef before folding*) I believe that is a bug in notepad++
4) Coloring match the folding, not the block.
5) Main definition is also folded

But it makes folding of #metadef useful.


* This can be fixed by adding: ;#idString before the first #metadef
One way to use this is to place
;idString Header
On the first line in the file then the header can be folded.
« Last Edit: August 28, 2026, 10:51:10 am by HKJ »
 

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 #7374 on: August 28, 2026, 07:16:59 am »
You can also not fold on #metaSection since there same directive is used for start middle and end.

And if is messing things up, if you do not like if - elseif - endif folding just delete it.

I will add you suggestion to the next release of it.
They say attention is a shovel. It's time to dig 'em out.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf