I have a mildly evil plan, but I think I might need some help...aka, probably need features added.
I would like :setvar: to work from cmdSetup.
I would like to be able to set a variable, with no other function;
#scpiCmd name none would be fine if that will work to set the variable from cmdSetup.
For example, in measurement setup, I can use any of 4 analog channels, or any of 16 digital channels as the source channel.
I can then choose 1 of 38 measurement types to go along with the 1 chosen of those 20 channel options. Setting 20 channels times 38 currently available measurement types would be cuckoo (ignore that not all measurement types can be done on digital channels

).
My plan is to create multiple variables to define a measurement type and channel for 4 or 5 measurement option groups.
Then use #replacetext to set the #value for the specific measurement setup(s).
Something like this maybe:
#scpiCmd MeasChan1 none
:setvar: meas1Chan=inputValue
#scpiCmd getMeasChan1? none?
:readmath: meas1Chan
#cmdSetup combobox M1_Channel Measure
:read: getMeasChan1?
:write: MeasChan1 (value)
:update: M1_Channel
:string:
CH1 CHANnel1
CH2 CHANnel2
CH3 CHANnel3
CH4 CHANnel4
DO DIGital0
D1 DIGital1
D2 DIGital2
D3 DIGital3
D4 DIGital4
D5 DIGital5
D6 DIGital6
D7 DIGital7
D8 DIGital8
D9 DIGital9
D10 DIGital10
D11 DIGital11
D12 DIGital12
D13 DIGital13
D14 DIGital14
D15 DIGital15
:tip: Select measurement source(Another combobox for the measurement type...)
The command for current measurement values is:
:MEASurement:[Type]:CURRent? <Channel>
I could set that as something like:
#replacetext M1CHAN HOWDOIGETTHEVARIABLEHERE;)
#replacetext M1TYPE HOWDOIGETTHEVARIABLEHERE;)
#value M1CHAN_M1TYPE _ SI
#askValues :MEAS:M1TYPE:CURR? M1CHAN
What do you think?
Thanks,
Josh