@HKJ I am starting to understand the underlying architecture better. Whew.
Does this mean that if I want to incorporate some calculated values...
* That too is one of these major hiccups requiring reconfiguration?
* And, do I therefore need to invent a mode for that?
Looking at how cmdModeCheck is used, I am guessing the following is a semi-correct expanded interpretation / documentation. Am I close?
Current DocsIf the mode on/off commands contain [localmode] the state of the mode is handled by TestController and need not be included in the #askMode. With local mode it may not be necessary to send commands to the device, but only to add more columns and modify the #askValues command with the [mode:xxx] tag.
...
"Changing number of columns, device mode is not used (Note: m2 test is not used, but must be present)."
#cmdModeCheck modeLabel deviceModeString defaultState
mode on commands
mode off commands
modes where this mode is valid, use ! to invert mode. (This line is optional)
* In the example, "deviceModeString" is always "m2" and is present in #cmdMode and #cmdModeCheck
* EVERY example in the documentation, and in the device files, uses [localmode]
My Interpretation of the above- Each #cmdModeCheck defines an independent additional mode that can potentially be active simultaneously.
- Best to always use [localmode] for multi-mode devices. We have no instructions or examples of non-local (ie where the device returns good multi-mode data on its own)
- The third line ("modes where this is valid"...) defines how this mode interacts with all other modes, in the sense of a filter. (?? By default this mode is available with all other modes. If not, then some combination of positive inclusion and/or negative removal must be used. ?? )
- For multi-mode value reading, #askValues and #askValuesNumberFormat is used to define and limit the number of values to be read. See below.
Here's an example from R&SHMC8012.txt:
#askValues FETC?[mode:Frequency_Voltage,Frequency_Current,DCV_Power,DCI_Power,dB,dBm];FETCH2?[mode:DCV_Power,DCI_Power];CALC:POW?[mode:Limit];STAT:QUES:COND?[mode:Statistics];CALC:AVER:COUN?;CALC:AVER:MAX?;CALC:AVER:AVER?;CALC:AVER:MIN?;CALC:AVER:SDEV?;CALC:AVER:PTP?
; Format of answer: f=float, u=remove trailing letters, x=skip, *=Zero upper case values if this value is 0
#askValuesReadFormat FFFFFFFFFF
- Counting in #askValues, one sees up to ten values returned depending on the combination of active modes. Thus, #askValuesReadFormat specifies ten floating point numbers.
- Sometimes a single mode produces more than one value (eg Statistics); sometimes a single mode is present in more than one list, which is another way to produce multiple values (eg DCV_Power).
- In #askValues, the modes listed in a group [mode:Mode1,Mode2...] are "OR'd" together: the following associated values are expected if any of the listed modes are active.
One more question that's slightly related:In defining #cmdMode, the docs say:
- All defined modes are shown in a popup window, where they are sorted in alphabetically order.
- It is also possible to add empty positions with #cmdMode (on a line by itself)
Normally, a sorted list puts all empty records at the start or end. QUESTION: By any chance, does adding #cmdMode as a blank, cause a separate alphabetical sort before and after the blank?
(BTW a nit: it should say "sorted in alphabetical order")
THANKS as always!