I am able to set the alarm status of an asub record by doing the following in an asub function:
recGblSetSevr(prec,READ_ALARM,MAJOR_ALARM);
This works for the asub record. Instead of setting the alarm like this for an asub record though, I was wondering if it is possible to set the alarm for an ai record.
Here is my attempt so far. My asub record is defined as:
record(aSub, "$(Sys)$(Dev)T$(N_T)-Elapsed_asub") {
field(SNAM, "timeElapsed")
field(INPA, "$(Sys)$(Dev)T$(N_T)-Time")
field(OUTA, "$(Sys)$(Dev)T$(N_T)-Elapsed PP")
field(OUTB, "$(Sys)$(Dev)T$(N_T)-I.NSTA")
field(FTA, "DOUBLE")
field(FTVA, "DOUBLE")
field(FTVB, "ENUM")
field(SCAN, "5 second")
}
I specified the alarm I am trying to set in OUTB. And then in my asub c file I try to do the following:
*((epicsEnum16*)prec->valb) = READ_ALARM;
I get the following messages in the IOC:
Error (511,511) PV: XF:17ID-CT:FMX{RG:F4}T-I.NSTA error detected in routine: dbPut
Is there any way I can set the alarm status for an ai record from an asub function? I can do it for an asub record, but asub records lack some features that I want from ai records, such as HIGH and HIHI fields.
Alex