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

KungFuJosh, flash2b and 79 Guests are viewing this topic.

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3753
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5250 on: November 30, 2025, 04:46:19 pm »
I am trying to interface to a BSide I8 3010 PSU which is controlled over ModBus_RTU over a serial connection (COM).

How do I do that in TC, and what protocol driver do I need ?

Try the modbus driver  :) https://lygte-info.dk/project/TestControllerConfigDevice2%20UK.html#Modbus_serial_&_network


Is there a definition that uses a same/similar approach ?

There are many.
 

Offline Gertjan

  • Frequent Contributor
  • **
  • Posts: 283
  • Country: nl
Re: Program that can log/control many multimeters and other devices.
« Reply #5251 on: November 30, 2025, 05:55:36 pm »
I am trying to interface to a BSide I8 3010 PSU which is controlled over ModBus_RTU over a serial connection.

Is there a definition that uses a same/similar approach ?

From the modbus documentation:


The power supply definitions RidenRD6006 uses this driver. It has a fairly advanced configuration menu.

Maynuo M97xx definition is a electronic load.

regards, Gertjan
 

Online flash2b

  • Frequent Contributor
  • **
  • Posts: 275
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5252 on: November 30, 2025, 08:42:48 pm »
So translating:

Quote
Example: Set the output voltage to 1.23V;
1. Convert the value into an integer, that is, 1.23*100=123; (the 100 data is the conversion ratio of the voltage control value)
2. Convert 123 to hexadecimal number 0x7B; that is, the value corresponding to the high-order "HH" of the control value is "00"; the value corresponding to the low-order "LL" of the control value is "7B";
3. The command sent is: "01 06 00 30 00 7B C9 E6" (the following two bytes "C9" and "E6" are the CRC code of the command).

Code: [Select]
#scpiCmd setVolt holding 0x30 (value) *100
:write: setVolt 1.23

I cannot use holdingL since that is 32bit, so I assume (value) * 100 will be 16 bit.... :-\


- Am I on the right track ?
- Are the device ID address (=0x01), function (=0x06) and CRC (2 bytes) automatically handled by the Modbus driver of TestController ?
« Last Edit: November 30, 2025, 08:50:30 pm by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3753
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5253 on: November 30, 2025, 09:08:12 pm »
So translating:

Quote
Example: Set the output voltage to 1.23V;
1. Convert the value into an integer, that is, 1.23*100=123; (the 100 data is the conversion ratio of the voltage control value)
2. Convert 123 to hexadecimal number 0x7B; that is, the value corresponding to the high-order "HH" of the control value is "00"; the value corresponding to the low-order "LL" of the control value is "7B";
3. The command sent is: "01 06 00 30 00 7B C9 E6" (the following two bytes "C9" and "E6" are the CRC code of the command).

Code: [Select]
#scpiCmd setVolt holding 0x30 (value) *100
:write: setVolt 1.23

I cannot use holdingL since that is 32bit, so I assume (value) * 100 will be 16 bit.... :-\


- Am I on the right track ?
- Are the device ID address (=0x01), function (=0x06) and CRC (2 bytes) automatically handled by the Modbus driver of TestController ?

You are getting close.
The modifier is to the value from the device, i.e. use /100
The address can be changed with a command, but default to 1
The function is selected depending on what register type you specify and read/write.

You can try the commands from the command line, i.e. type:
holding 0x30 1.23 /100
and see how your device behave.


 

Online flash2b

  • Frequent Contributor
  • **
  • Posts: 275
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5254 on: December 01, 2025, 05:33:37 pm »
I am on the way of making my definition and I can already read/set Voltage, Current, OVP and OCP and identify the PSU.

With #driver Modbus within TestController, it is easier as I thought it would be. TC nicely shows the byte values that are sent to the PSU  :-+

For reading the power output there are 2 addresses : 0012H(high 16 bits) and 0013H(low 16 bits) which return 32 bit data so I cannot use holdingL? since this uses only 1 address.

I have made 2 scpiCmd's:
Code: [Select]
#scpiCmd outputPower_H? holding? 0x12
#scpiCmd outputPower_L? holding? 0x13

How can i concatenate these 2 values to have it as one variable or one scpiCmd ?

I guess I need to store H as :string: and L as :string: and then set a var as value_H+"."+value_L.   :-\

For setting the OPP (Over Power Protection), I need also the other way around.....
« Last Edit: December 01, 2025, 06:02:05 pm by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3753
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5255 on: December 01, 2025, 08:17:22 pm »
I am on the way of making my definition and I can already read/set Voltage, Current, OVP and OCP and identify the PSU.

With #driver Modbus within TestController, it is easier as I thought it would be. TC nicely shows the byte values that are sent to the PSU  :-+

For reading the power output there are 2 addresses : 0012H(high 16 bits) and 0013H(low 16 bits) which return 32 bit data so I cannot use holdingL? since this uses only 1 address.

I have made 2 scpiCmd's:
Code: [Select]
#scpiCmd outputPower_H? holding? 0x12
#scpiCmd outputPower_L? holding? 0x13

How can i concatenate these 2 values to have it as one variable or one scpiCmd ?

I guess I need to store H as :string: and L as :string: and then set a var as value_H+"."+value_L.   :-\

For setting the OPP (Over Power Protection), I need also the other way around.....

You can try holdingL? and see if it works, another possibility is:

#scpiCmd outputPower_L? holding? 0x12;holding? 0x13
:readmath: ...

The value variable will contain two values with a space between.
 
The following users thanked this post: flash2b

Online flash2b

  • Frequent Contributor
  • **
  • Posts: 275
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5256 on: December 01, 2025, 09:43:44 pm »
Well thank you !

#scpiCmd outputPower? holdingL? 0x12 /1000 , did the trick for me and I was not expecting it from reading the BSide documentation. TestController can do everything.

I also played with the alternative, that was more work to achieve the same. But I learned something new..  :)

As a preview of the setup menu:


I put the outputPower on the screen just to show (it will not be on the final version), it's main purpose was logging which now works 100%...  :-+

I will add all models to the definition and test it thoroughly, and when I am happy I will release it to you.

« Last Edit: December 01, 2025, 10:11:01 pm by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3753
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5257 on: December 02, 2025, 10:38:28 am »
#scpiCmd outputPower? holdingL? 0x12 /1000 , did the trick for me and I was not expecting it from reading the BSide documentation. TestController can do everything.

I believe it is a decent implementation of modbus I have done and it makes it fairly easy to do modbus devices.


I will add all models to the definition and test it thoroughly, and when I am happy I will release it to you.

I look forward to include it.
 

Online flash2b

  • Frequent Contributor
  • **
  • Posts: 275
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5258 on: December 03, 2025, 07:13:44 am »
When I set the current to the PSU to 1.4A, with setCurrent holding 0x31 (value) *1000 the readback with setCurrent? holding? 0x31 /1000 produces: 1.4000000000000001

Command window:
Code: [Select]
;; I83010: Tx <setCurrent 1.4>
;; I83010: Tx <holding 0x31 1.4 *1000>
;; COM6: Tx: 01 06 00 31 05 78 DB 77
;; COM6: Rx: 01 06 00 31 05 78 DB 77
;; I83010: Tx <setCurrent?>
;; I83010: Tx <holding? 0x31 /1000>
;; COM6: Tx: 01 03 00 31 00 01 D5 C5
;; COM6: Rx: 01 03 02 05 78 BB 36
;; I83010: Rx <1.4000000000000001>
;; I83010: Rx as number <1.4000000000000001>

Log file:
Code: [Select]
;; I83010: Tx <setCurrent 1.4>
;; I83010: Tx <holding 0x31 1.4 *1000>
;; COM6: Tx: 01 06 00 31 05 78 DB 77
;; COM6: Rx: 01 06 00 31 05 78 DB 77
;; I83010: Tx <setCurrent?>
;; I83010: Tx <holding? 0x31 /1000>
;; COM6: Tx: 01 03 00 31 00 01 D5 C5
;; COM6: Rx: 01 03 02 05 78 BB 36
;; I83010: Rx <1.4000000000000001>
;; I83010: Rx as number <1.4000000000000001>

