dls-controls / pythonSoftIOC

Embed an EPICS IOC in a Python process
Apache License 2.0
32 stars 7 forks source link

Be able to force Out records into an error state #53

Closed AlexanderWells-diamond closed 2 months ago

AlexanderWells-diamond commented 2 years ago

Currently there is no explicit way to force an Out record into an error state. The set() method on In records provides the severity and alarm keyword arguments (as well as the set_alarm() method), but there is no equivalent mechanism for Out records. Providing this would be useful for the PandABlocks-client PythonSoftIOC integration, as PandA can report fields as being in_error, and the associated records are often Out types.

evalott100 commented 3 months ago

@AlexanderWells-diamond

Was there any progress on this? We need it for https://github.com/PandABlocks/PandABlocks-ioc/issues/107.

AlexanderWells-diamond commented 3 months ago

@Araneidae and I have just discussed this. In principle we can do it.

There are some behavioural questions though, such as whether this alarm should be "sticky" or whether it should clear on next write, that sort of thing. Could you give us an example of what you'd want/expect to see, assuming we invent some .set_alarm() method on out records?

Araneidae commented 3 months ago

It's worth pointing out that doing this requires a hack and is not directly supported by EPICS.

evalott100 commented 3 months ago

The use case we're looking at is when the PandABlocks ioc stops receiving data from the client. We don't want to end the process, but mirror what other iocs do - keep the PVs active and in an error state.

image

$ caget PANDA1:CALC2:INPA.STAT

PANDA1:CALC2:INPA.STAT NO_ALARM

$ caget PANDA1:CALC2:OUT.STAT

PANDA1:CALC2:OUT.STAT READ_ACCESS