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

0 Members and 8 Guests are viewing this topic.

Offline AtlanticSurfer

  • Contributor
  • Posts: 26
  • Country: gb
Re: Program that can log from many multimeters.
« Reply #1550 on: March 14, 2021, 03:01:37 pm »
I’ve been trying to setup the last of my instruments, a R&S NGPS voltage source.  Basically, it can be thought of as a two channel power supply with a High and a Low mode for each channel.  It has no current control or anything fancy, just a voltage source.

I’ve made a definition file that enables control of the output voltage but I’m a bit stuck now.  The main problem is extracting the numbers from the data string when reading the “set values”.  Are there any examples of how to use mathFormat & readmath?

Another goal I have is to be able to turn the outputs off - the manual says to send either “selected device clear” or “device clear” but I’ve tried every syntax I can think of but can’t get them to switch off. 

It would also be nice if the outputs get set to zero and turned off when TC is closed.

In case anyone is willing to help I’ve attached an extract from the device manual, my rudimentary device definition file and a sample from the TC command window.

 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3038
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1551 on: March 14, 2021, 03:43:08 pm »
I’ve made a definition file that enables control of the output voltage but I’m a bit stuck now.  The main problem is extracting the numbers from the data string when reading the “set values”.  Are there any examples of how to use mathFormat & readmath?

Another goal I have is to be able to turn the outputs off - the manual says to send either “selected device clear” or “device clear” but I’ve tried every syntax I can think of but can’t get them to switch off. 

It would also be nice if the outputs get set to zero and turned off when TC is closed.

To read any value you need to use a command ending with ?, i.e. "txrx?"
You cannot directly control the GPIB lines from TestController (I will probably implement this in a future release).

You use the #finalCmd tag to define what happens when TC stops and #outputOff to define what happens when "Outputs off" is pressed. You can always set both outputs to 0V.
 

Offline Pukker

  • Regular Contributor
  • *
  • Posts: 153
  • Country: nl
Re: Program that can log from many multimeters.
« Reply #1552 on: March 14, 2021, 05:27:49 pm »
Another idea:
You do not need the filter to avoid stopping due to a sample or two missing, you could also use the table functions:

tableCalcMax("Voltage",tableRows()-4)

Working fine for now.

My Wait function is now:
#wait tableCalcMax(19,tableRows()-6)>endVoltage

Test with 6 values, some dropouts are a few.
Dropouts are not predictable. Logged for a few hours now.

