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: MBBO IVOA has different behavior in IOC shell and Unix terminal |
From: | Rolf Keitel via Tech-talk <tech-talk at aps.anl.gov> |
To: | tech-talk at aps.anl.gov |
Date: | Wed, 18 Oct 2023 11:52:48 -0700 |
Hello Marco,
The record, as you defined below, uses string values where numerical values are required.
If you define the record "record_name" as you describe, you should get an error message on the IOC console when your database is loaded. Something like:
"Error: syntax error ....."
This is because the fields ZRVL, ONVL, ... are of type ULONG. If you set them to a string value, which cannot be decoded into an integer, the IOC will load the database with an error message and will set ZRVL, ... to 0.
You can achieve what you want to do (limit the operational value) by:
For example, if you define
Now if you do a
caput record_name 4
in a linux shell or a
dbpf record_name 4
on the IOC console, the record's VAL field will be 19, but the OUT link will not be processed.
HTH - rolf -
Hello all. I stumbled upon a curious behavior of mbbo record with configured IVOA field, both in EPICS 3.15.6 and 7.0.7
We were originally testing it in an areaDetector IOC, but managed to make a minimal example. Basically, we want to set forbidden values to mbbo record in such a way that the IOC does not accept values above a certain number (in the example, above or equal to five).
I defined the following record:
record(mbbo, "record_name") {field(DESC, "description")field(ZRST, "zero_string") field(ZRVL, "zero_value")field(ONST, "one_string") field(ONVL, "one_value")field(TWST, "two_string") field(TWVL, "two_value")field(THST, "three_string") field(THVL, "three_value")field(FRST, "four_string") field(FRVL, "four_value")field(IVOA, "1")}
By configuring the IVOA field to "Dont drive outputs", i expect that whenever i put 5 into record_name, it does nothing and statys in the old value. This works in ioc shell:
epics> dbpf record_name 3DBF_STRING: "three_string"epics> dbgf record_nameDBF_STRING: "three_string"epics> dbpf record_name 7recGblRecordError: 7 Illegal choice PV: record_nameDBF_STRING: "three_string"epics> dbgf record_nameDBF_STRING: "three_string"
However, in a linux terminal with caget and caput this is not true:
marco@s-swc10-l:~$ caget record_namerecord_name three_stringmarco@s-swc10-l:~$ caput record_name 7Warning: enum index value '7' may be too large.Old : record_name three_stringNew : record_namemarco@s-swc10-l:~$ caget record_namerecord_namemarco@s-swc10-l:~$
And it changes the value to zero. Even worse: when in an asyn IOC, the value passed to writeInt32 asyn function is also zero.
Is there any better way to set an operational limit to mbbo? Am i missing something?
Thanks in advance,
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.