Hi
record(calcout,
"$(dev):cur")
{
field(INPA, "$(dev):raw_cur.VAL CP MS")
field(INPB, "$(dev):coefOffset.PROC CP
MS")
field(OOPT, "Every Time")
field(DOPT, "Use CALC")
field(CALC, "A-B")
field(FLNK, "$(dev):rangeunit")
}
record(ao, "$(dev):newcur")
{
field(DTYP, "Soft Channel")
}
record(sel, "$(dev):coefOffset")
{
field(SELM, "Specified")
field(NVL, "$(dev):range")
field(INPB, "$(dev):calc_offset1.VAL")
field(INPC, "$(dev):calc_offset2.VAL")
field(INPD, "$(dev):calc_offset3.VAL")
field(INPE, "$(dev):calc_offset4.VAL")
field(INPF, "$(dev):calc_offset5.VAL")
field(INPG, "$(dev):calc_offset6.VAL")
field(INPH, "$(dev):calc_offset7.VAL")
field(INPI, "$(dev):calc_offset8.VAL")
field(FLNK, "$(dev):newcur")
}
## below is offset1 of 8 possible offsets I need to save
record(bo, "$(dev):store_offset1")
{
field(PINI, "YES")
field(VAL, "0")
field(FLNK, "$(dev):calc_offset1" )
}
record(bo, "$(dev):clear_offset1")
{
field(VAL, "0")
field(OUT, "$(dev):store_offset1")
field(FLNK, "$(dev):store_offset1")
}
record(calcout, "$(dev):calc_offset1")
{
field(PINI, "YES")
field(INPA, "$(dev):raw_cur.VAL") # rawval
field(INPB, "$(dev):store_offset1")
field(OOPT, "Every Time")
field(DOPT, "Use CALC")
field(CALC, "B=1?A:0*A")
field(OUT, "$(dev):newcur")
}
My problem is that I see the calculated
values like $(dev):calc_offset1 correctly, but the $(dev):newcur
shows 0.
I want to have a 'current' offset (newcur)
that changes depending on what the current 'range' is (user
can select Range 1 to 8)
Amien