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

wim.de.jong.59, Gertjan, homico and 27 Guests are viewing this topic.

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4950 on: October 18, 2025, 10:53:32 am »
I'll try downloading again in a bit, it's not available yet. Besides the things I mentioned previously, it can't send commands yet. I tried selecting one of the options on my Magnova driver, and got this error:

Just because I say I have fixed something, do not mean I did a new upload!

I started by copying the regular combobox control and then modified it, I missed one modification  :(
This time I have uploaded a new test version, with hopefully everything fixed, but it looks like I cannot get the color in the comboboxs main window, it changes back to standard after I had a chance to modify them :( but any icon will survive.

If you design any icons, be careful with the fileformat, a small file is rather important or the definition will be very long.

Note: the control is not finished and I may add a parameter more.
 
The following users thanked this post: KungFuJosh

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4951 on: October 18, 2025, 10:55:30 am »
BRAINSTOrming HIGH_LEVEL GPIB-cmmunication fill the device dependant data/Command inVARIABLES
each command-string Contains a Fixed Set of Variables and At A Fixed Position (a "New" programming language/ syntax
variables:

I do not know what you want with this, TC do not need a new language and for GPIB/SCPI it uses the language/commands of the device.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4952 on: October 18, 2025, 12:34:39 pm »
Another update to TC, now v2.84

Params is: label foregroundcolor backgroundcolor expression icon command

Use attached device with these settings in the dummy driver to test it:

 
The following users thanked this post: KungFuJosh

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 5949
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4953 on: October 18, 2025, 04:16:07 pm »
V2.84 looks great so far. Everything is working as expected, and the dropdown is awesome.

Is the expression for use in TC? I assume that's not sent to the device?

Thanks,
Josh
« Last Edit: October 20, 2025, 08:15:48 pm by KungFuJosh »
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4954 on: October 18, 2025, 04:26:05 pm »
Is the expression for use in TC? I assume that's not sent to the device?

The expression if what you asked for, they is used to enable/disable lines. If they return 0 the line is hidden.
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 5949
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4955 on: October 18, 2025, 04:45:32 pm »
Is the expression for use in TC? I assume that's not sent to the device?

The expression if what you asked for, they is used to enable/disable lines. If they return 0 the line is hidden.

Cool!

How can I automatically enable/disable them, and what's the general logic of it? Is combo==1 for all items in group 1, and combo==2 all items in group 2? etc.

I'm using this for memory depth, which is limited by the number of channels.

If only 1 channel, then the black items in the dropdown above. If 2 or more, than the gray options are active, etc.

Thanks,
Josh
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4956 on: October 18, 2025, 04:48:43 pm »
How can I automatically enable/disable them, and what's the general logic of it? Is combo==1 for all items in group 1, and combo==2 all items in group 2? etc.

I'm using this for memory depth, which is limited by the number of channels.

If only 1 channel, then the black items in the dropdown above. If 2 or more, than the gray options are active, etc.

Download the example I published to see how it works.       

Short form: Expression is similar to enable and visible, this limit what controls can be used in them,
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 5949
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4957 on: October 18, 2025, 04:56:35 pm »
How can I automatically enable/disable them, and what's the general logic of it? Is combo==1 for all items in group 1, and combo==2 all items in group 2? etc.

I'm using this for memory depth, which is limited by the number of channels.

If only 1 channel, then the black items in the dropdown above. If 2 or more, than the gray options are active, etc.

Download the example I published to see how it works.       

Short form: Expression is similar to enable and visible, this limit what controls can be used in them,

I did, but the example doesn't work. I tried setting every option in both combos, and the hidden combo==1 items never show. The log generally looks like this:

Code: [Select]
;; TCTest: Tx <cbb?>
Tx input: cbb?
Rx after processing: null
;; TCTest: Rx <null>
;; TCTest: Tx <acbb?>
Tx input: acbb?
Rx after processing: null
;; TCTest: Rx <null>
;; TCTest: Tx <acbb 3>
Tx input: acbb 3
Rx after processing:
;; TCTest: Tx <acbb?>
Tx input: acbb?
Rx after processing: null
;; TCTest: Rx <null>

Thanks,
Josh
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 5949
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4958 on: October 18, 2025, 05:02:06 pm »
I tried using it on my real driver, and got this error:
Code: [Select]
Exception in thread "AWT-EventQueue-0" dk.hkj.script.ProgramExceptions$UnknownException: Variable not found combo
combo==____<----____2
        at dk.hkj.script.Script.getVar(Script.java:83)
        at dk.hkj.script.Script.parseValue(Script.java:291)
        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.SetupFormats$AdvComboboxField.enableItems(SetupFormats.java:4383)
        at dk.hkj.devices.SetupFormats$AdvComboboxField.syncValue(SetupFormats.java:4486)
        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 java.desktop/javax.swing.Timer.fireActionPerformed(Timer.java:289)
        at java.desktop/javax.swing.Timer$DoPostEvent.run(Timer.java:221)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:323)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:702)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)


