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

Alex Nikitin and 3 Guests are viewing this topic.

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #750 on: June 11, 2020, 10:41:41 am »
Just to show what Test Controller can do (in X/Y mode) some Bode plots. :-+

You need a generator you can control from TestController. The you could automate the sweeps very easily.
 
The following users thanked this post: Marco1971

Offline masterx81

  • Frequent Contributor
  • **
  • Posts: 481
  • Country: it
Re: Program that can log from many multimeters.
« Reply #751 on: June 11, 2020, 12:29:36 pm »
Just to show what Test Controller can do (in X/Y mode) some Bode plots. :-+
Sooo nice!
What have you used for read back the values? Need something that have a flat curve in frequency response.
 

Offline masterx81

  • Frequent Contributor
  • **
  • Posts: 481
  • Country: it
Re: Program that can log from many multimeters.
« Reply #752 on: June 11, 2020, 12:30:28 pm »
#scpiCmd must be specified BEFORE using it? Or the order of the commands doesn't matter?

The order do not matter, all # commands are read and sorted before the definition is used.

I will suggest try using the tx/txrx/txrx? commands from the command line in debug mode, this way you can try commands and see answers very easily.
Ok, this evening that i go home i try! Thanks!
 
The following users thanked this post: Marco1971

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #753 on: June 11, 2020, 12:39:48 pm »
Ok, this evening that i go home i try! Thanks!

If you find something I need to change in the NS driver, I can do that fairly fast.
Also note that you can send some initial commands to it: On the GPIB page the settings field is for sending commands to the GPIB driver (Use ; as delimiter between the commands).
 

Offline Messtechniker

  • Frequent Contributor
  • **
  • Posts: 782
  • Country: de
  • Old analog audio hand - No voodoo.
Re: Program that can log from many multimeters.
« Reply #754 on: June 11, 2020, 02:49:48 pm »

You need a generator you can control from TestController. The you could automate the sweeps very easily.

Yep. I know and I am looking for an UNI-T UTG 962 which is currently not
available from a renowned source in Germany :palm:. If not available until Black Friday its then the going to be a Siglent SDG2042X provided it is substantially discounted then. :popcorn:
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 MikeLud

  • Regular Contributor
  • *
  • Posts: 218
  • Country: us
Re: Program that can log from many multimeters.
« Reply #755 on: June 11, 2020, 02:51:14 pm »
Just to show what Test Controller can do (in X/Y mode) some Bode plots. :-+

Messtechniker,

You beat me to it, yesterday I wrote the attached script to do a frequency sweep. I still need to make a device file for my scope to read some measurements for the Bode Plot

* BP.txt (0.44 kB - downloaded 60 times.)
 

Offline Messtechniker

  • Frequent Contributor
  • **
  • Posts: 782
  • Country: de
  • Old analog audio hand - No voodoo.
Re: Program that can log from many multimeters.
« Reply #756 on: June 11, 2020, 02:56:12 pm »
Just to show what Test Controller can do (in X/Y mode) some Bode plots. :-+
Sooo nice!
What have you used for read back the values? Need something that have a flat curve in frequency response.
Since I do not own/need a proper signal generator (yet), I simply used the sweep function of Audio Tester driving my PC sound card. Flat enough for most purposes.
This quick-and-dirty approach has its limitations. The frequency-to-voltage conversion is inherently slow. :palm: And the X-axis is linear with log being more common.
« Last Edit: June 11, 2020, 02:59:28 pm by Messtechniker »
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 Mr. Scram

  • Super Contributor
  • ***
  • Posts: 9810
  • Country: 00
  • Display aficionado
Re: Program that can log from many multimeters.
« Reply #757 on: June 11, 2020, 03:24:15 pm »
You need a generator you can control from TestController. The you could automate the sweeps very easily.
I gather we could we add oscilloscopes too? I've been meaning to write a bode program for my oscilloscope, but if we can do it in TestController, that'd be even better.
 

Offline masterx81

  • Frequent Contributor
  • **
  • Posts: 481
  • Country: it
Re: Program that can log from many multimeters.
« Reply #758 on: June 11, 2020, 04:46:03 pm »
Question: Can't be done simply with a (qood quality) DMM?
DMM True RMS converters have a quite wide bandwidth with flat curve.

If doing with scope, would be nice to also measure the phase shift, but it for sure need some sort of sync between scope and sig generator.
But i think tha't way too much
 
The following users thanked this post: Marco1971

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #759 on: June 11, 2020, 05:17:45 pm »
Question: Can't be done simply with a (qood quality) DMM?
DMM True RMS converters have a quite wide bandwidth with flat curve.
Look at the name of his axis, 34465 is a Keysight bench meter.

I will have to look at bit more on logarithmic axis.
 
The following users thanked this post: masterx81, Marco1971

Offline masterx81

  • Frequent Contributor
  • **
  • Posts: 481
  • Country: it
Re: Program that can log from many multimeters.
« Reply #760 on: June 11, 2020, 06:18:09 pm »
I will suggest try using the tx/txrx/txrx? commands from the command line in debug mode, this way you can try commands and see answers very easily.

Tried  to send a" txrx? G" and i've got:
Code: [Select]
;; 50PLUS: Tx <txrx? G>
;; COM9: Tx: <WRT 1.> 57 52 54 20 31 0A
;; COM9: Tx: <G.> 47 0A
;; COM9: Tx: <RD #15,1.> 52 44 20 23 31 35 2C 31 0A
;; COM9: Rx: timeout
java.lang.NullPointerException
        at dk.hkj.shared.SharedInterfaceNSGPIB232CT.read(SharedInterfaceNSGPIB232CT.java:58)
        at dk.hkj.shared.SharedInterface.writeRead(SharedInterface.java:258)
        at dk.hkj.comm.GpibInterface.writeRead(GpibInterface.java:63)
        at dk.hkj.comm.CommInterface.writeRead(CommInterface.java:95)
        at dk.hkj.devices.DeviceAscii$TranslatingCommInterface.write(DeviceAscii.java:153)
        at dk.hkj.comm.CommInterface.writeRead(CommInterface.java:100)
        at dk.hkj.main.SCPICommand.writeReadDelay(SCPICommand.java:151)
        at dk.hkj.main.SCPICommand.writeReadInternal(SCPICommand.java:188)
        at dk.hkj.main.SCPICommand.writeRead(SCPICommand.java:230)
        at dk.hkj.main.DeviceInterface.doCommand(DeviceInterface.java:70)
        at dk.hkj.main.CommandProcessor.processCommands(CommandProcessor.java:675)
        at dk.hkj.main.PaneCommand.processCommand(PaneCommand.java:1140)
        at dk.hkj.main.PaneCommand.access$20(PaneCommand.java:1138)
        at dk.hkj.main.PaneCommand$15.keyTyped(PaneCommand.java:632)
        at java.awt.AWTEventMulticaster.keyTyped(Unknown Source)
        at java.awt.Component.processKeyEvent(Unknown Source)
        at javax.swing.JComponent.processKeyEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
        at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
        at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
        at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
        at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$500(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
;; 50PLUS: Rx Timeout

Sending a "tx M1" for switch to Vac it not give any error, but the meter not switch.
Quote
;; 50PLUS: Tx <tx M1>
;; COM9: Tx: <WRT 1.> 57 52 54 20 31 0A
;; COM9: Tx: <M1.> 4D 31 0A

Maybe the simple LF isn't enough? Send with keyboard using the "enter" key (i suppose a cr+lf) was working

Tried to send also a "CLR 1" GPIB Command in the gpib window, he sent it:
Code: [Select]
;; COM9: Tx: <CLR 1.> 43 4C 52 20 31 0A
But the meter had not reset
« Last Edit: June 11, 2020, 06:27:31 pm by masterx81 »
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #761 on: June 11, 2020, 06:25:43 pm »
Tried  to send a txrx? G and i've got:

It just means timeout and that I was a missing null pointer check in the code. This will be fixed in next version
I will not be posting a update for that alone.
 

Offline masterx81

  • Frequent Contributor
  • **
  • Posts: 481
  • Country: it
Re: Program that can log from many multimeters.
« Reply #762 on: June 11, 2020, 06:28:13 pm »
Sorry, i've edited the message adding details...
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #763 on: June 11, 2020, 06:32:22 pm »
Tried to send also a "CLR 1" GPIB Command in the gpib window, he sent it:
Code: [Select]
;; COM9: Tx: <CLR 1.> 43 4C 52 20 31 0A
But the meter had not reset

At the current time not CR or LF reach the meter, but the GPIB controller uses a control line to signal end of message.
Can you try from a terminal program and use the character count to send/not send a CR or LF to the meter?

If you can confirm this is the problem I will modify the driver to use the count parameter to get the CR/LF to the meter.

 

Offline masterx81

  • Frequent Contributor
  • **
  • Posts: 481
  • Country: it
Re: Program that can log from many multimeters.
« Reply #764 on: June 11, 2020, 06:39:41 pm »
Using putty i've tried and work sending both "CLR 1 Ctrl+M" (CR) and "CLR 1 Ctrl+J" (LF).
I think that i attach the logic analyzer to see what's going on...
 

Offline masterx81

  • Frequent Contributor
  • **
  • Posts: 481
  • Country: it
Re: Program that can log from many multimeters.
« Reply #765 on: June 11, 2020, 06:51:03 pm »
Found it. In the GPIB configuration page i've set as baudrate 19200, but actually the data is output at 9600bps
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #766 on: June 11, 2020, 08:15:49 pm »
Found it. In the GPIB configuration page i've set as baudrate 19200, but actually the data is output at 9600bps

Thanks, I will take a look at it tomorrow.
 
The following users thanked this post: masterx81

Offline MikeLud

  • Regular Contributor
  • *
  • Posts: 218
  • Country: us
Re: Program that can log from many multimeters.
« Reply #767 on: June 12, 2020, 02:24:29 am »
HKJ,

I am creating a device file for my Siglent SDS1204X-E and I am having issues reading the first value, I am getting "Rx timeout 1000ms   In buffer: C1-C2:MEAD PHA,0.06degree". I looks like it is reading the value but it is stuck in the buffer. Also to do a :readmath: on each value I am using the ASCII driver.

Code: [Select]
;; 22:12:36.326 SDS1204XE: Tx <C1-C2:PHA?>
;; 22:12:36.327 SDS1204XE: Tx <txrx? C1-C2:MEAD? PHA>
;; 22:12:36.329 192.168.1.212: Tx: <C1-C2:MEAD? PHA.> 43 31 2D 43 32 3A 4D 45 41 44 3F 20 50 48 41 0A
;; 22:12:37.329 192.168.1.212: Rx timeout 1000ms   In buffer: C1-C2:MEAD PHA,0.06degree
;; 22:12:43.833 SDS1204XE: Rx Timeout
;; 22:12:43.833 SDS1204XE: Tx <C1:RMS?>
;; 22:12:43.833 SDS1204XE: Tx <txrx? C1:PAVA? RMS>
;; 22:12:43.834 192.168.1.212: Tx: <C1:PAVA? RMS.> 43 31 3A 50 41 56 41 3F 20 52 4D 53 0A
;; 22:12:43.862 192.168.1.212: Rx: <C1:PAVA RMS,1.80E+00V> 43 31 3A 50 41 56 41 20 52 4D 53 2C 31 2E 38 30 45 2B 30 30 56 0A
;; 22:12:43.862 SDS1204XE: Rx <1.80E+00V>
;; 22:12:43.862 SDS1204XE: Tx <C2:RMS?>
;; 22:12:43.863 SDS1204XE: Tx <txrx? C2:PAVA? RMS>
;; 22:12:43.863 192.168.1.212: Tx: <C2:PAVA? RMS.> 43 32 3A 50 41 56 41 3F 20 52 4D 53 0A
;; 22:12:43.888 192.168.1.212: Rx: <C2:PAVA RMS,1.80E+00V> 43 32 3A 50 41 56 41 20 52 4D 53 2C 31 2E 38 30 45 2B 30 30 56 0A
;; 22:12:43.889 SDS1204XE: Rx <1.80E+00V>
;; 22:12:43.890 SDS1204XE: Rx as numbers <1.8 1.8>

Code: [Select]
#author MikeLud
#idString Siglent Technologies,SDS1204X-E,
#name Siglent SDS1204X-E
#handle SDS1204X-E
#driver Ascii
#port 5024

#scpiCmd C1-C2:PHA? txrx? C1-C2:MEAD? PHA
:readmath: getElement(value,1,",")
#scpiCmd C1:RMS? txrx? C1:PAVA? RMS
:readmath: getElement(value,1,",")
#scpiCmd C2:RMS? txrx? C2:PAVA? RMS
:readmath: getElement(value,1,",")


; A list of possible column name with unit and formatter (SI, Time, Int, D0..D6)
#value Delay Degree D2
#value C1:RMS V si
#value C2:RMS V si

; How to poll for data, this is used for table and #values?
; a #askMode, #cmdMode and #prepareSample is used before this is string is used.
; This is a single line command
#askValues C1-C2:PHA?;C1:RMS?;C2:RMS?

; Format of answer: f=float, u=remove trailing letters, x=skip, *=Zero upper case values if this value is 0
#askValuesReadFormat uuu

;Accept this delay when reading values (seconds)
#readingDelay 5

; Initial commands to meter when establishing connection
#initCmd MEAD PHA,C1-C2;PACU RMS,C1;PACU RMS,C2

; Prepare the meter to response to #askValues
#prepareSample
abort
sample:count 1
trig:source imm
trig:count inf
init
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #768 on: June 12, 2020, 04:37:40 am »
I am creating a device file for my Siglent SDS1204X-E and I am having issues reading the first value, I am getting "Rx timeout 1000ms   In buffer: C1-C2:MEAD PHA,0.06degree". I looks like it is reading the value but it is stuck in the buffer.

This means TestController is missing a CR or LF character (Either one will do).

Also to do a :readmath: on each value I am using the ASCII driver.

Nice trick, you could also do a long and more complex :readmath: that would handle everything.


 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #769 on: June 12, 2020, 06:23:22 am »
Found it. In the GPIB configuration page i've set as baudrate 19200, but actually the data is output at 9600bps

Thanks, I will take a look at it tomorrow.

New version that initializes the baudrate (Big oops).
 

Offline masterx81

  • Frequent Contributor
  • **
  • Posts: 481
  • Country: it
Re: Program that can log from many multimeters.
« Reply #770 on: June 12, 2020, 07:46:59 am »
I'll try it this evening that i go home after work, thanks!
 

Offline MikeLud

  • Regular Contributor
  • *
  • Posts: 218
  • Country: us
Re: Program that can log from many multimeters.
« Reply #771 on: June 12, 2020, 01:45:29 pm »
I am creating a device file for my Siglent SDS1204X-E and I am having issues reading the first value, I am getting "Rx timeout 1000ms   In buffer: C1-C2:MEAD PHA,0.06degree". I looks like it is reading the value but it is stuck in the buffer.
This means TestController is missing a CR or LF character (Either one will do).

Where do I add \n or is this a scope bug that I can't fix.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #772 on: June 12, 2020, 02:31:49 pm »
Where do I add \n or is this a scope bug that I can't fix.

It is something to do with the scope. Some ideas:
1) Longer timeout, maybe the timeout is too short.
2) Because you are using ascii driver, you can do a trick: Send this command with "tx", then send another command that will answer. You are now supposed to get both answers on the same line.
 

Offline masterx81

  • Frequent Contributor
  • **
  • Posts: 481
  • Country: it
Re: Program that can log from many multimeters.
« Reply #773 on: June 12, 2020, 07:22:12 pm »
So, now seem all correct. At power on i get:
Code: [Select]
;; COM9: Set params: 19200
;; Start thread for: National Instruments GPIB-232CT A:1 - Solartron 7150Plus
;; COM9: Tx: <.> 0A
;; National Instruments GPIB-232CT A:1: Tx <init>
;; National Instruments GPIB-232CT A:1: Tx <tx T0>
;; COM9: Tx: <WRT 1.> 57 52 54 20 31 0A
;; COM9: Tx: <T0.> 54 30 0A
;; Found Solartron 7150Plus on National Instruments GPIB-232CT A:1
;; 50PLUS: Tx <mode?>
;; 50PLUS: Tx <txrx? M?>
;; COM9: Tx: <WRT 1.> 57 52 54 20 31 0A
;; COM9: Tx: <M?.> 4D 3F 0A
;; COM9: Tx: <TMO 1.0.> 54 4D 4F 20 31 2E 30 0A
;; COM9: Tx: <RD #15,1.> 52 44 20 23 31 35 2C 31 0A
;; COM9: Rx: <M0> 4D 30
;; 50PLUS: Rx <M0>
Seem perfect! It also return the correct mode (M0)

If i do, from the command window, a "txrx? G" for getting a single shot value, this is the result:
Code: [Select]
txrx? G
;; 50PLUS: Tx <txr (i've set 15 bytex? G>
;; COM9: Tx: <WRT 1.> 57 52 54 20 31 0A
;; COM9: Tx: <G.> 47 0A
;; COM9: Tx: <RD #15,1.> 52 44 20 23 31 35 2C 31 0A
;; COM9: Rx: <+.0000330  V DC15> 2B 2E 30 30 30 30 33 33 30 20 20 56 20 44 43 31 35
;; 50PLUS: Rx <+.0000330  V DC15>
;; +.0000330  V DC15
It return 17 bytes instead of 15 (I've set 15 byte return value), witht that strange "15" at the end.
And if i do a second time the "txrx? G" it goes in timeout
« Last Edit: June 12, 2020, 07:23:46 pm by masterx81 »
 

Offline MikeLud

  • Regular Contributor
  • *
  • Posts: 218
  • Country: us
Re: Program that can log from many multimeters.
« Reply #774 on: June 12, 2020, 07:42:56 pm »
Where do I add \n or is this a scope bug that I can't fix.

It is something to do with the scope. Some ideas:
1) Longer timeout, maybe the timeout is too short.
2) Because you are using ascii driver, you can do a trick: Send this command with "tx", then send another command that will answer. You are now supposed to get both answers on the same line.

Tried idea 2, no luck, the scope only accepts one SCPI command at a time.  I checked with Wireshark and the scope is definitely not send "0A" at the end of the string as the others responses do.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf