Author Topic: Program that can log/control many multimeters and other devices.  (Read 1487674 times)

Zerokol and 549 Guests are viewing this topic.

Offline Hydron

  • Super Contributor
  • ***
  • Posts: 1598
  • Country: gb
Re: Program that can log/control many multimeters and other devices.
« Reply #5125 on: November 04, 2025, 11:27:46 pm »
OK I have finished the Advantest R6581(D/T) driver, notes as follows (copied from driver notes section):

- For R6581 set to a DC mode before using, no AC modes support yet (please add if you have one!)
- Sets number of digits to max on mode change (this also applies to values returned over SCPI)
- Sets instrument to continuous trigger on exit
- 4W ohms measure mode set to offset compensation on/off (no 4W check function)
- Not all possible aperture/NPLC values exposed

Note that the R6581T/R6581D models are DC only. I didn't support the AC modes of the R6581(non T/D) due to lack of time to write the extra modes for the driver and lack of a unit to test on (set to a DC mode before using with a R6581, otherwise TestController won't be able to identify the current mode). DC stuff should be pretty comprehensive other than as noted.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5126 on: November 05, 2025, 09:06:02 am »
OK I have finished the Advantest R6581(D/T) driver, notes as follows (copied from driver notes section):

I have added it, thanks.
 

Online Gertjan

  • Frequent Contributor
  • **
  • Posts: 339
  • Country: nl
Re: Program that can log/control many multimeters and other devices.
« Reply #5127 on: November 05, 2025, 10:01:38 am »
Hi HKJ,

A device configuration file for the Hameg HM8134 and HM8135 RF generator.

The unique property of this Hameg HM8135 RF synthesiser is that the carrier frequency starts at 1Hz. So one can sweep from 1Hz to 3Ghz in one go :)
(HM 8134 to 1024MHz) Also nice is the excellent output attenuator: output levels from 40nV to 1V (or -135dBm to +13dBm)


IMG_4625__Hameg_HM8135_front-2000pix.jpg

The HM8135 is a modern SCPI device, but with a limited command set. So I had to add a few commands to do what I wanted.
"Interesting" is that when the output level is requested in volts, the HM8135 gives a value for an answer, but not a unit. Depending on actual output level this unit can be nV, uV, mV or Volts. So it needed some #pgm#ing to get this right.


HM8135_TC_screenshot_v10-1000pix.png

This frequency curve of my Fluke 8920A True RMS meter with thermal conversion is  a nice application example: frequency sweep from 3Hz to 100MHz in one go.
And no, I did not take this measurement with FM modulation on :).

This generator was also sold under the Rohde & Schwarz brand. Unfortunately I do not know what the R&S version answers to *idn?, so I could not support it with a #metadedef.
But is someone owns the R&S version, and can tell met the *idn? answer, I will add it.

Please find the Hameg HM8134 en HM8135 definition file here: HamegHM8135.zip

regards, Gertjan.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5128 on: November 05, 2025, 10:23:24 am »
A device configuration file for the Hameg HM8134 and HM8135 RF generator.

I have added it, thanks.
 

Online Gertjan

  • Frequent Contributor
  • **
  • Posts: 339
  • Country: nl
Re: Program that can log/control many multimeters and other devices.
« Reply #5129 on: November 05, 2025, 03:34:23 pm »
Hi HKJ,

To break my habit of posting drivers just after a TC update. :)  Here are two more updated configuration files, for Keithley 199 DMM and Rigol DG1000Z ARB.

They have mostly small improvements, made after prolonged use. And getting more experienced in writing TestController device files :)

The Rigol DG1000Z has improved handling of Vrms / Vpp / dBm output. At the time I could not make this work exactly how I wanted.  (It turned out later that it was because of a bug in the :invisible: tag)

Please find the updated configuration files here: Keithley199.zip and Rigol_DG1000Z.zip

regards, Gertjan.
 
The following users thanked this post: croma641

Offline jmurray

  • Regular Contributor
  • *
  • Posts: 73
  • Country: au
Re: Program that can log/control many multimeters and other devices.
« Reply #5130 on: November 06, 2025, 01:05:48 am »
I understand the concept, but I was specifically asking for help with the syntax.
In the following (Attempts 3 & 4), trying to assign the output to a variable instead results only in the variable being assigned the value of 1.

Code: [Select]
=var result = ""
=result = runScript("MyScriptName")
;; Some\\Directory\\Structure\\SomeFileName
=result
;; 1

The result displayed from = works exactly the same way, but is restricted to evaluate one line at a time.


Attempt #4

Code: (MyScriptName) [Select]
; Do things
=var path = "Some\\Directory\\Structure\\"
=var filename = "SomeFileName"
=print(string(path + filename))

My test:
=print("Hello world")
;; Hello world

How do I assign the returned result from the script to the variable?

I can pass arguments to a script when called as #runScript MyScriptName (arg), but have not been able to determine the correct syntax when it is called as =runScript("MyScriptName (arg)").
In the following tests, only the first attempt actually executed the script.

From one of my scripts (Arguments are in parenthesis because they are variables and I am in # based scripts):

#runScript USBChargingFormatChart (psCurrent) (loadVoltage) (mathCapacity)

#scriptScript USBChargingFormatChart
; The routine do the actual formatting of the chart
=var psCurrent=params[0];
=var loadVoltage=params[1];
=var mathCapacity=params[2];

I don't think I've been clear in my questions.
In my previous post I tried to separate the two different issues for the purpose of troubleshooting and clarity, but perhaps that wasn't the best approach.

I am trying to accomplish the following:
1. "ParentScript" calls "ChildScript" with optional arguments
2. "Childscript" executes, and returns a variable (string, in this case)
3. "ParentScript" stores the returned variable and uses it

I am encountering the following two issues in this scenario:
1. I am unable to assign the returned value to a variable
2. I am unable to determine the correct syntax to call the script with arguments, and have it assign the return value to a variable

 

Offline jmurray

  • Regular Contributor
  • *
  • Posts: 73
  • Country: au
Re: Program that can log/control many multimeters and other devices.
« Reply #5131 on: November 06, 2025, 01:13:31 am »
I understand the concept, but I was specifically asking for help with the syntax.
In the following (Attempts 3 & 4), trying to assign the output to a variable instead results only in the variable being assigned the value of 1.

Code: [Select]
=var result = ""
=result = runScript("MyScriptName")
;; Some\\Directory\\Structure\\SomeFileName
=result
;; 1

The result displayed from = works exactly the same way, but is restricted to evaluate one line at a time.


Attempt #4

Code: (MyScriptName) [Select]
; Do things
=var path = "Some\\Directory\\Structure\\"
=var filename = "SomeFileName"
=print(string(path + filename))

My test:
=print("Hello world")
;; Hello world

How do I assign the returned result from the script to the variable?

I can pass arguments to a script when called as #runScript MyScriptName (arg), but have not been able to determine the correct syntax when it is called as =runScript("MyScriptName (arg)").
In the following tests, only the first attempt actually executed the script.

From one of my scripts (Arguments are in parenthesis because they are variables and I am in # based scripts):

#runScript USBChargingFormatChart (psCurrent) (loadVoltage) (mathCapacity)

#scriptScript USBChargingFormatChart
; The routine do the actual formatting of the chart
=var psCurrent=params[0];
=var loadVoltage=params[1];
=var mathCapacity=params[2];

I don't think I've been clear in my questions.
In my previous post I tried to separate the two different issues for the purpose of troubleshooting and clarity, but perhaps that wasn't the best approach.

I am trying to accomplish the following:
1. "ParentScript" calls "ChildScript" with optional arguments
2. "Childscript" executes, and returns a variable (string, in this case)
3. "ParentScript" stores the returned variable and uses it

I am encountering the following two issues in this scenario:
1. I am unable to assign the returned value to a variable
2. I am unable to determine the correct syntax to call the script with arguments, and have it assign the return value to a variable

Okay, through trial and error I have worked out how to call the script with arguments from an =runScript("ScriptName") call:

Code: [Select]
=var result = runScript("ChildScript", "<arg-string>")So arguments are additional array elements in the line. That's sorted.

I just need to understand how to get the variable "result" to contain the value returned by "ChildScript", instead of the value "1".
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5132 on: November 06, 2025, 06:24:45 am »
To break my habit of posting drivers just after a TC update. :)  Here are two more updated configuration files, for Keithley 199 DMM and Rigol DG1000Z ARB.

Thanks, I have updated the definitions.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5133 on: November 06, 2025, 06:30:33 am »
I just need to understand how to get the variable "result" to contain the value returned by "ChildScript", instead of the value "1".


Script programming (i.e. command starting with #) do not return a value, for that reason runscript() do not return a script depend value, just a 1 to signal it has run
Programming language (With execute... or addFunc) do return values and has two different ways to do it.

You can use variables to return values: Create a value before calling the script and assign that variable a value in the script.
 

Offline jmurray

  • Regular Contributor
  • *
  • Posts: 73
  • Country: au
Re: Program that can log/control many multimeters and other devices.
« Reply #5134 on: November 06, 2025, 08:31:15 am »
I just need to understand how to get the variable "result" to contain the value returned by "ChildScript", instead of the value "1".


Script programming (i.e. command starting with #) do not return a value, for that reason runscript() do not return a script depend value, just a 1 to signal it has run
Programming language (With execute... or addFunc) do return values and has two different ways to do it.

You can use variables to return values: Create a value before calling the script and assign that variable a value in the script.

Okay, that clarifies things slightly. So I need to use the execute environment rather than scripting.
I've just converted my "ChildScript" to comply with the execute syntax - it runs without errors, but ultimately doesn't do almost any of the things it's expected to.

Could you provide a basic example of the syntax for the execute environment that accomplishes what I'm trying to do?
I've used executeFile() after a #calc tag, which I assume is what is required, but not having much success.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5135 on: November 06, 2025, 09:09:55 am »
Could you provide a basic example of the syntax for the execute environment that accomplishes what I'm trying to do?

I am not sure what you are trying to do.

I've used executeFile() after a #calc tag, which I assume is what is required, but not having much success.

The #calc tag when used from the command line is restricted to single line stuff, i.e. it cannot handle any multiline statement.
When stuff are execute away from the command line, this changes.

A handy way to make programs is the triple quotes """, this makes it possible to make multiline strings (Again: Not on the command line). Very handy for addFunc() and executeString(). addFunc() will be preparsed and execute in about half the time script usually takes.

When using executeFile(filename), TC will load the file and in the file multiline is possible, but be aware that executeFile(filename) will load the file each time it is called.

 

Offline jmurray

  • Regular Contributor
  • *
  • Posts: 73
  • Country: au
Re: Program that can log/control many multimeters and other devices.
« Reply #5136 on: November 06, 2025, 09:18:07 am »
Could you provide a basic example of the syntax for the execute environment that accomplishes what I'm trying to do?

I am not sure what you are trying to do.

I've used executeFile() after a #calc tag, which I assume is what is required, but not having much success.

The #calc tag when used from the command line is restricted to single line stuff, i.e. it cannot handle any multiline statement.
When stuff are execute away from the command line, this changes.

A handy way to make programs is the triple quotes """, this makes it possible to make multiline strings (Again: Not on the command line). Very handy for addFunc() and executeString(). addFunc() will be preparsed and execute in about half the time script usually takes.

When using executeFile(filename), TC will load the file and in the file multiline is possible, but be aware that executeFile(filename) will load the file each time it is called.

When you say "command line", I assume you are referring to the command line text box (single line text box) on the Commands page?
Except for the external file that I'm editing in a text editor (Notepad++), I am only entering commands into the log window on the command page and clicking "Run".
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5137 on: November 06, 2025, 09:39:39 am »
When you say "command line", I assume you are referring to the command line text box (single line text box) on the Commands page?
Except for the external file that I'm editing in a text editor (Notepad++), I am only entering commands into the log window on the command page and clicking "Run".

That qualify as non-command line and will accept multiline stuff.
 

Online Gertjan

  • Frequent Contributor
  • **
  • Posts: 339
  • Country: nl
Re: Program that can log/control many multimeters and other devices.
« Reply #5138 on: November 06, 2025, 10:23:55 am »
Hi HKJ,

The Rohde & Schwarz HMC8012 DMM has a very nice and complete configuration file, written by PL.  (Many thanks PL!)

My Hameg branded HMC8012 was not recognised because of a different *IDN? answer.
I added a #metadef to also support the Hameg branded HMC8012.

Please find the updated configuration file here: R&SHMC8012.zip.

regards, Gertjan.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5139 on: November 06, 2025, 11:36:29 am »
Hi HKJ,

The Rohde & Schwarz HMC8012 DMM has a very nice and complete configuration file, written by PL.  (Many thanks PL!)

My Hameg branded HMC8012 was not recognised because of a different *IDN? answer.
I added a #metadef to also support the Hameg branded HMC8012.

Please find the updated configuration file here: R&SHMC8012.zip.

I have added the updated configuration, thanks.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5140 on: November 07, 2025, 09:49:20 am »
V2.87 is up
Lot of new definitions and a few updates to TC
   Added: Hameg HMC8012 DMM (Thanks Gertjan)
   Updated: Rigol DG1022Z, Rigol DG1032Z, Rigol DG1062Z arb generator (Thanks Gertjan)
   Updated: Keithley 199 Bench DMM (Thanks Gertjan)
   Changed: Adjusted tip text on Load devices filter input field.
   Added: Hameg HM8134 and Hameg HM8135 RF generator (Thanks Gertjan)
   Added: Advantest R6581, Advantest R6581T and Advantest R6581D DMM (Thanks Hydron)
   Updated: Agilent 3458A DMM (Thanks Gertjan)
   Added/updated: Keithley DMM6500, Keithley DAQ6510 and Keithley DMM7510 DMM (Thanks KungFuJosh)
   Added: Agilent 34410A and Agilent 34411A DMM (Thanks KungFuJosh)
   Modified: Underscore handling, _ will be replace with space (as before), \_ will pass the _ in some cases.
   Added: UNI-T UTL8511+, UNI-T UTL8512+ and UNI-T UTL8513+ Electronic load (Thanks homico)
   Added: Batronix Magnova Oscilloscope, this is a very advanced driver (Thanks KungFuJosh)
   Added: Vars from #scpiCmd and :setvar: is now present in visible and enable definitions
   Added: AdvComboBox, AdvComboBoxHot combobox with color, icon and conditions for each item.
   Added: Kollmorgen KED Servo Drive all models (Thanks gby)
   Update: Yokogawa DMM's definition has been updated (Thanks flash2b)

The Magnova scope is the most complicated and largest definition ever made for TC, it makes it possible to remote control nearly all aspect of the scope and download screenshots. This was done by KungFuJosh.

During that definition a more advanced combobox was requested and I implemented it as AdvComboBox. The selections in that box can have different colors and be visible or not.

I did a text adjustment in the "filter" input on load devices page, mostly because I do not believe all people are aware how to use it and with about 700 devices in TC it is nearly mandatory to use when searching for a device.
 
The following users thanked this post: Gertjan, TUMEMBER, KungFuJosh, MrPete

Offline Hydron

  • Super Contributor
  • ***
  • Posts: 1598
  • Country: gb
Re: Program that can log/control many multimeters and other devices.
« Reply #5141 on: November 07, 2025, 11:54:38 am »
Thanks, will have a look at the Keithley 199 update specifically as it may help with my K617 work. <- checked and only small changes

I realised after posting my R6581(D/T) definition that I didn't have it go back to local control on disconnect, but related to that I might have found a bug when connected to both the R6581T and a Keithley 617 - [LOC] in #finalCmd works when only the R6581T is connected, but with the K617 running as well it does not, throwing errors.
Will investigate further when I have time (btw this is with the Kofen adapter). I also discovered that the "++loc" command doesn't work for the K617, it needs the "++loc all" as per the HPIB spec - this might be related to what I saw with both instruments connected.

I'll provide updates to the R6581(D/T) definiton when I've figured this out, and also submit the new K617 definition when done.
« Last Edit: November 07, 2025, 12:10:29 pm by Hydron »
 

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 938
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5142 on: November 07, 2025, 12:32:50 pm »
With the new version I get a Java exception on my definition which worked OK with 2.77 and 2.86 !!!

Code: [Select]
:readmath: modeVal>
;; COM3: Tx: <OS.> 4F 53 0A
;; COM3: Rx: <MDL7552> 4D 44 4C 37 35 35 32
;; COM3: Rx: <F3R0> 46 33 52 30
;; COM3: Rx: <M0IT4SI2000TD0> 4D 30 49 54 34 53 49 32 30 30 30 54 44 30
;; COM3: Rx: <NL0AZ1> 4E 4C 30 41 5A 31
;; COM3: Rx: <NS500RD0> 4E 53 35 30 30 52 44 30
;; COM3: Rx: <SM0AT100> 53 4D 30 41 54 31 30 30
;; COM3: Rx: <CO0CF1> 43 4F 30 43 46 31
;; COM3: Rx: <KA+0.00000E+0KB+1.00000E+0> 4B 41 2B 30 2E 30 30 30 30 30 45 2B 30 4B 42 2B 31 2E 30 30 30 30 30 45 2B 30
;; COM3: Rx: <KC+0.20000E+2KD+1.00000E+0> 4B 43 2B 30 2E 32 30 30 30 30 45 2B 32 4B 44 2B 31 2E 30 30 30 30 30 45 2B 30
;; COM3: Rx: <HI+0.00000E+0LO+0.00000E+0> 48 49 2B 30 2E 30 30 30 30 30 45 2B 30 4C 4F 2B 30 2E 30 30 30 30 30 45 2B 30
dk.hkj.script.ProgramExceptions$UnknownException: Unclosed character class near index 3
[
\]
   ^
 getElement(OSresponse,1,"[\n]")____<----____
        at dk.hkj.script.Script.expression(Script.java:1242)
        at dk.hkj.devices.DeviceAscii$TranslatingCommInterface.write(DeviceAscii.java:382)
        at dk.hkj.comm.CommInterface.writeRead(CommInterface.java:149)
        at dk.hkj.main.SCPICommand.writeReadDelay(SCPICommand.java:182)
        at dk.hkj.main.SCPICommand.writeReadInternal(SCPICommand.java:362)
        at dk.hkj.main.SCPICommand.writeRead(SCPICommand.java:408)
        at dk.hkj.devices.DeviceSCPI.getMode(DeviceSCPI.java:138)
        at dk.hkj.devices.DeviceSCPI.initColumns(DeviceSCPI.java:129)
        at dk.hkj.main.DeviceInterface.getValueNameList(DeviceInterface.java:553)
        at dk.hkj.main.InterfaceThreads$DeviceThread.getValueNames(InterfaceThreads.java:1619)
        at dk.hkj.main.PaneCurrentValues.setupFields(PaneCurrentValues.java:574)
        at dk.hkj.main.PaneCurrentValues.changeDevicesOrTable(PaneCurrentValues.java:496)
        at dk.hkj.main.Main.notifyChangeDevicesOrTableSync(Main.java:177)
        at dk.hkj.main.Main.access$1(Main.java:173)
        at dk.hkj.main.Main$2.run(Main.java:167)
        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)
Caused by: java.util.regex.PatternSyntaxException: Unclosed character class near index 3
[
\]
   ^
        at java.util.regex.Pattern.error(Unknown Source)
        at java.util.regex.Pattern.clazz(Unknown Source)
        at java.util.regex.Pattern.sequence(Unknown Source)
        at java.util.regex.Pattern.expr(Unknown Source)
        at java.util.regex.Pattern.compile(Unknown Source)
        at java.util.regex.Pattern.<init>(Unknown Source)
        at java.util.regex.Pattern.compile(Unknown Source)
        at java.lang.String.split(Unknown Source)
        at java.lang.String.split(Unknown Source)
        at dk.hkj.script.FunctionsString$32.execute(FunctionsString.java:594)
        at dk.hkj.script.Script.parseValue(Script.java:279)
        at dk.hkj.script.Script.parseBitOp(Script.java:326)
        at dk.hkj.script.Script.parseProduct(Script.java:398)
        at dk.hkj.script.Script.parseSum(Script.java:480)
        at dk.hkj.script.Script.parseCompare(Script.java:535)
        at dk.hkj.script.Script.parseLogical(Script.java:571)
        at dk.hkj.script.Script.parseQuestionMark(Script.java:597)
        at dk.hkj.script.Script.parseExpression(Script.java:622)
        at dk.hkj.script.Script.expression(Script.java:1230)
        ... 28 more
;; YOKO7552: Rx Timeout

It seems that it cannot handle statements like this:

:readmath: getElement(OSresponse,1,"[\n]")
:readmath: getElement(value,1,"R")
:setvar: rangeVal = substring(value,0,1
« Last Edit: November 07, 2025, 12:47:33 pm by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5143 on: November 07, 2025, 12:47:16 pm »
With the new version I get a Java exception on my definition which worked OK with 2.77 and 2.86 !!!

I did modify the string parsing to make it consistent in all places, it looks like there may be a bug in it.
Try using \\n instead of \n, the \n will place a LF in the string, the \\n will not.
 

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 938
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5144 on: November 07, 2025, 12:51:37 pm »
That led to another Java exception:
Code: [Select]
:readmath: getElement("Volt DC;Volt AC;Ohm 2W; Ohm 4W;Amp DC;Amp AC;Freq Volt AC;Freq Amp AC;dB Volt AC;dB Amp AC", modeVal -1)>
dk.hkj.script.ProgramExceptions$OperationNotSupportedForDataTypeException: -
 getElement("Volt DC;Volt AC;Ohm 2W; Ohm 4W;Amp DC;Amp AC;Freq Volt AC;Freq Amp AC;dB Volt AC;dB Amp AC", modeVal -1)____<----____
        at dk.hkj.script.Script.parseSum(Script.java:515)
        at dk.hkj.script.Script.parseCompare(Script.java:535)
        at dk.hkj.script.Script.parseLogical(Script.java:571)
        at dk.hkj.script.Script.parseQuestionMark(Script.java:597)
        at dk.hkj.script.Script.parseExpression(Script.java:622)
        at dk.hkj.script.Script.parseParamList(Script.java:133)
        at dk.hkj.script.Script.parseValue(Script.java:277)
        at dk.hkj.script.Script.parseBitOp(Script.java:326)
        at dk.hkj.script.Script.parseProduct(Script.java:398)
        at dk.hkj.script.Script.parseSum(Script.java:480)
        at dk.hkj.script.Script.parseCompare(Script.java:535)
        at dk.hkj.script.Script.parseLogical(Script.java:571)
        at dk.hkj.script.Script.parseQuestionMark(Script.java:597)
        at dk.hkj.script.Script.parseExpression(Script.java:622)
        at dk.hkj.script.Script.expression(Script.java:1230)
        at dk.hkj.devices.DeviceAscii$TranslatingCommInterface.write(DeviceAscii.java:382)
        at dk.hkj.comm.CommInterface.writeRead(CommInterface.java:149)
        at dk.hkj.main.SCPICommand.writeReadDelay(SCPICommand.java:182)
        at dk.hkj.main.SCPICommand.writeReadInternal(SCPICommand.java:362)
        at dk.hkj.main.SCPICommand.writeRead(SCPICommand.java:408)
        at dk.hkj.devices.SetupFormats$InfoField.syncValue(SetupFormats.java:3391)
        at dk.hkj.devices.SetupFormats.syncAll(SetupFormats.java:374)
        at dk.hkj.main.PopupSetupSelection.initialSync(PopupSetupSelection.java:124)
        at dk.hkj.main.PopupSetupSelection.timerUpdate(PopupSetupSelection.java:131)
        at dk.hkj.main.PopupSetupSelection.access$3(PopupSetupSelection.java:129)
        at dk.hkj.main.PopupSetupSelection$3.actionPerformed(PopupSetupSelection.java:88)
        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)
;; YOKO7552: Rx Timeout
;; YOKO7552: Tx <modeRanges?>
;; YOKO7552: Tx <none?
:readmath: modeVal>
;; YOKO7552: Rx Timeout
************************* Logging slow *****************************
;; YOKO7552: Tx <range?>
;; YOKO7552: Tx <none?
:readmath: rangeVal>
;; YOKO7552: Rx Timeout
************************* Logging slow *****************************
Exception in thread "AWT-EventQueue-0" dk.hkj.script.ProgramExceptions$UnknownException:  could not be converted to double
limit(value,0,7)____<----____
        at dk.hkj.script.Script.expression(Script.java:1242)
        at dk.hkj.main.SCPICommand.writeReadInternal(SCPICommand.java:392)
        at dk.hkj.main.SCPICommand.writeRead(SCPICommand.java:408)
        at dk.hkj.main.SCPICommand.readNumberInternal(SCPICommand.java:491)
        at dk.hkj.main.SCPICommand.readNumber(SCPICommand.java:509)
        at dk.hkj.devices.SetupFormats$RadioField.syncValueNumber(SetupFormats.java:2981)
        at dk.hkj.devices.SetupFormats$RadioField.syncValue(SetupFormats.java:3010)
        at dk.hkj.devices.SetupFormats$SelectorField.syncValue(SetupFormats.java:4937)
        at dk.hkj.devices.SetupFormats.syncAll(SetupFormats.java:374)
        at dk.hkj.main.PopupSetupSelection.initialSync(PopupSetupSelection.java:124)
        at dk.hkj.main.PopupSetupSelection.timerUpdate(PopupSetupSelection.java:131)
        at dk.hkj.main.PopupSetupSelection.access$3(PopupSetupSelection.java:129)
        at dk.hkj.main.PopupSetupSelection$3.actionPerformed(PopupSetupSelection.java:88)
        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)
Caused by: dk.hkj.vars.VarExceptions$ConversionException:  could not be converted to double
        at dk.hkj.vars.Support.stringToDouble(Support.java:24)
        at dk.hkj.vars.VarValueString.asDouble(VarValueString.java:57)
        at dk.hkj.vars.Var.asDouble(Var.java:240)
        at dk.hkj.script.FunctionsMath$40.execute(FunctionsMath.java:507)
        at dk.hkj.script.Script.parseValue(Script.java:279)
        at dk.hkj.script.Script.parseBitOp(Script.java:326)
        at dk.hkj.script.Script.parseProduct(Script.java:398)
        at dk.hkj.script.Script.parseSum(Script.java:480)
        at dk.hkj.script.Script.parseCompare(Script.java:535)
        at dk.hkj.script.Script.parseLogical(Script.java:571)
        at dk.hkj.script.Script.parseQuestionMark(Script.java:597)
        at dk.hkj.script.Script.parseExpression(Script.java:622)
        at dk.hkj.script.Script.expression(Script.java:1230)
        ... 28 more

Seems that it does not like:
:readmath: getElement("Volt DC;Volt AC;Ohm 2W; Ohm 4W;Amp DC;Amp AC;Freq Volt AC;Freq Amp AC;dB Volt AC;dB Amp AC", modeVal -1)


Well it seems that modeVal is not populated so that means changing \n into \\n did not work.

When I run my \\n modified definition on v2.86 it works OK there. So that version works with \n and \\n
« Last Edit: November 07, 2025, 01:02:50 pm by flash2b »
They say attention is a shovel. It's time to dig 'em out.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5145 on: November 07, 2025, 01:29:15 pm »
V2.88 is up
There was a serious bug in V2.87 and somehow I missed it, everything is the same as 2.87, except the bug is hopefully fixed now.
 
The following users thanked this post: flash2b, KungFuJosh

Offline flash2b

  • Frequent Contributor
  • **
  • Posts: 938
  • Country: nl
  • Everything I like about myself is better with you.
Re: Program that can log/control many multimeters and other devices.
« Reply #5146 on: November 07, 2025, 01:52:25 pm »
Well with v2.88 my Java exception is gone so it seems to be fixed.
They say attention is a shovel. It's time to dig 'em out.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5147 on: November 07, 2025, 01:59:33 pm »
Well with v2.88 my Java exception is gone so it seems to be fixed.

I had screwed up the string parsing in the programming language, anything with a \ prefix gave a wrong result.
 

Offline gby

  • Frequent Contributor
  • **
  • Posts: 271
  • Country: us
Re: Program that can log/control many multimeters and other devices.
« Reply #5148 on: November 07, 2025, 02:39:10 pm »
Hi HKJ,

New device file for GW Instek PSB2xxx series power supplies to add to the next release.
 

Offline HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 4776
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #5149 on: November 07, 2025, 02:48:15 pm »
New device file for GW Instek PSB2xxx series power supplies to add to the next release.

I have added them, thanks.
That is some serious power supplies with 820V 6A or 82V 80A for another model.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf