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

0 Members and 146 Guests are viewing this topic.

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4975
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6400 on: May 27, 2026, 06:04:32 pm »
The future is now! 🤯

if somebody using a COM port wants to test these, that'd be great, thanks. 😉

No issues with this change using my 2010 on GPIB. I can't test on a 2700 anymore.

I have update, but I changed your if statements.
A single = is a assignment, not a comparison
And using !="GPIB" is a better way, because TC support 3 different comports, but only one GPIB port.
 
The following users thanked this post: KungFuJosh

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8491
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #6401 on: May 27, 2026, 06:20:37 pm »
The future is now! 🤯

if somebody using a COM port wants to test these, that'd be great, thanks. 😉

No issues with this change using my 2010 on GPIB. I can't test on a 2700 anymore.

I have update, but I changed your if statements.
A single = is a assignment, not a comparison
And using !="GPIB" is a better way, because TC support 3 different comports, but only one GPIB port.

Like the attached then?

I didn't know the different comport types might be an issue.

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: 4975
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6402 on: May 27, 2026, 06:30:50 pm »
Like the attached then?

Exactly.

I didn't know the different comport types might be an issue.

Depends, using GPIB is the safe way.
The actual internal porttype names are: None, Serial, SerialFixedBaud, SerialNoBaud, SocketAuto, Socket, LXI, USBHID, GPIB, UDP, Modbus, Dummy

Upper/Lower case do also matter when using == to compare.

 
The following users thanked this post: KungFuJosh

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8491
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #6403 on: May 29, 2026, 04:04:03 pm »
I want to add screendump to the Siglent SDM3000X meters. They support the command SCDP to do that via SCPI, but it doesn't work.
I tried this:
#ScreenDump std
SCDP

TC says "ScreenDump failed due to null" - log attached, but probably useless.

Thanks,
Josh

ETA: I dunno why the B was missing in that log, but more often it starts with this:
BM6ú6(àú       
« Last Edit: May 29, 2026, 06:28:59 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!
 

Offline rallyhard

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Re: Program that can log/control many multimeters and other devices.
« Reply #6404 on: May 30, 2026, 07:22:54 am »
When launching an automatic battery test from a script, I can't get setting chargeEndCurrent (EOC) to work. Is there something special about that field?
« Last Edit: May 30, 2026, 09:33:17 am by rallyhard »
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4975
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6405 on: May 30, 2026, 12:59:08 pm »
I want to add screendump to the Siglent SDM3000X meters. They support the command SCDP to do that via SCPI, but it doesn't work.
I tried this:
#ScreenDump std
SCDP

TC says "ScreenDump failed due to null" - log attached, but probably useless.

The log may be more useful if you give the command on the command line.
TC expect standard image format (Usually png or bmp).
If a image is transferred another way I can must add code to handle it.

 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4975
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6406 on: May 30, 2026, 01:05:50 pm »
When launching an automatic battery test from a script, I can't get setting chargeEndCurrent (EOC) to work. Is there something special about that field?

I just tried this:

#ShowPopupSystem BatteryTest 132 14 500 330
#BatteryTest V 4.3 1000m 60m 3.2 5m
#BatteryTest C 501m 1.1 2.1 5.1
#BatteryTest M 255 0 4 70 1 Test

And parameters went in exactly as specified.

But I do have a limit on the maximum value, what current are you trying to set?
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8491
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #6407 on: May 30, 2026, 05:09:58 pm »
I want to add screendump to the Siglent SDM3000X meters. They support the command SCDP to do that via SCPI, but it doesn't work.
I tried this:
#ScreenDump std
SCDP

TC says "ScreenDump failed due to null" - log attached, but probably useless.

The log may be more useful if you give the command on the command line.
TC expect standard image format (Usually png or bmp).
If a image is transferred another way I can must add code to handle it.

Attached from the command window and debug log. It's supposed to be a BMP.

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: 4975
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6408 on: May 30, 2026, 06:44:25 pm »
Attached from the command window and debug log. It's supposed to be a BMP.

Nothing looks like a binary SCPI command, i.e. it mat be a proprietary format.
The first character is supposed to be #, followed by a numeric digit, that specify how many digits to read for the length, i.e. usually it will be something like:
#49876.........................
for a actual data length of 9876 bytes.

To handle other format I need some format specifications.
 

Offline flash2b

  • Super Contributor
  • ***
  • Posts: 1054
  • Country: nl
  • Everything I like about myself is better with you.
« Last Edit: May 30, 2026, 07:53:16 pm by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8491
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #6410 on: May 30, 2026, 09:00:06 pm »
Attached from the command window and debug log. It's supposed to be a BMP.

Nothing looks like a binary SCPI command, i.e. it mat be a proprietary format.
The first character is supposed to be #, followed by a numeric digit, that specify how many digits to read for the length, i.e. usually it will be something like:
#49876.........................
for a actual data length of 9876 bytes.

To handle other format I need some format specifications.
I think the SCDP command might be a little weird. There's discussion on this site for different Siglent devices with SCDP command. This is probably relevant: https://www.eevblog.com/forum/testgear/siglent-sdg6000-series-awg_s/msg5857495/#msg5857495

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: 8491
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #6411 on: May 31, 2026, 12:07:09 am »
I ran into a sorta weird thing. ;)

On the Scales for chart tab:
I usually switch to Center/Span for the range. I made a mistake and put 500uu. The second u made both columns switch to ?s. Editing either one wouldn't work. I had to switch to Min/Max and manually enter values there, then switch back to edit Center/Span.

Is it possible you can limit the input to a single unit letter to avoid this? Or something to prevent that like ignoring doubles or rejecting invalid input (but revert to last acceptable value).

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: 4975
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6412 on: May 31, 2026, 10:15:51 am »
Attached from the command window and debug log. It's supposed to be a BMP.

I have made a new test version, it support a bmp type in addition to std type screendump.
The code is completely untested, please test and report back.

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

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4975
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6413 on: May 31, 2026, 10:16:49 am »
When launching an automatic battery test from a script, I can't get setting chargeEndCurrent (EOC) to work. Is there something special about that field?

In the new beta version I have increased the charge the limit on charge termination current to 5A, hope that fixes your problems.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4975
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6414 on: May 31, 2026, 10:19:02 am »
I ran into a sorta weird thing. ;)

On the Scales for chart tab:
I usually switch to Center/Span for the range. I made a mistake and put 500uu. The second u made both columns switch to ?s. Editing either one wouldn't work. I had to switch to Min/Max and manually enter values there, then switch back to edit Center/Span.

Is it possible you can limit the input to a single unit letter to avoid this? Or something to prevent that like ignoring doubles or rejecting invalid input (but revert to last acceptable value).

It looks like it enters NaN (Not a number) value when you do that and that prevents calculating the center/span values.
I have not decided if I want to change this behavior, it is easy enough to get back from.
 

Offline rallyhard

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Re: Program that can log/control many multimeters and other devices.
« Reply #6415 on: May 31, 2026, 11:42:31 am »
Got it all working now  :-+

Thanks for bumping that up
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8491
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #6416 on: May 31, 2026, 02:28:57 pm »
I have not decided if I want to change this behavior, it is easy enough to get back from.

Something should be done about what happens after that. If Center/Span is in use, you can't recover without switching to Min/Max.

Maybe add an if statement that if changing from NaN to a valid number resets the other to a default value. Or simply if the result is NaN set it to a default instead automatically.
"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: 8491
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #6417 on: May 31, 2026, 02:50:22 pm »
I have made a new test version, it support a bmp type in addition to std type screendump.
The code is completely untested, please test and report back.
I added a delay to the command which removed the failure due to null for both std and bmp. However, it doesn't turn into an image in either case:
#ScreenDump std
SCDP;[1000]

#ScreenDump bmp
SCDP;[1000]

I've attached the result the above produces as fail.bmp.txt (copied from the command window) and a zip containing a working bmp for comparison saved directly on the device.

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: 4975
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6418 on: May 31, 2026, 03:48:43 pm »
I added a delay to the command which removed the failure due to null for both std and bmp. However, it doesn't turn into an image in either case:
#ScreenDump std
SCDP;[1000]

#ScreenDump bmp
SCDP;[1000]

I've attached the result the above produces as fail.bmp.txt (copied from the command window) and a zip containing a working bmp for comparison saved directly on the device.

I converted the read code to read a file and tried again, I found a bug and fixed it.
Please try again.
You have to use #ScreenDump bmp to use this code. Std is for a SCPI command. I could have made that automatic, but if other formats shows up, it is better to request that it is defined in the definition.

PS: I added a check for NaN on the center/span input and is now ignoring that type of input.
 
The following users thanked this post: KungFuJosh

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8491
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #6419 on: May 31, 2026, 05:56:20 pm »
I converted the read code to read a file and tried again, I found a bug and fixed it.
Please try again.
You have to use #ScreenDump bmp to use this code. Std is for a SCPI command. I could have made that automatic, but if other formats shows up, it is better to request that it is defined in the definition.
The end result is attached. I tried with and without the delay, and shared both (delay appears to be required for now).

Is it possible for TC to read the response in raw hex or something like that? TC seems to be doing something to convert the response (or at least it's converted in the command window). If you view the response in hex vs. reading the BMP file I shared above in hex, they are different.


Quote
PS: I added a check for NaN on the center/span input and is now ignoring that type of input.
Thank you!

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: 4975
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6420 on: May 31, 2026, 06:31:51 pm »
The end result is attached. I tried with and without the delay, and shared both (delay appears to be required for now).

Is it possible for TC to read the response in raw hex or something like that? TC seems to be doing something to convert the response (or at least it's converted in the command window). If you view the response in hex vs. reading the BMP file I shared above in hex, they are different.

TC uses the same read routines as the std format, it is a binary read.
I have added code to list how many bytes is read and a hex dump of the first 512 bytes

I.e. it is supposed to write the line:
Read 391734 bytes
And 32 lines with hex data to the console.

The above code ignores the debug setting and will always dump these lines.
Note: The reading has a hardcoded 5 second timeout, I would not expect any issues with that on a network.

 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8491
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #6421 on: May 31, 2026, 07:13:48 pm »
It's just a guess, but I think the reading conversion might be the issue. I dunno. I will also try with a different meter.
"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: 4975
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6422 on: May 31, 2026, 07:24:01 pm »
It's just a guess, but I think the reading conversion might be the issue. I dunno. I will also try with a different meter.

You are not supposed to get any output when doing a screendump, it is supposed to read all bytes.
I wonder if the device uses too much time to prepare the screendump and the first read timeout* (It uses the standard timeout).
Try increase the timeout.

The routine uses a initial read to get the data length (it read 6 bytes) and the another read to read the remaining data. The second read has a 5 second timeout.
 
The following users thanked this post: KungFuJosh

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8491
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #6423 on: May 31, 2026, 07:49:47 pm »
I tried:
#ScreenDump bmp
SCDP;[9999]

No change in the results.

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: 4975
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6424 on: May 31, 2026, 07:57:07 pm »
I tried:
#ScreenDump bmp
SCDP;[9999]

No change in the results.

That was not the value I was talking about, it do not affect the read in any way.
It is the #readingDelay setting, try increase it to 5 seconds.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->