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

ton4eff, HKJ, Gertjan and 449 Guests are viewing this topic.

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8424
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4575 on: September 13, 2025, 08:30:13 pm »
But why?
The serial and firmware number are used in the TC function to document what devices are used for a test (Popups, Devices, List all connected devices, this can also be done from script). It can also be used in "Remap handles".

I figured it out. ;)

I used:
Code: [Select]
:read: *IDN?
:readmath: getElement(value,3, ",")

I wanted to isolate the firmware version number, and later I will add an info field for "Latest Firmware Version" once the command is available.

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

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4954
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4576 on: September 13, 2025, 08:39:57 pm »
I figured it out. ;)

I misunderstood your question, but yes with the controls you can edit any answer.
 
The following users thanked this post: KungFuJosh

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8424
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4577 on: September 13, 2025, 08:47:58 pm »
I figured it out. ;)

I misunderstood your question, but yes with the controls you can edit any answer.

How can I add a word before the version number? I want to change the info to show both versions (current/latest) on the same line.

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

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4954
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4578 on: September 13, 2025, 09:05:54 pm »
How can I add a word before the version number? I want to change the info to show both versions (current/latest) on the same line.

You can do any expression, see my example:

Code: [Select]
:read: *IDN?
:readmath: "my prefix "+getElement(value,3, ",")+" my postfix"
 
The following users thanked this post: KungFuJosh

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8424
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4579 on: September 13, 2025, 09:24:40 pm »
You can do any expression, see my example:

Code: [Select]
:read: *IDN?
:readmath: "my prefix "+getElement(value,3, ",")+" my postfix"

Perfect, thank you.

I doubled the command to see how it will look; I'll change the latest part after the SCPI command is created.

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

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8424
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4580 on: September 14, 2025, 02:47:48 pm »
Here's my vote for a better thread title:

"TestController - Data Logging Software with Advanced Remote Control and Automation Support"

Something like that. ;)

"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
Best Continuity Tester Ever...Got Betterer!
 

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8424
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4581 on: September 14, 2025, 06:03:42 pm »
I have a mildly evil plan, but I think I might need some help...aka, probably need features added. ;)

I would like :setvar: to work from cmdSetup.
I would like to be able to set a variable, with no other function; #scpiCmd name none would be fine if that will work to set the variable from cmdSetup.

For example, in measurement setup, I can use any of 4 analog channels, or any of 16 digital channels as the source channel.
I can then choose 1 of 38 measurement types to go along with the 1 chosen of those 20 channel options. Setting 20 channels times 38 currently available measurement types would be cuckoo (ignore that not all measurement types can be done on digital channels ;)).


My plan is to create multiple variables to define a measurement type and channel for 4 or 5 measurement option groups.
Then use #replacetext to set the #value for the specific measurement setup(s).

Something like this maybe:
Code: [Select]
#scpiCmd MeasChan1 none
:setvar: meas1Chan=inputValue
#scpiCmd getMeasChan1? none?
:readmath: meas1Chan

#cmdSetup combobox M1_Channel Measure
:read: getMeasChan1?
:write: MeasChan1 (value)
:update: M1_Channel
:string:
CH1 CHANnel1
CH2 CHANnel2
CH3 CHANnel3
CH4 CHANnel4
DO DIGital0
D1 DIGital1
D2 DIGital2
D3 DIGital3
D4 DIGital4
D5 DIGital5
D6 DIGital6
D7 DIGital7
D8 DIGital8
D9 DIGital9
D10 DIGital10
D11 DIGital11
D12 DIGital12
D13 DIGital13
D14 DIGital14
D15 DIGital15
:tip: Select measurement source
(Another combobox for the measurement type...)

The command for current measurement values is:
:MEASurement:[Type]:CURRent? <Channel>

I could set that as something like:
Code: [Select]
#replacetext M1CHAN HOWDOIGETTHEVARIABLEHERE;)
#replacetext M1TYPE HOWDOIGETTHEVARIABLEHERE;)
#value M1CHAN_M1TYPE _ SI
#askValues :MEAS:M1TYPE:CURR? M1CHAN


What do you think?

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

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4954
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4582 on: September 14, 2025, 06:18:13 pm »
I would like :setvar: to work from cmdSetup.
I would like to be able to set a variable, with no other function; #scpiCmd name none would be fine if that will work to set the variable from cmdSetup.

#scpiCmd works as a SCPI command, i.e. you can list it on any #cmdSetup and set the variable
When needing to read the variable it must be done in a #SCPICmd


What do you think?

#replaceText is only done at startup of TC, not dynamic.
 

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8424
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4583 on: September 14, 2025, 06:32:18 pm »
I would like :setvar: to work from cmdSetup.
I would like to be able to set a variable, with no other function; #scpiCmd name none would be fine if that will work to set the variable from cmdSetup.

#scpiCmd works as a SCPI command, i.e. you can list it on any #cmdSetup and set the variable
When needing to read the variable it must be done in a #SCPICmd


What do you think?

#replaceText is only done at startup of TC, not dynamic.


What if you made it possible to run #replaceText with a command? Or if it's easier for some reason, a new variation of #replaceText that could be run via a command?

In that case, #cmdSetup could set the variables with #scpiCmd stuff, then #cmdMode could activate the #replaceText to run and create the needed #askValues based on the set variables.

The result would be a much cleaner way of creating #Values and #askValues when too many options are possible. The alternative now is to limit options significantly to 4 channels with Vpp and Vrms, but there's potential for a lot more. ;)

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

Offline Pukker

  • Regular Contributor
  • *
  • Posts: 161
  • Country: nl
Re: Program that can log/control many multimeters and other devices.
« Reply #4584 on: September 15, 2025, 10:31:06 am »
Question over "Current Values page"
When logging with interval higher than 1,
then is automaticly Source "Direct is selected, instead of "Table"
SumeTimeHour en other aren't working in that case.
When logging with greater interval, battery discharge for example,
log wil be very long when logging with 1 second interval and logging over hours.
Is it possible to choose Table, with longer interval time.

Bug?
Testcontroller crashes when I select "reconnect" in the "load devices" page.
earlier versions didn't have this problem.
 

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8424
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4585 on: September 15, 2025, 02:59:12 pm »
Reconnect works fine for me.

Try debug mode and see if you notice anything.
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
Best Continuity Tester Ever...Got Betterer!
 

Online Gertjan

  • Frequent Contributor
  • **
  • Posts: 368
  • Country: nl
Re: Program that can log/control many multimeters and other devices.
« Reply #4586 on: September 15, 2025, 05:20:13 pm »
Bug?
Testcontroller crashes when I select "reconnect" in the "load devices" page.
earlier versions didn't have this problem.

I experience the same problem. After clicking "Reconnect" I get a Java popup:



Roughly translated: Java (TM) Platform SE binary does not work anymore.The program is not working anymore because of a problem. Close your Program.
A really helpfull message... :)

This is on a Windows 7 - 32bit machine. (clean OS with just a few measurement programs)

The debug log (with only a 34401A connected, from first start until crash):
Code: [Select]
Starting
;; jSerialComm version: 2.11.0
;; Start thread for: COM4 - Agilent 34401A
;; COM4: Set params: 9600
;; COM4: Tx: <*IDN?.> 2A 49 44 4E 3F 0A
;; COM4: Rx: <HEWLETT-PACKARD,34401A,0,10-5-2> 48 45 57 4C 45 54 54 2D 50 41 43 4B 41 52 44 2C 33 34 34 30 31 41 2C 30 2C 31 30 2D 35 2D 32
;; COM4: Tx <SerialInit>
;; COM4: Script start
;; COM4: Tx <SYST:REM>
;; COM4: Tx: <SYST:REM.> 53 59 53 54 3A 52 45 4D 0A
;; COM4: Delay: 500ms
;; COM4: Script end <>
;; Found Agilent 34401A on 16C95x Serial Port (COM4)
;; HP34401A: Tx <FUNC?>
;; COM4: Tx: <FUNC?.> 46 55 4E 43 3F 0A
;; COM4: Rx: <"VOLT"> 22 56 4F 4C 54 22
;; HP34401A: Rx <"VOLT">
;; HP34401A: Tx <SerialExit>
;; HP34401A: Script start
;; HP34401A: Tx <system:local>
;; COM4: Tx: <system:local.> 73 79 73 74 65 6D 3A 6C 6F 63 61 6C 0A
;; HP34401A: Script end <>
;; COM4: Close
;; jSerialComm version: 2.11.0
Basicly, everything is normal, disconnecting after the "Reconnect" is OK. But after re-start TC crashes immediately....

