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

0 Members and 285 Guests are viewing this topic.

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4788
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5575 on: January 25, 2026, 09:00:03 pm »
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

You forgot to restart TC between the 3 test, the first test did the configuration, the other might not have done anything.
 
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 #5576 on: January 25, 2026, 09:10:40 pm »
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

You forgot to restart TC between the 3 test, the first test did the configuration, the other might not have done anything.

Sorry about this. I made a new one. I hope it is OK now?
https://jumpshare.com/share/q7EjAhcIEon51kQCtwTp
« Last Edit: January 25, 2026, 10:12:37 pm by 2X »
 

Offline MrPete

  • Regular Contributor
  • *
  • Posts: 152
  • Country: us
Re: Program that can log/control many multimeters and other devices.
« Reply #5577 on: January 26, 2026, 04:38:49 am »
@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.

I've got huge RAM as well. Plenty of spare memory, so you're correct that (unless Java has an artificial limit) that wouldn't be it.

Note too: I've got a fast computer. It has plenty of idle cycles when these lockups occur. TC isn't just slow. It's 100% nonresponsive. I can't even close using the normal close-window actions (eg on right-click tray.) I have to use a task kill.

Definitely hung somewhere: zero cycles on any TC-related threads.

Maybe procmon will show something. If I can grab a few Round Tuits I'll try to diagnose further :)
 

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8217
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #5578 on: January 26, 2026, 05:06:31 am »
You should pay attention to see if your lockups occur with specific devices only.
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4788
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5579 on: January 26, 2026, 12:11:09 pm »
I've got huge RAM as well. Plenty of spare memory, so you're correct that (unless Java has an artificial limit) that wouldn't be it.

Note too: I've got a fast computer. It has plenty of idle cycles when these lockups occur. TC isn't just slow. It's 100% nonresponsive. I can't even close using the normal close-window actions (eg on right-click tray.) I have to use a task kill.

Definitely hung somewhere: zero cycles on any TC-related threads.

Maybe procmon will show something. If I can grab a few Round Tuits I'll try to diagnose further :)

Definitely a hung thread, they are often very hard to find, except if I can reproduce it.
I did try you first description, but did not see any issues.
 

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 942
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5580 on: January 26, 2026, 04:20:35 pm »
When I write a negative signed integer to a holding register using the modbus driver, will the highest bit be automatically set ?

If no, what do I need to do to set the high bit of double byte value? and how to do this in the #scpiCmd (value) statement ?


For reading I currently use this:
Code: [Select]
:readmath: binConv(int(value),0,2,1)/10
« Last Edit: January 26, 2026, 04:26:48 pm by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4788
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5581 on: January 26, 2026, 04:27:36 pm »
When I write a negative signed integer to a holding register using the modbus driver, will the highest bit be automatically set ?

If no, what do I need to do to set the high bit of double byte value?

Negative integers will have all high order bits one, that do not change when transferring them to the modbus commands.
 

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 942
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5582 on: January 26, 2026, 04:33:20 pm »
Ok, that is good news.

For reading I needed the binConv as described above and could not use the /10 in the #scpiCmd.
They say attention is a shovel. It's time to dig 'em out.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4788
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5583 on: January 26, 2026, 04:39:13 pm »
For reading I needed the binConv as described above and could not use the /10 in the #scpiCmd.

The format of scpiCmd (or rather the commands) varies with the driver, they are tailored to the protocol.
 

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 942
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5584 on: January 27, 2026, 08:28:48 am »
The dummy port does not work when using #driver Modbus.

That's a pity, will support be added to TestController?
They say attention is a shovel. It's time to dig 'em out.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4788
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5585 on: January 27, 2026, 09:58:42 am »
The dummy port does not work when using #driver Modbus.

That's a pity, will support be added to TestController?

The dummy do not work with binary interfaces at all.
I expect to add that at a later data, but modbus is a bit special and more dedicated support for it would be better. I have not decided about that yet.
 

Offline 2X

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: gr
Re: Program that can log/control many multimeters and other devices.
« Reply #5586 on: January 27, 2026, 12:46:07 pm »
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

You forgot to restart TC between the 3 test, the first test did the configuration, the other might not have done anything.

I didn't understand why there was a possibility that when I restart the TC maybe the script didn't work.


 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4788
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5587 on: January 27, 2026, 12:50:41 pm »
I didn't understand why there was a possibility that when I restart the TC maybe the script didn't work.

That was not the issue, but it was impossible to see if it applied the colors without restarting (or using the layout menu to clear the color, but restarting is simpler to say)
 
The following users thanked this post: 2X

Offline homico

  • Contributor
  • Posts: 43
  • Country: ru
Re: Program that can log/control many multimeters and other devices.
« Reply #5588 on: January 27, 2026, 04:13:47 pm »
Hi HKJ
My electronic payload for the MODE:LIST command returns MODE:LISTxx with the active list file number. Please tell me how to trim or replace this. Or better yet, provide a link to where this is described. I read about "readmach" but couldn't find it...
« Last Edit: January 27, 2026, 04:28:54 pm by homico »
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4788
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5589 on: January 27, 2026, 04:23:26 pm »
Hi HKJ
My electronic payload for the MODE:LIST command returns MODE:LISTxx with the active list file number. Please tell me how to trim or replace this. Or better yet, provide a link to where this is described. I read about "readmach" but couldn't find it...

Readmath is a tag and listen in the list of tags:
https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html#Tags
It also exist with another name for use on #askValues
https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html#mathFormat_&_readmath

If you search for readmath on the above page you will find some examples.

It needs an expression with "value" as the input value and generally this part of the function list is the most useful for it:
https://lygte-info.dk/project/TestControllerFunctions%20UK.html#String_functions

 

Offline homico

  • Contributor
  • Posts: 43
  • Country: ru
Re: Program that can log/control many multimeters and other devices.
« Reply #5590 on: January 27, 2026, 04:38:23 pm »
I read everything on those links three times, but I'm a bit slow and still don't understand how to do it.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4788
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5591 on: January 27, 2026, 04:46:53 pm »
I read everything on those links three times, but I'm a bit slow and still don't understand how to do it.

A simple way:

:readmath: substring(value,0,9)+substring(value,11)

The first substring returns the part before the number, the second part the part after the number.
 

Offline homico

  • Contributor
  • Posts: 43
  • Country: ru
Re: Program that can log/control many multimeters and other devices.
« Reply #5592 on: January 27, 2026, 04:57:18 pm »
Thanks...
Well, I'm trying to do something with #askModeMathFormat...🙂
 

Offline homico

  • Contributor
  • Posts: 43
  • Country: ru
Re: Program that can log/control many multimeters and other devices.
« Reply #5593 on: January 27, 2026, 05:05:59 pm »
It doesn't seem to work here:
#cmdSetup comboboxhot Load__Mode Main_
:read: :FUNC?
:write: :FUNC
:string:
:update: Main_Select
CC CURR
CV VOLT
CP POW
CR RES
OCP OCP
OVP OVP
Dual DUAL
Dynamic DYN
Load Effect EFFECT
List LIST
Auto_List ALIST
LED LED
Timing TIME
Short SHORT
Battery BAT
----------
It works for everyone :(
« Last Edit: January 27, 2026, 05:08:01 pm by homico »
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4788
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5594 on: January 27, 2026, 05:08:28 pm »
Thanks...
Well, I'm trying to do something with #askModeMathFormat...🙂

Expressions are exactly the same, there is no difference if you write a expression after:
:readmath:
#askValuesMathFormat
#askModeMathFormat

But the result are used differently :)
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4788
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5595 on: January 27, 2026, 05:14:28 pm »
It doesn't seem to work here:
#cmdSetup comboboxhot Load__Mode Main_
:read: :FUNC?
:write: :FUNC
:string:
:update: Main_Select
CC CURR
CV VOLT
CP POW
CR RES
OCP OCP
OVP OVP
Dual DUAL
Dynamic DYN
Load Effect EFFECT
List LIST
Auto_List ALIST
LED LED
Timing TIME
Short SHORT
Battery BAT
----------
It works for everyone :(

A conditional statement will fix it:

:readformat: substring(value,0,9)=="MODE:LIST"?substring(value,0,9)+substring(value,11):value

You can generally test these expression on the command line, but you have to add a = in front of them:
First you create a value:
=var value="MODE:LIST12"

then you can use the expression:
=substring(value,0,9)=="MODE:LIST"?substring(value,0,9)+substring(value,11):value

Arrow up will recall old commands.


 

Offline homico

  • Contributor
  • Posts: 43
  • Country: ru
Re: Program that can log/control many multimeters and other devices.
« Reply #5596 on: January 27, 2026, 05:24:18 pm »
Thank you. Last question: if the File List is not activated, then "xx" appears: how can I exclude them?
 

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 942
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5597 on: January 27, 2026, 05:42:55 pm »
Generally FUNC? should be linked to #askMode (=read) and not the setup menu.

Those functions should be in de mode menu and use #cmdMode instead (=write).
They say attention is a shovel. It's time to dig 'em out.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4788
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5598 on: January 27, 2026, 05:47:07 pm »
Thank you. Last question: if the File List is not activated, then "xx" appears: how can I exclude them?

I am not sure what you mean, the substring() do not care about number of x's
 

Offline homico

  • Contributor
  • Posts: 43
  • Country: ru
Re: Program that can log/control many multimeters and other devices.
« Reply #5599 on: January 27, 2026, 05:53:19 pm »
How do I exclude any/all "x"...?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf