Experimental Physics and
| |||||||||||||||
|
Hi everybody, I want to perform a simple operation but as I am still new on EPICS and I don't manage to do it. On my device I use I,Q register to set up my DAC and I want for the user to modify Amplitude and Phase Process variable to setup these I,Q.
I would like to perform this transformation at database level so that my driver remains as simple as possible. Actually I have this: record(ao, "$(S):$(D)_$(C):RefminAmpSet")
{ field(DESC, "RefminAmp Temporary Set Record") field(PINI, "YES") field(VAL, "500")
} record(ao, "$(S):$(D)_$(C):RefminPhasSet") { field(DESC, "RefminPhas Temporary Set Record")
field(PINI, "YES") field(VAL, "0") } record(calcout, "$(S):$(D)_$(C):RefminAmpCalc")
{ field(FLNK, "$(S):$(D)_$(C):RefminISet") field(CALC, "A * COS(B)")
field(INPA, "$(S):$(D)_$(C):RefminAmpSet.VAL") field(INPB, "$(S):$(D)_$(C):RefminPhasSet.VAL")
} record(ao, "$(S):$(D)_$(C):RefminISet") { field(DTYP, "asynFloat64") field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))refminI")
field(PINI, "YES") field(VAL, "0") field(PREC, "2") } record(ao, "$(S):$(D)_$(C):RefminQSet") { field(DTYP, "asynFloat64") field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))refminQ") field(PINI, "YES") field(VAL, "0")
field(PREC, "2") } I have seen many example on how to use calc to read ai records but not for setting ao records.
Regards,
-- Benoit RAT
| ||||||||||||||
ANJ, 20 Apr 2015 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |