Author Topic: Program that can log from many multimeters.  (Read 471427 times)

0 Members and 3 Guests are viewing this topic.

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2899
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1700 on: May 12, 2021, 03:48:52 pm »
Okay. In outgoing packets from the com-port, I see packets bytes, that's why I named it that way.

Communication works in layer. You have the link layer that here is serial data in RS232 format, then you have the protocol that is a modified modbus. In TestController these two parts are different part parts in the software, that can be replaced very easy (It support 4 different modbus protocols).
You work at the next layer where you see the actual data with the protocol removed and it is independent of the link layer.

 

Offline PaWill68

  • Regular Contributor
  • *
  • Posts: 114
  • Country: ru
Re: Program that can log from many multimeters.
« Reply #1701 on: May 13, 2021, 10:49:15 am »
All the other messages uses long integers in a scaled format, this means I would expect something like 178mAh or 1780*0.1mAh or 17800*0.01mAh
But it do not match the message.
You can fairly easy check for this by opening the calculator popup, select hex format and then type in the number, it will show the expected hex string:
Dear interflexo helped.
00 09 C4 00 = 640000mAs = 0.177Ah
00 22 A3 C8 = 2270152mWs = 0.63Wh
 

Offline PaWill68

  • Regular Contributor
  • *
  • Posts: 114
  • Country: ru
Re: Program that can log from many multimeters.
« Reply #1702 on: May 14, 2021, 11:00:20 am »
Why doesn't this command work?
HALF CURR   0x014A   1   R/W   0,1

holdingL 0x014A 1
 

Offline PaWill68

  • Regular Contributor
  • *
  • Posts: 114
  • Country: ru
Re: Program that can log from many multimeters.
« Reply #1703 on: May 14, 2021, 11:07:37 am »
Reads correctly (1 or 0).

#scpiCmd CurrHalf? holdingL? 0x014A
:readmath: (0x1&value)
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2899
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1704 on: May 14, 2021, 11:10:43 am »
Why doesn't this command work?
HALF CURR   0x014A   1   R/W   0,1

holdingL 0x014A 1

holdingL is a 4 byte register, you must use holding for a 1 byte register.
The OCP_STEP_TIME cannot be done with current version of TC, because it requires a 2 byte register.
 

Offline PaWill68

  • Regular Contributor
  • *
  • Posts: 114
  • Country: ru
Re: Program that can log from many multimeters.
« Reply #1705 on: May 14, 2021, 11:37:52 am »
This variation also does not work, or I am writing the wrong syntax.
This similar command "holdingL 0x0144 (value)" works great.

BATT ONOFF   0x0144   1   R/W   0,1

Probably a bug in the firmware
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2899
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1706 on: May 14, 2021, 11:55:56 am »
This variation also does not work, or I am writing the wrong syntax.
This similar command "holdingL 0x0144 (value)" works great.

BATT ONOFF   0x0144   1   R/W   0,1

Probably a bug in the firmware

I am not sure what you mean, but the message is 4 bytes with the L and 1 bytes without it.

;; 16184.10ms KP184: Tx <holdingL 0x014A 1>
;; 16184.18ms COM15: Tx: 01 06 01 4A 00 01 04 00 00 00 01 09 5A
;; 23568.18ms KP184: Tx <holding 0x014A 1>
;; 23568.31ms COM15: Tx: 01 06 01 4A 00 01 01 01 48 EE
 

Offline PaWill68

  • Regular Contributor
  • *
  • Posts: 114
  • Country: ru
Re: Program that can log from many multimeters.
« Reply #1707 on: May 14, 2021, 12:39:39 pm »
holdingL 0x014A 1
;; COM11: Flush:
;; COM11: Tx: 01 06 01 4A 00 01 04 00 00 00 01 5A 09
holding 0x014A 1
;; COM11: Flush: 01 06 01 4A 00 01 04 20 2D
;; COM11: Tx: 01 06 01 4A 00 01 01 01 EE 48

I'm talking about the fact that the value "1" in KP184 is not written by both commands.
 

Offline PaWill68

  • Regular Contributor
  • *
  • Posts: 114
  • Country: ru
Re: Program that can log from many multimeters.
« Reply #1708 on: May 15, 2021, 07:50:17 am »
Code: [Select]
;; KP184: Tx <VoltageEnd 5.6>
;; KP184: Tx <holdingL 0x0146 5.6 *1000                    ;0-150>
;; COM11: Flush:
;; COM11: Tx: 01 06 01 46 00 01 04 00 00 15 E0 94 84
;; KP184: Tx <VoltageEnd?>
;; KP184: Tx <holdingL? 0x0146 /1000>
;; COM11: Flush: 01 06 01 46 00 01 04 23 7D
;; COM11: Tx: 01 03 01 46 00 04 A4 20
;; COM11: Rx: 01 03 04 00 00 15 E0 F5 2B
;; KP184: Rx <5.6000000000000005>
;; KP184: Cache Tx: <VoltageEnd?> Rx: <5.6000000000000005>
;; KP184: Rx as number <5.6000000000000005>
HKJ, What is the best way to make this value appear in a comboboxhot or radio?
Need to convert <5.6000000000000005> to <5.6>
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2899
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1709 on: May 15, 2021, 08:50:51 am »
HKJ, What is the best way to make this value appear in a comboboxhot or radio?
Need to convert <5.6000000000000005> to <5.6>

Use a :readmath: with a formatDouble()

Parameters: formatDouble(number,minIntDigits,maxIntDigits,minFracDigits,maxFracDigits)

You could also use the round() function: round(value*10)/10.0
« Last Edit: May 15, 2021, 08:52:29 am by HKJ »
 

Offline PaWill68

  • Regular Contributor
  • *
  • Posts: 114
  • Country: ru
Re: Program that can log from many multimeters.
« Reply #1710 on: May 15, 2021, 11:40:02 am »
Code: [Select]
;; KP184: Tx <VoltageEnd 5.6>
;; KP184: Tx <holdingL 0x0146 5.6 *1000                    ;0-150>
;; COM11: Flush:
;; COM11: Tx: 01 06 01 46 00 01 04 00 00 15 E0 94 84
;; KP184: Tx <VoltageEnd?>
;; KP184: Tx <holdingL? 0x0146 /1000>
;; COM11: Flush: 01 06 01 46 00 01 04 23 7D
;; COM11: Tx: 01 03 01 46 00 04 A4 20
;; COM11: Rx: 01 03 04 00 00 15 E0 F5 2B
;; KP184: Rx <5.6000000000000005>
;; KP184: Rx after :readmath: formatDouble(value,1,3,3,3) <5.600>
;; KP184: Cache Tx: <VoltageEnd?> Rx: <5.6000000000000005>
;; KP184: Rx after :readmath: formatDouble(value,1,3,3,3) <5.600>
;; KP184: Rx as number <5.6>
It did not help.
I think the problem is in the comboboxhot and radio components.
« Last Edit: May 15, 2021, 11:45:26 am by PaWill68 »
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2899
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1711 on: May 15, 2021, 12:17:30 pm »
It did not help.
I think the problem is in the comboboxhot and radio components.

They are string based, i.e. they do not match numeric values, this means formatting with 3 decimal places will try to match a value with 3 decimal places.
 
The following users thanked this post: PaWill68

Offline PaWill68

  • Regular Contributor
  • *
  • Posts: 114
  • Country: ru
Re: Program that can log from many multimeters.
« Reply #1712 on: May 15, 2021, 12:24:52 pm »
There is no such problem with the Number component. Thank you.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2899
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1713 on: May 15, 2021, 12:35:55 pm »
There is no such problem with the Number component. Thank you.

No, it is numeric based.
comboboxhot is string based
radio is numeric, but can be switched to string (In numeric mode it includes a small tolerance, that is supposed to avoid the above problem)
 

Offline PaWill68

  • Regular Contributor
  • *
  • Posts: 114
  • Country: ru
Re: Program that can log from many multimeters.
« Reply #1714 on: May 15, 2021, 01:32:41 pm »
It is necessary to round up to 3 digits and discard the final 0. But I don't know what the syntax will be.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2899
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1715 on: May 15, 2021, 02:44:24 pm »
It is necessary to round up to 3 digits and discard the final 0. But I don't know what the syntax will be.

You can use the min/max digit specifications: formatDouble(value,1,6,1,3)
Will return 1 to 6 digit before the point (leading zeros will be removed) and 1 to 3 digit after the point (Trailing zeros will be removed).
 
The following users thanked this post: PaWill68

Offline PaWill68

  • Regular Contributor
  • *
  • Posts: 114
  • Country: ru
Re: Program that can log from many multimeters.
« Reply #1716 on: May 17, 2021, 08:08:59 am »
HKJ, can you add a directory selection for saving reports to the settings?
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2899
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1717 on: May 17, 2021, 09:03:24 am »
HKJ, can you add a directory selection for saving reports to the settings?

I am not sure exactly what you mean, all save dialogs allows your to choose directory.
 

Offline PaWill68

  • Regular Contributor
  • *
  • Posts: 114
  • Country: ru
Re: Program that can log from many multimeters.
« Reply #1718 on: May 17, 2021, 10:02:11 am »
Default directory.
My directory is C:/18650_test. TC opens every time C:/Users/User/Documents/TestController
« Last Edit: May 17, 2021, 10:06:06 am by PaWill68 »
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2899
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1719 on: May 17, 2021, 11:52:16 am »
Default directory.
My directory is C:/18650_test. TC opens every time C:/Users/User/Documents/TestController

This can be adjusted by a command line argument, start TC from a batch file with:
java -jar TestController.jar dataDir=C:/18650_test

The TestController.bat file has documentation about it.

This way you can have multiple shortcuts with different working directories and also different devices.
 
The following users thanked this post: PaWill68

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2899
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1720 on: May 17, 2021, 12:56:07 pm »
V1.65 is up
It includes some internal improvements and download of data from a couple of multimeters.
   Fixed: Automatic column changing with mode change on multimeter did not always work.
   Update: ET5410 more advanced definition by PaWill68 (Thanks)
   Added: holdingBytes? for modbus protocol, it returns a bytes data type and must be processed with :readmath:   
   Fixed: Kunkin KP184 now works in V4 and newer, thanks to help from some users.
   Added: Keysight U125xA now support downloading of log
   Added: Keysight U128xA now support downloading of log
   Added: Keysight 344xxA now support downloading of data from internal flash memory
   Added: Other button, this will be visible for devices where download of screenshots or data is supported.
   Added: deviceReadBytes to read a binary IEEE block from a SCPI device.
   Added: floatBytes, doubleBytes to control casting of float/double to bytes.
   Added: binConvString that converts a bytes type to a text string.
   Added: binConvFloat that convert a string/bytes/int/long to float/double if it contains the correct bits.
   Added: binConv supports bytes data type
   Added: subbytes function similar to substring but for bytes datatype
   Added: bytes as new data type, this is only used for handling communication and not for normal math.



The download of data means that there will sometimes be an extra device button called "Other"



When clicked it will show a menu, the contents of this menu will depend on the device. Data can be downloaded as either text of into in the table (That will be cleared first).


 
The following users thanked this post: Marco1971, PaWill68, SigurdR

Offline Messtechniker

  • Frequent Contributor
  • **
  • Posts: 774
  • Country: de
  • Old analog audio hand - No voodoo.
Re: Program that can log from many multimeters.
« Reply #1721 on: May 18, 2021, 05:20:41 am »
Used the new screen shot feature. Works great. Except for date and time which which are wrong. See pics.

Agilent 34465A, Siglent SDG 2042X, Hameg HMO1022, R&S HMC 8043, Peaktech 2025A, Voltcraft VC 940, M-Audio Audiophile 192, R&S Psophometer UPGR, 3 Transistor Testers, DL4JAL Transistor Curve Tracer, UT622E LCR meter
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2899
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1722 on: May 18, 2021, 05:33:41 am »
Used the new screen shot feature. Works great. Except for date and time which which are wrong. See pics.

That is a bug in the DMM or probably more likely because you have not adjusted the clock in the DMM. I get the full screen shot as a bmp or png file that includes the time stamp.
I suppose the html version uses the browser to add the PC time.
 

Offline Messtechniker

  • Frequent Contributor
  • **
  • Posts: 774
  • Country: de
  • Old analog audio hand - No voodoo.
Re: Program that can log from many multimeters.
« Reply #1723 on: May 18, 2021, 05:44:19 am »
Sorry. Works now. Date and time are correct. I somehow messed things up. :palm:
Agilent 34465A, Siglent SDG 2042X, Hameg HMO1022, R&S HMC 8043, Peaktech 2025A, Voltcraft VC 940, M-Audio Audiophile 192, R&S Psophometer UPGR, 3 Transistor Testers, DL4JAL Transistor Curve Tracer, UT622E LCR meter
 

Offline PaWill68

  • Regular Contributor
  • *
  • Posts: 114
  • Country: ru
Re: Program that can log from many multimeters.
« Reply #1724 on: May 18, 2021, 06:32:32 am »
I run TestController.jar, ok, now I will be testController.bat, although I don't need multiple profiles.
I tested several batteries, now I'm thinking how to superimpose the comparison results on each other like here. Can this be done with TC?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf