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

0 Members and 7 Guests are viewing this topic.

Offline klausES

  • Regular Contributor
  • *
  • Posts: 226
  • Country: de
  • restore Sony ES/Esprit era
Re: Program that can log from many multimeters.
« Reply #325 on: April 24, 2020, 12:35:56 am »
Does changing the 3055 mode button positions already work ?
regards klaus. "Art is when you can't do it ... because if you can, it's not art"
 

Offline MikeLud

  • Regular Contributor
  • *
  • Posts: 218
  • Country: us
Re: Program that can log from many multimeters.
« Reply #326 on: April 24, 2020, 12:51:52 am »
Yes, see screenshot and sample code



Code: [Select]
; Strings to configure device in different modes
; First parameter must match a #value (4 parameter) and second parameter must match what #askMode returns
; First parameter is also used in shortcut menu
;#cmdMode

#cmdModeLayout 3 5

#cmdMode DC_Voltage VOLT
abort;
*cls;
CONF:VOLT:DC;[*OPC]

#cmdMode AC_Voltage VOLT:AC
abort;
*cls;
conf:volt:ac;[*OPC]

#cmdMode 2W_Resistance RES
abort;
*cls;
conf:res;[*OPC]

#cmdMode

#cmdMode 4W_Resistance FRES
abort;
*cls;
conf:fres;[*OPC]

#cmdMode Capacitance CAP
abort;
*cls;
conf:cap;[*OPC]

#cmdMode Diode DIOD
abort;
*cls;
conf:diod;[*OPC]

#cmdMode Continuity CONT
abort;
*cls;
conf:CONT;[*OPC]

#cmdMode

#cmdMode Frequency FREQ
abort;
*cls;
conf:freq;[*OPC]

#cmdMode Period PER
abort;
*cls;
conf:per;[*OPC]

#cmdMode Temperature TEMP
abort;
*cls;
func "temp";[*OPC]

#cmdMode

#cmdMode DC_Current CURR
abort;
*cls;
conf:curr:dc;[*OPC]

#cmdMode AC_Current CURR:AC
abort;
*cls;
conf:curr:ac;[*OPC]

Does changing the 3055 mode button positions already work ?
 

Offline MikeLud

  • Regular Contributor
  • *
  • Posts: 218
  • Country: us
Re: Program that can log from many multimeters.
« Reply #327 on: April 24, 2020, 11:00:19 am »
I plan on supporting the modbus protocol, but I do not know if it will be hardcoded or with user configurable yet.

HKJ

I think going with the user configurable would be the best route. This would allow user like me to do some of the work in helping add more devices.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #328 on: April 24, 2020, 11:15:25 am »
I plan on supporting the modbus protocol, but I do not know if it will be hardcoded or with user configurable yet.
I think going with the user configurable would be the best route. This would allow user like me to do some of the work in helping add more devices.

I agree, but I have to look a bit on MODBUS first and see how difficult it is to do in my framework. The easiest way would be if I can make some SCPI style commands that translates to MODBUS messages and answers.
 

Offline klausES

  • Regular Contributor
  • *
  • Posts: 226
  • Country: de
  • restore Sony ES/Esprit era
Re: Program that can log from many multimeters.
« Reply #329 on: April 24, 2020, 06:04:54 pm »
What can it be if a definition file with changed content is not read by the program despite copying the new version
in both relevant directories (the old ones were definitely overwritten).
So the old definition file is still used by the program, not the changed one.

Removing the device, exiting the program, restarting, the device new from the list and integrating it did not change either.

As if the program saved the data of the old file somewhere else and still read the old ones ?
regards klaus. "Art is when you can't do it ... because if you can, it's not art"
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #330 on: April 24, 2020, 06:30:16 pm »
What can it be if a definition file with changed content is not read by the program despite copying the new version
in both relevant directories (the old ones were definitely overwritten).

The program only read the two directories, not anything else. A serious error will usually mean the program drops the file, you may see an error on the console output in debug mode.
The program do not have any hidden definitions, all devices is based on the two devices directories. In some cases it might be a bit obscure due to #metadef statements, but that is it. It is also important to know that filenames do not have anything with the device names to do, except what the people making the definitions elect (For anything but DMMs it is fairly straight for now and that is due to me and #metadef to match similar equipment).
 

Offline klausES

  • Regular Contributor
  • *
  • Posts: 226
  • Country: de
  • restore Sony ES/Esprit era
Re: Program that can log from many multimeters.
« Reply #331 on: April 24, 2020, 09:07:28 pm »
Checked all definition files, followed every advice, the error remains.
Then it found that the devices were duplicated in the device list. Not all but just my two devices.
But the two txt files of my two devices were only correctly present once in each of the two directories.

All directories completely emptied, program new unpacked, the two definition files supplied by the unpacker exchanged for the two changed ones.
Everything is going now.

It's strange that my two txt files now appear twice in the device list again (but it works) ?
« Last Edit: April 24, 2020, 09:13:20 pm by klausES »
regards klaus. "Art is when you can't do it ... because if you can, it's not art"
 

Offline MikeLud

  • Regular Contributor
  • *
  • Posts: 218
  • Country: us
Re: Program that can log from many multimeters.
« Reply #332 on: April 24, 2020, 09:50:34 pm »
HKJ,

I have one question, does it matter the order of the :read: and :write: tags under #cmdSetup command. I notice on your website the samples show :read: first on some of the samples and others show :write: first.

Thanks
MikeLud
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #333 on: April 25, 2020, 04:12:10 am »
I have one question, does it matter the order of the :read: and :write: tags under #cmdSetup command. I notice on your website the samples show :read: first on some of the samples and others show :write: first.

No, all the tags can be in any sequence.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #334 on: April 25, 2020, 09:59:04 am »
Modbus is nearly working now and it is defined in a device file.
If somebody want to help me test it and has time today or tomorrow to try implement and test a Modbus device, please say. It is the serial RTU type I have implemented.
I am testing on a Maynou M9712C load.
 

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: Program that can log from many multimeters.
« Reply #335 on: April 25, 2020, 10:40:25 am »
I've been lurking here for a while and finally got round to downloading and running this code; it looks pretty good :D

One obvious application for this would be to test power supplies.  I own an HP6060B 3-60V 0-60A DC electronic load and a HP6643A 0-35V 0-6A Power supply, these devices are old and have GPIB connectors at the back that I connect to an Aglient E5810A GPIB to LAN gateway.  Can anyone steer me as to:

a. How I can make a connection from HKJ's program to my devices over the LAN?
b. How to get started writing device files that would control the above old test gear?

Thanks in advance.
If at first you don't succeed, get a bigger hammer
 

Offline MikeLud

  • Regular Contributor
  • *
  • Posts: 218
  • Country: us
Re: Program that can log from many multimeters.
« Reply #336 on: April 25, 2020, 11:05:24 am »
Modbus is nearly working now and it is defined in a device file.
If somebody want to help me test it and has time today or tomorrow to try implement and test a Modbus device, please say. It is the serial RTU type I have implemented.
I am testing on a Maynou M9712C load.

HkJ,

I will try the RD6006, send over the new version for me to test.
 

Offline MikeLud

  • Regular Contributor
  • *
  • Posts: 218
  • Country: us
Re: Program that can log from many multimeters.
« Reply #337 on: April 25, 2020, 11:10:32 am »
Gandalf_Sr,

Go to HKJ's website, he has a lot of info there on how to use his program and writing a device files.

https://lygte-info.dk/project/TestControllerIntro%20UK.html

I've been lurking here for a while and finally got round to downloading and running this code; it looks pretty good :D

One obvious application for this would be to test power supplies.  I own an HP6060B 3-60V 0-60A DC electronic load and a HP6643A 0-35V 0-6A Power supply, these devices are old and have GPIB connectors at the back that I connect to an Aglient E5810A GPIB to LAN gateway.  Can anyone steer me as to:

a. How I can make a connection from HKJ's program to my devices over the LAN?
b. How to get started writing device files that would control the above old test gear?

Thanks in advance.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #338 on: April 25, 2020, 11:12:51 am »
a. How I can make a connection from HKJ's program to my devices over the LAN?

The program works directly with LAN, you just need the network address for the device. Only requirement is that you can connect to the controller and do a "*idn?" getting the device id string. If you need to do a couple of command first it will not work.

b. How to get started writing device files that would control the above old test gear?

Check the files in the Devices directory, they are all definitions for equipment. There are a couple of different formats, you will need to check the SCPI ones (Files without a #driver definition is usually SCPI).

I have also written a document about doing SCPI definitions: https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html


The easiest way to start is making a file with this contents:

#idString Test,test
#name Test
#handle Test
#port 9221

Port must be correct.
When connecting with this file you will get a error message, because the #idString do not match the device. This error message contains the correct #idString. Change the file to use the correct name and try again, it must now say it has found the device.

When the above works, you can start making the definition. Note that you can test command on the command line, it will work as a terminal connected to the device.
 
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 #339 on: April 25, 2020, 11:21:35 am »
I will try the RD6006, send over the new version for me to test.

You can get it here: http://lygte-info.dk/pic/Projects/TestController/TestController.jar
The Modbus is not finished yet, but everything that is described here: http://lygte-info.dk/project/TestControllerConfigDevice2%20UK.html#Serial_Modbus_RTU
hopefully works.

Here is a partially device definition using modbus, it do not work yet (It is missing a on and mode commands):

#idString Maynuo,Maynuo M9712C
#name Maynuo M9712C
#handle M9712C
#port com
#driver Modbus

#disableWriteSingle 1

#scpiCmd Current holdingF 0xa01 (value)
#scpiCmd Current? holdingF? 0xa01
#scpiCmd Voltage holdingF 0xa03 (value)
#scpiCmd Voltage? holdingF? 0xa03
#scpiCmd Power holdingF 0xa05 (value)
#scpiCmd Power? holdingF? 0xa05
#scpiCmd Resistance holdingF 0xa07 (value)
#scpiCmd Resistance? holdingF? 0xa07

#scpiCmd values? holdingF? 0xb00;holdingF? 0xb02


#value Voltage V D3
#value Current A D3

; This is a single line command
#askValues values?


; Initial commands to meter when establishing connection
#initCmd 

; Final command to meter before breaking connection
#finalCmd

; Used when output off button is pressed
#outputOff
« Last Edit: April 25, 2020, 11:29:57 am by HKJ »
 
The following users thanked this post: MikeLud

Offline MikeLud

  • Regular Contributor
  • *
  • Posts: 218
  • Country: us
Re: Program that can log from many multimeters.
« Reply #340 on: April 25, 2020, 01:10:24 pm »
HKJ,

I am able to get my RD6006 to communicate. When on the Current Values tab I get the below after about a minute or two.

Code: [Select]
COM7 23.827 vTx: values?
;; COM7: Tx: 01 03 00 05 00 01 94 0B
;; COM7: Rx: 01 03 02 00 1F F9 8C
;; COM7: Tx: 01 03 00 0A 00 01 A4 08
;; COM7: Rx: 01 03 02 01 F4 B8 53
COM7 23.953 vRx: 31 500
;; RD6006: Rx <31 500>
;; RD6006: Rx as numbers <31.0 500.0>
;; RD6006: Tx <values?>
COM7 24.033 vTx: values?
;; COM7: Tx: 01 03 00 05 00 01 94 0B
Thread for RD6006
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at dk.hkj.devices.DeviceModbus$TranslatingCommInterface.readHoldingInput(DeviceModbus.java:336)
        at dk.hkj.devices.DeviceModbus$TranslatingCommInterface.write(DeviceModbus.java:176)
        at dk.hkj.comm.CommInterface.writeRead(CommInterface.java:102)
        at dk.hkj.main.SCPICommand.writeReadDelay(SCPICommand.java:155)
        at dk.hkj.main.SCPICommand.writeReadInternal(SCPICommand.java:192)
        at dk.hkj.main.SCPICommand.writeRead(SCPICommand.java:237)
        at dk.hkj.main.SCPICommand.readNumbers(SCPICommand.java:317)
        at dk.hkj.main.DeviceInterface.getValuesFromDevices(DeviceInterface.java:301)
        at dk.hkj.devices.DeviceSCPI.getValuesFromDevices(DeviceSCPI.java:38)
        at dk.hkj.main.InterfaceThreads$DeviceThread.run(InterfaceThreads.java:905)
java.lang.NullPointerException
        at dk.hkj.main.PaneCurrentValues.updateDirect(PaneCurrentValues.java:363)
        at dk.hkj.main.PaneCurrentValues.timerUpdate(PaneCurrentValues.java:353)
        at dk.hkj.main.PaneCurrentValues.access$6(PaneCurrentValues.java:351)
        at dk.hkj.main.PaneCurrentValues$2.actionPerformed(PaneCurrentValues.java:68)
        at javax.swing.Timer.fireActionPerformed(Unknown Source)
        at javax.swing.Timer$DoPostEvent.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(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.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)
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #341 on: April 25, 2020, 01:33:38 pm »
I am able to get my RD6006 to communicate. When on the Current Values tab I get the below after about a minute or two.

Can it have problems with the update speed? Try log with 1 seconds intervals and see if it works without error.
Do it stop updating completely?
 

Offline MikeLud

  • Regular Contributor
  • *
  • Posts: 218
  • Country: us
Re: Program that can log from many multimeters.
« Reply #342 on: April 25, 2020, 03:12:43 pm »
I am able to get my RD6006 to communicate. When on the Current Values tab I get the below after about a minute or two.

Can it have problems with the update speed? Try log with 1 seconds intervals and see if it works without error.
Do it stop updating completely?

HKJ,

It is a timing issue, logging at 1 second works. When on the Current Value  tab it stops updating completely. If I change tabs and go back to the Current Value it starts back up.
I also could not get /factor to work
#scpiCmd Voltage? holding? 0x0a /100
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #343 on: April 25, 2020, 03:43:17 pm »
It is a timing issue, logging at 1 second works. When on the Current Value  tab it stops updating completely. If I change tabs and go back to the Current Value it starts back up.

I will take a look at that tomorrow

I also could not get /factor to work
#scpiCmd Voltage? holding? 0x0a /100

My command parsing is a bit lazy at the moment, you need to use:
#scpiCmd Voltage? holding? 0x0a 1 /100


I have updated the software and documentation, there is a few new details:
#verifyDevice
#scpiCmd getDeviceSW? ...
#scpiCmd getDeviceSN? ...
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #344 on: April 25, 2020, 04:49:56 pm »
I got time to add a #cmdDelayTime

Something like:

#cmdDelayTime 50

May fix the timeout.

This is V0.46 and only a .jar file.
 

Offline MikeLud

  • Regular Contributor
  • *
  • Posts: 218
  • Country: us
Re: Program that can log from many multimeters.
« Reply #345 on: April 25, 2020, 05:27:07 pm »
HKJ,

The below link is still V0.45

http://lygte-info.dk/pic/Projects/TestController/TestController.jar

I got time to add a #cmdDelayTime

Something like:

#cmdDelayTime 50

May fix the timeout.

This is V0.46 and only a .jar file.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #346 on: April 25, 2020, 05:54:57 pm »
The below link is still V0.45

Probably the server that is funny, sometimes there is a delay from I upload until I can download it from website.
I deleted the jar file on the server and uploaded it again, it may help or time may help.
 

Offline MikeLud

  • Regular Contributor
  • *
  • Posts: 218
  • Country: us
Re: Program that can log from many multimeters.
« Reply #347 on: April 25, 2020, 06:35:21 pm »
HKJ,

The issue I was having with timing out was the baud rate on the RD6006 being to high, the default was 115200, I dropped it down to 9600 and all is good with out using #cmdDelayTime.

I still  can not get /factor to work
#scpiCmd Voltage? holding? 0x0a 1 /100

I got time to add a #cmdDelayTime

Something like:

#cmdDelayTime 50

May fix the timeout.

This is V0.46 and only a .jar file.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 2904
  • Country: dk
    • Tests
Re: Program that can log from many multimeters.
« Reply #348 on: April 25, 2020, 06:49:10 pm »
The issue I was having with timing out was the baud rate on the RD6006 being to high, the default was 115200, I dropped it down to 9600 and all is good with out using #cmdDelayTime.

It is a good idea to secure it works at its default settings, i.e. try with a small delay.

I still  can not get /factor to work
#scpiCmd Voltage? holding? 0x0a 1 /100

I have only tested it on the command line, because the load I am using do not need it.
I.e. do "holding? 0x0a 1 /100" work on the command line?
The last version did fix the parser and you do not need the 1 anymore.
 

Offline MikeLud

  • Regular Contributor
  • *
  • Posts: 218
  • Country: us
Re: Program that can log from many multimeters.
« Reply #349 on: April 25, 2020, 06:59:09 pm »

I still  can not get /factor to work
#scpiCmd Voltage? holding? 0x0a 1 /100

I have only tested it on the command line, because the load I am using do not need it.
I.e. do "holding? 0x0a 1 /100" work on the command line?
The last version did fix the parser and you do not need the 1 anymore.

HKJ,

I does work on the command line :-+

I will test #cmdDelayTimes at the default baud rate.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf