On Oct 29, 2021, at 2:19 AM, Wang, Andrew via Tech-talk <
tech-talk at aps.anl.gov> wrote:
Quick question. So I have noticed that when we run camonitor for a record called "foo", it initially doesn't show a time stamp. When I then do caput foo.PROC 1, camonitor updates with a new entry containing a time stamp, which I assume is the
time at which the processing occurred. However when I do caput foo.PROC 1 again, camonitor doesn't update. This has me thinking that it is just for monitoring value changes and not meant for monitoring processing. If we want to know if a record has been processed,
it is better to use TPRO. Please correct me if I am wrong.
EPICS was designed to minimize the bandwidth needed by the control system, so whether you get sent a monitor or not depends on the record type and the record’s settings. Most standard record types use a dead-band filter on their VAL field which lets the
database designer determine when to send out monitors, based on the contents of the record’s MDEL field. MDEL defaults to 0, which means that the VAL field must have changed after record processing for it to send out a monitor update, and for clients like
display managers that’s what you want, there’s no point updating a widget on the screen if its value hasn’t changed.
If the record represents a reading from a fast ADC which was noisy though you might set MDEL to a positive number, in which case the value would have to change by at least that amount before it would send another update. In your case above you could set
MDEL to any negative value (most people use -1) which will cause it to send out monitors on VAL every time the record processes, even if the value hasn’t changed at all.
Setting TPRO results in a message on the IOC’s console when the record (or any record processed by it that is connected to it using a DB link) gets processed, so the fact that it has processed can’t be seen remotely. If you’re only interested in that for
debugging purposes and you’re watching the console TPRO is a good solution as it doesn’t send out extra monitor events.
Using MDEL affects all clients monitoring the record, which you may or may not want if the record appears on many different display screens. TPRO has limited visibility (console connections only). Thus these are different solutions for different situations.
The timestamp that comes with the monitor is the time that the record was processed, as read by the IOC (so if the IOC is running on an embedded system its OS clock needs to be accurate enough for your purposes).
HTH,
- Andrew
--
Complexity comes for free, simplicity you have to work for.