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: | "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>, Rolf Keitel <rolf at triumf.ca> |
Date: | Thu, 19 Oct 2023 02:19:40 +0000 |
Hi, Rolf. Thanks for the help!
Indeed in the example record i blindly accepted VSCode mbbo template and forgot to change the values to numerical ones. In the actual implementation, the record has numerical values between double quotes, so i figure i can remove these quotes just to be sure. By what you are saying i understand that i also need to explicitly set the alarm fields to INVALID in order for the IVOA associated algorithm to understand that those fields should not trigget the OUT field. I did this: record(mbbo, "record_name") {
field(DESC, "description")
field(ZRST, "zero_string") field(ZRVL, 0)
field(ONST, "one_string") field(ONVL,1)
field(TWST, "two_string") field(TWVL, 2)
field(THST, "three_string") field(THVL, 3)
field(FRST, "four_string") field(FRVL, 4)
field(ZRSV, NO_ALARM) field(ONSV, NO_ALARM)
field(TWSV, NO_ALARM) field(THSV, NO_ALARM)
field(FRSV, NO_ALARM) field(FVSV, INVALID)
field(SXSV, INVALID) field(SVSV, INVALID)
field(EISV, INVALID) field(NISV, INVALID)
field(TESV, INVALID) field(ELSV, INVALID)
field(TVSV, INVALID) field(TTSV, INVALID)
field(FTSV, INVALID) field(FFSV, INVALID)
field(IVOA, 1)
field(OUT, "test")
}
record(ai, "test"){}
The interesting thing is: when i do caput record_name 4 caput record_name 8 Then i can see record_name.RVAL = 0 and test.VAL=4. Since the actual record is an asyn record:
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Rolf Keitel via Tech-talk <tech-talk at aps.anl.gov>
Sent: 18 October 2023 15:52 To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov> Subject: Re: MBBO IVOA has different behavior in IOC shell and Unix terminal 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
record(mbbo, "record_name") {
field(DESC, "description")
field(ZRST, "zero_string") field(ZRVL, 11)
field(ONST, "one_string") field(ONVL,13)
field(TWST, "two_string") field(TWVL, 15)
field(THST, "three_string") field(THVL, 17)
field(FRST, "four_string") field(FRVL, 19)
field(FRSV, INVALID)
field(IVOA, 1)
}
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 -
On 2023-10-17 6:24 a.m., Marco A. Barra Montevechi Filho via Tech-talk wrote:
--
Rolf Keitel, Ph.D. Researcher Emeritus e-mail: rolf at triumf.ca ------ Home ------ 4158 West 13th Ave Vancouver, BC, V6R 2T6 604 228 0594 ------ Office: ------ 604 222 7453 TRIUMF Canada’s particle accelerator centre 4004 Wesbrook Mall Vancouver, BC, V6T 2A3 www.triumf.ca | Twitter | Facebook | Instagram TRIUMF is located on the traditional, ancestral, and unceded territory of the xʷməθkʷəy̓əm (Musqueam) people, who for millennia have passed on their culture, history, and traditions from one generation to the next on this site. |