On another Windows 10-64bit machine I do not get the Java error, but not all devices are reloaded after "Reconnect". (they were loaded correct the first time)

For the moment my workaround is to close and re-start TC instead of using "Reconnect"...

Regards, Gertjan.
 

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8424
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4587 on: September 15, 2025, 06:11:28 pm »
I'm on Windows 11 with no issues reconnecting.

What version of TC are you guys using?
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
Best Continuity Tester Ever...Got Betterer!
 

Online Gertjan

  • Frequent Contributor
  • **
  • Posts: 368
  • Country: nl
Re: Program that can log/control many multimeters and other devices.
« Reply #4588 on: September 16, 2025, 06:10:10 am »
Is there any version other than the latest version? :)

But yes, I should give a bit more info.
- I am not sure when this started, but at least it happens with the last two TC versions, v2.61 and v2.64.
- I am using the latest Oracle Java, version 8, update 461. The last Java update did not help.
- Windows 7 has all available updates (and worked flawless before). Windows 10 gets all latest updates  & patches.

regards, Gertjan.
 

Offline Pukker

  • Regular Contributor
  • *
  • Posts: 161
  • Country: nl
Re: Program that can log/control many multimeters and other devices.
« Reply #4589 on: September 16, 2025, 08:06:18 am »
I'm on Windows 11 with no issues reconnecting.

What version of TC are you guys using?

Using Windows 11 and latest TC (2.68)
Java 8.0 Update 411  (build 1.8.0_411-b09)
TC Version 2.31 has not this problem.

Remarkeble: With no devices connected, ofcourse TC won't find anything,
but then no crash. With devices connected it crashes.
Restart is working fine.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4954
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4590 on: September 16, 2025, 10:22:22 am »
What if you made it possible to run #replaceText with a command? Or if it's easier for some reason, a new variation of #replaceText that could be run via a command?

In that case, #cmdSetup could set the variables with #scpiCmd stuff, then #cmdMode could activate the #replaceText to run and create the needed #askValues based on the set variables.

The result would be a much cleaner way of creating #Values and #askValues when too many options are possible. The alternative now is to limit options significantly to 4 channels with Vpp and Vrms, but there's potential for a lot more. ;)

A loaded definition cannot be changed, it is parsed into various structures. With a programable #scpiCmd you can send any command and change it on the fly.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4954
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4591 on: September 16, 2025, 10:31:14 am »
Question over "Current Values page"
When logging with interval higher than 1,
then is automaticly Source "Direct is selected, instead of "Table"
SumeTimeHour en other aren't working in that case.
When logging with greater interval, battery discharge for example,
log wil be very long when logging with 1 second interval and logging over hours.
Is it possible to choose Table, with longer interval time.

Current values will synchronize to log (Table) when needed, i.e. when there is too little time to reliable send its own read request to devices.
I have no idea how you mean SunTimeHour do not work, could you explain a bit more.
You can select any logging interval you want, there are a few fixed on the log button, advanced log gives your a input field, and #log command allows you to write any (within limits) value after it.

Bug?
Testcontroller crashes when I select "reconnect" in the "load devices" page.
earlier versions didn't have this problem.

It is a very log time since I have seen a crash on TC? Is it related to a specific device?
It is a very long time since I have done anything around reconnecting.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4954
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4592 on: September 16, 2025, 10:38:16 am »
Is there any version other than the latest version? :)

There is, v2.35 is on my server:
http//lygte-info.dk/pic/Projects/TestController/TestController2.35.zip

But yes, I should give a bit more info.
- I am not sure when this started, but at least it happens with the last two TC versions, v2.61 and v2.64.
- I am using the latest Oracle Java, version 8, update 461. The last Java update did not help.
- Windows 7 has all available updates (and worked flawless before). Windows 10 gets all latest updates  & patches.

I am very surprised about these crashes.
Is it related to a specific device, driver or interface?

I generally run on Win10 64bit and also has a Win11 machine, but has not moved TC development or usage to that machine yet.
 

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8424
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4593 on: September 16, 2025, 12:55:46 pm »
Is there any version other than the latest version? :)

But yes, I should give a bit more info.
- I am not sure when this started, but at least it happens with the last two TC versions, v2.61 and v2.64.
- I am using the latest Oracle Java, version 8, update 461. The last Java update did not help.
- Windows 7 has all available updates (and worked flawless before). Windows 10 gets all latest updates  & patches.

regards, Gertjan.

I'm using v2.70, which I assume is a beta or prerelease version. You could try downloading that from HKJ's previous post with the link.
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
Best Continuity Tester Ever...Got Betterer!
 

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8424
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4594 on: September 16, 2025, 12:56:56 pm »
What if you made it possible to run #replaceText with a command? Or if it's easier for some reason, a new variation of #replaceText that could be run via a command?

In that case, #cmdSetup could set the variables with #scpiCmd stuff, then #cmdMode could activate the #replaceText to run and create the needed #askValues based on the set variables.

The result would be a much cleaner way of creating #Values and #askValues when too many options are possible. The alternative now is to limit options significantly to 4 channels with Vpp and Vrms, but there's potential for a lot more. ;)

A loaded definition cannot be changed, it is parsed into various structures. With a programable #scpiCmd you can send any command and change it on the fly.

Fair enough. I guess I can have a note that says to restart TC after making those measurement changes. Or would clicking Reconnect be sufficient?

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

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8424
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4595 on: September 16, 2025, 02:50:44 pm »
Setting the variables is no problem, and they're still good after restarting. How do I make something like this work?:

Code: [Select]
#replacetext M1CHAN getMeasChan1?
#replacetext M1TYPE getMeasType1?

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

Online Gertjan

  • Frequent Contributor
  • **
  • Posts: 368
  • Country: nl
Re: Program that can log/control many multimeters and other devices.
« Reply #4596 on: September 16, 2025, 03:28:08 pm »
Is there any version other than the latest version? :)

There is, v2.35 is on my server:
http//lygte-info.dk/pic/Projects/TestController/TestController2.35.zip

But yes, I should give a bit more info.
- I am not sure when this started, but at least it happens with the last two TC versions, v2.61 and v2.64.
- I am using the latest Oracle Java, version 8, update 461. The last Java update did not help.
- Windows 7 has all available updates (and worked flawless before). Windows 10 gets all latest updates  & patches.

I am very surprised about these crashes.
Is it related to a specific device, driver or interface?

Hi HKJ,

I am saving the older versions too :)

- Using v2.64, I tried different drivers and interfaces. It makes no difference. TC (or Java) crashes after "Reconnect", even when there is not any device enabled on the "Load devices" tab.

- 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 v2.58....

Best regards & thanks for looking into this, Gertjan.

« Last Edit: September 16, 2025, 04:49:05 pm by Gertjan »
 

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8424
  • Country: us
  • TEAS is real.
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
Best Continuity Tester Ever...Got Betterer!
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4954
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4598 on: September 16, 2025, 04:36:30 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.
 

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8424
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4599 on: September 16, 2025, 04:42:42 pm »
Setting the variables is no problem, and they're still good after restarting. How do I make something like this work?:

Code: [Select]
#replacetext M1CHAN getMeasChan1?
#replacetext M1TYPE getMeasType1?

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?
Is it possible to do what I quoted above using a variable for #replacetext?

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


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->