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: | pyepics get_with_metadata inconstant behaviour |
From: | "Marco A. Barra Montevechi Filho via Tech-talk" <tech-talk at aps.anl.gov> |
To: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Cc: | Lucca Bavia Cuenca Campoi <lucca.campoi at lnls.br> |
Date: | Fri, 16 Sep 2022 18:37:12 +0000 |
Good evening!
We are perceiving a strange behaviour with get_with_metadata method in pyepics here. We have a motor record PV with defined PREC and EGU fields. We have a script that goes: my_pv = epics.PV("MGN:B:PB01:CS7:m4") my_dict = my_pv.get_with_metadata(use_monitor=True) First weird behaviour: between the many values returned in my_dict, the "precision" key is associated with "None" value and the same goes for "unit" key: {'pvname': 'MGN:B:PB01:CS7:m4', 'value': 3.56963, 'char_value': '3.56963', 'status': 0, 'ftype': 20, 'chid': 28543096, 'host': '10.10.10.38:46317', 'count': 1, 'access': 'read/write', 'write_access': True, 'read_access': True, 'severity': 0, 'timestamp': 1663352086.023605, 'posixseconds': 1663352086.0, 'nanoseconds': 23605915, 'precision': None, 'units': None, 'enum_strs': None, 'upper_disp_limit': None, 'lower_disp_limit': None, 'upper_alarm_limit': None, 'lower_alarm_limit': None, 'lower_warning_limit': None, 'upper_warning_limit': None, 'upper_ctrl_limit': None, 'lower_ctrl_limit': None, 'nelm': 1, 'type': 'time_double', 'typefull': 'time_double'} Second weird behaviour: when executed several times, dictionaries with different number of keys are returned. Changing use_monitor=False limited the dictionary size to {'status': 0, 'severity': 0, 'timestamp': 1663353141.426072, 'posixseconds': 1663353141.0, 'nanoseconds': 426072330, 'value': 3.56963} and the number of keys does not vary, but now we dont have precision and unit, which would be useful. Are we doing something wrong? Where does get_with_metadata gets its information from? Shouldnt "unit" come from EGU field?
I couldnt find answers for that in the documentation. Thanks for any help
🙂
Marco
Aviso Legal: Esta mensagem e seus anexos podem conter informações confidenciais e/ou de uso restrito. Observe atentamente seu conteúdo e considere eventual consulta ao remetente antes de copiá-la, divulgá-la ou distribuí-la. Se você recebeu esta mensagem por engano, por favor avise o remetente e apague-a imediatamente. Disclaimer: This email and its attachments may contain confidential and/or privileged information. Observe its content carefully and consider possible querying to the sender before copying, disclosing or distributing it. If you have received this email by mistake, please notify the sender and delete it immediately. |