A little confusion about table column numbers:
for example 22 Columns,
=tableColumns()  Returns 22
Last 3 columns 20, 21 and 22 are Math. VoltageFilter.Filter, Math.Current.Filter, Math.Temp.Filter
(see Picture
=tableColumnName(19) Returns Math.VoltageFilter
So have to use the real column-number minus 1
Not an big problem, just for your information.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3038
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1553 on: March 14, 2021, 05:38:24 pm »
A little confusion about table column numbers:
for example 22 Columns,
=tableColumns()  Returns 22
Last 3 columns 20, 21 and 22 are Math. VoltageFilter.Filter, Math.Current.Filter, Math.Temp.Filter
(see Picture
=tableColumnName(19) Returns Math.VoltageFilter
So have to use the real column-number minus 1
Not an big problem, just for your information.


Both column and row numbers are zero based, but for columns you can use the name instead, i.e. 19 or "Math.VoltageFilter" will return the same column data.
But why use the filtered column, why not use the original data column?
 

Offline Pukker

  • Regular Contributor
  • *
  • Posts: 153
  • Country: nl
Re: Program that can log from many multimeters.
« Reply #1554 on: March 14, 2021, 05:39:30 pm »
My discharge script complete
and
picture from command window after complete run.
 

Offline Pukker

  • Regular Contributor
  • *
  • Posts: 153
  • Country: nl
Re: Program that can log from many multimeters.
« Reply #1555 on: March 14, 2021, 05:45:45 pm »

But why use the filtered column, why not use the original data column?

Yes, that is what I do now.
I had the picture of the columns already and used them for example.
But my ATDL.Voltage column is nr. 5 and use in my script nr. 4
 

Offline Pukker

  • Regular Contributor
  • *
  • Posts: 153
  • Country: nl
Re: Program that can log from many multimeters.
« Reply #1556 on: March 14, 2021, 05:52:29 pm »
A small message for information.
When logging and discharging without doing anything,
I had a few dropouts in 3 hours.
When opening setup Popups for Riden6012 and ATDL24 a lot of dropouts..
Also a lot dropouts after eachother.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3038
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1557 on: March 15, 2021, 07:25:57 am »
A small message for information.
When logging and discharging without doing anything,
I had a few dropouts in 3 hours.
When opening setup Popups for Riden6012 and ATDL24 a lot of dropouts..
Also a lot dropouts after eachother.

Strange, the setup popups do not use the communication or cpu cycles, except when something is activated on them, only exception is the "updater" control and very few devices uses it.
Using one of the pages or popups that shows the result will use more cpu cycles, but are not supposed to affect communication that runs on separate threads and with higher priority.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3038
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1558 on: March 16, 2021, 08:40:18 am »
Hi, do not delete posts when I want to answer it!

TestController is designed to work fairly transparently with GPIB interfaces, mostly it works fine, but I can see there are some exceptions.

I have added some untested code that will hopefully control the GPIB lines: [CLR] [LLO] [TRG]
When using other interfaces they will be ignored.
They are not documented and only supported in AR488 interface, when I have reports back that they work I will document them and add them to other GPIB interfaces.

Test jar file (Use it to replace existing jar file): http://lygte-info.dk/pic/Projects/TestController/TestController.jar
 

Offline AtlanticSurfer

  • Contributor
  • Posts: 26
  • Country: gb
Re: Program that can log from many multimeters.
« Reply #1559 on: March 16, 2021, 09:56:15 am »
Okay I deleted it because I figured out that your prior response had already answered the question.

I don’t see a change with the new jar - maybe my syntax?

CLR
;; NGPS: Tx <CLR>
;; NGPS: Tx <tx ++clr>
;; COM9: Tx: <++addr 8.> 2B 2B 61 64 64 72 20 38 0A
;; COM9: Tx: <.+.+clr.> 1B 2B 1B 2B 63 6C 72 0A
Trg
;; NGPS: Tx <Trg>
;; NGPS: Tx <tx ++trg>
;; COM9: Tx: <.+.+trg.> 1B 2B 1B 2B 74 72 67 0A 

I don’t think the device supports [LLO] – I don’t see it in the manual.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3038
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1560 on: March 16, 2021, 10:03:14 am »
Okay I deleted it because I figured out that your prior response had already answered the question.

I do frequently add new functions to TestController and due to you problems I decided to look at the GPIB lines.


I don’t see a change with the new jar - maybe my syntax?

CLR
;; NGPS: Tx <CLR>

You must include the square brackets, i.e. [CLR] is not the same as CLR

I don’t think the device supports [LLO] – I don’t see it in the manual.

It looked like the 3 I have included are the control lines that may need direct support on the GPIB interface.
 

Offline AtlanticSurfer

  • Contributor
  • Posts: 26
  • Country: gb
Re: Program that can log from many multimeters.
« Reply #1561 on: March 16, 2021, 10:24:33 am »
No response from the device, just a blink from the address light.

TRG
;; NGPS: Tx <TRG>
;; NGPS: Tx <tx [TRG]>
;; COM9: Tx: <[TRG].> 5B 54 52 47 5D 0A
CLR
;; NGPS: Tx <CLR>
;; NGPS: Tx <tx [CLR]>
;; COM9: Tx: <[CLR].> 5B 43 4C 52 5D 0A
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3038
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1562 on: March 16, 2021, 10:44:51 am »
No response from the device, just a blink from the address light.

TRG
;; NGPS: Tx <TRG>
;; NGPS: Tx <tx [TRG]>
;; COM9: Tx: <[TRG].> 5B 54 52 47 5D 0A

Sorry, I added it to SCPI/SCPIx driver code, now I have also added it to the ASCII driver code. It is still untested!

It may be some time before you can download the new version (I have seen from immediately up to 1 hour), check the version number, it must be V1.60
 

Offline AtlanticSurfer

  • Contributor
  • Posts: 26
  • Country: gb
Re: Program that can log from many multimeters.
« Reply #1563 on: March 16, 2021, 10:53:22 am »

Quote
Sorry, I added it to SCPI/SCPIx driver code, now I have also added it to the ASCII driver code. It is still untested!

Bingo! That's working perfectly thank you very much!
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3038
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1564 on: March 18, 2021, 03:43:34 pm »
I have updated the script library for TestController, this update will be visible in all TC running on online computes and being V1.46 or newer.
To access it right click in the log window, the scripts either requires a loaded load (For battery test) or data in the table (For annotations).



A couple of annotations is can be done automatic, for each one a curve and a color must be select and it is possible to skip the first few samples.



Here min/max/average has been added to a noise sinus curve.



Two battery test functions have been added, they will discharge a battery with specified current, until voltage drops below minimum. The load sweep will also add some annotations and color to the chart.



It is possible to manually add load sweep annotations and color to the chart.



The load sweep with annotations.

As usually it is possible to view and reuse the code for home designed scripts.
 

Offline Pukker

  • Regular Contributor
  • *
  • Posts: 153
  • Country: nl
Re: Program that can log from many multimeters.
« Reply #1565 on: March 22, 2021, 08:07:39 pm »

Two battery test functions have been added, they will discharge a battery with specified current, until voltage drops below minimum. The load sweep will also add some annotations and color to the chart.

As usually it is possible to view and reuse the code for home designed scripts.

I've seached, but how do I use the Battery discharge function with own made script?
In other words, I like to use the discharge popup in my own script.
Looks good for quick making settings.
Thanks in advance.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3038
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1566 on: March 23, 2021, 01:45:07 pm »
I've seached, but how do I use the Battery discharge function with own made script?
In other words, I like to use the discharge popup in my own script.
Looks good for quick making settings.
Thanks in advance.

First you open the list and manage scripts, right click in the log window and select:


In the script window you checkmark 1), select the script 2) and click View or Copy.


Copy will copy to clipboard and you can then paste it into you own script.

You can find the file with all the system scripts here: \Documents\TestController\Settings\ScriptLibrary.dat
You can see the headers and the filters in the file, they are not included in View and Copy.
Do not bother change it, it will be restored to the standard contents next time TestController is started.
 

Offline Pukker

  • Regular Contributor
  • *
  • Posts: 153
  • Country: nl
Re: Program that can log from many multimeters.
« Reply #1567 on: March 23, 2021, 09:40:43 pm »
@HKJ

Thanks for pointing me, just wat I needed and want to know.

THANKS for your complete instructions.
 

Offline Pukker

  • Regular Contributor
  • *
  • Posts: 153
  • Country: nl
Re: Program that can log from many multimeters.
« Reply #1568 on: March 28, 2021, 08:37:20 am »
Load DL24 and PX100

For the owners of the DL24 or PX100 I like to share my own script for Battery discharge test with Atorch DL24 and PX100.

Added some functions for eliminating Drop-out failures. Seems to work OK.
Tested for hours and no problems.

Added option to reset the load before starting discharge. (I always forgot)
Added option to set specified max. time for discharging. After this time discharge stops anyway.
Setting now in Seconds, maybe better in minutes, don't know yet.
For result see the pictures.

Added function which set end voltage of the load 0.05 Volt lower than the end voltage
for Testcontroller, so Testcontroller has control and the load end voltage is for failsafe.

Attached my discharge script.

Note: I have not much programming experience, so code may not look good.

Remarks, hints, tips? let me know.

Thanks to HKJ for help.

« Last Edit: March 28, 2021, 08:56:13 am by Pukker »
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 28088
  • Country: nl
    • NCT Developments
Re: Program that can log from many multimeters.
« Reply #1569 on: March 28, 2021, 09:28:42 pm »
Just wondering... has anyone used this program to log a frequency / time interval counter?
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3038
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1570 on: March 29, 2021, 11:58:16 am »
For the owners of the DL24 or PX100 I like to share my own script for Battery discharge test with Atorch DL24 and PX100.

Nice script, would it be ok if I make a webpage with user scripts and put your script and explanation on it?

Hopefully other will be added late.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3038
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1571 on: March 29, 2021, 12:00:04 pm »
Just wondering... has anyone used this program to log a frequency / time interval counter?

I do not believe anyone has. It is probably fairly easy to define a frequency counter with the standard SCPI driver.
 
The following users thanked this post: nctnico

Offline Pukker

  • Regular Contributor
  • *
  • Posts: 153
  • Country: nl
Re: Program that can log from many multimeters.
« Reply #1572 on: March 29, 2021, 12:08:56 pm »

Nice script, would it be ok if I make a webpage with user scripts and put your script and explanation on it?


Yes for sure, that is OK.
 

Offline joxelito

  • Contributor
  • Posts: 13
  • Country: es
Re: Program that can log from many multimeters.
« Reply #1573 on: April 08, 2021, 08:26:38 am »
Just wondering... has anyone used this program to log a frequency / time interval counter?
Nice!!!
The line:
Code: [Select]
#math Energy Wh SumTimeHour 0 (nameCurrent(load)+"*"+nameVoltage(load))
Solved my issue defining this class of Math.
In particular the way of inserting the product symbol as a text string: "*"
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3038
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1574 on: April 11, 2021, 12:05:36 pm »
V1.61 is up, the program has now been out for more than a year with lots of update.
It is mostly about new devices, with a few minor tweaks to the code:
   Added: Gossen MetraHit Energy DMM
   Changed: Large values (>=1e36) will be mapped to +/-infinite when reading from devices
   Fixed: Settings in GridPanel will update setupPopup
   Added: Support for direct GPIB control of some devices: CLR, LLO, LOC, TRG
   Added: RND 320 (KEL103) electronic load, thanks Calvin
   Fixed: Serial binary communication buffer will not overflow at fast data rates.
   Added: Multicomp Pro MP710258 & MP710259, thanks ian.ameline
   Added: Fluke 45, thanks Bad_driver

The Energy meter is the most complicated handheld meter to date.





In Power mode with Energy checked a lot of values are read from the meter:



It is a very good meter for checking standby power, the current range goes down to uA and the fuse will not blow as long as current is below 10A.
 
The following users thanked this post: MikeLud


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf