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

ton4eff and 657 Guests are viewing this topic.

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8454
  • Country: us
  • TEAS is real.
Re: Program that can log from many multimeters.
« Reply #4250 on: June 23, 2025, 07:07:30 pm »
The #author at the top before the ;#notes was also a problem. After moving both, it's working now.

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 KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8454
  • Country: us
  • TEAS is real.
Re: Program that can log from many multimeters.
« Reply #4251 on: June 23, 2025, 07:10:57 pm »
I have a command in the setup menu to run internal calibration:
;; SMIQ06B: Tx <SYSTem:PROTect1 OFF,123456>
;; SMIQ06B: Tx <:CAL:ALL?>
;; SMIQ06B: Rx Timeout

The debug dialog shows a timeout there, but it's not going to get a response. Should I ignore that, or is there something to add so it knows it won't get a response?

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: 4959
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #4252 on: June 23, 2025, 07:24:43 pm »
I have a command in the setup menu to run internal calibration:
;; SMIQ06B: Tx <SYSTem:PROTect1 OFF,123456>
;; SMIQ06B: Tx <:CAL:ALL?>
;; SMIQ06B: Rx Timeout

The debug dialog shows a timeout there, but it's not going to get a response. Should I ignore that, or is there something to add so it knows it won't get a response?

You can switch to SCPIx, then you can use the tx like in Ascii definitions. But it is optionally, you do not need to change anything else.
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8454
  • Country: us
  • TEAS is real.
Re: Program that can log from many multimeters.
« Reply #4253 on: June 23, 2025, 07:44:04 pm »
Okay, this should be cool to start with. Please let me know if you think there's anything I should add or change.

ETA: I should probably add my connection settings on the device/com port. I'll do that shortly and then upload it again.

ETA2: Updated with settings added to Notes.

Thanks,
Josh
« Last Edit: June 24, 2025, 12:41:19 am by KungFuJosh »
"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: 4959
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #4254 on: June 23, 2025, 08:04:58 pm »
Okay, this should be cool to start with. Please let me know if you think there's anything I should add or change.

ETA: I should probably add my connection settings on the device/com port. I'll do that shortly and then upload it again.

ETA2: Updated with settings added to Notes.

Looks like a nice definition and it did not take you much time to do it.
I will, of course, include it.
« Last Edit: June 23, 2025, 08:06:38 pm by HKJ »
 
The following users thanked this post: KungFuJosh

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8454
  • Country: us
  • TEAS is real.
Re: Program that can log from many multimeters.
« Reply #4255 on: June 23, 2025, 08:10:15 pm »
Okay, this should be cool to start with. Please let me know if you think there's anything I should add or change.

ETA: I should probably add my connection settings on the device/com port. I'll do that shortly and then upload it again.

ETA2: Updated with settings added to Notes.

Looks like a nice definition and it did not take you much time to do it.
I will, of course, include it.

Thank you. Most of the learning curve was with the first definition. ;)

Though I looked at your SDG2122X definition and see there's a whole lot I could still learn, but probably won't. lol

Now to convert this to R&S SML, as that's very similar.

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 KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8454
  • Country: us
  • TEAS is real.
Re: Program that can log from many multimeters.
« Reply #4256 on: June 24, 2025, 12:39:15 am »
Something is wrong with the definition for the SML series. It should work. Most things do work. The SCPI commands in the operation manuals look copypasta'd. However, it doesn't properly set the sweep mode, even though TC thinks it does. The read commands say what it's supposed to say (for example, AUTO), but switching the SML to local, and checking the Sweep mode will say Single.

FREQ? also won't work during a sweep (gives the wrong answer), but I don't know if that's a limitation of the device or what. 🤷

I don't have those issues at all with the SMIQ, but that one can only seem to set AUTO and MANual, STEP doesn't work. That's not a big deal, I'll just remove STEP since it's functioning the same as MANual for whatever reason.

I'm going to make a couple small updates to the SMIQ definition. Mostly a couple :format: changes.

Thanks,
Josh

ETA: FREQ? is still dumb, but I read more manuals for R&S gens, and came across:
:TRIG:SWE:SOUR AUTO
:TRIG:SWE:SOUR SING

That corrects the stupid issue with the SML. It's functional on both series, so I'll add it to both.
« Last Edit: June 24, 2025, 01:26:47 am by KungFuJosh »
"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 orion242

  • Supporter
  • ****
  • Posts: 747
  • Country: us
Re: Program that can log from many multimeters.
« Reply #4257 on: June 24, 2025, 01:27:32 am »
Are there any example program/scripts for this application?

I see the website has all the commands documented, but I'm a bit lost how I write and test a program that can also use script commands.

I want to write a test program to control my power supply, DMMs and Eload to run I/O tests on PLC type controllers to verify the its hardware I/O.  Have this app talking to all my test gear, verified I can send the required commands to my equipment.  Just looking for some examples on how I can write my own program to puppet master my test gear and record the results. 

An example or two of an program would likely fill in what I'm missing.  Where do I use script commands, where do I use a program commands how they interact, load and kick a program off.

Forgive me if this has already been pointed out somewhere in this thread.  I'm about 80 pages in and haven't seen an example program yet.

Btw, awesome work on this app.  Very little effort and I have most my gear working.  Eload is modbus, have GPIB gear and stuff with serial...even Fluke 289 with IR.  It all just worked for the most part.  Nice job.
« Last Edit: June 24, 2025, 01:31:07 am by orion242 »
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8454
  • Country: us
  • TEAS is real.
Re: Program that can log from many multimeters.
« Reply #4258 on: June 24, 2025, 02:06:06 am »
Here are both definitions with the formats updated, and the sweep trigger mode setting added. Hopefully, they're all good now. ;)

I guess that pain in the ass was useful with the SML since it added another feature for the SMIQ definition.

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 KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8454
  • Country: us
  • TEAS is real.
Re: Program that can log from many multimeters.
« Reply #4259 on: June 24, 2025, 02:08:44 am »
Are there any example program/scripts for this application?

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

https://lygte-info.dk/project/TestControllerUserScripts1%20UK.html

The easiest way to find stuff is search google for "testcontroller" and whatever you want to find for it. I searched "testcontroller user scripts" for the second one.

Your devices need definitions to run with TestController. If you're lucky, most or all of them will already be in there. ;)

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: 4959
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #4260 on: June 24, 2025, 05:43:08 am »
Are there any example program/scripts for this application?

Yes and some is included with TC, try opening this menu:


This will open the script overview:


Checkmark the "Include system" to see included scripts.

The "Generate Script" menu will also make scripts for you. This depends on conditions in TC what scripts can be generated:
Use the Setup menus for a couple of devices and a script to do the same can be generated. https://lygte-info.dk/project/TestControllerScript1%20UK.html
Configure a "Log Event" menu and a script with the same functionality can be generated and you can make multiple of these scripts and sting them together.
A configured GridPanel can be generated as a script.
The full layout of TC can be generated as script, this is useful to cut snippets from.

Also be aware that TC has two languages:
Scripting, that is commands starting with #, this language is designed to control TC
Programming, that is basically a full programming language and starts as the expressions you can use in many places. This language is more universal, but cannot control TC the same way that script can do.
The two languages are integrated and is often used together.

« Last Edit: June 24, 2025, 06:23:07 am by HKJ »
 
The following users thanked this post: orion242

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4959
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #4261 on: June 24, 2025, 05:50:53 am »
Here are both definitions with the formats updated, and the sweep trigger mode setting added. Hopefully, they're all good now. ;)

I guess that pain in the ass was useful with the SML since it added another feature for the SMIQ definition.

They will be included (Thanks).

Now to another part of definitions, that is optional, that is the #interface part.
The purpose of this part of the definitions is to make multiple similar device definition usable from the same script, even if the devices has different SCPI commands. Let me illustrate with power supplies:

Defining these interface command: setVoltage(), setCurrent and setOn() you can control a power supply enough for use in many scripts (In praxis you will define a few more).
To get a 5V 1A supply I can use:

=var ps=getDevice("PS")
=setCurrent(ps,1)
=setVoltage(ps,5)
=setOn(ps,1);

And it will work with any loaded supply that support the interface. I can easily make a program that will test at a couple of different voltage and will work with any of my supplies.
It is not designed to handle specialty functions, only the general functions for the device. Stuff like sweeping will usually be handled by TC, that way it can be synchronized with other devices.

It is up to you if you believe that would be a good idea to add to your devices, I have not had this kind of devices in the interface before, i.e. you might have to add some extra commands, but there is already a setPower and setFrequency.

Documentation is here, include defined commands and device classes:
https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html#A_generic_interface

Note: TC has a special popup in the popups menu to test this stuff.


When making scripts you can add filters to the script that will limit the script to consider devices with specific interface functions. TC will not list the script, except if needed devices with the correct interface functions are loaded.

« Last Edit: June 24, 2025, 06:38:53 am by HKJ »
 
The following users thanked this post: orion242, KungFuJosh

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8454
  • Country: us
  • TEAS is real.
Re: Program that can log from many multimeters.
« Reply #4262 on: June 24, 2025, 09:01:24 pm »
Hmm, looks like I don't need to do any extra work scripting anything. The built-in Param Sweeper seems to do exactly what I want.

However, where does it save the logs and charts?

I have them checked, and a name set, but the test sweep doesn't give me any files anywhere.

It also says chart needs to be setup first, but how? Scales for Charts, or something else?

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: 4959
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #4263 on: June 24, 2025, 09:15:25 pm »
Hmm, looks like I don't need to do any extra work scripting anything. The built-in Param Sweeper seems to do exactly what I want.

However, where does it save the logs and charts?

I have them checked, and a name set, but the test sweep doesn't give me any files anywhere.

It will save where TC default save log files and chart files, try checking the ..\documents\TestController\ directory.


It also says chart needs to be setup first, but how? Scales for Charts, or something else?

You need to checkmark the curves you want included on the chart, you can adjust scales in "Scales for chart"
In praxis you can often start a test and then switch to chart to do the setup, but it depends on how long time the sweep takes.

When you have configured Param Sweeper TC can generate a script that will configure it exactly the same way again.
 
The following users thanked this post: KungFuJosh

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8454
  • Country: us
  • TEAS is real.
Re: Program that can log from many multimeters.
« Reply #4264 on: June 24, 2025, 09:31:27 pm »
The Chart tab is inactive while the sweeper runs. I tried logging at 1s to enable the chart, and selected the stuff I wanted.

Then I started the Sweeper, and it killed the chart tab.

The docs\TC folder is the first place I checked, but nothing shows up there. I did a test, and hit "save as log" from the Commands tab, and that did save to that expected folder.

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: 4959
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #4265 on: June 24, 2025, 10:06:04 pm »
The Chart tab is inactive while the sweeper runs. I tried logging at 1s to enable the chart, and selected the stuff I wanted.

Then I started the Sweeper, and it killed the chart tab.

The docs\TC folder is the first place I checked, but nothing shows up there. I did a test, and hit "save as log" from the Commands tab, and that did save to that expected folder.

I will except the chart tab to be killed, at least until the first log value is put into the table.

If you have cmdSetup defined as type "number" they can be directly select as sweep values.
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8454
  • Country: us
  • TEAS is real.
Re: Program that can log from many multimeters.
« Reply #4266 on: June 24, 2025, 10:46:37 pm »
I'm not using the cmdSetup. I have the Cmd entered as SCPI commands in the Sweeper. It's a very simple sweep- just sending a FREQ command to each device. See my screenshots above for the setup.

ETA: I found the problem. If Log is checked on the Primary/Secondary tabs, the files aren't created. With those unchecked, the Save log each on the Main tab works.

The chart can be watched live now when the test runs. What are those separate log checkboxes supposed to do?

Thanks,
Josh
« Last Edit: June 24, 2025, 10:56:15 pm by KungFuJosh »
"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: 4959
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #4267 on: June 25, 2025, 06:44:36 am »
The chart can be watched live now when the test runs. What are those separate log checkboxes supposed to do?

They are supposed to add extra columns to the table with the sweeping parameter.
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8454
  • Country: us
  • TEAS is real.
Re: Program that can log from many multimeters.
« Reply #4268 on: June 25, 2025, 07:00:06 am »
The chart can be watched live now when the test runs. What are those separate log checkboxes supposed to do?

They are supposed to add extra columns to the table with the sweeping parameter.

You might want to test those. The only thing they did for me was make it so the charts/logs didn't work. That could be something with my setup, I dunno.

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: 4959
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #4269 on: June 25, 2025, 07:05:55 am »
You might want to test those. The only thing they did for me was make it so the charts/logs didn't work. That could be something with my setup, I dunno.

Yes, they need to be checked to hopefully find the reason they failed in your case.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4959
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #4270 on: June 25, 2025, 12:01:25 pm »
Yes, they need to be checked to hopefully find the reason they failed in your case.

I have looked at it and the reason is very obvious now.
The function use readback from the device to get the actual value, that do not work with a SCPI command or with devices without a :read: defined for the selected parameter.

I have modified the code, now it will silently switch to use the write value when readback is not possible. It will be included in the next update.
 
The following users thanked this post: KungFuJosh

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8454
  • Country: us
  • TEAS is real.
Re: Program that can log from many multimeters.
« Reply #4271 on: June 25, 2025, 05:53:17 pm »
In TC you can use any value for x-axis, not only time, try right clicking on the hh:mm:ss text at the bottom. You can select a log scale if you want.

You can also combine curves from different files with the import function.

There are some limitations and sometimes odd behavior that prevents me from using TC for the comparisons like I did in the other thread.

When there is a live chart with active devices, I can combine legends with one acting as the master. I haven't seen any options to do that with imported data (no right-click menu available on the Y axis items).

There is a limitation that I can only show 4 active traces.

In the attached screenshot, I would like 7 active traces along with the already set frequency as the X axis.

That's why I use Excel for the comparisons. I can set anything I want, and save it to add to it later, even if I want to use a silly number of traces. Well, the other reason I use Excel, is that I can setup those charts and put data together while TC is running more tests. 😉

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: 4959
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #4272 on: June 25, 2025, 06:10:09 pm »
When there is a live chart with active devices, I can combine legends with one acting as the master. I haven't seen any options to do that with imported data (no right-click menu available on the Y axis items).

You can combine scales, it is in the charts right-click menu in layout and called Sync.
This kind of processing is supposed to be done after the data collection and you can save the settings.

There is a limitation that I can only show 4 active traces.

In the attached screenshot, I would like 7 active traces along with the already set frequency as the X axis.

Go to the options page and remove the checkmark for "Fast charting" and you can use more tracks.


That's why I use Excel for the comparisons. I can set anything I want, and save it to add to it later, even if I want to use a silly number of traces. Well, the other reason I use Excel, is that I can setup those charts and put data together while TC is running more tests. 😉

It is possible to run multiple instances of TC and if you want separate data areas you make .bat files to start them, each with a command line option specifying the data area.

TC can show a readout of values at the cursor (Click in chart to enable it) and it can also be switched to relative values. In both the table and chart you can easily search for min/max values and a few other things.

 
The following users thanked this post: KungFuJosh

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8454
  • Country: us
  • TEAS is real.
Re: Program that can log from many multimeters.
« Reply #4273 on: June 25, 2025, 11:55:46 pm »
You can combine scales, it is in the charts right-click menu in layout and called Sync.
This kind of processing is supposed to be done after the data collection and you can save the settings.
I'm familiar with the function. I dunno if this is a bug or not, but when I right-click hh:mm:ss and change that to the SMIQ's frequency instead of time, all other clicking is disabled. If I switch back to time, then I can click or right click again. Going back to time also removes the weird straight-line glitch at the end of the traces in my previous screenshot.

Quote
There is a limitation that I can only show 4 active traces.

In the attached screenshot, I would like 7 active traces along with the already set frequency as the X axis.

Go to the options page and remove the checkmark for "Fast charting" and you can use more tracks.
That option was never active in my TC.

Apparently, if I use Import in the Table tab for multiple files, it gives me those track limitations. After importing everything, I exported it all. Reopened TC, and hit Load instead, and I was able to select as many tracks as I want. Importing each file separately seems to have caused the bug (repeatable). Importing or Opening the exported (combined) data file seems to work fine either way. The data in the screenshots is attached, separately and as the combined export.

The other issues still persist though, see attached screenshot comparison.

There is a visual bug on the Import popup (see screenshot).

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 DeanA

  • Regular Contributor
  • *
  • Posts: 128
  • Country: au
    • Design Electronics
Re: Program that can log from many multimeters.
« Reply #4274 on: June 26, 2025, 07:33:03 am »
Hi,
I've played around and I can get all the symbols (AD/DC, V, A, Ohm etc) correct but it still doesn't want to decode the digits.  Suspect I have something wrong with my #segments or #digits definitions

I have checked from the hex and looks to me like the segment definitions and digits are correct as per the tp4000zc_serial_protocol.pdf document (attached).
Also attached the hexdump.txt and DigitechQM1462.txt driver and photo of the meter screen.

Any help greatly appreciated.
I did try different #segments and #digits definitions but no luck I'm afraid, always comes back with infinity


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->