This repository has been archived on 2025-11-05. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
SinqProtonCurrent/db/old/sumIO.db.dmc
T

42 lines
939 B
Plaintext

# This code integrates the beam intensity signal during the
# time where the integration is activated (SWITCH = 1).
# It also counts the time during which the integration occured.
# this is a switch which can be set to activate/deactivate the counting
record(bi, "$(P)SWITCH")
{
field(DTYP,"Soft Channel")
field(ZNAM,"Low")
field(ONAM,"High")
}
# This is an accumulator for the beam intensity integral
record(ai, "$(P)ACCINT")
{
field(SCAN,"1 second")
field(DTYP, "Soft Channel")
field(LINR, "LINEAR")
}
record(longin, "$(P)PRESET")
{
field(DTYP,"Soft Channel")
}
# This record computes the integral of the beam intensity
# (gated by the SWITCH signal)
record(calcout, "$(P)BEAMINT")
{
field(SCAN,".1 second")
field(INPA,"$(AI)")
field(INPB,"$(P)SWITCH")
field(INPC,"$(P)PRESET")
field(INPD,"$(P)ACCINT")
field(CALC,"((B >= 1) && (C > D)) ? D + A * .1 : D")
field(OUT,"$(P)ACCINT")
field(OOPT,"Every Time")
field(DOPT,"Use CALC")
}