Using \x5f hex code for underscore certainly works in a script command. But, it does not work in a setup window radio button. The present SiglentSDGxxxX.txt device file does not support sweep UP_DOWN mode and I am working to add it. I modified the existing driver file setup popup code by adding one line at the end for the third state:
#cmdSetup radio Sweep_Direction Channel_1
:read: C1:SWWV?
:readmath: getElement(getMatch(value,"DIR,[^,]*(,|$)"),1,",")
:readformat: u
:write: C1:SWWV DIR,#
:string:
Up UP
Down DOWN
Up_Down UP\x5fDOWN
The above does not work in two ways:
1. When the device is actually in UP_DOWN mode the radio button does not recognize it and does not put the dot on any radio button. If the last line has "UP_DOWN" it will put the dot on Up Down when in that mode.
2. As written above the Setup processing sends
;; SDG2122X: Tx <C1:SWWV DIR,UPx5fDOWN>
to the device. It does not send C1:SWWV DIR,UP_DOWN like using \x5f in a command line would.
The original attempt was using
Up_Down UP\_DOWN
which also did not work.
So, for a setup radio button how to get Test Controller to send actual text "UP_DOWN" and how to get the radio button to recognize this third state and populate the dot on the radio button properly?