For the record, I’ll put a nice answer here that I got from James Larson.
‘At the end of your exec statement
direct the output, >, to /dev/null . It won’t show up on the ioc .’
I tried that and it works a treat.
In the protocol file:
commsFail {
#exec 'echo "comms fail on \$0"'; #Turn this off in production
exec 'dbpf \$1:\$4 "Comms error"> /dev/null'; #/dev/null makes it silent
}
readCurrent{
…. Usual out and in stuff, then an exception handler for timeout
@replytimeout{commsFail;} #comms is down
}
And in the database file:
….
#COMMSFAIL is the record to write to on a replytimeout
field(INP, "@$(DEVICE).proto readCurrents($(P)$(R),ITIME_MON,OVR_STS,COMMSFAIL) $(PORT) 0")
…..
Thanks James.