1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 <2022> 2023 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 <2022> 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: [EXTERNAL] ScrollBar in Phoebus - cannot set $(pv_value) in script |
From: | "Kasemir, Kay via Tech-talk" <tech-talk at aps.anl.gov> |
To: | EPICS Tech-Talk <tech-talk at aps.anl.gov>, Amien Crombie <ma.crombie at ilabs.nrf.ac.za> |
Date: | Thu, 24 Mar 2022 14:18:55 +0000 |
> i .. have a ScrollBar widget.
That widget displays the value of a PV and writes to that same PV when the user moves the scrollbar
> I however cannot set the scrollbar's value in my script.
If for some reason you have to use a script,
you can set the value of a PV in that script,
and if that PV happens to be the PV of the scrollbar,
that scrollbar will then update:
# Script attached to scrollbar or other widget with PV
# pvs[0]: Some input PV
#
# Writes the value from the input PV to the PV of the widget
from org.csstudio.display.builder.runtime.script import PVUtil, ScriptUtil
value = PVUtil.getDouble(pvs[0])
pv = ScriptUtil.getPrimaryPV(widget)
pv.setValue(value) |