Skip to content

Commit

Permalink
database: forward rate limit to FrameRate.DRVH.
Browse files Browse the repository at this point in the history
Both AcquirePeriod and FrameRate can be used to define frame rate. Keep
their limits consistent by forwarding the inverse of period limit to the
FrameRate record.

A better implementation of this feature would to have a FrameRateLimit
record which forwards for both AcquirePeriod's and FrameRate's DRVL and
DRLH fields. Having the limit specified in terms of frame rate would
however would require changing the configuration parameter defined in
the template st.cmd.

To keep backward compatibility, the frame rate is computed based on the
value of the AcquirePeriod.DRVL instead. Changing it at runtime requires
reprocessing FrameRateLimitFwd to forward to FrameRate.DRVH.
  • Loading branch information
henriquesimoes committed Apr 24, 2024
1 parent 50fc445 commit 38aabac
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions CameraApp/Db/limits.db
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@ record(bo, "$(P)$(R)FrameRateEnable") {
field(VAL, 1)
}

record(calc, $(P)$(R)FrameRateLimit) {
field(DESC, "Compute frame rate limit from period")
field(INPA, "$(P)$(R)AcquirePeriod.DRVL")
field(CALC, "1 / A")
field(FLNK, "$(P)$(R)FrameRateLimitFwd")
}

record(ao, "$(P)$(R)FrameRateLimitFwd") {
field(DESC, "Forward limit to FrameRate.DRVH")
field(PINI, "YES")
field(OMSL, "closed_loop")
field(DOL, "$(P)$(R)FrameRateLimit PP")
field(OUT, "$(P)$(R)FrameRate.DRVH NPP")
}

record(ao, "$(P)$(R)FrameRate") {
field(DRVL, "0")
}

record(ao, "$(P)$(R)AcquirePeriod") {
field(DRVL, "$(ACQUIRE_PERIOD_DRVL=0)")
field(DRVH, "inf")
Expand Down

0 comments on commit 38aabac

Please sign in to comment.