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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | CSS opi refresh |
From: | Márcio Paduan Donadio <[email protected]> |
To: | <[email protected]> |
Cc: | Márcio Paduan Donadio <[email protected]> |
Date: | Mon, 15 Apr 2013 11:29:35 -0300 |
Hello
all.
I have an OPI that sends some
data to Stream Device records that are connected to an
equipment using serial RS232. This operation is started with a button
press. I don't want this button to be pressed again while the data is
being transfered to my equipment. So, I tried to disable the button in the
beginnig of the script, and reenable it at the end. But what I see is
an enabled button until the end of the data transfer. Only at the end of the
script I can see a quick transition of the button to disabled state and again to
enabled.
Between each data I need to
transfer, I use time.sleep, because my equipment need some time to
process the data before receiveing the next one.
My python script is the
following:
(...)
button = widgetController.getWidgetModel() button.setPropertyValue("enabled", False) button.setPropertyValue("text", "Programming\nPlease, Wait") (data transfer code, with some time.sleep functions...)
button.setPropertyValue("text", "Program Furnace") button.setPropertyValue("enabled", True) Is there a way to force the OPI refresh, as
the disabled status of the button is shown?
Thanks,
Márcio Paduan Donadio Engenheiro de Computação - Software de Operação das Linhas de Luz Laboratório Nacional de Luz Síncrotron ? (LNLS) Centro Nacional de Pesquisa em Energia e Materiais (CNPEM) + 55 (19) 3512-3520 - [email protected] www.lnls.cnpem.br |