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

0 Members and 9 Guests are viewing this topic.

Offline AtlanticSurfer

  • Contributor
  • Posts: 22
  • Country: gb
Re: Program that can log from many multimeters.
« Reply #1500 on: February 25, 2021, 05:02:53 pm »
Yes it seems a popular solution over on the “Topic: AR488 Arduino-based GPIB adapter” blog.  It cost me $10 for 30 PCBs and $10 for 10 connectors so people can have a working GPIB interface for less than the cost of a used GPIB cable.  That being the case, guys are making a separate interface for each instrument so no GPIB cables required at all – and that’s what I’m going to try next with Test Controller so my current issue will hopefully become a non-issue.

While I’m at it I have to say I’m very impressed with the firmware that blog is all about, their version of AR488 just worked.  It autodetected my Pro Micro and I didn’t need to change a single value from default, I just put the bits together (in minutes) and flashed it and it worked (just as soon as someone pointed out that I needed to set an address).  I think it can auto-configure for the Uno R3, Nano, Micro, Leonardo R3 and the Mega 2560 – handy for guys that need more pins for wireless operation or for extra sensors.  Then there’s a small test utility so I didn’t have to work with terminal software.  I could go on more about it but lastly, I want to mention that the manual for the firmware is very thorough and that I’ve learned more about how GPIB works from that manual than from any other single source.

I’ve tried Labview, Matlab, Benchvue and had a look at EZGPIB when using the Agilent interface but I chose to adopt Excel VBA because I’m somewhat familiar with it but I’m very pleased with Test Controller and now I think the that AR488 and your Test Controller is a perfect partnership for hobbyists like me that are not competent with object orientated programming but still want to get control of their instruments from their computer.  I hope to do a tutorial for it.

Thanks for the tip about baudrate and thanks for Test Controller!

Offer still stands for an interface – I don’t plan to use all 10 connectors.

https://www.eevblog.com/forum/projects/ar488-arduino-based-gpib-adapter/
https://github.com/Twilight-Logic/AR488



« Last Edit: February 25, 2021, 05:04:57 pm by AtlanticSurfer »
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1501 on: February 25, 2021, 05:50:33 pm »
Offer still stands for an interface – I don’t plan to use all 10 connectors.

If you want to send me a PCB and connector I will not say no, it may even arrive faster than I get around to do my own adapter. When I have done my own (i.e. soldered the cable to the Arduino) adapter I also hope to add a documentation page about how to make a GPIB adapter and there that PCB will be nice to include.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1502 on: February 26, 2021, 02:14:45 pm »
I have published some examples on Arduino used with TestController: Digital IO, Servo controller, DS1820 temperature input and DHT22/AM2302 temperature and humidity sensor: http://lygte-info.dk/project/TestControllerArduino2%20UK.html



The temperature and humidity sensor only need a box to be ready for practical use, the other can also be used, but more work will make them better.

I am also working on a examples with ADS1115 15 bit ADC, but I need a few more examples before I can publish that article.
 
The following users thanked this post: Marco1971, nez, nightfire

Offline PaWill68

  • Regular Contributor
  • *
  • Posts: 117
  • Country: ru
Re: Program that can log from many multimeters.
« Reply #1503 on: February 27, 2021, 10:02:03 am »
TestController doesn't work with RIDEN RD60xx over WIFI?
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1504 on: February 27, 2021, 11:37:28 am »
TestController doesn't work with RIDEN RD60xx over WIFI?

No, Riden uses a reverse connection, i.e. the computer must be the server and the Riden calls the computer. This is opposite of normal test equipment and I have not implemented it in TestController. I could implement it, but connection would be a bit awkward due to the way TC works.
 

Offline Bad_Driver

  • Frequent Contributor
  • **
  • Posts: 364
  • Country: de
Re: Program that can log from many multimeters.
« Reply #1505 on: February 28, 2021, 03:23:53 pm »
Thank you very much for your DS1820 example! Works perfect!

After rejecting my wish last week I tried myself to program a Uno.
(I used time interrupt all seconds to get the sensors values - 2 sensors attached, but interrupt handling is different from model to model)
but I'm ashamed by your perfect solution.

Thanks!
 

Offline meandeev

  • Regular Contributor
  • *
  • Posts: 67
  • Country: de
Re: Program that can log from many multimeters.
« Reply #1506 on: February 28, 2021, 09:58:28 pm »
Hello,

I tried to write a definition-file for a Prema 6048. This is a non-scpi Device, but with GPIB. I use a ar488-GPIB adapter. The problem is, that the Prema replies to a ++read with the full measurement value and the status in one single line only after the integration time is finished. The integration time can be very long: up to 80sec, in this time the device doesn´t answers to any ++read and there is no possibility to ask for the status or the last measurement value of the device. Thats why I tried the following approach:
buffer the output to a variable and when a rx-timeout occurs, then use this buffer, but I need help for that. What I have so far (and it doesn´t work completely):

Code: [Select]
#author meandeev
#idString PREMA 6048
#name Prema_6048
#handle P6048
#port comfixedbaud
; using a AR488 so the DTR has to be set correctly:
#baudrate 115200N81Rd
#driver Ascii



; A list of possible column name with unit and formatter (SI, Time, Int, D0..D6)
#value VoltageDC V X9 DC_Voltage

; Simulated SCPI command definitions for the Prema 6048

; Function
#scpiCmd VD tx VD


; Synthetic Commands
#scpiCmd READ:DATA? txrx? ++read
:readmath: (strlen(value)==0)? oldvar : value
:setvar: oldvar=(strlen(value)==0)?oldvar:value



#cmdMode DC_Voltage VD
VD

; String to ask about actual meter mode,
; This is a single line command
#askMode READ:DATA?
#askModeMathFormat substring(value,16,18)




; How to poll for data, this is used for table and #values?
; a #askMode, #cmdMode and #prepareSample is used before this string is used.
; This is a single line command
#askValues READ:DATA?
#readingDelay 3
#askValuesMathFormat substring(value,0,14)


#initCmd
:setvar: oldvar=""

#finalCmd tx ++loc

; Setup menu functions
;Mode-------------------------------------------------------------------------------------------
#cmdSetup info Active_Mode
:read: READ:DATA?
:readmath: substring(value,16,18)
:updatemodechange:

;DC_Voltage-------------------------------------------------------------------------------------
#cmdSetup checkbox AutoRange DC_Voltage
:write: (getElement("A0 A1",value))
:read: READ:DATA?
:readmath: substring(value,22,23)
On 0 1
:updatemodechange:

but when I set the integration time to 4s and the rate of TC to 1s I get this:
Code: [Select]
;; 22:50:39.022 P6048: Tx <READ:DATA?>
;; 22:50:39.022 P6048: Tx <txrx? ++read>
;; 22:50:39.039 COM23: Tx: <++read.> 2B 2B 72 65 61 64 0A
;; 22:50:39.039 COM23: Rx: <+007.497929E+0MRVDP00A1R3F1T7D0S0Q1M02B06> 2B 30 30 37 2E 34 39 37 39 32 39 45 2B 30 4D 52 56 44 50 30 30 41 31 52 33 46 31 54 37 44 30 53 30 51 31 4D 30 32 42 30 36
;; 22:50:39.046 P6048: Rx <+007.497929E+0MRVDP00A1R3F1T7D0S0Q1M02B06>
;; 22:50:39.048 P6048: Rx after :readmath: substring(value,0,14) <+007.497929E+0>
;; 22:50:39.048 P6048: Rx as numbers <7.497929>
;; 22:50:40.022 P6048: Tx <READ:DATA?>
;; 22:50:40.022 P6048: Tx <txrx? ++read>
;; 22:50:40.024 COM23: Tx: <++read.> 2B 2B 72 65 61 64 0A
;; 22:50:41.027 COM23: Rx: timeout
;; 22:50:41.027 P6048: Rx <null>
;; 22:50:41.027 P6048: Rx after :readmath: substring(value,0,14) <null>
;; 22:50:41.027 P6048: Rx as numbers <NaN>
;; 22:50:41.027 P6048: Tx <READ:DATA?>
;; 22:50:41.027 P6048: Tx <txrx? ++read>
;; 22:50:41.030 COM23: Tx: <++read.> 2B 2B 72 65 61 64 0A
;; 22:50:41.164 COM23: Rx: <+007.497929E+0MRVDP00A1R3F1T7D0S0Q1M02B00> 2B 30 30 37 2E 34 39 37 39 32 39 45 2B 30 4D 52 56 44 50 30 30 41 31 52 33 46 31 54 37 44 30 53 30 51 31 4D 30 32 42 30 30
;; 22:50:41.180 P6048: Rx <+007.497929E+0MRVDP00A1R3F1T7D0S0Q1M02B00>
;; 22:50:41.180 P6048: Rx after :readmath: substring(value,0,14) <+007.497929E+0>
;; 22:50:41.180 P6048: Rx as numbers <7.497929>
;; 22:50:42.035 P6048: Tx <READ:DATA?>
;; 22:50:42.035 P6048: Tx <txrx? ++read>
;; 22:50:42.038 COM23: Tx: <++read.> 2B 2B 72 65 61 64 0A
;; 22:50:43.050 COM23: Rx: timeout
;; 22:50:43.050 P6048: Rx <null>
;; 22:50:43.050 P6048: Rx after :readmath: substring(value,0,14) <null>
;; 22:50:43.050 P6048: Rx as numbers <NaN>
;; 22:50:43.050 P6048: Tx <READ:DATA?>
;; 22:50:43.050 P6048: Tx <txrx? ++read>
;; 22:50:43.055 COM23: Tx: <++read.> 2B 2B 72 65 61 64 0A
;; 22:50:44.065 COM23: Rx: timeout
;; 22:50:44.065 P6048: Rx <null>
;; 22:50:44.065 P6048: Rx after :readmath: substring(value,0,14) <null>
;; 22:50:44.065 P6048: Rx as numbers <NaN>
;; 22:50:44.065 P6048: Tx <READ:DATA?>
;; 22:50:44.065 P6048: Tx <txrx? ++read>
;; 22:50:44.071 COM23: Tx: <++read.> 2B 2B 72 65 61 64 0A
;; 22:50:45.090 COM23: Rx: timeout
;; 22:50:45.090 P6048: Rx <null>
;; 22:50:45.090 P6048: Rx after :readmath: substring(value,0,14) <null>
;; 22:50:45.090 P6048: Rx as numbers <NaN>
;; 22:50:45.090 P6048: Tx <READ:DATA?>
;; 22:50:45.090 P6048: Tx <txrx? ++read>
;; 22:50:45.096 COM23: Tx: <++read.> 2B 2B 72 65 61 64 0A
;; 22:50:45.174 COM23: Rx: <+007.497929E+0MRVDP00A1R3F1T7D0S0Q1M02B00> 2B 30 30 37 2E 34 39 37 39 32 39 45 2B 30 4D 52 56 44 50 30 30 41 31 52 33 46 31 54 37 44 30 53 30 51 31 4D 30 32 42 30 30
;; 22:50:45.174 P6048: Rx <+007.497929E+0MRVDP00A1R3F1T7D0S0Q1M02B00>
;; 22:50:45.174 P6048: Rx after :readmath: substring(value,0,14) <+007.497929E+0>
;; 22:50:45.174 P6048: Rx as numbers <7.497929>
;; 22:50:46.023 P6048: Tx <READ:DATA?>
;; 22:50:46.023 P6048: Tx <txrx? ++read>
;; 22:50:46.027 COM23: Tx: <++read.> 2B 2B 72 65 61 64 0A
;; 22:50:47.041 COM23: Rx: timeout
;; 22:50:47.041 P6048: Rx <null>
;; 22:50:47.041 P6048: Rx after :readmath: substring(value,0,14) <null>
;; 22:50:47.041 P6048: Rx as numbers <NaN>
;; 22:50:47.041 P6048: Tx <READ:DATA?>
;; 22:50:47.041 P6048: Tx <txrx? ++read>
;; 22:50:47.046 COM23: Tx: <++read.> 2B 2B 72 65 61 64 0A
;; 22:50:48.060 COM23: Rx: timeout
;; 22:50:48.060 P6048: Rx <null>
;; 22:50:48.060 P6048: Rx after :readmath: substring(value,0,14) <null>
;; 22:50:48.060 P6048: Rx as numbers <NaN>

So after the rx timeout the substitution with the oldvar doesn´t occur. Why? I´m lost ...

Can somebody help me with this? Thanks!

« Last Edit: February 28, 2021, 10:00:15 pm by meandeev »
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1507 on: March 01, 2021, 07:57:19 am »
Thank you very much for your DS1820 example! Works perfect!

After rejecting my wish last week I tried myself to program a Uno.
(I used time interrupt all seconds to get the sensors values - 2 sensors attached, but interrupt handling is different from model to model)
but I'm ashamed by your perfect solution.

You can easily change my example to handle two or more sensors, either simultaneous or in sequence. Sequence is probably the best solution, but will reduce the update rate.
Interrupts is not a good way to handle the single wire sensor protocol
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1508 on: March 01, 2021, 08:14:20 am »
I tried to write a definition-file for a Prema 6048. This is a non-scpi Device, but with GPIB. I use a ar488-GPIB adapter. The problem is, that the Prema replies to a ++read with the full measurement value and the status in one single line only after the integration time is finished. The integration time can be very long: up to 80sec, in this time the device doesn´t answers to any ++read and there is no possibility to ask for the status or the last measurement value of the device. Thats why I tried the following approach:
buffer the output to a variable and when a rx-timeout occurs, then use this buffer, but I need help for that. What I have so far (and it doesn´t work completely):

You cannot catch a timeout, it is a fault and will terminate any further processing for that value.
TestController is not really designed to handle very slow responses, but you can do something with setting timeouts, i.e. using "#readingDelay" specification.

Another note: You do not need a _ in the #name
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1509 on: March 04, 2021, 02:41:12 pm »
V1.58 is up
Bugfixes, new devices and small changes, mostly due to users and user requests.
   Changed: Field number & multi layout will use spare columns in some conditions
   Added: Tag :textwidth: to define text width of input fields, default value is 6
   Fixed: Request to open webbrowser when not supported will not throw an error anymore
   Added: Hameg HMP2020 power supply, thanks to AtlanticSurfer
   Added: checkbox in mode popupmenu, can either use a local mode or a device mode.
   Added: [mode:xxx] conditional tag to #askValues definition
   Added: #askValues can be modified depending on modes.
   Fixed: displayVar did not work during device initialization
   Added: Keithley 2015, thanks PhilipZ

From this version it is easy to define optional columns from data collection, if requires the use of #askValues with [mode:xxx] and #cmdModeCheck
 

Offline sairfan1

  • Frequent Contributor
  • **
  • Posts: 348
  • Country: ca
Re: Program that can log from many multimeters.
« Reply #1510 on: March 04, 2021, 10:34:09 pm »
Does it support HP3457A ?
 

Offline AtlanticSurfer

  • Contributor
  • Posts: 22
  • Country: gb
Re: Program that can log from many multimeters.
« Reply #1511 on: March 04, 2021, 10:58:36 pm »
Hi sairfan1, HP3457A doesn’t yet appear to have a definition file but there is a file for the HP3478a and that probably wouldn’t take much modification to make it work with the HP3457A.
 
The following users thanked this post: sairfan1

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1512 on: March 05, 2021, 10:21:54 am »
Does it support HP3457A ?

As AtlanticSurfer says: No
I have only added the devices I have, but it is possible for users to add more devices and I have made some documentation about it. I do also try to help with it (As much as I can without the device). Adding devices to not require programming, but is done with a definition file in text format.

I do always hope that people that creates definitions for other devices will post them here, then I can include them in subsequent releases.
 

Offline Bad_Driver

  • Frequent Contributor
  • **
  • Posts: 364
  • Country: de
Re: Program that can log from many multimeters.
« Reply #1513 on: March 05, 2021, 12:33:04 pm »
Attached my working definition for the FLUKE 45.
Some issues:

- 2nd Display can be set but not read
- Scroll down menu for 2nd display "forgets" setting but works
- dBm reading not implemented since no SCPI device

May be some one will benefit from it. Unfortunately I own only a Agilent GPIB-adaptor and I learned that this is not supported by TC.
So the device only works with serial connection.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1514 on: March 05, 2021, 12:44:58 pm »
Attached my working definition for the FLUKE 45.

Thanks, it will be included in the next release

May be some one will benefit from it. Unfortunately I own only a Agilent GPIB-adaptor and I learned that this is not supported by TC.
So the device only works with serial connection.

A supported GPIB adapter can be build fairly cheap.
If somebody else has the meter and a supported GPIB adapter it can also easy be enabled by changing this line (Include the GPIB word): "#port comfixedbaud GPIB"
 
The following users thanked this post: nightfire

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1515 on: March 05, 2021, 12:50:21 pm »
- 2nd Display can be set but not read

I do generally not recommend reading more than one values from a DMM, this is because some of the popups can track single value devices, but will not do not on devices that returns multiple values. With track I mean they will automatic change to the active #value when it changes.


- dBm reading not implemented since no SCPI device

dBm can easily be added with a math function.
 

Offline nightfire

  • Frequent Contributor
  • **
  • Posts: 585
  • Country: de
Re: Program that can log from many multimeters.
« Reply #1516 on: March 05, 2021, 02:00:54 pm »
As I have a Fluke 45, I am eager to try this out, but probably not this weekend as I am redecorating a bit at home...

Would it be possible to model such two-display DMM in a way to set up separate handlers for them, or will that conflict with the serial port locking/concurrent use to that port?
Especially for using a DMM to control discharging of a battery, the Fluke 45 offers 3-wire measurement so it would be an ideal candidate to measure voltage and current in the same circuit naturally ;-)
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1517 on: March 05, 2021, 04:20:50 pm »
Would it be possible to model such two-display DMM in a way to set up separate handlers for them, or will that conflict with the serial port locking/concurrent use to that port?

No, but it is possible to use multiple columns (#value) specification, you just looses the tracking feature in "Readout" and a few other popups. This only means you will have to manually select the value in the popup after each mode change. I may improve this at a later date.

Especially for using a DMM to control discharging of a battery, the Fluke 45 offers 3-wire measurement so it would be an ideal candidate to measure voltage and current in the same circuit naturally ;-)

Using same DMM to do both measurement will cost a bit of precision due to cable resistance, the best solution for battery testing is a electronic load with remote sense. TC supports a couple of models, even a cheap ATorch model, but I do not believe it has remote sense, you can get around that by using the Fluke directly over the battery terminals and only use the current from the load.
 

Offline nightfire

  • Frequent Contributor
  • **
  • Posts: 585
  • Country: de
Re: Program that can log from many multimeters.
« Reply #1518 on: March 05, 2021, 05:25:10 pm »
Ahh ok, thanks for clarifying!

I also have a (rebranded) KEL-102, but I can think of several possibilities where it could be nice to let a single device do measurements, like in debugging small circuits and voltage drops under load, not only doing discharging of batteries- and as a happy Fluke 45 owner, some good must come from that 2nd display  8)
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1519 on: March 05, 2021, 05:40:35 pm »
...I can think of several possibilities where it could be nice to let a single device do measurements, like in debugging small circuits and voltage drops under load, not only doing discharging of batteries- and as a happy Fluke 45 owner, some good must come from that 2nd display  8)

I do not generally limit myself to a single piece of equipment, that was one of the reasons I wrote TestController. I like to use multiple pieces of test equipment together, independent of brand.
I also wanted a easy way to configure a computer as a test station (I buy cheap laptops for that), with TestController I only have to install Java and probably a couple of serial drivers, then copy TestController onto it and it is ready to run any test I want.
The secondary display can be useful when using a DMM standalone, but when logging test I prefer a secondary DMM or a math expression.
Note: I plan on making easier to do some Math functions, this will not require any update of TestController (If it is a fairly new version), but will be scripts that is automatic downloaded if the computer is online when TestController is started.
 

Offline sairfan1

  • Frequent Contributor
  • **
  • Posts: 348
  • Country: ca
Re: Program that can log from many multimeters.
« Reply #1520 on: March 05, 2021, 07:33:54 pm »
@AtlanticSurfer (or someone else) please advise what kind of changes i need to make to 3478A config file to make it workable with my 3457A
 

Offline Hydron

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: gb
Re: Program that can log from many multimeters.
« Reply #1521 on: March 06, 2021, 09:02:16 am »
There is extensive documentation on HKJ's site about how to write drivers - start there and with the instrument manual.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #1522 on: March 06, 2021, 09:30:48 am »
...what kind of changes i need to make to 3478A config file to make it workable with my 3457A

To get started copy the definition for 3478A to .../Documents/TestController/Devices/ and rename it to HP3457A
Next step is to fix the #idString line, the #name line and the #handle line

When this is fixed TestController will connect to the meter, if not there is something wrong with the above fix or you have not specified the connection correctly.

When you have a connection you can start on the meter manual and use the commands from the manual on the command line in TestController (You need to prefix the commands with tx or txrx? when using the Ascii driver).
Now you also need to compare the definition of the meter to the manual for the meter and adjust for differences. A part of the definition defines a map to convert from the meters language to SCPI, this definition is done with #scpiCmd lines.

TC manual for Ascii devices: https://lygte-info.dk/project/TestControllerConfigDevice2%20UK.html#Non-SCPI_ascii_devices
Mnaual for SCPI and UI definitions: https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html

 

Offline ian.ameline

  • Regular Contributor
  • *
  • Posts: 73
  • Country: ca
Re: Program that can log from many multimeters.
« Reply #1523 on: March 07, 2021, 02:05:48 am »
I have a rebranded KORAD KEL 102 load. The *IDN? string returned is "MP710258 V2.20 SN:500xxxxx"

How would I go about making this program work with this device?

Same question goes for an Agilent power supply - E3640A?

Thanks!
 

Offline ian.ameline

  • Regular Contributor
  • *
  • Posts: 73
  • Country: ca
Re: Program that can log from many multimeters.
« Reply #1524 on: March 07, 2021, 02:40:47 am »
Ok -- figured out the load -- now for the E3640A power supply...
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf