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: | RE: calc out record to verify pv not connected |
From: | "Andrew C. Starritt" <[email protected]> |
To: | "Goff, Steven J" <[email protected]>, "Mooney, Tim M." <[email protected]>, "[email protected]" <[email protected]> |
Date: | Tue, 10 Jun 2014 00:10:54 +0000 |
Hi Steven, When I need to do this sort of thing I use an intermediate record that I know exists,
thus allowing the calcout record to process. If the remote PV does not exist, then the intermediate will be invalid and I can test for that, i.e. something like:
record (ai, “MY_REMOTE_PV_ALIAS”)
{ Field(SCAN, “Passive”) Field(INP, “MY_REMOTE_PV CP”) } record (calcout, “REMOTETEST”)
{ Field(SCAN, “1 second”) Field(INPA, “MY_REMOTE_PV_ALIAS”) Field(INPB, “MY_REMOTE_PV_ALIAS.SEVR”) Field(CALC, “B#3 ? ... : ... ”) } I set up the intermediate record to be ai, bi, mbbi, longin as appropriate, and usually set EGU, PREC etc as appropriate as well in order to mimic the remote PV as best I can. Regards Andrew C. Starritt | Principal Controls Engineer | Australian Synchrotron
From: [email protected] [mailto:[email protected]]
On Behalf Of Goff, Steven J Thanks, We tried that and it did not work… From: Mooney, Tim M. [mailto:[email protected]]
On my system, there is a delay of around 15-30 seconds after I unplug the remote IOC's network connection before INAV goes to 0, and a similar delay
after I plug it back in before INAV goes to 1. In my case, both IOCs are on the same subnet. From:
[email protected] [[email protected]] on behalf of Goff, Steven J [[email protected]] I’m using a calcout record that uses a remote PV (from another IOC) as part of its calculation. I’m also using the INAV filed to test the link status of the remote PV. But I’m having problems getting
it to work. While troubleshooting, I narrowed my calculation to be nothing more than to tell me what the connection status is. Here’ what I have: Record(calcout, “REMOTETEST”)
{ Field(SCAN, “1 second”) Field(INPA, “MY_REMOTE_PV”) Field(INPB, “REMOTETEST.INAV”) Field(CALC, “B”) } My understanding is that INAV returns an enumeration where 0 = not connected, 1 = connected, 2 = local PV and 3 = constant. So when I start my IOC, REMOTETEST = 0 as expected. When I start my remote IOC, REMOTETEST = 1 as expected. When I terminate the remote IOC, REMOTETEST = 1. Shouldn’t it go back to 0? Especially since
when I run “camonitor REMOTETEST.INAV” it toggles from 0 to 1 to 0 again. It looks like the “B” value never gets updated in the calculation once the remote connection is gone. Any ideas? |