Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fb_epid: I/O Intr not valid (no DSET) #10

Open
prjemian opened this issue May 13, 2021 · 9 comments
Open

fb_epid: I/O Intr not valid (no DSET) #10

prjemian opened this issue May 13, 2021 · 9 comments
Assignees
Labels

Comments

@prjemian
Copy link
Contributor

from prjemian/epics-docker#43

after iocInit: PV: xxx:epid1:outpv scanAdd: I/O Intr not valid (no DSET)

The code in the fb_epid.db database has this:

grecord(sseq, "$(P):outpv") {
        field(DESC, "follow OUT PV name")
        field(SCAN, "I/O Intr")
        field(DOL1, "$(P):out.OUTN")
        field(DLY1, "0")
        field(LNK1, "$(P):resume.INBN")
}

The SCAN field is triggering the message above.

@prjemian prjemian added the bug label May 13, 2021
@prjemian prjemian self-assigned this May 13, 2021
@timmmooney
Copy link
Contributor

timmmooney commented May 13, 2021 via email

@MarkRivers
Copy link
Member

Note that the swait record in that database also have SCAN=I/O Intr. Is that also an error?

How did this database ever work?

Should these lines all be deleted so that it defaults to SCAN=PASSIVE?

@keenanlang
Copy link
Member

keenanlang commented Apr 14, 2023

From the comments in the code, it appears that the intended function would be to set

$(P):outpv.SCAN = PASSIVE

and

$(P):out.FLNK = "$(P):outpv PP"

@prjemian
Copy link
Contributor Author

I could try to test this in my simulation IOC by modifying the database locally.

@prjemian
Copy link
Contributor Author

Looks as if this fb_epid support is ripe for an overhaul. We could compare with current use at 33ID.

@prjemian
Copy link
Contributor Author

Could be tested by constructing a temperature controller simulation. Here's an example of that using an swait record (as setup for bluesky):

        calcs.calc8.reset()  # remove any prior configuration
        self.description.put("temperature")
        self.report_dmov_changes.put(report_dmov_changes)
        self.previous_value_pv.put(self.readback.pvname)
        if setpoint is not None:
            self.setpoint.put(setpoint)
            self.readback.put(setpoint)
        self.noise.put(noise)
        self.max_change.put(max_change)
        self.tolerance.put(tol)
        self.scanning_rate.put(rate)  # 1 second
        self.calculation.put("A+max(-D,min(D,(B-A)))+C*(RNDM-0.5)")

@prjemian
Copy link
Contributor Author

Also, there's no button for fb_epid.adl on the XXX green button screen. $(P)epid1

@prjemian
Copy link
Contributor Author

Could be tested by constructing a temperature controller simulation.

Indeed: such simulation is noted in the database:

#--------------------------------------------
# simulate a temperature sensor and heater
#----------------------
# A : minimum "temperature" allowed
# B : cooling rate parameter
# C : heater power
# D : output of PID loop
# E : heater relay closes when D > E
# F : current "temperature"
#----------------------
# PID loop terms:
# $(P):in.INAN = "$(P):sim"
# $(P):out.OUTN = "$(P):sim.D"
# $(P):enable.INAN = "$(P):on.VAL"
# $(P).KP = "0.01"
# $(P).KI = "0.1"
# $(P).I = "0.0"
# $(P).KD = "0.0"
# $(P).DRVL = "0.0"
# $(P).DRVH = "1.0"
# $(P).FMOD = "PID"
#----------------------
grecord(swait, "$(P):sim") {
field(DESC, "EPID Temperature Controller simulator")
field(PREC, "5")
field(SCAN, ".1 second")
field(CALC, "max(A,F*(1-B)+C*D*G)")
field(A, "0.1") # minimum "temperature"
field(B, "0.05") # cooling rate parameter
field(C, "30") # heater power
field(D, "0") # driven by epid loop
field(E, "0.8") # relay close threshold
field(INFN, "$(P):sim.VAL")
field(INGN, "$(P).FBON")# is feedback ON?
}

@prjemian
Copy link
Contributor Author

Time for an overhaul of the fb_epid support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants