I see the same thing with base 7.0.5.
I have the following simple database with a seq record which just writes 1 and 0 to the Shutter record. There is a delay of $(DELAY) before writing 1 and before writing 0.
record(seq,"$(P)OpenCloseShutter") {
field(PINI, "YES")
field(DLY0,"$(DELAY)")
field(DOL0,"1")
field(LNK0,"$(P)Shutter PP MS")
field(DLY1,"$(DELAY)")
field(DOL1,"0")
field(LNK1,"$(P)Shutter PP MS")
field(FLNK,"$(P)OpenCloseShutter.PROC CA")
}
record(bo, "$(P)Shutter") {
field(ZNAM, "Done")
field(ONAM, "Moving")
}
If DELAY is 0.1 I see the following with camonitor on Shutter:
Test:Shutter 2022-03-02 18:22:24.997849 Moving
Test:Shutter 2022-03-02 18:22:25.092984 Done
Test:Shutter 2022-03-02 18:22:25.188102 Moving
Test:Shutter 2022-03-02 18:22:25.283205 Done
Test:Shutter 2022-03-02 18:22:25.378332 Moving
Test:Shutter 2022-03-02 18:22:25.473436 Done
Test:Shutter 2022-03-02 18:22:25.568547 Moving
Test:Shutter 2022-03-02 18:22:25.663681 Done
Test:Shutter 2022-03-02 18:22:25.758885 Moving
Test:Shutter 2022-03-02 18:22:25.854026 Done
Test:Shutter 2022-03-02 18:22:25.949228 Moving
The period is about 190 ms rather than the expected 200 ms, but not too far off.
However, if I set DELAY=0.01 then I see this:
Test:Shutter 2022-03-02 18:25:44.341923 Done
Test:Shutter 2022-03-02 18:25:44.347055 Moving
Test:Shutter 2022-03-02 18:25:44.352186 Done
Test:Shutter 2022-03-02 18:25:44.357367 Moving
Test:Shutter 2022-03-02 18:25:44.362523 Done
Test:Shutter 2022-03-02 18:25:44.367682 Moving
Test:Shutter 2022-03-02 18:25:44.372816 Done
Test:Shutter 2022-03-02 18:25:44.377965 Moving
Test:Shutter 2022-03-02 18:25:44.383104 Done
Test:Shutter 2022-03-02 18:25:44.388263 Moving
Test:Shutter 2022-03-02 18:25:44.393372 Done
Test:Shutter 2022-03-02 18:25:44.398496 Moving
Test:Shutter 2022-03-02 18:25:44.403633 Done
The period is 10 ms when it should be 20 ms. The DELAY appears to be 5 ms, not 10 ms.
If I set DELAY=.005 then the Shutter PV has no monitor events.
Something seems wrong here, since I know that epicsThreadSleep on Linux is capable of good accuracy down to 100 microseconds or so.
This is base 7.0.4 on Centos 7. Is this expected?
Mark