You can use the delay field in a sequence record to create specific scan frequencies ... like that shown below. Change TestRecord1.DLY1 to the period you want it to scan. If multiple records need to be processed at this rate, TestRecord2 could become an event
record that posts a soft event which causes other records to scan.
record(seq,TestRecord1) {
field(PINI,"1")
field(DLY1,"3")
field(LNK1,"TestRecord2.PROC CP NMS")
field(LNK2,"TestRecord1 CP NMS")
}
record(calcout,"TestRecord2") {
field(INPA,"TestRecord2.VAL NPP NMS")
field(CALC,"A+1")
}
The SCAN field lets you choose from .1, .2, .5, 1, 2, 5, or 10 seconds. In cases where this is not enough, is there a simple way to make a record process at other intervals such as 2.7 seconds or 5.4 seconds, specified at runtime? I know
you can add options for more periods of the SCAN field by editing dbd files, but you cannot change your mind at runtime.
I envision something like this:
record(timer, “BL0:mytimer”){
field(PERI, 2.7)
field(FLNK, “BL0:mytrigger”)
}
And then subfields to enable/disable it.
Does anything like this exist? I would imagine that something like this would be very generally useful.
Alex