In my AreaDetector setup I have EPICS <-> Middle Layer <-> Camera. I need to report on the link status between EPICS and the middle layer (EPICS link), and between the middle layer and the camera (camera link). For the camera link, I
have a polling EPICS PV to query the middle layer for the camera link status, and this works. For the EPICS link, my thought was to use the polled query’s status as an indication of the EPICS link status e.g. through a return value of the asyn write of asynDisconnected,
as shown in the code below:
if ((asynDisconnected == ret) || (asynTimeout == ret)) //Assume link down
{
setIntegerParam(SDEPICSLinkStatus, 0);
}
else if (ret != -1) //Assume link up, but don't change status if variable not found
{
setIntegerParam(SDEPICSLinkStatus, 1);
}
I have verified that I get a return value of asynDisconnected, but the EPICS link status is never set to zero. The else clause does execute and set the PV to 1, so the PV and asyn seem to be programmed right. Is there a connection issue
I am missing, org should I just use dbNameToAddr() or similar to set the value to zero, as opposed to going through asyn?
Thank you,
Iain Marcuson
Software Engineer, Sydor Technologies
585.278.1168 |
www.SydorTechnologies.com
Skype: iain.marcuson at sydorinstruments.com