Hi kay,
Thanks for your reply.
I have two questions to consult you:
I didn't see any warning or error messages by display builder if the displays misused Text Update widgets as labels by leaving the pv_name empty. How to turn on the function for phoebus.
I intend to display "ok" or pv1 value according to different pv0 value conditions in text update widget, for example:
if pv0 is zero then text update widget displays the pv1 value.
if pv0 is not zero then text update widget displays "ok".
Is it possible to write scripts by using text update widget for phoebus and could you please help me how to do this for phoebus or for ioc side.
Thank you very much again.
See
https://github.com/ControlSystemStudio/phoebus/wiki/Display-Builder-Compatibility#text-update:
“Some BOY displays misused Text Update widgets as labels by leaving the pv_name empty and instead directly configuring the text.”
If you want to display the value of a PV, use a text update widget and configure it’s PV name.
If you have a number but want to display that as a label, add suitable mbbi records to the IOC to convert the states into lables, and then you’re back to simply displaying that PV in a text update widget.
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of neu lzf via Tech-talk <Tech-talk at aps.anl.gov>
Date: Monday, September 11, 2023 at 8:36 AM
To: tech-talk at aps.anl.gov <Tech-talk at aps.anl.gov>
Subject: [EXTERNAL] Question about text update widget is not updating text problem for phoebus
I use binary SNS version
of Phoebus and have two questions to consult you:
1) I want to display "OK" text in Text Update Widget according to pv1 value if it is not equal to zero. I write embedded python script for phoebus as follows:
from org.csstudio.opibuilder.scriptUtil import PVUtil
pv0=PVUtil.getDouble(pvs[0])
pv1=PVUtil.getDouble(pvs[1])
widget.setPropertyValue("text","OK")
widget.setPropertyValue("text",str(format(pv0,".3f")))
the above script works well for CSS, while for phoebus it doesn't update text content to "OK" if pv1 is not equal to zero. I have no idea what the problem of the script is.
2) The script for phoebus doesn't show any error message if there is a syntax error in it, I wonder if I miss configuration to turn this function on and where to turn this function
on.
Any help will be appreciated and thank you very much in advance.