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
p: (03) 8540 4164 | f: (03) 8540 4200
[email protected] |
www.synchrotron.org.au
800 Blackburn Road, Clayton, Victoria 3168
Thanks,
We tried that and it did not work…
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.
Tim Mooney
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?