Example as used:
text foreground background variable icon command
Code: [Select]
Auto blue - - - AUTo
Auto_Fast blue - - - AFASt
5k gray - combo==1 - 5000
10k - - - - 10000
12.5k gray - combo==1 - 12500
20k - - - - 20000
25k gray - combo==1 - 25000

Thanks,
Josh
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 5949
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4959 on: October 18, 2025, 05:05:33 pm »
One other question: when this works, will combo==1,2 work, or will I need to have common items entered again for each combo?

Thanks,
Josh
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4960 on: October 18, 2025, 05:07:31 pm »
I did, but the example doesn't work. I tried setting every option in both combos, and the hidden combo==1 items never show. The log generally looks like this:

You have to load the attached device and configure the dummy interface.
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4961 on: October 18, 2025, 05:14:24 pm »
One other question: when this works, will combo==1,2 work, or will I need to have common items entered again for each combo?

No, you have to use a valid expression.
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 5949
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4962 on: October 18, 2025, 05:15:06 pm »
I did, but the example doesn't work. I tried setting every option in both combos, and the hidden combo==1 items never show. The log generally looks like this:

You have to load the attached device and configure the dummy interface.

I did load the dummy device, but I didn't get the configuration popup. I couldn't find it either. Where is it hiding?

Never mind, I found it.
« Last Edit: October 18, 2025, 05:24:28 pm by KungFuJosh »
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 5949
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4963 on: October 18, 2025, 05:19:12 pm »
One other question: when this works, will combo==1,2 work, or will I need to have common items entered again for each combo?

No, you have to use a valid expression.

What's the valid syntax here?
combo==1 or combo==2?
combo==1 || combo==2?
[1, 2].includes(combo)?
combo in (1, 2)?
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 5949
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4964 on: October 18, 2025, 05:31:42 pm »
Is the combo in the dummy driver reading the value of combobox combo as a variable combo? So if combobox combo value ==1, then the group is group 1 in advcombobox? IOW, when cbb=1, combo==1 is valid?

Thanks,
Josh

« Last Edit: October 18, 2025, 05:33:37 pm by KungFuJosh »
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4965 on: October 18, 2025, 05:32:57 pm »
What's the valid syntax here?
combo==1 or combo==2?
combo==1 || combo==2?
[1, 2].includes(combo)?
combo in (1, 2)?

Number 2 will work, but the inList function can also be used, it is string based and that means you can test many more types of values.
https://lygte-info.dk/project/TestControllerFunctions%20UK.html#inList
 
The following users thanked this post: KungFuJosh

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4966 on: October 18, 2025, 05:35:43 pm »
Is the combo in the dummy driver reading the value of combobox combo as a variable combo? So if combobox combo value ==1, then the group is group 1 in advcombobox? So, when cbb=1, combo==1 is valid?

Yes, combo is the variable created from the combobox and its value is the selected value.
TC has a function that can show all defined variables in a content, it can be useful for this kind of stuff.
 
The following users thanked this post: KungFuJosh

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 5949
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4967 on: October 18, 2025, 06:03:25 pm »
The advCombobox grouping needs to be set by toggleButton Channels (which includes 4 channels- CH1 - CH4).

I assume then that Channels will replace combo for my expression, but how can I see what is set for Channels? Channels doesn't exist as a variable.

TC has a function that can show all defined variables in a content, it can be useful for this kind of stuff.
What command will show me what the advCombobox will see for Channels?

Or is there something else I need to do? I know I could set variables for the groupings via the Channels, but if I can avoid the extra step, that would be preferred.

Thanks,
Josh
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4968 on: October 18, 2025, 06:08:34 pm »
The advCombobox grouping needs to be set by toggleButton Channels (which includes 4 channels- CH1 - CH4).

I assume then that Channels will replace combo for my expression, but how can I see what is set for Channels? Channels doesn't exist as a variable.

TC has a function that can show all defined variables in a content, it can be useful for this kind of stuff.
What command will show me what the advCombobox will see for Channels?

Or is there something else I need to do? I know I could set variables for the groupings via the Channels, but if I can avoid the extra step, that would be preferred.

You cannot set variables for this, only variables that are set by controls can be used.
Use: return0(printLog(getVarList(0))) as expression in the field to get a list of variables in the log window.


 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 5949
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4969 on: October 18, 2025, 06:18:42 pm »
Use: return0(printLog(getVarList(0))) as expression in the field to get a list of variables in the log window.

Is that the right command? This is what I got from it:
Code: [Select]
;; Magnova.commandTime={long}48
Magnova.commandTimeAverage={long}48
Magnova.commandTimeSlowest={long}48
PI={double,RO}3.141592653589793
TCTest.commandTime={long}8
TCTest.commandTimeAverage={long}8
TCTest.commandTimeSlowest={long}8
commandTime={long}180081
e={double,RO}2.718281828459045
logInterval={long}0
path.config={string,RO}\\TestController\\Settings
path.data={string,RO}\\TestController\\TCData
path.devices={string,RO}\\TestController\\Devices
path.program={string,RO}C:\\Users\\joshu\\Desktop\\Bench Meters\\TestController
path.script={string,RO}\\TestController\\ScriptLibrary
pi={double,RO}3.141592653589793
;; Magnova.commandTime={long}48
Magnova.commandTimeAverage={long}48
Magnova.commandTimeSlowest={long}48
PI={double,RO}3.141592653589793
TCTest.commandTime={long}8
TCTest.commandTimeAverage={long}8
TCTest.commandTimeSlowest={long}8
commandTime={long}180081
e={double,RO}2.718281828459045
logInterval={long}0
path.config={string,RO}\\TestController\\Settings
path.data={string,RO}\\TestController\\TCData
path.devices={string,RO}\\TestController\\Devices
path.program={string,RO}\\TestController
path.script={string,RO}\\TestController\\ScriptLibrary
pi={double,RO}3.141592653589793

Thanks,
Josh
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4970 on: October 18, 2025, 06:23:56 pm »
Use: return0(printLog(getVarList(0))) as expression in the field to get a list of variables in the log window.

Is that the right command? This is what I got from it:
Code: [Select]
;; Magnova.commandTime={long}48
Magnova.commandTimeAverage={long}48
Magnova.commandTimeSlowest={long}48
PI={double,RO}3.141592653589793
TCTest.commandTime={long}8
TCTest.commandTimeAverage={long}8
TCTest.commandTimeSlowest={long}8
commandTime={long}180081
e={double,RO}2.718281828459045
logInterval={long}0
path.config={string,RO}\\TestController\\Settings
path.data={string,RO}\\TestController\\TCData
path.devices={string,RO}\\TestController\\Devices
path.program={string,RO}C:\\Users\\joshu\\Desktop\\Bench Meters\\TestController
path.script={string,RO}\\TestController\\ScriptLibrary
pi={double,RO}3.141592653589793
;; Magnova.commandTime={long}48
Magnova.commandTimeAverage={long}48
Magnova.commandTimeSlowest={long}48
PI={double,RO}3.141592653589793
TCTest.commandTime={long}8
TCTest.commandTimeAverage={long}8
TCTest.commandTimeSlowest={long}8
commandTime={long}180081
e={double,RO}2.718281828459045
logInterval={long}0
path.config={string,RO}\\TestController\\Settings
path.data={string,RO}\\TestController\\TCData
path.devices={string,RO}\\TestController\\Devices
path.program={string,RO}\\TestController
path.script={string,RO}\\TestController\\ScriptLibrary
pi={double,RO}3.141592653589793

You have to put it in the right context, i.e. in the AdvComboBox definition
And I was wrong about the argument, it has to be 1, not 0 (0 is global vars)
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 5949
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4971 on: October 18, 2025, 06:38:19 pm »
You have to put it in the right context, i.e. in the AdvComboBox definition
And I was wrong about the argument, it has to be 1, not 0 (0 is global vars)

I had placed it in context, but changing it to 1 was what it needed. Thank you.

Main.Channels={long}0

That groups the 4 channel controls, but it doesn't change, so it seems I can't use that to define the groups in my advCombobox.

But the active channels do change this way:

CH1.Channel_1={long}1
CH3.Channel_3={long}1


I assume that means I can use Channel_1==1 and/or Channel_3==1 as part of the expression. Is that correct?

Thanks,
Josh
« Last Edit: October 18, 2025, 06:47:01 pm by KungFuJosh »
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online HKJTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: dk
    • Tests
Re: Program that can log/control many multimeters and other devices.
« Reply #4972 on: October 18, 2025, 06:44:31 pm »
But the active channels do change this way:

CH1.Channel_1={long}1
CH3.Channel_3={long}1


I assume that means I can use Channel_1=1 and/or Channel_3=1 as part of the expression. Is that correct?

You are nearly correct, it is: Channel_1==1

If you have to deal with variables that are not always defined the language has ways to do that: https://lygte-info.dk/project/TestControllerFunctions%20UK.html#Failsafe_reading_of_a_variable and https://lygte-info.dk/project/TestControllerFunctions%20UK.html#Trapping_any_error_or_fault
 
The following users thanked this post: KungFuJosh

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 5949
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4973 on: October 18, 2025, 06:46:38 pm »
That's what I meant. ;)

Thanks,
Josh
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 

Online KungFuJosh

  • Super Contributor
  • ***
  • Posts: 5949
  • Country: us
  • TEAS is real.
Re: Program that can log/control many multimeters and other devices.
« Reply #4974 on: October 18, 2025, 07:17:36 pm »
The way this works is problematic for me. Since the channels are grouped as Channels, there's no individual Channel_#==1 on the main tab. Even if there was, it's lower on the page than the advCombobox, so the variable doesn't exist because 1. it's not preset, and 2. can't get set because there's a variable not found error that occurs before anything can be set.

In its current state, the variable must be preset to function. But the channel state has to be read for it to work, and it can't be read as it is.

Is there a way to get that from a SCPI command? If I could use stuff like :CHAN1:STATe == ON that would work.

Either that or if you made it work with defined variables (:setvar: CH1 ON etc).

Thanks,
Josh
"Experience is something you don't get until just after you need it." - Steven Wright
Best Continuity Tester Ever
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf