I do see the message that Andrew referred to when the IOC boots:
osdMonotonicInit: Measuring CPU time-base frequency ... 25000172 ticks/sec.
I just modified the scaler record to print the current value of the first counter in the callback routine. I print with errlogPrintf(), rather than printf(), so it does not slow down the operation very much.
My scaler has a 10 MHz input on scaler[0], so the ticks are 100 ns.
This is what I see if the RATE=59. The expected delta tick is 1/59.*1e7=169492. The average delta for the first 6 readings is 163981, which is pretty close.
This is what I see if RATE=60
updateCounts: posting scaler values counts[0]=65
updateCounts: posting scaler values counts[0]=186497
updateCounts: posting scaler values counts[0]=188068
updateCounts: posting scaler values counts[0]=188639
updateCounts: posting scaler values counts[0]=189067
updateCounts: posting scaler values counts[0]=189495
updateCounts: posting scaler values counts[0]=189924
updateCounts: posting scaler values counts[0]=190351
So now the average delta from the last 7 readings is 642 ticks, which means the callback is running every 64 microseconds, or 15.6 kHz.
This confirms that the problem is indeed that the callback is being called far too often when RATE=60.
If the problem is that callbackRequestDelay is returning too soon when RATE=60 then I don't understand why the bo record .HIGH field is not showing the same problem.
I do see the message that Andrew referred to when the IOC boots:
osdMonotonicInit: Measuring CPU time-base frequency ... 25000172 ticks/sec.
I just modified the scaler record to print the current value of the first counter in the callback routine. I print with errlogPrintf(), rather than printf(), so it does not slow down the operation very much.
My scaler has a 10 MHz input on scaler[0], so the ticks are 100 ns.
This is what I see if the RATE=59. The expected delta tick is 1/59.*1e7=169492. The average delta for the first 6 readings is 163981, which is pretty close.
updateCounts: posting scaler values counts[0]=74
updateCounts: posting scaler values counts[0]=150723
updateCounts: posting scaler values counts[0]=317296
updateCounts: posting scaler values counts[0]=483968
updateCounts: posting scaler values counts[0]=651202
updateCounts: posting scaler values counts[0]=817458
updateCounts: posting scaler values counts[0]=983962
This is what I see if RATE=60
updateCounts: posting scaler values counts[0]=65
updateCounts: posting scaler values counts[0]=186497
updateCounts: posting scaler values counts[0]=188068
updateCounts: posting scaler values counts[0]=188639
updateCounts: posting scaler values counts[0]=189067
updateCounts: posting scaler values counts[0]=189495
updateCounts: posting scaler values counts[0]=189924
updateCounts: posting scaler values counts[0]=190351
So now the average delta from the last 7 readings is 642 ticks, which means the callback is running every 64 microseconds, or 15.6 kHz.
This confirms that the problem is indeed that the callback is being called far too often when RATE=60.
If the problem is that callbackRequest Delay is returning too soon when RATE=60 then I don't understand why the bo record .HIGH field is not showing the same problem.