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

0 Members and 3 Guests are viewing this topic.

Offline thelastdodo

  • Newbie
  • Posts: 7
  • Country: de
Re: Program that can log from many multimeters.
« Reply #2975 on: April 19, 2023, 12:11:11 pm »
Thanks for the template!  :-+

I'll try to dig into it (if I can grasp it & find some spare time).

 

Offline Njk

  • Regular Contributor
  • *
  • Posts: 203
  • Country: ru
Re: Program that can log from many multimeters.
« Reply #2976 on: April 19, 2023, 03:31:28 pm »
It looks like the USBHID interface has stopped working. I have not modified any code in the HID interface. there must be some other reason.
I will be looking at it, but it might take some time. If you can find a older version of TC try using that.

I've some experience in HID with Windows. So i remember that the HID data exchange can be implemented in the application in the two ways. You can parse the HID report received from the device entirely by your code, or you can use the system-provided helper APIs to parse the report to extract the data from the desired fields in the report. Each the way has its pros and contras. Just curious, which way you took with the TC.
 

Offline Njk

  • Regular Contributor
  • *
  • Posts: 203
  • Country: ru
Re: Program that can log from many multimeters.
« Reply #2977 on: April 19, 2023, 03:46:19 pm »
I have attached the start, i.e. the energy, but with the name changed. It is not a working Prime definition

By the way, your app seems well suited for drawing energy profile charts using the data from utility electricity meters. There are lots of vendor-specific protocols, but they're being replaced with the common framework, which is known as DLMS/COSEM. It's not officially public, and it can be looking a bit complex initially, but an open source implementations exists. What is your vision in that regard?
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2978 on: April 20, 2023, 04:42:37 pm »
Thanks for the template!  :-+

I'll try to dig into it (if I can grasp it & find some spare time).

You can always ask questions here or on email.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2979 on: April 20, 2023, 04:43:46 pm »
It looks like the USBHID interface has stopped working. I have not modified any code in the HID interface. there must be some other reason.
I will be looking at it, but it might take some time. If you can find a older version of TC try using that.

I've some experience in HID with Windows. So i remember that the HID data exchange can be implemented in the application in the two ways. You can parse the HID report received from the device entirely by your code, or you can use the system-provided helper APIs to parse the report to extract the data from the desired fields in the report. Each the way has its pros and contras. Just curious, which way you took with the TC.

The library I use return a some bytes that I decode. They number of bytes matches the Brymen description.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2980 on: April 20, 2023, 04:46:24 pm »
By the way, your app seems well suited for drawing energy profile charts using the data from utility electricity meters. There are lots of vendor-specific protocols, but they're being replaced with the common framework, which is known as DLMS/COSEM. It's not officially public, and it can be looking a bit complex initially, but an open source implementations exists. What is your vision in that regard?

I have no vision for that type of meters, I have never looked at the interface for that type of meters.
It might be possible to implement it, but the open source code must be in Java to be useful for TC.
 

Offline ali_asadzadeh

  • Super Contributor
  • ***
  • Posts: 1906
  • Country: ca
Re: Program that can log from many multimeters.
« Reply #2981 on: April 21, 2023, 08:35:32 am »
Quote
I have no idea why it does not work, I use a library for serial ports (See About page in TC) it works on multiple OS's and is generally stable.

Maybe one idea: Do the device echo the commands? TC do not like that.

Thanks HJK for the feedback, It would not echo back the commands, The device anser to *IDN? cokmmand is like this GW Instek,GPP-4323,SN:GEW895373,V1.19
So does TC search for a specific string? maybe this response has some additional charachters or info?

ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2982 on: April 21, 2023, 08:53:18 am »
Thanks HJK for the feedback, It would not echo back the commands, The device anser to *IDN? cokmmand is like this GW Instek,GPP-4323,SN:GEW895373,V1.19
So does TC search for a specific string? maybe this response has some additional charachters or info?

The #idString tag must match the first part of the answer to the *idn? command, i.e. with the above answer you need:
#idString GW Instek,GPP-4323,

This string will also be shown in the "does not match" error message in the log window if you try with a non-matching SCPI device.
 

Offline thelastdodo

  • Newbie
  • Posts: 7
  • Country: de
Re: Program that can log from many multimeters.
« Reply #2983 on: April 21, 2023, 10:21:33 am »
@ HKJ:

Do you also have interruptions while logging with the Metrahit Energy?

No matter how many data or period of time I choose I always have breakdowns, which are obviously not there in reality, as other meters like Brymen, Keysight or Fluke work just fine at the same usb port / setup...


...and also METRAwin10 does not show these unforeseen interruptions?


I would prefer using TestController, but I can live with METRAwin10, so that I don't have any expectancy, just asking as I have no other Metrahit DMM to compare, as it is probably more like this Brymen USBHID-thingy, because the Gossen USB-IR-Interface also does not run under linux itself in contrast to Keysight or Fluke, which are the best brands for linux users...

I have tested different setups with Win7, Win10, Linux with VirtualBox so far and always have this problem with TestController. As there is a "serial fixed baudrate" there is also no difference whether I keep the 9600 or change it to 38400 in the "settingsLoad.ini".

Does anyone else have similar issues?

[...]

ThanX & Cheers!

Interestingly I see the same dropouts (and spikes) as well - but only when I use the "USB X-Tra"
When I use the "IrDroid transceiver", I don't see any of these.

I verified this using the "MetraHit Energy" and "MetraHit PM Prime BT" and by swapping USB-Ports.
It is always the original "USB X-Tra" which creates those outliers.
Those outliers are not present in "MetraWIN 10"

MetraHit Energy + USB X-Tra:
1766012-0

The math "DropOutFiler" makes is less pronounced
1766018-1

MetraHit Energy + IrDroid:
1766024-2
« Last Edit: April 21, 2023, 10:26:05 am by thelastdodo »
 

Offline ali_asadzadeh

  • Super Contributor
  • ***
  • Posts: 1906
  • Country: ca
Re: Program that can log from many multimeters.
« Reply #2984 on: April 21, 2023, 03:19:33 pm »
Thanks HKJ for the update, would you please share some picture on how to use TC with serial port,so I can chekc If I made something worng, as I say before, I can send commands with a simple teriman by hand and the device would responde back.
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2985 on: April 21, 2023, 04:09:24 pm »
Interestingly I see the same dropouts (and spikes) as well - but only when I use the "USB X-Tra"
When I use the "IrDroid transceiver", I don't see any of these.

I verified this using the "MetraHit Energy" and "MetraHit PM Prime BT" and by swapping USB-Ports.
It is always the original "USB X-Tra" which creates those outliers.
Those outliers are not present in "MetraWIN 10"

I have no explanation on why TC do it for that interface.

You can try adjust the "Delay timeout" setting on the configuration page, it might help:
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2986 on: April 21, 2023, 04:20:11 pm »
Thanks HKJ for the update, would you please share some picture on how to use TC with serial port,so I can chekc If I made something worng, as I say before, I can send commands with a simple teriman by hand and the device would responde back.

I do not know what to show picture of.
There is a few tricks in the baudrate setting:
  • The baudrate can be any baudrate, but can also contain more parameters line: 19200O71Dr
  • The D or d sets DTR high or low and R or r sets RTS high or low.
  • The last letter can be H for DTR flow control (Windows only) or h or RTS flow control.

When working on getting a connection there are two ways to simplify getting a connection:
1) Let TC try settings and make a skeleton driver (Right click in the Filter field on the "Load devices" page and select "Create new SCPI device definition"
2) Use a ASCII device definition, it do not need any confirmation string on startup and this makes the command line into a serial terminal (You can switch to SCPI or SCPIx a bit later when the connection works).
 

Online Gertjan

  • Regular Contributor
  • *
  • Posts: 115
  • Country: nl
Re: Program that can log from many multimeters.
« Reply #2987 on: April 22, 2023, 11:51:10 am »
Hi HKJ

First I want to thank you for creating TestController, and the vast amount of your effort in the ongoing improvement and support!

I am writing a device definition file for the Racal-Dana 1998 Frequency Counter. (Almost done…)
This is a very nice counter because it is fast, easy to use, has a very clear display, and has the ability to show 10MHz with 1mHz resolution . It is popular amongst amateurs, also because it became available in large quantities as Army surplus.


IMG_2271__Racal-Dana_1998_controlled_by_TestController-2000pix.jpg

All functions of the counter are supported.
I am using the counter in the single-shot mode, it takes one measurement in each logging interval.
There is more info, some tips and known issues in the header of the definition file.

As this counter is Pre-SCPI, I am using the Ascii driver. Most testing is done with the AR488 GPIB adapter.


TC-screenshot-Racal1998-1000pix.png

I have two questions left:

I am using mouse-over tips (using the :tip: tag ) in the menu’s. For a few tips, I would like to divide a long line of text into 2 short lines (in other words, add a CR/LF halfway the line). I searched your documentation, but could not find the solution. How can I achieve this?

The Racal-Dana 1998 has a twin model, the 1999. Only difference is that the Racal-Dana 1999 does not have the “Ratio B/A” function. And of course it returns “1999” when asked for the model name,  instead of “1998”. So I added  meta definitions, to make this configuration file also work for the Racal-Dana 1999.
But I do not have a Racal-Dana 1999 for testing, so I can not check if I did the #meta and #metadef statements right. Could you have a look if I did the meta definitions right?

Please find the preliminary final version of the device configuration file below:
Racal1998-1999 v1.0

Regards, Gertjan.
« Last Edit: April 25, 2023, 04:28:29 pm by Gertjan »
 

Offline thelastdodo

  • Newbie
  • Posts: 7
  • Country: de
Re: Program that can log from many multimeters.
« Reply #2988 on: April 22, 2023, 03:02:57 pm »
Interestingly I see the same dropouts (and spikes) as well - but only when I use the "USB X-Tra"
When I use the "IrDroid transceiver", I don't see any of these.

I verified this using the "MetraHit Energy" and "MetraHit PM Prime BT" and by swapping USB-Ports.
It is always the original "USB X-Tra" which creates those outliers.
Those outliers are not present in "MetraWIN 10"

I have no explanation on why TC do it for that interface.

You can try adjust the "Delay timeout" setting on the configuration page, it might help:


I'll give it a try and report back :)

Is there a way to "pause" and "resume" logging?
When I "stop log" and then start again, the graph is cleaned - can this be avoided in some simple way?

 

Offline Hexley

  • Regular Contributor
  • *
  • Posts: 198
  • Country: us
Re: Program that can log from many multimeters.
« Reply #2989 on: April 22, 2023, 03:28:46 pm »
Thanks HKJ for the update, would you please share some picture on how to use TC with serial port,so I can chekc If I made something worng, as I say before, I can send commands with a simple teriman by hand and the device would responde back.

I do not know what to show picture of.
There is a few tricks in the baudrate setting:
  • The baudrate can be any baudrate, but can also contain more parameters line: 19200O71Dr
  • The D or d sets DTR high or low and R or r sets RTS high or low.
  • The last letter can be H for DTR flow control (Windows only) or h or RTS flow control.

When working on getting a connection there are two ways to simplify getting a connection:
1) Let TC try settings and make a skeleton driver (Right click in the Filter field on the "Load devices" page and select "Create new SCPI device definition"
2) Use a ASCII device definition, it do not need any confirmation string on startup and this makes the command line into a serial terminal (You can switch to SCPI or SCPIx a bit later when the connection works).
The fact that TC does not see your serial port in its scan seems suggestive.
Have you tried setting the connection to "USB" rather than "serial"?
Can you post a sketch of exactly how your PC is connected to the GPP-4323?
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2990 on: April 23, 2023, 08:27:08 am »
I am using the counter in the single-shot mode, it takes one measurement in each logging interval.

I do not believe that is a good idea, but if it is the only way, you have to use it.
Test controller can have multiple threads fetching data from a device (mostly they will coordinate the reading).

I am using mouse-over tips (using the :tip: tag ) in the menu’s. For a few tips, I would like to divide a long line of text into 2 short lines (in other words, add a CR/LF halfway the line). I searched your documentation, but could not find the solution. How can I achieve this?

I have not really done anything to support it, but Java has a trick to make multiline:
Code: [Select]
:tip: <html>Line 1<br>Line 2<br>Line 3A couple of other html tags are supported (it is a very old version of html Java supports).

The Racal-Dana 1998 has a twin model, the 1999. Only difference is that the Racal-Dana 1999 does not have the “Ratio B/A” function. And of course it returns “1999” when asked for the model name,  instead of “1998”. So I added  meta definitions, to make this configuration file also work for the Racal-Dana 1999.
But I do not have a Racal-Dana 1999 for testing, so I can not check if I did the #meta and #metadef statements right. Could you have a look if I did the meta definitions right?

At first glance it looks correct.
If you want to see the final definition you can put this line:
#metaDebug save
below the #metadef tag, this will write the processed definition to disk.

Please find the preliminary version of the device configuration file below:
Racal1998-1999BETA.zip

I look forward to the final definition.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2991 on: April 23, 2023, 08:32:48 am »
Is there a way to "pause" and "resume" logging?
When I "stop log" and then start again, the graph is cleaned - can this be avoided in some simple way?

Yes, you have to use advanced logging.
It will run the logging function continuous, but only add data to the log when enabled.
It support a small popup with start/stop buttons (Popup "Log Trigger") or it can log when some conditions are met or a lot of other stuff.
https://lygte-info.dk/project/TestControllerPopupLog%20UK.html
 

Offline thelastdodo

  • Newbie
  • Posts: 7
  • Country: de
Re: Program that can log from many multimeters.
« Reply #2992 on: April 23, 2023, 09:24:38 am »
Thanks!
With "enabled" you mean the checkbox in the "load devices" tab?

I tried to your suggestion with the "Delay timeout" setting in the configuration page to get rid of the dropouts, but it didn't do anything:
1767146-0

Even the DropOutFilter (30 samples) was not able to completely get rid of those dropouts:
1767152-1

Configurattion:
1767158-2

Again, no issues with the "IrDroid Transceiver"  :-//
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2993 on: April 23, 2023, 10:50:26 am »
With "enabled" you mean the checkbox in the "load devices" tab?

With log enabled I mean you use the popup or a command to start it.


I tried to your suggestion with the "Delay timeout" setting in the configuration page to get rid of the dropouts, but it didn't do anything:

I have no idea why you have problems with this, have you tried reinstalling the serial driver. I have no idea if it will help, but it might be worth a try.
 

Online Gertjan

  • Regular Contributor
  • *
  • Posts: 115
  • Country: nl
Re: Program that can log from many multimeters.
« Reply #2994 on: April 23, 2023, 12:29:54 pm »
Hi HKJ,

I am using the counter in the single-shot mode, it takes one measurement in each logging interval.

I do not believe that is a good idea, but if it is the only way, you have to use it.
Test controller can have multiple threads fetching data from a device (mostly they will coordinate the reading).

The problem with these Racal-Dana's is that the buffer is cleared after a read-out. So after the first read-out, there is nothing left to fetch for the next read-out...

I am using mouse-over tips (using the :tip: tag ) in the menu’s. For a few tips, I would like to divide a long line of text into 2 short lines (in other words, add a CR/LF halfway the line). I searched your documentation, but could not find the solution. How can I achieve this?

I have not really done anything to support it, but Java has a trick to make multiline:
Code: [Select]
:tip: <html>Line 1<br>Line 2<br>Line 3A couple of other html tags are supported (it is a very old version of html Java supports).

This works like a charm. Thank you!

The Racal-Dana 1998 has a twin model, the 1999. Only difference is that the Racal-Dana 1999 does not have the “Ratio B/A” function. And of course it returns “1999” when asked for the model name,  instead of “1998”. So I added  meta definitions, to make this configuration file also work for the Racal-Dana 1999.
But I do not have a Racal-Dana 1999 for testing, so I can not check if I did the #meta and #metadef statements right. Could you have a look if I did the meta definitions right?

At first glance it looks correct.
If you want to see the final definition you can put this line:
#metaDebug save
below the #metadef tag, this will write the processed definition to disk.

I tested with "#metaDebug save", and the result looks fine.
Thank you, this make me more confident that the definition file will also work with a Racal-Dana 1999.


There is one issue remaining, a “beauty flaw”… (meaning: not essential, but would be nice to solve...)
The Racal-Dana 1998 puts the value of a finished measurement in a read-out buffer. This buffer is cleared when it is read out, or when a new measurement is started.
So, one has to first read-out the result of the previous measurement, and then trigger a new measurement. This is what the configuration file is doing with #askValues , and it works fine.

However, when something else reads out the buffer, (the “Current values” tab, or the  “Readout” popup), this readout clears the buffer, so the buffer is empty when the logging routine tries to read out the buffer. This results in missing values in the logging table….

This is especially a problem because the counter is often used with long gate-times of 1 or 20 sec. (To get high resolution). And of course the logging interval has to be a bit longer than the gate-time.
With short gate times, there is time to take an extra measurement, but with these long gate-times there is not…..

First I tried to solve this by storing the measured value in a variable, which is subsequently read out by TestController. However, the problem is that TestController uses the same read-out command (#askValues) for the logging and the other read-out functions. And for the logging it is necessary to trigger the next measurement after the read-out with this command, which of course spoils it when used for the other read-out functions….

Is there a way around this?
A solution could be to use the values in the table for the other TestController read-outs (At the moment this only works when the table is updated rather fast, not with these slow logging intervals)

For now the solution is simply not to use the current values tab, or the  Readout popup while logging...

Regards, Gertjan.


« Last Edit: April 23, 2023, 01:06:18 pm by Gertjan »
 
The following users thanked this post: croma641

Offline thelastdodo

  • Newbie
  • Posts: 7
  • Country: de
Re: Program that can log from many multimeters.
« Reply #2995 on: April 24, 2023, 08:26:20 am »
With "enabled" you mean the checkbox in the "load devices" tab?

With log enabled I mean you use the popup or a command to start it.

Works perfectly! Thanks for your guidance!

I tried to your suggestion with the "Delay timeout" setting in the configuration page to get rid of the dropouts, but it didn't do anything:

I have no idea why you have problems with this, have you tried reinstalling the serial driver. I have no idea if it will help, but it might be worth a try.

I'll give it a try  :-+
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2996 on: April 25, 2023, 10:57:20 am »
There is one issue remaining, a “beauty flaw”… (meaning: not essential, but would be nice to solve...)
The Racal-Dana 1998 puts the value of a finished measurement in a read-out buffer. This buffer is cleared when it is read out, or when a new measurement is started.
So, one has to first read-out the result of the previous measurement, and then trigger a new measurement. This is what the configuration file is doing with #askValues , and it works fine.

However, when something else reads out the buffer, (the “Current values” tab, or the  “Readout” popup), this readout clears the buffer, so the buffer is empty when the logging routine tries to read out the buffer. This results in missing values in the logging table….

This is especially a problem because the counter is often used with long gate-times of 1 or 20 sec. (To get high resolution). And of course the logging interval has to be a bit longer than the gate-time.
With short gate times, there is time to take an extra measurement, but with these long gate-times there is not…..

First I tried to solve this by storing the measured value in a variable, which is subsequently read out by TestController. However, the problem is that TestController uses the same read-out command (#askValues) for the logging and the other read-out functions. And for the logging it is necessary to trigger the next measurement after the read-out with this command, which of course spoils it when used for the other read-out functions….

Is there a way around this?
A solution could be to use the values in the table for the other TestController read-outs (At the moment this only works when the table is updated rather fast, not with these slow logging intervals)

I do not have a good solution to it.
You can sort of fix it for faster sample rates with #cmdDelayTime , but it will affect all commands.
 

Offline ali_asadzadeh

  • Super Contributor
  • ***
  • Posts: 1906
  • Country: ca
Re: Program that can log from many multimeters.
« Reply #2997 on: April 25, 2023, 02:26:34 pm »
Hi HKJ,
I think I have found the problem with your program that does not detect my GPP-4323 Power supply over serial port, I have used Device Monitoring Studio to monitor the ongoing traffic from your TC software and the GPP-4323 and found that you first send these characters to detect the Power supply, *IDN? with a 0x0A character at the end, but you need to send 0x0A 0x0D so that the GPP-4323 would respond back, since I just do that in my terminal program and it would respond back, so How should we fix this? Does this mean you should update your TC program?
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2998 on: April 25, 2023, 04:22:03 pm »
Hi HKJ,
I think I have found the problem with your program that does not detect my GPP-4323 Power supply over serial port, I have used Device Monitoring Studio to monitor the ongoing traffic from your TC software and the GPP-4323 and found that you first send these characters to detect the Power supply, *IDN? with a 0x0A character at the end, but you need to send 0x0A 0x0D so that the GPP-4323 would respond back, since I just do that in my terminal program and it would respond back, so How should we fix this? Does this mean you should update your TC program?

Add a
#eol \r\n
to the definition
 

Online Gertjan

  • Regular Contributor
  • *
  • Posts: 115
  • Country: nl
Re: Program that can log from many multimeters.
« Reply #2999 on: April 25, 2023, 04:23:24 pm »
Racal-Dana 1998 and 1999 device definition file for TestController

Hi HKJ,

There is one issue remaining, a “beauty flaw”…
I do not have a good solution to it.

No problem. After all, it is mostly a beauty flaw  :)
There is no real need to look at the “Current values” tab, or have  readout popups while logging....

Please find the final definition file below this post, for adding to TestController.

I took a Photo of the Racal-Dana 1998, for if you wish to add it to your supported equipment page:


IMG_2273__Racal-Dana_1998-2000pix.jpg



Racal-Dana 1998 and 1999 device definition file for TestController: Racal1998-1999.txt v1.0

Regards, Gertjan.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf