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

0 Members and 25 Guests are viewing this topic.

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3906
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4600 on: September 16, 2025, 05:06:51 pm »
Scratch that. The variables didn't save after restarting TC after all. I dunno why they did the first time.

Is it possible to save variables to a text file?

Sort of, the programming language support file access, but I would not recommend doing it.


Is it possible to do what I quoted above using a variable for #replacetext?

As I stated before: A definition is static after loading, that includes commands (I believe), but not parameters.
The programable #scpiCmd can use any facility/function in the programming language to generate commands and parameters.

#scpiCmd name #pgm#
#scpiCmd name? #pgm#
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 5950
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4601 on: September 16, 2025, 05:29:53 pm »
As I stated before: A definition is static after loading, that includes commands (I believe), but not parameters.
The programable #scpiCmd can use any facility/function in the programming language to generate commands and parameters.

#scpiCmd name #pgm#
#scpiCmd name? #pgm#

Does that mean I can use a programable #scpiCmd to generate the #askValues? Or is that static too?

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

Offline Gertjan

  • Frequent Contributor
  • **
  • Posts: 290
  • Country: nl
Re: Program that can log/control many multimeters and other devices.
« Reply #4602 on: September 16, 2025, 05:58:02 pm »
- More interesting: version  2.53 works without any issues. With version 2.58 I get the crashes on "Reconnect". (Your v2.35 was fine too)
  I tested wit a mix of devices: SCPI and ASCII, connected with USB, RS-232 and ethernet.
So something changed between v2.53 and v.58....

The main difference between these two version is the serial library.

Hi HKJ,

I retested, using only one device, connecting using ethernet (so not using serial)
Same result, v2.53 is OK, v2.58 crashes on "Reconnect"....

The annotated logs, from versions v2.53 and v2.58:
Code: [Select]
version 2.53
------------

Starting
;; jSerialComm version: 2.10.3
;; Start thread for: 192.168.1.35 - R&S HMC8012
;; 192.168.1.35: Tx: <*IDN?.> 2A 49 44 4E 3F 0A
;; 192.168.1.35: Rx: <HAMEG,HMC8012,018803817,01.400> 48 41 4D 45 47 2C 48 4D 43
 38 30 31 32 2C 30 31 38 38 30 33 38 31 37 2C 30 31 2E 34 30 30 0A
;; Found R&S HMC8012 on 192.168.1.35 sn: 18803817
;; HMC8012: Tx <:SENSE:FUNCTION?>
;; 192.168.1.35: Tx: <:SENSE:FUNCTION?.> 3A 53 45 4E 53 45 3A 46 55 4E 43 54 49
4F 4E 3F 0A
;; 192.168.1.35: Rx: <"VOLT"> 22 56 4F 4C 54 22 0A
;; HMC8012: Rx <"VOLT">
;; HMC8012: Rx after :readmath: unQuote(value); <VOLT>
                                                                            <---- Reconnect
;; HMC8012: Tx <SYSTEM:LOCAL>
;; 192.168.1.35: Tx: <SYSTEM:LOCAL.> 53 59 53 54 45 4D 3A 4C 4F 43 41 4C 0A
;; jSerialComm version: 2.10.3
;; Start thread for: 192.168.1.35 - R&S HMC8012
;; 192.168.1.35: Tx: <*IDN?.> 2A 49 44 4E 3F 0A
;; 192.168.1.35: Rx: <HAMEG,HMC8012,018803817,01.400> 48 41 4D 45 47 2C 48 4D 43
 38 30 31 32 2C 30 31 38 38 30 33 38 31 37 2C 30 31 2E 34 30 30 0A
;; Found R&S HMC8012 on 192.168.1.35 sn: 18803817
;; HMC8012: Tx <:SENSE:FUNCTION?>
;; 192.168.1.35: Tx: <:SENSE:FUNCTION?.> 3A 53 45 4E 53 45 3A 46 55 4E 43 54 49
4F 4E 3F 0A
;; 192.168.1.35: Rx: <"VOLT"> 22 56 4F 4C 54 22 0A
;; HMC8012: Rx <"VOLT">
;; HMC8012: Rx after :readmath: unQuote(value); <VOLT>



version 2.58
------------

Starting
;; jSerialComm version: 2.11.0
;; Start thread for: 192.168.1.35 - R&S HMC8012
;; 192.168.1.35: Tx: <*IDN?.> 2A 49 44 4E 3F 0A
;; 192.168.1.35: Rx: <HAMEG,HMC8012,018803817,01.400> 48 41 4D 45 47 2C 48 4D 43
 38 30 31 32 2C 30 31 38 38 30 33 38 31 37 2C 30 31 2E 34 30 30 0A
;; Found R&S HMC8012 on 192.168.1.35 sn: 18803817
;; HMC8012: Tx <:SENSE:FUNCTION?>
;; 192.168.1.35: Tx: <:SENSE:FUNCTION?.> 3A 53 45 4E 53 45 3A 46 55 4E 43 54 49
4F 4E 3F 0A
;; 192.168.1.35: Rx: <"VOLT"> 22 56 4F 4C 54 22 0A
;; HMC8012: Rx <"VOLT">
;; HMC8012: Rx after :readmath: unQuote(value); <VOLT>
                                                                            <---- Reconnect
;; HMC8012: Tx <SYSTEM:LOCAL>
;; 192.168.1.35: Tx: <SYSTEM:LOCAL.> 53 59 53 54 45 4D 3A 4C 4F 43 41 4C 0A
;; jSerialComm version: 2.11.0
                                                          <---- Java error message, crash TC
Indeed, the difference seems to be the jSerialComm version. And it is loaded anyway.

I did a second test without any devices checked on the "Load devices" tab. Same results.
The annotated log:
Code: [Select]
version 2.53 (no devices selected)
------------

Starting
;; jSerialComm version: 2.10.3
                                 <---- Reconnect
;; jSerialComm version: 2.10.3




version 2.58 (no devices selected)
------------

Starting
;; jSerialComm version: 2.11.0
                                 <---- Reconnect
;; jSerialComm version: 2.11.0
                                 <---- Java error message, crash TC

Very short log. With only jSerialComm version loaded.

Hope this helps to find a solution.

regards, gertjan.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3906
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4603 on: September 16, 2025, 06:03:41 pm »
Does that mean I can use a programable #scpiCmd to generate the #askValues? Or is that static too?

Sort of, it makes SCPI commands and you can use these from #askValue.
 
The following users thanked this post: KungFuJosh

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3906
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4604 on: September 16, 2025, 06:04:59 pm »
I did a second test without any devices checked on the "Load devices" tab. Same results.

Do you mean TC crashed this time also?

I may have to make a version with a old serial lobrary for your to test with, but not today.
 

Offline Gertjan

  • Frequent Contributor
  • **
  • Posts: 290
  • Country: nl
Re: Program that can log/control many multimeters and other devices.
« Reply #4605 on: September 16, 2025, 06:38:10 pm »
I did a second test without any devices checked on the "Load devices" tab. Same results.

Do you mean TC crashed this time also?

Yes, v.258 crashed on reconnect, even without any devices loaded.

Quote
I may have to make a version with a old serial library for your to test with, but not today.

I am happy to test a version with a old serial library. There is no hurry. I can still use TC (and i am still a very happy TC user :)).

regards, Gertjan.
 

Offline gby

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: us
Re: Program that can log/control many multimeters and other devices.
« Reply #4606 on: September 16, 2025, 07:30:53 pm »
FWIW I am also having TestController close/crash every time I click the Load Devices tab Reconnect button.  Specifically:

Win 10 computer Ver 22H2
Java:  Version 8 Update 461 (build 1.8.0_461-b11)
TestController: Ver 2.58 and 2.64

Seems very consistent for me.  Whenever I hit Reconnect TestController stops running/closes its window.
Only Siglent SDG2122X over Ehternet LXI is Enabled     Reconnect button closes TC
No devices on the Load Devices page are Enabled         Reconnect button closes TC
New driver over Ethernet Socket port 5025 is Enabled   Reconnect button closes TC

Works fine connecting to any combination of devices when I start TestController.

Like others my memory is that in older TC versions Reconnect button worked fine.
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 5950
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4607 on: September 16, 2025, 07:44:49 pm »
Windows 11 Pro 24H2
TestController 2.70
The only Java install I have is Java SE Development Kit 22.0.1

Ran a 500MHz stability test on SDG for about an hour.
Hit Reconnect a bunch of times.

No crashes for me.

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: 355
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #4608 on: September 17, 2025, 05:44:11 am »
Win 10 computer Ver 22H2 with TC 2.64, no problems running multiple hours with reconnect during testing of my definitions.
They say attention is a shovel. It's time to dig 'em out.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3906
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4609 on: September 17, 2025, 06:20:45 am »
TC with serial lib 2.9.1, release is 2.11.0

http://www.lygte-info.dk/pic/Projects/TestController/TestControllerS291.jar

I have not changed the version number, only replaced the serial library and the file is called TestControllerS291.jar it can be run directly with that name, but the batch files will not use it without editing.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3906
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4610 on: September 17, 2025, 06:28:27 am »
I noticed that the serial library has been updated, here is another test version with that:

http://lygte-info.dk/pic/Projects/TestController/TestControllerS2112.jar

This is v2.11.2 and the file is named TestControllerS2112.jar, it will probably be in the next release of TC.

Version list of jSerialComm: https://github.com/Fazecast/jSerialComm/releases
« Last Edit: September 17, 2025, 06:33:56 am by HKJ »
 
The following users thanked this post: gby

Offline Gertjan

  • Frequent Contributor
  • **
  • Posts: 290
  • Country: nl
Re: Program that can log/control many multimeters and other devices.
« Reply #4611 on: September 17, 2025, 07:25:47 am »
I noticed that the serial library has been updated, here is another test version with that:

Good morning HKJ,

I am happy to report that the new TC test version works without any issues. I reconnected with multiple devices, using different drivers and connection interfaces.

So the problem was indeed with jSerialComm.
Thank you for resolving this so quickly!  :-+

Best regards & thanks, Gertjan.
« Last Edit: September 17, 2025, 09:33:30 am by Gertjan »
 

Offline Pukker

  • Regular Contributor
  • *
  • Posts: 161
  • Country: nl
Re: Program that can log/control many multimeters and other devices.
« Reply #4612 on: September 17, 2025, 07:35:38 am »
Bug?
Testcontroller crashes when I select "reconnect" in the "load devices" page.
earlier versions didn't have this problem.

Reply to my own message,
Uninstalling Java and reinstalling with the latest Java version, did the job,
reconnect works fine.
I will update to TC with new jSerialcomm also for failsafe.
« Last Edit: September 17, 2025, 09:35:56 am by Pukker »
 

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 355
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #4613 on: September 17, 2025, 08:14:21 am »
TC v2.70 (with new Jserial) also working for me while I had no problems.
« Last Edit: September 17, 2025, 09:05:38 am by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Offline Gertjan

  • Frequent Contributor
  • **
  • Posts: 290
  • Country: nl
Re: Program that can log/control many multimeters and other devices.
« Reply #4614 on: September 17, 2025, 09:38:02 am »
Uninstalling Java and reinstalling with the latest Java version, did the job,
reconnect works fine.

While searching for a solution for my reconnect problem, I completely removed Java, and reinstalled with the latest version.
It did not solve the problem. TC v2.70 with the new version of jSerialComm does.

regards, Gertjan.
 

Offline gby

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: us
Re: Program that can log/control many multimeters and other devices.
« Reply #4615 on: September 17, 2025, 01:07:42 pm »
HKJ,

This test version of 2.70 with serial 2.11.2 serial also fixes the Reconnect issue for me.

Thanks for fixing this quickly.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3906
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4616 on: September 17, 2025, 05:28:54 pm »
Java by itself do seldom crash, but when something goes wrong in a call to native code, it can crash.
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 5950
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4617 on: September 17, 2025, 10:34:33 pm »
My evil plan might have worked.

Thanks,
Josh
« Last Edit: September 18, 2025, 04:39:52 am by KungFuJosh »
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 5950
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4618 on: September 18, 2025, 02:35:56 am »
Is there a way to get inputValue to work on scpiCmd #pgm#? It appears to only work in scpiCmd none.

As I see it currently, my options to set dynamic Units are:
Code: [Select]
#scpiCmd MeasType1 #pgm#
:setvar: meas1Type=(inputValue);
(more code goes here for the rest of the function)
...which doesn't currently work.

Or, is there a way I can execute a second scpiCmd from another? For example:
Code: [Select]
#scpiCmd MeasType1 none
:setvar: meas1Type=inputValue;meas1Unit=GetUnitFromType(inputValue)
OR:
:setvar: meas1Type=inputValue;meas1Unit=GetUnitFromType(meas1Type)
Where GetUnitFromType is a helper command, or:
Code: [Select]
#scpiCmd MeasType1 none
:setvar: meas1Type=inputValue;
meas1Unit
Where meas1Unit would be a 2nd command executed to set the 2nd variable based on the 1st.

The tedious way (that I know would work) would be to have a separate command for each measurement type that individually sets both variables, but that's a lot of extra bloat.

Alternatively, I can keep it super simple with only 2 options for each measurement channel, but I'm still curious about doing things like I mentioned above.

What do you think?

Thanks,
Josh
« Last Edit: September 18, 2025, 04:16:28 am by KungFuJosh »
"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: 3906
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4619 on: September 18, 2025, 08:35:18 am »
Is there a way to get inputValue to work on scpiCmd #pgm#? It appears to only work in scpiCmd none.

inputValue can be accessed in the script (It is called value here, because there is no answer to call value) and you have direct access to all variables in script.

Code: [Select]
#scpiCmd MyFunc #pgm#
var myVar=value;

endif;
 
The following users thanked this post: KungFuJosh

Offline Gertjan

  • Frequent Contributor
  • **
  • Posts: 290
  • Country: nl
Re: Program that can log/control many multimeters and other devices.
« Reply #4620 on: September 18, 2025, 10:33:22 am »
Hi HKJ,

I am using the param sweeper popup. The param sweeper controls a device that needs some time to settle after a step. But now the measurement is taken immediately after the step, so the value is not correct...

So I would like do a sweep-step, and then have a delay before starting the measurement for that step. (So the device is settled before the measurement is taken)
Would that be possible?


A related question: could you explain the difference between the "log interval" and "step time" settings? For now I just set them to the same value...
regards, Gertjan.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3906
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4621 on: September 18, 2025, 11:21:41 am »
I am using the param sweeper popup. The param sweeper controls a device that needs some time to settle after a step. But now the measurement is taken immediately after the step, so the value is not correct...

So I would like do a sweep-step, and then have a delay before starting the measurement for that step. (So the device is settled before the measurement is taken)
Would that be possible?


A related question: could you explain the difference between the "log interval" and "step time" settings? For now I just set them to the same value...
regards, Gertjan.

The param sweeper and the log system works independent of each other, i.e. there is no guarantee when the measurement is taken.
 

Offline Gertjan

  • Frequent Contributor
  • **
  • Posts: 290
  • Country: nl
Re: Program that can log/control many multimeters and other devices.
« Reply #4622 on: September 18, 2025, 11:36:09 am »
The param sweeper and the log system works independent of each other, i.e. there is no guarantee when the measurement is taken.
Hi HKJ,

Please correct me if I am wrong, but isn't the param sweeper controlling the logging with "Log interval" and "Step time"?
Could you expand a bit on the relation between param sweeper and log system to make this more clear?

Thanks & regards, Gertjan.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3906
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4623 on: September 18, 2025, 12:34:58 pm »
Please correct me if I am wrong, but isn't the param sweeper controlling the logging with "Log interval" and "Step time"?
Could you expand a bit on the relation between param sweeper and log system to make this more clear?

Yes the sweeper sends orders to the log system, any popup in TC can theoretical start/stop the log system and a couple do it.
Anything you can control with a script command, can also be controlled from any popup in TC, if there is a reason to do it (Mostly there is not) .
https://lygte-info.dk/project/TestControllerScriptCommands%20UK.html
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 13831
  • Country: us
Re: Program that can log/control many multimeters and other devices.
« Reply #4624 on: September 18, 2025, 02:23:10 pm »
I've never tied your program or downloaded it.  I was wondering if you were planning to add support for the new Brymen BM788BT.   Looking at your list of supported meters, I don't see the 121GW, Gossen Ultra, UNI-T UT181A.   With the protocol for the 121GW being open, I am thinking that the only reason you don't support it due to it using BLE.   Which would explain why the others are not listed as well.   

Any plans to support BLE in the future? 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf