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

Gertjan and 554 Guests are viewing this topic.

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 938
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #6025 on: March 16, 2026, 02:29:20 pm »
My Eletechsup N4DBA06 has 2 voltage inputs, 1 current input, 1 digital input, 2 voltage outputs, 1 current output and 1 digital output. All these inputs and outputs work independently.

At first I had this #interfaceType
Code: [Select]
#interfaceType PS
#interface setVoltageCH1 setVoltageCH1 (value)
#interface setVoltageCH2 setVoltageCH2 (value)
#interface setCurrentCH3 setCurrentCH3 (value)
#interface outputDigital outputDigital (value)
#interface readInputVoltageCH1 0
#interface readInputVoltageCH2 1
#interface readInputCurrentCH3 2
#interface readOutputSetVoltageCH1 3
#interface readOutputSetVoltageCH2 4
#interface readOutputSetCurrentCH3 5
#interface readInputDigital 6
#interface readOutputDigital 7

But I know I got it wrong. Now I made this #interfaceType

Code: [Select]
#interfaceType PS PS:2 PS:3
#interface setVoltage setVoltage(getElement("CH1;CH2", value) (channel)
#interface setCurrent setVoltageCH3 (channel)
#interface getVoltage setVoltage(getElement("CH1;CH2", value) (channel)
#interface setCurrent setCurrentCH3? (channel)
#interface setOutputDigital outputDigital (value)
#interface getOutputDigital? outputDigital?
#interface readVoltage 0 1
#interface readCurrent 2
#interface readInputDigital 6
#interface readOutputDigital 7

Is the last #interfaceType correct ?
« Last Edit: March 16, 2026, 02:31:08 pm by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6026 on: March 16, 2026, 02:44:19 pm »
Code: [Select]
#interfaceType PS PS:2 PS:3
#interface setVoltage setVoltage(getElement("CH1;CH2", value) (channel)
#interface setCurrent setVoltageCH3 (channel)
#interface getVoltage setVoltage(getElement("CH1;CH2", value) (channel)
#interface readVoltage 0 1
#interface readCurrent 2

Is the last #interfaceType correct ?

readVoltage/readCurrent must list 3 columns, because the interface has 3 units, I suppose you can list the same column for all 3 if you want.

These will also be called with 0, 1 and 2: getElement("CH1;CH2", value)

Of course you need to but the index after the handle for it to call with all 3 values.
 

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 938
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #6027 on: March 16, 2026, 02:56:35 pm »
I do not get it..  :-\

CH1 and CH2 do not offer a readCurrent and CH3 does dot offer a readVoltage. Those are from the input channels 1, 2 and 3.

The output channels: 1, 2, 3 are not linked. You can link them physically but they work independenty.

Also I have made all output channels on/off switchable. scpi: toggleVoltageCH1. toggleVoltageCH2 and toggleCurrentCH3.

How can I map them to #interface setOn ?

I can use #interface setOn toggleVoltage(getElement("CH1;CH2", value) (channel) but CH3 is not called Voltage, but Current. Do I need to change my scpi names ?

I currently have no command for #interface getOn but I can write it.

Also #interface getVoltage setVoltage(getElement("CH1;CH2", value) (channel) should be #interface getVoltage setVoltage(getElement("CH1;CH2", value)? (channel) I recon. (? was missing, my mistake)
« Last Edit: March 16, 2026, 03:01:58 pm by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 938
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #6028 on: March 16, 2026, 03:12:06 pm »
readVoltage/readCurrent must list 3 columns, because the interface has 3 units, I suppose you can list the same column for all 3 if you want.

These will also be called with 0, 1 and 2: getElement("CH1;CH2", value)

Of course you need to but the index after the handle for it to call with all 3 values.

I can make a empty setVoltageCH3,  setCurrentCH1 and setCurrentCH2. Then I can add getElement("CH1;CH2;CH3", value) to those lines.

For the toggle, I can rename,

You mean for read values something like this

#interface readVoltage 0 1 0
#interface readCurrent 2 2 2

But this is not correct since CH1 and CH2 do not measure current and CH3 does not measure voltage.
« Last Edit: March 16, 2026, 03:15:09 pm by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6029 on: March 16, 2026, 03:12:45 pm »
How can I map them to #interface setOn ?

I can use #interface setOn toggleVoltage(getElement("CH1;CH2", value) (channel) but CH3 is not called Voltage, but Current. Do I need to change my scpi names ?

I currently have no command for #interface getOn but I can write it.

setOn work like the other with a channel and a value. A value of zero must turn off and 1 must turn on.
If you cannot do that, you cannot support setOn.

Also #interface getVoltage setVoltage(getElement("CH1;CH2", value) (channel) should be #interface getVoltage setVoltage(getElement("CH1;CH2", value)? (channel) I recon. (? was missing, my mistake)

You may be swapping value and channel in the above.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6030 on: March 16, 2026, 03:14:07 pm »
I can make a empty setVoltageCH3,  setCurrentCH1 and setCurrentCH2. Then I can add getElement("CH1;CH2;CH3", value) to those lines.

Just dont make a setVoltage and current.
 

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 938
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #6031 on: March 16, 2026, 03:24:30 pm »
So this?

Code: [Select]
#interfaceType PS PS:2 PS:3
#interface setVoltage setVoltage(getElement("CH1;CH2;CH3", channel) (value)
#interface setCurrent setCurrent(getElement("CH1;CH2;CH3", channel) (value)
#interface setOn toggleOutput(getElement("CH1;CH2;CH3", channel) (value)
#interface getVoltage setVoltage(getElement("CH1;CH2;CH3", channel)? (value)
#interface getCurrent setCurrent(getElement("CH1;CH2;CH3", channel)? (value)
#interface readVoltage 0 1 -
#interface readCurrent - - 2

What to put on the - ?

And I need to write a scpi for getOn.... and then add it.
« Last Edit: March 16, 2026, 03:27:15 pm by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 938
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #6032 on: March 16, 2026, 04:24:30 pm »
These do not work:

#interface getVoltage setVoltage(getElement("CH1?;CH2?;CH3?", channel) (value)
#interface getCurrent setCurrent(channel==1?"CH1?":(channel==2?"CH2?":"CH3?") (value)

Only setVoltage and setCurrent sent....

Well I am about to give up this challenge....

This works ok:
#interface readVoltage 0 1 -
#interface readCurrent - - 2

The rest does not.
« Last Edit: March 16, 2026, 04:34:56 pm by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Offline Benleentje

  • Contributor
  • Posts: 34
  • Country: nl
Re: Program that can log/control many multimeters and other devices.
« Reply #6033 on: March 16, 2026, 04:34:26 pm »
I am struggling with the variable's they don't work and i don't understand why.

initialization is used
#initCmd init
#scpiCmd init none
:setvar: varRange=1

Code: [Select]
Starting
;; jSerialComm version: 2.11.2
;; Start thread for: COM3 - Matrix APS-7100
;; COM3: Set params: 38400
;; : Tx <txrx? ?MAXPOW
:string:>
;; COM3: Tx: <?MAXPOW..> 3F 4D 41 58 50 4F 57 0D 0A
;; COM3: Rx: <1050.00> 31 30 35 30 2E 30 30
;; COM3: Tx <init>
;; COM3: Tx <none
:setvar: varRange=1>
;; Found Matrix APS-7100 on FT232R USB UART (COM3)


using the variable
Code: [Select]
#cmdSetup toggleButton Range
:read: setVoltage?
:readmath: ((value)< 155.01)?0:1
;:setvar: (varRange)=(value)
:write: setRange (varRange)
:tip: sets range high or low, depending on setvoltage
:color: gray yellow
:update:
Low 0
High 1

The error i get
Code: [Select]
;; APS7100: Cache Tx: <setVoltage?> Rx: <155.00>
;; APS7100: Rx after :readmath: ((value)< 155.01)?0:1 <0>
;; APS7100: Rx as number <0.0>
Exception in thread "AWT-EventQueue-0" dk.hkj.script.ProgramExceptions$UnknownException: Variable not found varRange
varRange____<----____
        at dk.hkj.script.Script.getVar(Script.java:83)


 

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 938
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #6034 on: March 16, 2026, 04:37:50 pm »
You cannot do a :setvar: varRange=value in a #cmdSetup toggleButton Range

You need to make a new scpCmd that does this for you.
« Last Edit: March 16, 2026, 04:45:02 pm by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Offline Benleentje

  • Contributor
  • Posts: 34
  • Country: nl
Re: Program that can log/control many multimeters and other devices.
« Reply #6035 on: March 16, 2026, 08:09:54 pm »
this var thing is to difficult.
#scpiCmd test
:setvar: varRange = !(varRange) is not working
:setvar: varRange = (varRange xor 0x01) didn't work

For both i get errors.

I give it up for now.
The definition is working and everthing works except the range indication. You have to look on the power supply to see wich range it is on. Is not perfect but good enough to work with.

The only thing i have to do is to add a lot of replace text in the metadeff's
 

Offline KungFuJosh

  • Super Contributor
  • ***
  • Posts: 8201
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #6036 on: March 16, 2026, 09:43:37 pm »
this var thing is to difficult.

Don't guess at how it works. Look through other definitions for better examples.

Code: [Select]
:setvar: kbVal="255"
:setvar: kcVal="255"
:setvar: kdVal="255"
:setvar: hiVal="255"
:setvar: loVal="255"
:setvar: modeVal="255"


:setvar: meas1Chan="CHAN1"
:setvar: meas1Type="None"
:setvar: meas1Unit="None"


#scpiCmd setVars none
:setvar: AcalMode="0"


#scpiCmd setVars none
:setvar: Function="Frequency_A"
:setvar: TriggerA="AtrigMan"
:setvar: CouplingA="AcouplingAC"
:setvar: SlopeA="AslopeNeg"
:setvar: ImpA="AimpHigh"

You might notice a theme or things that are missing from yours.
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Offline Benleentje

  • Contributor
  • Posts: 34
  • Country: nl
Re: Program that can log/control many multimeters and other devices.
« Reply #6037 on: March 16, 2026, 10:03:10 pm »
I looked in a few definitions but the way how i want it is not working for so far.
I am sure i do something wrong.
The definition is working and are able to set everthing. Maybe if i know how to use the variables better a change it.

The ascii definition for the Matrix APS series acsources is ready. In total 8 devices all tested for so far able to test.
please add
The 2 files works together. De power supply support 2 modes for communication in hex or Ascii. Both modes works and are tested
« Last Edit: March 17, 2026, 06:33:33 pm by Benleentje »
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6038 on: March 18, 2026, 08:26:33 am »
These do not work:

#interface getVoltage setVoltage(getElement("CH1?;CH2?;CH3?", channel) (value)
#interface getCurrent setCurrent(channel==1?"CH1?":(channel==2?"CH2?":"CH3?") (value)

3 opening parenthesis and 2 closing ones?

This works ok:
#interface readVoltage 0 1 -
#interface readCurrent - - 2

That looks like a good solution.
 

Offline Tjuurko

  • Regular Contributor
  • *
  • Posts: 165
Re: Program that can log/control many multimeters and other devices.
« Reply #6039 on: March 18, 2026, 08:28:12 am »
Is there a command to get a fixed delay?
After setting (:write:) one parameter, I need to "wait" for a short time (<3 seconds). This delay is not necessary for reading (:read:).
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6040 on: March 18, 2026, 08:28:40 am »
I looked in a few definitions but the way how i want it is not working for so far.
I am sure i do something wrong.
The definition is working and are able to set everthing. Maybe if i know how to use the variables better a change it.

The ascii definition for the Matrix APS series acsources is ready. In total 8 devices all tested for so far able to test.
please add
The 2 files works together. De power supply support 2 modes for communication in hex or Ascii. Both modes works and are tested

Very nice, I have added them, thanks.
I like you are supporting both modes, it makes it easier if you also have to work with other software that only support one of the modes.

 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6041 on: March 18, 2026, 08:32:22 am »
Is there a command to get a fixed delay?
After setting (:write:) one parameter, I need to "wait" for a short time (<3 seconds). This delay is not necessary for reading (:read:).

In the SCPI commands you can use [0000] where 0000 is the delay in milliseconds (1 to 4 digits). Another way to delay is [*OPC], this must be supported by the device before you can use it.
https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html#Timing_issues
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6042 on: March 18, 2026, 09:46:35 am »
I made a full battery test and have collected the result into a document showing what is saved during a battery test:

http://lygte-info.dk/project/TestControllerPopupBatteryTestExample%20UK.html

I used these parameters:

 

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 938
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #6043 on: March 18, 2026, 11:36:53 am »
Dear HKJ,

I have made a definition for the Eletechsup 10IOA01, 10IOA02, 10IOA04 and 10IOA08 relay modules supporting both Digital Input and Digital Output.

These are very nice relay modules built around the MindMotion MM32F0010A1T ARM Cortex M0 48MHz micro controller. The module uses high quality relays and other components. It is the second relay definition that is supported by TestController and it has been extensively tested both in TC as well as with the Battery Test popup.



It supports both Digital Traces for the input and the output and has a setup menu. It supports setting the relation between input and output as well.



Please add it to the wonderful world of TestController. I hope you are happy with it.

[ Specified attachment is not available ]

Part of TestController v3.00

PS.
I will be updating all my BSide and eTommens definitions shortly due to a bug in the #interface that prevents it from working with the Battery Test popup. I have tested this new popup only for the charging part and it seems to be working fine.
« Last Edit: March 20, 2026, 09:23:03 am by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6044 on: March 18, 2026, 11:58:20 am »
I have made a definition for the Eletechsup 10IOA01, 10IOA02, 10IOA04 and 10IOA08 relay modules supporting both Digital Input and Digital Output.

I have added it and I included the picture on the supported equipment page, thanks.
 

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 938
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #6045 on: March 18, 2026, 01:30:29 pm »
I have re updated my BSide I8, eTommens eTM-MP and eTommens eTM-P again.

They now all work happily with test Battery Test popup in (coming) TC.

HKJ thanks for you guidance with #interface stuff.

[ Attachment Invalid Or Does Not Exist ]  

Part of TestController v3.00
« Last Edit: March 20, 2026, 09:22:17 am by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6046 on: March 18, 2026, 01:34:38 pm »
I have re updated my BSide I8, eTommens eTM-MP and eTommens eTM-P again.

They now all work happily with test Battery Test popup in (coming) TC.

Updated, thanks
 

Offline Benleentje

  • Contributor
  • Posts: 34
  • Country: nl
Re: Program that can log/control many multimeters and other devices.
« Reply #6047 on: March 18, 2026, 09:50:13 pm »
today is was busy trying to connect a modbus tcp/ip to my pc. After many hours it connected. It appear to be modbus rtu/ascii over tcp/ip. That is without the TCP/ip overhead and directly talking rtu to the device.
For now i have the ip adres en de port and baudrate

What must i use as #driver or other things to make this work in TC.
And does TC support modbus rtu over tcp/ip
« Last Edit: March 18, 2026, 09:52:49 pm by Benleentje »
 

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 938
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #6048 on: March 19, 2026, 07:03:22 am »
I do not know for sure but you can just use #port <port number>. In the connected tab of TC you should use the address.

That it is Mobus_RTU over TCP/IP should not matter writing the definition commands.
They say attention is a shovel. It's time to dig 'em out.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #6049 on: March 19, 2026, 07:58:26 am »
today is was busy trying to connect a modbus tcp/ip to my pc. After many hours it connected. It appear to be modbus rtu/ascii over tcp/ip. That is without the TCP/ip overhead and directly talking rtu to the device.
For now i have the ip adres en de port and baudrate

Modbus exist in 3 different variants, TC support all of them, but do not force any specific variant based on interface used.
I.e. if you specify a port number, the data will use a socket connection with RTU, to switch modbus type used #subdriver definition.
Documentation: https://lygte-info.dk/project/TestControllerConfigDevice2%20UK.html#Modbus_serial_&_network
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf