Hello, and thanks for reading,
I’m having trouble keeping a counter for the number of errors coming in from an electron microscope (SEM). I’m using the Stream device driver to listen to incoming messages from the SEM, and when a message matches
a certain format that identifies it as an error message, the PV processes and stores the new error message, overwriting the last. When this happens I would like to have a second record process and increment a counter, so that I can keep track of the number
of error messages coming in.
My current setup gets the most recent error message correctly, but does not correctly increment the counter (the counter stays at zero). Here is the relevant code from the record definition file.
field(DESC,"Holds last SEM error")
field(INP, "@devhardware.proto debugListen() L5 0")
field(DESC,"Counter of # of errors")
When the first record processes due to an interrupt on a received error message, it is supposed to forward-link the calc record to process, causing an increment to the counter.
Any help or insight is appreciated.