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

0 Members and 3 Guests are viewing this topic.

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3017
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3600 on: August 08, 2024, 02:40:33 pm »
So that seems happy now, but sadly I don't get any readings (It does not show up under Current_values.)  |O

It does work with DMMEasyControl (simple Owon program) so I really don't think that there is much of a difference between the two, other than name etc.

Any Help is much appreciated.

The first thing to do is start TestController in debug mode with the debug batch file, this will show the communication and may help you.

You can also do manual commands on the command line to test if they work. I.e. do typing MEAS? return a value or is it just ignored.
 
The following users thanked this post: The Soulman

Online The Soulman

  • Super Contributor
  • ***
  • Posts: 1002
  • Country: nl
  • The sky is the limit!
Re: Program that can log from many multimeters.
« Reply #3601 on: August 08, 2024, 02:46:53 pm »
Ok, without further changes, the mode and setup functions do seem to work.
The current value is displayed in the setup menu as a function of "Null-Value", so some data is making in it across.
Must be something obvious I'm missing here.  :palm:

edit: attached image to clarify.
« Last Edit: August 08, 2024, 03:16:36 pm by The Soulman »
 

Online The Soulman

  • Super Contributor
  • ***
  • Posts: 1002
  • Country: nl
  • The sky is the limit!
Re: Program that can log from many multimeters.
« Reply #3602 on: August 08, 2024, 02:49:57 pm »
Thanks HKJ, MEAS? does return a correct value.
I'll try debug mode.

edit:
Code: [Select]
meas?
;; vc7200: Tx <meas?>
;; vc7200: Rx <1.008514E+01>
;; 1.008514E+01
« Last Edit: August 08, 2024, 03:18:02 pm by The Soulman »
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3017
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3603 on: August 08, 2024, 02:51:34 pm »
Ok, without further changes, the mode and setup functions do seem to work.
The current value is displayed in the setup menu as a function of "Null-Value", so some data is making in it across.
Must be something obvious I'm missing here.  :palm:

Null-value means TC did not decode data for that value, either because it do not understand the format (There are a lot of options to handle that) or because there is no data.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3017
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3604 on: August 08, 2024, 02:53:15 pm »
Thanks HKJ, MEAS? does return a correct value.
I'll try debug mode.

Then TC do not understand it, in simple cases you can use the #askValuesReadFormat and in more complex cases you need the #askValuesMathFormat 
 

Online The Soulman

  • Super Contributor
  • ***
  • Posts: 1002
  • Country: nl
  • The sky is the limit!
Re: Program that can log from many multimeters.
« Reply #3605 on: August 08, 2024, 03:12:03 pm »
I'll edit my previous post to clarify what I meant with  "Null-Value".

Here is what is produced in debug mode: (including: MEAS? and opening the setup window)

Code: [Select]
;; jSerialComm version: 2.10.3
;; Start thread for: 10.10.0.11 - Voltcraft VC7200BT
;; 10.10.0.11: Tx: <*IDN?.> 2A 49 44 4E 3F 0A
;; 10.10.0.11: Rx: <Voltcraft,VC7200BT,2303281,V3.7.2,2> 56 6F 6C 74 63 72 61 66 74 2C 56 43 37 32 30 30 42 54 2C 32 33 30 33 32 38 31 2C 56 33 2E 37 2E 32 2C 32 0A
;; 10.10.0.11: Tx <SYST:REM>
;; 10.10.0.11: Tx: <SYST:REM.> 53 59 53 54 3A 52 45 4D 0A
;; 10.10.0.11: Tx <TEMP:RTD:UNIT C>
;; 10.10.0.11: Tx: <TEMP:RTD:UNIT C.> 54 45 4D 50 3A 52 54 44 3A 55 4E 49 54 20 43 0A
;; Found Voltcraft VC7200BT on 10.10.0.11 sn: 2303281
;; vc7200: Tx <SENS:FUNC?>
;; vc7200: Rx <?>>
;; vc7200: Rx after :readmath: unQuote(replace(replace(value,"VOLT AC","VOLTAC"),"CURR AC","CURRAC")) <?>>
MEAS?
;; vc7200: Tx <MEAS?>
;; vc7200: Rx <1.008514E+01>
;; 1.008514E+01
;; vc7200: Tx <FUNC?>
;; vc7200: Rx <"VOLT">
;; vc7200: Rx after :readmath: getElement("Diode;DC Voltage;AC Voltage;DC Current;AC Current;Temperture;Capacitance;2W Resistance;4W Resistance;Frequency;Period;Continuity",listIndex(unQuote(replace(replace(value,"VOLT AC","VOLTAC"),"CURR AC","CURRAC")),"DIOD,VOLT,VOLTAC,CURR,CURRAC,TEMP,CAP,RES,FRES,FREQ,PER,CONT",","),";") <DC Voltage>
;; vc7200: Cache Tx: <FUNC?> Rx: <"VOLT">
;; vc7200: Rx after :readmath: unQuote(replace(replace(value,"VOLT AC","VOLTAC"),"CURR AC","CURRAC")) <VOLT>
;; vc7200: Tx <VOLT:DC:RANGE:AUTO?>
;; vc7200: Rx <0>
;; vc7200: Rx after :readmath: replace(replace(value,"0","OFF"),"1","ON") <OFF>
;; vc7200: Tx <VOLT:DC:RANGE?>
;; vc7200: Rx <2.000000E+01>
;; vc7200: Delay: 100ms
;; vc7200: Tx <RATE?>
;; vc7200: Rx <S>
;; vc7200: Tx <VOLT:DC:FILTER:STAT?>
;; vc7200: Rx <0>
;; vc7200: Rx after :readmath: replace(replace(value,"0","OFF"),"1","ON") <OFF>
;; vc7200: Tx <VOLT:DC:IMP:AUTO?>
;; vc7200: Rx <0>
;; vc7200: Rx after :readmath: replace(replace(value,"0","OFF"),"1","ON") <OFF>
;; vc7200: Tx <VOLT:DC:NULL?>
;; vc7200: Rx <0>
;; vc7200: Rx after :readmath: replace(replace(value,"0","OFF"),"1","ON") <OFF>
;; vc7200: Tx <CALC:NULL:OFFS?>
;; vc7200: Rx <10.085104>
;; vc7200: Rx as number <10.085104>
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3017
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3606 on: August 08, 2024, 03:49:26 pm »
I'll edit my previous post to clarify what I meant with  "Null-Value".

I do not see the issue.
meas? returns about 10V
and you have a zero offset defined of about 10V

It sort of matches a 0V input.
 

Online The Soulman

  • Super Contributor
  • ***
  • Posts: 1002
  • Country: nl
  • The sky is the limit!
Re: Program that can log from many multimeters.
« Reply #3607 on: August 08, 2024, 04:17:58 pm »
I'll edit my previous post to clarify what I meant with  "Null-Value".

I do not see the issue.
meas? returns about 10V
and you have a zero offset defined of about 10V

It sort of matches a 0V input.

Sorry about the confusion.

Anyway, it does produce readings in the command window in debug mode:
Code: [Select]
;; vc7200: Tx <MEAS?>
;; vc7200: Rx <1.008514E+01>
;; vc7200: Rx as numbers <10.08514>
 

Online The Soulman

  • Super Contributor
  • ***
  • Posts: 1002
  • Country: nl
  • The sky is the limit!
Re: Program that can log from many multimeters.
« Reply #3608 on: August 08, 2024, 04:27:33 pm »
Thanks HKJ, MEAS? does return a correct value.
I'll try debug mode.

Then TC do not understand it, in simple cases you can use the #askValuesReadFormat and in more complex cases you need the #askValuesMathFormat

Ok, to be clear I need to change the data format in the device definition?
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3017
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3609 on: August 08, 2024, 04:41:30 pm »
Ok, to be clear I need to change the data format in the device definition?

I do not see your issues, TC reads and decodes the answer on MEAS? correctly.
 
The following users thanked this post: The Soulman

Online The Soulman

  • Super Contributor
  • ***
  • Posts: 1002
  • Country: nl
  • The sky is the limit!
Re: Program that can log from many multimeters.
« Reply #3610 on: August 08, 2024, 05:37:20 pm »
Ok, to be clear I need to change the data format in the device definition?

I do not see your issues, TC reads and decodes the answer on MEAS? correctly.

My issue is that it doesn't show on the current readings page or on any of the other pages except on load devices, It must be something really simple I'm missing.  |O
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3017
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3611 on: August 08, 2024, 06:19:45 pm »
My issue is that it doesn't show on the current readings page or on any of the other pages except on load devices, It must be something really simple I'm missing.  |O

That is another problem, it take a bit of work to fix, but is not really difficult.
There is 3 steps to it:

1) The command:
#askMode SENS:FUNC?
#askModeMathFormat unQuote(replace(replace(value,"VOLT AC","VOLTAC"),"CURR AC","CURRAC"))
It returns the current mode of the meter, this result must be converted in a string without spaces that uniquely identify each mode, in this case only two answer has to be modified and the quotes must be removed:


2) Commands to handle the mode must be defined:
#cmdMode DC_Voltage VOLT
CONF:VOLT:DC
The first line defines the TC name for the mode, here it is "DC_Voltage" and the response from above will be "VOLT" when in this mode. To select the mode "CONF:VOLT:DC" must be transmitted to the meter.

3) Display columns handling:
#value VoltageDC V si DC_Voltage
Each #value command defines a data value to display with the name to show, the unit and the display format. It is possible to only show a specific column in a specific mode, this is done with a 4 parameter, here it is "DC_Voltage" and means the column will only be shown when the TC mode for the meter is "DC_Voltage"

Somewhere in this chain is a error in the definition.
You can always get a column shown by using as the last #value statement:
#value Value _ si
It will show the value TC read, but will not have any mode or unit on it, this can be useful when testing.

You can also type FUNC? in the command mode too see what the meter answers for its current mode.
 
The following users thanked this post: The Soulman

Online The Soulman

  • Super Contributor
  • ***
  • Posts: 1002
  • Country: nl
  • The sky is the limit!
Re: Program that can log from many multimeters.
« Reply #3612 on: August 08, 2024, 08:05:58 pm »
The learning curve is a bit steep (not a programmer) and I've looked at the definitions of other dmm's to use as an example, however the Owon XDM 1241, 3041 and 3051
definitions all share this same line:
Code: [Select]
#cmdSetup info Active_Mode
:read: FUNC?
:readmath: getElement("Diode;DC Voltage;AC Voltage;DC Current;AC Current;Temperture;Capacitance;2W Resistance;4W Resistance;Frequency;Period;Continuity",listIndex(unQuote(replace(replace(value,"VOLT AC","VOLTAC"),"CURR AC","CURRAC")),"DIOD,VOLT,VOLTAC,CURR,CURRAC,TEMP,CAP,RES,FRES,FREQ,PER,CONT",","),";")
I assume these are functional definitions, so this line shout not be the cause off my troubles but I can't find anywhere else VOLT AC and CURR AC (with space).
Out of despair I've tried modifying this line but no luck yet.

Edit: pasted the wrong line
« Last Edit: August 08, 2024, 08:16:05 pm by The Soulman »
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3017
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3613 on: August 09, 2024, 05:06:31 am »
I assume these are functional definitions, so this line shout not be the cause off my troubles but I can't find anywhere else VOLT AC and CURR AC (with space).
Out of despair I've tried modifying this line but no luck yet.

A mode may exist in up to 3 version:
1) The device/DMM name
2) The string used in part of TC definition (The name used from section 1) to 2) in my last answer)
3) The TC name, that is used for selections in TC.

1) and 2) will often be the same, except spaces are removed from 2)
When definition do not use #cmdMode 2) and 3) are the same.

You can always type deviceMode("VC7200"); on the command line to get the TC device mode for your DMM.

 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3017
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3614 on: August 09, 2024, 07:11:45 am »
Code: [Select]
#cmdSetup info Active_Mode

This has nothing to do with the function of TC, but is only used for a information display in the mode popup. You can ignore this definition until everything else works.
 

Online The Soulman

  • Super Contributor
  • ***
  • Posts: 1002
  • Country: nl
  • The sky is the limit!
Re: Program that can log from many multimeters.
« Reply #3615 on: August 09, 2024, 10:15:00 am »
That is another problem, it take a bit of work to fix, but is not really difficult.
There is 3 steps to it:

1) The command:
#askMode SENS:FUNC?
#askModeMathFormat unQuote(replace(replace(value,"VOLT AC","VOLTAC"),"CURR AC","CURRAC"))
It returns the current mode of the meter, this result must be converted in a string without spaces that uniquely identify each mode, in this case only two answer has to be modified and the quotes must be removed:


I think my problem is at step 1.
Is this the correct line to modify? if yes what should it look like?
Code: [Select]
#askModeMathFormat unQuote(replace(replace(value,"VOLT AC","VOLTAC"),"CURR AC","CURRAC"))

Quote
You can always get a column shown by using as the last #value statement:
#value Value _ si
It will show the value TC read, but will not have any mode or unit on it, this can be useful when testing.

That works.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3017
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3616 on: August 09, 2024, 10:21:25 am »
I think my problem is at step 1.
Is this the correct line to modify? if yes what should it look like?

Try selecting different modes on the DMM, then use the SENS:FUNC? command and see what it returns
All return values must exist as the last parameter on a #cmdMode definition.

The #askModeMathFormat only really affect two modes: VOLT AC and CURR AC where it concat the names to VOLTAC and CURRAC
 
The following users thanked this post: The Soulman

Online The Soulman

  • Super Contributor
  • ***
  • Posts: 1002
  • Country: nl
  • The sky is the limit!
Re: Program that can log from many multimeters.
« Reply #3617 on: August 09, 2024, 10:32:48 am »
I think my problem is at step 1.
Is this the correct line to modify? if yes what should it look like?

Try selecting different modes on the DMM, then use the SENS:FUNC? command and see what it returns
All return values must exist as the last parameter on a #cmdMode definition.

The #askModeMathFormat only really affect two modes: VOLT AC and CURR AC where it concat the names to VOLTAC and CURRAC

Only volt ac returns VOLT AC instead of VOLTAC and ac current returns CURR AC instead of CURRAC, all other modes return the correct names. (but also don't show a colum?)
What do I need to edit?
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3017
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3618 on: August 09, 2024, 10:59:18 am »

Only volt ac returns VOLT AC instead of VOLTAC and ac current returns CURR AC instead of CURRAC, all other modes return the correct names. (but also don't show a colum?)
What do I need to edit?

Try using deviceMode("VC7200");  on the command line and see what mode name is returned.

Also note that you need to use the "Mode" popup to change mode on the DMM, not do it on the DMM itself. The issue is that TC will not know about it, except if you use the "Mode" popup.
 
The following users thanked this post: The Soulman

Online The Soulman

  • Super Contributor
  • ***
  • Posts: 1002
  • Country: nl
  • The sky is the limit!
Re: Program that can log from many multimeters.
« Reply #3619 on: August 09, 2024, 11:36:49 am »

Only volt ac returns VOLT AC instead of VOLTAC and ac current returns CURR AC instead of CURRAC, all other modes return the correct names. (but also don't show a colum?)
What do I need to edit?

Try using deviceMode("VC7200");  on the command line and see what mode name is returned.

Not sure if I understand?

Quote
Also note that you need to use the "Mode" popup to change mode on the DMM, not do it on the DMM itself. The issue is that TC will not know about it, except if you use the "Mode" popup.

The meter is some distance away, been using the mode popup from the beginning.
Here is what it produces after switching to a few modes (from popup..) and than using func? after each switch.
 If I understand correctly VOLT AC and CURR AC are wrong as they have a space in their name?
All others functions appear to be correct.

Code: [Select]
;; VC7200: Tx <CONF:VOLT:DC>
;; VC7200: Tx <SENS:FUNC?>
;; VC7200: Rx <?>>
;; VC7200: Rx after :readmath: unQuote(replace(replace(value,"VOLT AC","VOLTAC"),"CURR AC","CURRAC")) <?>>
func?
;; VC7200: Tx <func?>
;; VC7200: Rx <"VOLT">
;; "VOLT"
;; VC7200: Tx <CONF:CURR:DC>
;; VC7200: Tx <SENS:FUNC?>
;; VC7200: Rx <?>>
;; VC7200: Rx after :readmath: unQuote(replace(replace(value,"VOLT AC","VOLTAC"),"CURR AC","CURRAC")) <?>>
func?
;; VC7200: Tx <func?>
;; VC7200: Rx <"CURR">
;; "CURR"
;; VC7200: Tx <CONF:VOLT:AC>
;; VC7200: Tx <SENS:FUNC?>
;; VC7200: Rx <?>>
;; VC7200: Rx after :readmath: unQuote(replace(replace(value,"VOLT AC","VOLTAC"),"CURR AC","CURRAC")) <?>>
func?
;; VC7200: Tx <func?>
;; VC7200: Rx <"VOLT AC">
;; "VOLT AC"
;; VC7200: Tx <CONF:CURR:AC>
;; VC7200: Tx <SENS:FUNC?>
;; VC7200: Rx <?>>
;; VC7200: Rx after :readmath: unQuote(replace(replace(value,"VOLT AC","VOLTAC"),"CURR AC","CURRAC")) <?>>
func?
;; VC7200: Tx <func?>
;; VC7200: Rx <"CURR AC">
;; "CURR AC"
;; VC7200: Tx <CONF:FRES>
;; VC7200: Tx <SENS:FUNC?>
;; VC7200: Rx <?>>
;; VC7200: Rx after :readmath: unQuote(replace(replace(value,"VOLT AC","VOLTAC"),"CURR AC","CURRAC")) <?>>
func?
;; VC7200: Tx <func?>
;; VC7200: Rx <"FRES">
;; "FRES"

Thank you for your patience.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3017
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3620 on: August 09, 2024, 12:32:59 pm »
The meter is some distance away, been using the mode popup from the beginning.
Here is what it produces after switching to a few modes (from popup..) and than using func? after each switch.
 If I understand correctly VOLT AC and CURR AC are wrong as they have a space in their name?
All others functions appear to be correct.

Code: [Select]
;; VC7200: Tx <CONF:VOLT:DC>
;; VC7200: Tx <SENS:FUNC?>
;; VC7200: Rx <?>>
;; VC7200: Rx after :readmath: unQuote(replace(replace(value,"VOLT AC","VOLTAC"),"CURR AC","CURRAC")) <?>>
func?
;; VC7200: Tx <func?>
;; VC7200: Rx <"VOLT">
;; "VOLT"
;; VC7200: Tx <CONF:CURR:DC>
;; VC7200: Tx <SENS:FUNC?>
;; VC7200: Rx <?>>
;; VC7200: Rx after :readmath: unQuote(replace(replace(value,"VOLT AC","VOLTAC"),"CURR AC","CURRAC")) <?>>
func?
;; VC7200: Tx <func?>
;; VC7200: Rx <"CURR">
;; "CURR"
;; VC7200: Tx <CONF:VOLT:AC>
;; VC7200: Tx <SENS:FUNC?>
;; VC7200: Rx <?>>
;; VC7200: Rx after :readmath: unQuote(replace(replace(value,"VOLT AC","VOLTAC"),"CURR AC","CURRAC")) <?>>
func?
;; VC7200: Tx <func?>
;; VC7200: Rx <"VOLT AC">
;; "VOLT AC"
;; VC7200: Tx <CONF:CURR:AC>
;; VC7200: Tx <SENS:FUNC?>
;; VC7200: Rx <?>>
;; VC7200: Rx after :readmath: unQuote(replace(replace(value,"VOLT AC","VOLTAC"),"CURR AC","CURRAC")) <?>>
func?
;; VC7200: Tx <func?>
;; VC7200: Rx <"CURR AC">
;; "CURR AC"
;; VC7200: Tx <CONF:FRES>
;; VC7200: Tx <SENS:FUNC?>
;; VC7200: Rx <?>>
;; VC7200: Rx after :readmath: unQuote(replace(replace(value,"VOLT AC","VOLTAC"),"CURR AC","CURRAC")) <?>>
func?
;; VC7200: Tx <func?>
;; VC7200: Rx <"FRES">
;; "FRES"

I can see the issue in the log.
The answer ;; VC7200: Rx <?>> is not supposed to be there, it looks like part of a echo function.
TC has issue with handling that, it expect a one line answer after a command, but it is getting a two line answer and all the data you want is on the second line.

But is looks like you can use:
func? instead of SENS:FUNC? and it will work.



 
The following users thanked this post: The Soulman

Online The Soulman

  • Super Contributor
  • ***
  • Posts: 1002
  • Country: nl
  • The sky is the limit!
Re: Program that can log from many multimeters.
« Reply #3621 on: August 09, 2024, 01:05:40 pm »
Replacing SENSE:FUNC? with FUNC? Worked!!  :-+

Last two questions for today:

Was this an error in the original XDM3051 definition or is it possible the VC7200 uses a slightly different data output format?

Is it possible to have a readout with a fixed amount of digits? i.e. not suppressing a trailing 0?
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3017
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3622 on: August 09, 2024, 01:18:14 pm »
Was this an error in the original XDM3051 definition or is it possible the VC7200 uses a slightly different data output format?

I expect that the XDM3051 has a slightly different protocol that supports both formats, maybe Voltcraft did not like to use :sens: before the function name and did not see a reason to have two formats for the command.

Is it possible to have a readout with a fixed amount of digits? i.e. not suppressing a trailing 0?

Yes, if you look here you will see a explanation of the different numeric formats supported:
https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html#Data_type_definitions

On the Table page you can right click and change format on the fly, but that will only be valid until you restart TC.

Note: The selected format is basically used everywhere in TC where it shows a reading from the DMM (Chart excluded)

Will you post the driver in this thread when you have  checked it (i.e. verified that all modes and functions works)?
 
The following users thanked this post: The Soulman

Online The Soulman

  • Super Contributor
  • ***
  • Posts: 1002
  • Country: nl
  • The sky is the limit!
Re: Program that can log from many multimeters.
« Reply #3623 on: August 09, 2024, 01:20:07 pm »
Diode function still doesn't produce a colum, func? returns DIOD so that seems correct, will have a look at it this evening and also test every range for each function before I call it done.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3017
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #3624 on: August 09, 2024, 01:41:11 pm »
Diode function still doesn't produce a colum, func? returns DIOD so that seems correct, will have a look at it this evening and also test every range for each function before I call it done.

Because the definition do not define a column for diode voltage (That must be a bug), adjust this column line:
#value VoltageDC V si DC_Voltage
to
#value VoltageDC V si DC_Voltage,Diode
 
The following users thanked this post: The Soulman


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf