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

0 Members and 2 Guests are viewing this topic.

Offline Bad_Driver

  • Frequent Contributor
  • **
  • Posts: 364
  • Country: de
Re: Program that can log from many multimeters.
« Reply #2250 on: January 26, 2022, 01:58:13 pm »
A note to the code: It would work better if you can use the RTOS (i.e. multitasking OS) and split the gathering of sensor data and the command loop into two separate threads (I have no idea if it is possible in python). Only responding to command every few seconds makes TC very sluggish when using the "Current values" tab.

You are right. 1 year ago I made a Arduino-C version for 2 sensors which used time interrupts. But I'm not so familiar with C, that's why I started this Micropython project.
But I'm still learning....
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2251 on: January 26, 2022, 02:24:59 pm »
Here's a new file for the Keysight DSOX2014A.

I have updated.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2252 on: January 26, 2022, 02:32:13 pm »
You are right. 1 year ago I made a Arduino-C version for 2 sensors which used time interrupts. But I'm not so familiar with C, that's why I started this Micropython project.
But I'm still learning....

multi-threading is not the same as interrupts. In can be very simple to use, but also has some serious caveats if you do not know what you are doing.
It looks like there may be some support with a _thread module https://techtutorialsx.com/2017/10/02/esp32-micropython-creating-a-thread/
 

Offline bicycleguy

  • Frequent Contributor
  • **
  • Posts: 265
  • Country: us
Re: Program that can log from many multimeters.
« Reply #2253 on: January 26, 2022, 04:38:27 pm »
My oscilloscope serves a built in SCPI reference page at ://LOCAL_ADDRESS/InfiniiVision_Quick_Reference.html#measure

The below works nicely using keyboard F1:
#helpurl  ://192.168.1.94/InfiniiVision_Quick_Reference.html#measure

Is there a way to get #helpurl to automatically put the LOCAL_ADDRESS in?

Also how is the #help file accessed?
« Last Edit: January 26, 2022, 04:42:05 pm by bicycleguy »
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2254 on: January 26, 2022, 05:08:22 pm »
My oscilloscope serves a built in SCPI reference page at ://LOCAL_ADDRESS/InfiniiVision_Quick_Reference.html#measure

The below works nicely using keyboard F1:
#helpurl  ://192.168.1.94/InfiniiVision_Quick_Reference.html#measure

Is there a way to get #helpurl to automatically put the LOCAL_ADDRESS in?

Not at the current time, but I will see to it in the next release.

Also how is the #help file accessed?

It is fetched from my server and a local copy is stored in ...\Documents\TestController\Settings
As long as the file do not exist on my server, you can make on in the above directory and it will be used.

 

Offline bicycleguy

  • Frequent Contributor
  • **
  • Posts: 265
  • Country: us
Re: Program that can log from many multimeters.
« Reply #2255 on: January 26, 2022, 05:52:22 pm »
It is fetched from my server and a local copy is stored in ...\Documents\TestController\Settings
As long as the file do not exist on my server, you can make on in the above directory and it will be used.

I guess I mean how is that file used?  ie what do I do in TC that causes it to do something. 

Also the settings that TC seems to use by default on the mac are in ~/TestController/Settings  not  ~/Documents/TestController/Settings.  This caused problems when I first installed.  Things didn't wok right until I moved the downloaded TestController directory into ~.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2256 on: January 26, 2022, 05:59:47 pm »
I guess I mean how is that file used?  ie what do I do in TC that causes it to do something. 

It is used to fill the help window with commands for the actual device.

Also the settings that TC seems to use by default on the mac are in ~/TestController/Settings  not  ~/Documents/TestController/Settings.  This caused problems when I first installed.  Things didn't wok right until I moved the downloaded TestController directory into ~.

I ask the Java/OS about a working directory, on Windows I get the document directory and I believe it is the home directory on Linux.
 

Offline Bad_Driver

  • Frequent Contributor
  • **
  • Posts: 364
  • Country: de
Re: Program that can log from many multimeters.
« Reply #2257 on: January 26, 2022, 06:18:26 pm »

multi-threading is not the same as interrupts. In can be very simple to use, but also has some serious caveats if you do not know what you are doing.
It looks like there may be some support with a _thread module https://techtutorialsx.com/2017/10/02/esp32-micropython-creating-a-thread/

Thanks again, I will do some home work but suffer from a shortage of hobby time nowadays  :-//
 

Offline oz2cpu

  • Frequent Contributor
  • **
  • Posts: 850
  • Country: dk
    • webx.dk private hobby and diy stuff
Re: Program that can log from many multimeters.
« Reply #2258 on: January 26, 2022, 07:06:28 pm »
here you go

all files are free to use

http://webx.dk/oz2cpu/TemperatureSensorTC/TempLogger.htm

if I forgot anything please let me know
Radioamateur OZ2CPU, Senior EE at Prevas
EMC RF SMPS SI PCB LAYOUT and all that stuff.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2259 on: January 28, 2022, 01:59:01 pm »
here you go

all files are free to use

http://webx.dk/oz2cpu/TemperatureSensorTC/TempLogger.htm

I have added the URL to my page with user projects.
 
The following users thanked this post: oz2cpu

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2260 on: January 28, 2022, 02:06:02 pm »
Thanks again, I will do some home work but suffer from a shortage of hobby time nowadays  :-//

Something like this may work:
Code: [Select]
def testThread():
  sensors = ds_sensor.scan()
  while True:
    ds_sensor.convert_temp()
    time.sleep_ms(700)
    index=0
   
    for sensor in sensors:
        temp_list[index]=(ds_sensor.read_temp(sensor))
        index=index+1
    sensor_numbers = index
 
_thread.start_new_thread(testThread, ())
while True:
    if uart.any() > 0:
        line = uart.read()
...
 

Offline oz2cpu

  • Frequent Contributor
  • **
  • Posts: 850
  • Country: dk
    • webx.dk private hobby and diy stuff
Re: Program that can log from many multimeters.
« Reply #2261 on: January 31, 2022, 08:49:18 am »
Math Formula Question:

we are trying to play the parameter sweeper in baby steps, first experiments are very simple,
a power supply sweep voltage, a bulb is load, very unlinear gives great curves to play with,
multimeter added to increase voltage resolution,
sweeps works perfectly, we have still not been able to trig the curve and data collection to the param sweeper,
so we just manually start and stop them both, for this experiment it does not matter much,
but this is next move to figure out.

then we wanted to get more familiar with the math features, if the data collection run at 0.1 sec, and the param sweep at 0.3 sec,
it is fair to use 3 times average, to get more smooth curves on the calculated resistance,
this dont work, it seems like we can create new variables for outputs of calculations,
BUT we are not able to use the created variables as input to new math, as seen on the picture.

see the attached picture, only the last line dont work,
all other lines create the wanted data fine.
Radioamateur OZ2CPU, Senior EE at Prevas
EMC RF SMPS SI PCB LAYOUT and all that stuff.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2262 on: January 31, 2022, 09:00:02 am »
sweeps works perfectly, we have still not been able to trig the curve and data collection to the param sweeper,
so we just manually start and stop them both, for this experiment it does not matter much,
but this is next move to figure out.

It will only control logging if you have check marked "Save log each"

then we wanted to get more familiar with the math features, if the data collection run at 0.1 sec, and the param sweep at 0.3 sec,
it is fair to use 3 times average, to get more smooth curves on the calculated resistance,
this dont work, it seems like we can create new variables for outputs of calculations,
BUT we are not able to use the created variables as input to new math, as seen on the picture.

You cannot use the result from other math channels in math, that is the problem.
« Last Edit: January 31, 2022, 09:05:54 am by HKJ »
 
The following users thanked this post: oz2cpu

Offline oz2cpu

  • Frequent Contributor
  • **
  • Posts: 850
  • Country: dk
    • webx.dk private hobby and diy stuff
Re: Program that can log from many multimeters.
« Reply #2263 on: January 31, 2022, 09:08:45 am »
thanks mate, we plan to play further with this tonight,
we wanted to recreate your setup with signal generator SDG6022X, and SDM3055 Multimeter,
make the AC voltmeter sweep, did you release a step by step explain how to recreate this ?
we see your time axis is frequency, and the multimeter read, must be synced to each new stimulus from the signal generator,
we found your pages with param sweeper and multimeter measurements,
but none of them explain all we need, to be able to run the exact test,
this way we expect to learn a lot of very usefull things we need for our future use of TC
Radioamateur OZ2CPU, Senior EE at Prevas
EMC RF SMPS SI PCB LAYOUT and all that stuff.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2264 on: January 31, 2022, 09:26:27 am »
we see your time axis is frequency, and the multimeter read, must be synced to each new stimulus from the signal generator,

To show frequency axis you have to right click on the hh:mm:ss field.
Because everything is controlled from TC it is synchronized.
 

Offline PushUp

  • Regular Contributor
  • *
  • Posts: 173
  • Country: de
Re: Program that can log from many multimeters.
« Reply #2265 on: February 01, 2022, 10:01:14 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?

By the way:

Does your USB-IR-Interface look like this with this wide "opening":





...or like the one with two small wholes for the diodes:





Have they changed the design?


ThanX & Cheers!
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2266 on: February 01, 2022, 10:27:45 am »
Do you also have interruptions while logging with the Metrahit Energy?

I do not see any:


You can try reducing the sample rate and/or look at what else is running on the computer (The sample thread uses a fairly high priority and will usually not be affected by other programs).


By the way:

Does your USB-IR-Interface look like this with this wide "opening":




No, it has holes in the plastic for the leds like your second picture, but then my interface is more than 10 years old.
 
The following users thanked this post: PushUp

Offline PushUp

  • Regular Contributor
  • *
  • Posts: 173
  • Country: de
Re: Program that can log from many multimeters.
« Reply #2267 on: February 01, 2022, 07:07:22 pm »
As always: Thank you very much for your quick and helpful reply, HKJ!  :-+

Mmmh, very strange, I think I have to invest a bit further, but at the moment I have no idea, why there are no interruptions in METRAwin10:






However, the good thing is, that I am able to export the data as a *.txt file from METRAwin10 to your genious TestController, as you have thought of anything...  ;)







..., so that I have the best readability and a clear layout, to analyze the data, which is definitely missing in the ancient METRAwin10...






ThanX & best wishes!  :)
 

Offline EHT

  • Frequent Contributor
  • **
  • Posts: 263
  • Country: gb
Re: Program that can log from many multimeters.
« Reply #2268 on: February 01, 2022, 11:57:21 pm »
Hi @HKJ, you've clearly done a great job supporting such a wide range of hardware! Is the project on github? Sorry if its in the thread somewhere. Also, I was wondering why you didn't build upon Sigrok, say a new UI and/or adding drivers for missing hardware?

I was hoping to find remote control/logging in a client-server design: backend interfacing with the h/w, say on a R-Pi (which could even be built into test equipment) and the client web / mobile...
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2269 on: February 02, 2022, 07:19:01 am »
Hi @HKJ, you've clearly done a great job supporting such a wide range of hardware!

It is not me alone, I got a lot of help from people here (You can see a list on the About page).

Is the project on github? Sorry if its in the thread somewhere.

No.

Also, I was wondering why you didn't build upon Sigrok, say a new UI and/or adding drivers for missing hardware?

I wanted the program simple to install and use. The program is in Java and works on multiple platforms with one executable file, you could not do that with Sigrok.

I was hoping to find remote control/logging in a client-server design: backend interfacing with the h/w, say on a R-Pi (which could even be built into test equipment) and the client web / mobile...

I may at some time in the future make it possible to use remote serial ports.
If you want to design your own test equipment, there is documentation on how to interface it to TestController.
 

Online bateau020

  • Regular Contributor
  • *
  • Posts: 243
  • Country: fr
Re: Program that can log from many multimeters.
« Reply #2270 on: February 02, 2022, 08:53:20 am »
A KS 34465A can sample every 40us (0.001PLC, manual range), but TC can only log every 10ms for now. And of course I want those 40us.
Has anyone tried to bridge that gap? I have ideas on how to do it, but didn't want to waste my time if people tell me it it will not work, or if it is possible already.
 

Offline oz2cpu

  • Frequent Contributor
  • **
  • Posts: 850
  • Country: dk
    • webx.dk private hobby and diy stuff
Re: Program that can log from many multimeters.
« Reply #2271 on: February 02, 2022, 08:55:59 am »
i also see those rare, random dropouts, first i had the idea it was a loose connection,
then i tribble checked all, and taped all cables, but it still happens,
maybe some of our internet routers are old crap ?
none of my internet connectivity stuff is new, i go thru 3 switches to access all my lab equipment,

it seems like:
usb DIY arduino: newer seen dropouts
ethernet (siglent equipment) yes, rarely
ethernet keysight, newer seen it.

the last 61hrs, not a single dropout, on two multimeters (3 sec data collection)
« Last Edit: February 02, 2022, 08:58:24 am by oz2cpu »
Radioamateur OZ2CPU, Senior EE at Prevas
EMC RF SMPS SI PCB LAYOUT and all that stuff.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2272 on: February 02, 2022, 09:15:55 am »
A KS 34465A can sample every 40us (0.001PLC, manual range), but TC can only log every 10ms for now. And of course I want those 40us.
Has anyone tried to bridge that gap? I have ideas on how to do it, but didn't want to waste my time if people tell me it it will not work, or if it is possible already.

The fast sample only works to internal memory, not for reading single values on the interface.
TC is not designed for fast sampling, but for logging multiple devices synchronous.

You can load csv files with fast sample rate and analyze them in TC.
 
The following users thanked this post: oz2cpu

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #2273 on: February 02, 2022, 09:18:17 am »
i also see those rare, random dropouts, first i had the idea it was a loose connection,
then i tribble checked all, and taped all cables, but it still happens,
maybe some of our internet routers are old crap ?
none of my internet connectivity stuff is new, i go thru 3 switches to access all my lab equipment,

it seems like:
usb DIY arduino: newer seen dropouts
ethernet (siglent equipment) yes, rarely
ethernet keysight, newer seen it.

I wonder if a "Automatic retry" option for SCPI commands would be a good idea. It will give a hickup in the sampling (Timeout is usually a couple of seconds), but you will probably avoid the dropouts.
 

Offline oz2cpu

  • Frequent Contributor
  • **
  • Posts: 850
  • Country: dk
    • webx.dk private hobby and diy stuff
Re: Program that can log from many multimeters.
« Reply #2274 on: February 02, 2022, 09:29:25 am »
>I wonder if a "Automatic retry" option for SCPI commands would be a good idea.

yes : that would add the missing data, better over a dropout ?
or : what if the request is not answered ? will it time out and deliver a zero ? or a random result to the curve ?
some might prefer missing data if no reply ? so they know the unit is unstable.
but other equipment might deliver their data fine, there will be a hole from the timed out unit,
so what data to put in that hole ? previous known good data ? or a zero ? or retry x number of times (create a time jitter) but at least deliver data to the curve.
but then, what if times out after x retry ? then what do to ?

the more i think about this, the more complex it gets :-) 
Radioamateur OZ2CPU, Senior EE at Prevas
EMC RF SMPS SI PCB LAYOUT and all that stuff.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf