Yes, you start TC with the testControllerDebug.bat file, it will list a lot of the communication and error message will be listed in the DOS window.
Excellent. Thanks.
I'm on LINUX so I ran it with
java -jar TestController.jar debug
(BTW: the equivalent
tcrundebug file lacks the
debug argument.)
Now I got debugging output that was quite helpful:
;; Found Uni-T UDP3305S on 192.168.0.66 sn: ADP**********
;; UDP3305S: Tx <OUTPUT:STATE (getElement("CH1 CH1 CH2 CH3 SER PARA",channel)), 1>
;; UDP3305S: Tx <OUTPUT:STATE? (getElement("CH1 CH1 CH2 CH3 SER PARA",channel))>
;; UDP3305S: Rx Timeout
So, while "
(value)" is correctly translated into "
1", the
getElement expression is just handed over verbatim. For the heck of it, I removed the
channel variable and just added a number, instead:
#interface setOn OUTPUT:STATE (getElement("CH1 CH1 CH2 CH3 SER PARA",2)), (value)
#interface getOn OUTPUT:STATE? (getElement("CH1 CH1 CH2 CH3 SER PARA",2))
:string:
and still, it is not parsed:
;; UDP3305S: Tx <OUTPUT:STATE (getElement("CH1 CH1 CH2 CH3 SER PARA",2)), 1>
;; UDP3305S: Tx <OUTPUT:STATE? (getElement("CH1 CH1 CH2 CH3 SER PARA",2))>
;; UDP3305S: Rx Timeout
If I copy&paste this exact expression into the command window, it works just fine:
OUTPUT:STATE? CH2
;; UDP3305S: Tx <OUTPUT:STATE? CH2>
;; UDP3305S: Rx <OFF>
;; OFF
At that point, I fired up a Windows 11 VM just in case this is a LINUX-only problem but there was no difference. In an act of despair, I opened my config file in a hex editor to ensure that the interface definition does not contain any weird characters that might confuse the expression parser but found everything to be well-behaved ASCII.
I tried removing the outer parenthesis, I tried adding an extra pair, I added parenthesis around the
channel variable. The latter
did improve things a bit: Now, at least the channel variable was translated to a number.
Interface definition:
#interface setOn OUTPUT:STATE (getElement("CH1 CH1 CH2 CH3 SER PARA",(channel))), (value)
#interface getOn OUTPUT:STATE? (getElement("CH1 CH1 CH2 CH3 SER PARA",(channel)))
:string:
now results in this:
;; UDP3305S: Tx <OUTPUT:STATE (getElement("CH1 CH1 CH2 CH3 SER PARA",1)), 1>
;; UDP3305S: Tx <OUTPUT:STATE? (getElement("CH1 CH1 CH2 CH3 SER PARA",1))>
;; UDP3305S: Rx Timeout
So our final challenge is getting the
getElement expression to be recognized as a function and parsed/processed.
Trying to overcome this last hurdle, I changed double quotes to single quotes, added and/or removed spaces in random places, cast ancient spells and sacrificed my only child to the gods of Java but nothing helped.
So at this point, I am out of ideas. Any ideas, anyone?