kPyQt
You should consider using the kPyQt module to streamline interactions with KTL keywords. The sphinx documentation for the module is here, including a working example similar to the complete example below:
https://www2.keck.hawaii.edu/software/kPyQt/
https://www2.keck.hawaii.edu/software/kPyQt/examples.html
Monitoring a keyword
Support we want to connect the monitoring of a keyword to a status text field.
...