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: | Trying to create softIoc to group alarms in one variable |
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> |
Date: | Thu, 17 Feb 2022 21:01:54 +0000 |
Hello all and good evening.
Im trying to create a project in which a softIoc receives many alarm fields, operates in them with the or "||" operator of the calc module and returns a value that represents the most severe activated status (that is, if there is a MINOR alarm and a MAJOR alarm both activated, the final result of the record will be MAJOR). For clarity im calling the softIoc the receiver and the other iocs which send the alarms, the senders. For technical reasons, that receiver must not depend on forwardlinks that come from the senders. For that, i created a dummy ioc with the records in the following pattern to mimic a regular sender IOC that has alarms: record(ai, "d:test1") { field(DESC, "Dummy var number 1")
field(HIHI, 10)
field(HIGH, 5)
field(LOW, 0)
field(LOLO, -5)
field(HHSV, MAJOR)
field(HSV, MINOR)
field(LSV, MINOR)
field(LLSV, MAJOR)
field(HYST, 1)
}First question: am i doing it right? I noticed that when i first initialize the ioc and run "caget d:test1.STAT" i get "UDF" and if i run "caput d:test1 10" and "caget dtest1.STAT" i get HIHI. If i otherwise run "caget d:test1.SEVR" then i get MAJOR. Is this how it is supposed to work? If yes, then i tried creating the second Ioc (the receiving end) with the following record pattern: record(calcout, ALM:Temperature01){ field(SCAN, "passive")
field(INPA, d:test1.STAT)
field(INPB, d:test2.STAT)
field(INPC, d:test3.STAT)
field(CALC,A||B||C){pp(TRUE)}
}
However, right in the moment i initialize the receiver Ioc, one of the messages i get is "Error: Invalid character '|'" which i think is weird because the operator is in the calc documentation(?).
Anyway, initializing the receiver Ioc when the sender is online does not result in what i expect: if d:test1.STAT is HIHI and i do "caget ALM:Temperature01" my answer is 0. The Iocs do seem to understand each other's presence because if i kill the sender, the receiver prints: "DB CA Link Exception: "Virtual circuit disconnect", context "<My_ip>:<Ioc_port>"" Am i doing something wrong? Does anyone have any suggestions? Thanks in advance. 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. |