Is that a bug or is it casued by my PSU ?

It happens only when I have *1000 or /1000, I never see it with *100 or /100.
Sometimes the "1" at the end of the value is a "2".
It does not happen if I set to 1.5, so certain values are affected.
It also happens with holdingL? and holdingL.

Seams like some rounding problem,,,,  :D

« Last Edit: December 03, 2025, 07:30:55 am by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3753
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5259 on: December 03, 2025, 10:00:46 am »
When I set the current to the PSU to 1.4A, with setCurrent holding 0x31 (value) *1000 the readback with setCurrent? holding? 0x31 /1000 produces: 1.4000000000000001

Is that a bug or is it casued by my PSU ?

It happens only when I have *1000 or /1000, I never see it with *100 or /100.
Sometimes the "1" at the end of the value is a "2".
It does not happen if I set to 1.5, so certain values are affected.
It also happens with holdingL? and holdingL.

Seams like some rounding problem,,,,  :D

It is sort of a rounding problem related to how numbers works on a computer. Because numbers are in binary (i.e. base 2), it is impossible to express most fractions precisely and that leads to small calculation errors that will be visible if you view all digits and do not round the result.
In some calculators they use another way to do calculations, that avoid this problem, but it is much slower. For a calculator that do not really matter, it do not need to calculate anything in less that 0.00000001 second, if it can do it in 0.1 second it is usually fine and even with a much slower cpu they can do that.


 

Online flash2b

  • Frequent Contributor
  • **
  • Posts: 275
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5260 on: December 03, 2025, 10:17:49 am »
If I add :readmath: formatDouble(value,0,2,0,3) to each of the affected scpiCmd's (3 in total) will that slow down the logging ?

In the #value I use D3 already.

I like with Modbus_RTU that the logging is so fast and I do not want to slow it down.
« Last Edit: December 03, 2025, 10:26:15 am by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3753
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5261 on: December 03, 2025, 10:35:12 am »
If I add :readmath: formatDouble(value,0,2,0,3) to each of the affected scpiCmd's (3 in total) will that slow down the logging ?

In the #value I use D3 already.

I like with Modbus_RTU that the logging is so fast and I do not want to slow it down.

Adding complexity to a definition will slow it down, but it will not affect logging speed. Logging is slow compared to how fast a definition is run.
 

Online flash2b

  • Frequent Contributor
  • **
  • Posts: 275
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5262 on: December 03, 2025, 11:42:37 am »
Dear HKJ,

I have completed my definition for TestController to support the  BSide I8305, I83010 and I84020 PSU.






Please add the definition to the next release TestController.
* BSide I8 v1.00 Final.zip (2.85 kB - downloaded 6 times.)
« Last Edit: December 03, 2025, 11:57:05 am by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3753
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5263 on: December 03, 2025, 12:14:43 pm »
Dear HKJ,

I have completed my definition for TestController to support the  BSide I8305, I83010 and I84020 PSU.

Please add the definition to the next release TestController.

I have added the file, thanks.
 

Offline Odd

  • Regular Contributor
  • *
  • Posts: 95
  • Country: no
Re: Program that can log/control many multimeters and other devices.
« Reply #5264 on: December 03, 2025, 10:29:44 pm »
Please add a link to releaselog near the download link.
The app notifies me nicely about new version, with F1 opening the DL page, and it would be nice to have the release notes nearby, so one could see what to look forward too :)
Thank you.
 

Online flash2b

  • Frequent Contributor
  • **
  • Posts: 275
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5265 on: Yesterday at 07:45:06 am »
The release note of the installed version are in the $Documents\TestController\Settings\ folder, file Versions.txt.
They say attention is a shovel. It's time to dig 'em out.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3753
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5266 on: Yesterday at 10:29:07 am »
Please add a link to releaselog near the download link.
The app notifies me nicely about new version, with F1 opening the DL page, and it would be nice to have the release notes nearby, so one could see what to look forward too :)
Thank you.

Click on the yellow sign and you will see the release log.

I do also post the updates in this thread every time I release a new version, it is exactly the same text as the release log.
« Last Edit: Yesterday at 10:30:50 am by HKJ »
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3753
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5267 on: Yesterday at 03:46:14 pm »
I have updated the documentation: https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html#Control_advNumber
That was mostly to include the advNumber, but there are other minor changes in the documentation. AdvNumber will first be listed in the updates from next release, but I have not found any bugs in it yet  ;D

 

Online flash2b

  • Frequent Contributor
  • **
  • Posts: 275
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5268 on: Yesterday at 08:55:49 pm »
The sample code #cmdSetup number downTime should be #cmdSetup advNumber downTime.

The pictures of control number, advNumber and numberInt do no match the code example, is that on purpose  ???

They say attention is a shovel. It's time to dig 'em out.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3753
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5269 on: Yesterday at 09:15:18 pm »
The sample code #cmdSetup number downTime should be #cmdSetup advNumber downTime.

Oops, fixed (Thanks for the notification).

The pictures of control number, advNumber and numberInt do no match the code example, is that on purpose  ???

Call it laziness. I do not try to make the code examples match the picture. In my opinion the picture shows how the control looks and the code examples shows how to define it, they do not need to match. When they do it is because that was the best example I had at the time.
 

Online IanJ

  • Supporter
  • ****
  • Posts: 1984
  • Country: scotland
  • Full time EE & Youtuber/Creator
    • IanJohnston.com
Hi,

Just downloaded the latest version (05/12/25) and BitDefender AV is identifying a threat in TestController.jar
Screenshot attached.

If it's a false positive suggest HKJ report to BitDefender, they are usually pretty good & fast at updating their definitions.

Ian.
Ian Johnston - Original designer of the PDVS2mini || Author of WinGPIB
Website: www.ianjohnston.com
YouTube: www.youtube.com/user/IanScottJohnston, Odysee: https://odysee.com/@IanScottJohnston, Twitter(X): https://twitter.com/IanSJohnston, Github: https://github.com/Ian-Johnston?tab=repositories
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3753
  • Country: dk
    • Tests
Just downloaded the latest version (05/12/25) and BitDefender AV is identifying a threat in TestController.jar
Screenshot attached.

If it's a false positive suggest HKJ report to BitDefender, they are usually pretty good & fast at updating their definitions.

I believe it is a false alarm, but I do not want to discus with any antivirus company.
The program is Java, that reduces the risk of infection, but it has build-in native code for a lot of different OS and cpu.
 

Online IanJ

  • Supporter
  • ****
  • Posts: 1984
  • Country: scotland
  • Full time EE & Youtuber/Creator
    • IanJohnston.com
Just downloaded the latest version (05/12/25) and BitDefender AV is identifying a threat in TestController.jar
Screenshot attached.

If it's a false positive suggest HKJ report to BitDefender, they are usually pretty good & fast at updating their definitions.

I believe it is a false alarm, but I do not want to discus with any antivirus company.
The program is Java, that reduces the risk of infection, but it has build-in native code for a lot of different OS and cpu.

I uploaded it to VirusTotal.com which also reports as malicious, see attached.

PS. The older version I was using was fine, it's just the latest version that is being reported as malicious. Suggest you contact them for the safety of your users. I've done this a couple of times and it's a painless process.

Thanks,

Ian.
Ian Johnston - Original designer of the PDVS2mini || Author of WinGPIB
Website: www.ianjohnston.com
YouTube: www.youtube.com/user/IanScottJohnston, Odysee: https://odysee.com/@IanScottJohnston, Twitter(X): https://twitter.com/IanSJohnston, Github: https://github.com/Ian-Johnston?tab=repositories
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3753
  • Country: dk
    • Tests
I uploaded it to VirusTotal.com which also reports as malicious, see attached.

PS. The older version I was using was fine, it's just the latest version that is being reported as malicious. Suggest you contact them for the safety of your users. I've done this a couple of times and it's a painless process.

The .jar file is the direct output from my Java compiler, sometimes I uses Sun, but mostly I use the free Java on a Linux system.
I do not see why I have to contact some non-related 3-party people.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf