Hi,
I want to make an operation on part of PV that defined in ai.template.
(namely:EMS-ARSM:Neutron:ChangeUnit001, EMS-ARSM:Neutron:ChangeUnit002,EMS-ARSM:Gamma:ChangeUnit001 )
So, I add operation field in ai.template and also copy the file to Db folder and recompiled again.
I have posted ai.template in the following lines:
#====================ai.tempalte========================
# ai record template
record (ai, "$(P)-$(S):$(NAME)$(NUM)")
{
field (DTYP, "lrpApp")
field (INP, "@Monitor:$(INDEX)/$(OFFSET) L=$(LENGTH)")
###
field (FLNK, "REMS-ARSM:Neutron:ChangeUnit001")
field (FLNK, "REMS-ARSM:Neutron:ChangeUnit002")
field (FLNK, "REMS-ARSM:Gamma:ChangeUnit003")
###
field (ASLO,"$(ASLO)")
field (LINR, "LINEAR")
field (SCAN, "I/O Intr")
field (HIHI, "$(HIHI)")
field (LOLO, "$(LOLO)")
field (HIGH,"$(HIGH)")
field (LOW,"$(LOW)")
}
record (calc, "REMS-ARSM:Neutron:ChangeUnit001")
{
field(INPA, "REMS-ARSM:AlphaCountRate001.VAL")
field(CALC, "A*0.1")
field(EGU, "uSv/h")
}
record (calc, "REMS-ARSM:Neutron:ChangeUnit002")
{
field(INPA, "REMS-ARSM:AlphaCountRate002.VAL")
field(CALC, "A*0.1")
field(EGU, "uSv/h")
}
record (calc, "REMS-ARSM:Gamma:ChangeUnit003")
{
field(INPA, "REMS-ARSM:AlphaCountRate003.VAL")
field(CALC, "A*0.1")
field(EGU, "uSv/h")
}
#====================end of ai.tempalte=====================
here is the content of REMS_ARSM.substitutions (load "ai.template") file that used in st.cmd file to launch the IOC:
#=========================REMS_ARSM.substitutions================
file "db/ai.template" { pattern
{P, S, NAME, NUM, INDEX, OFFSET, LENGTH, ASLO, HIHI, HIGH, LOLO, LOW}
{REMS, ARSM, AlphaCountRate, 001, 21, 100, 5, 0.1, 50, 20, 3, 0}
}
#====================end of REMS_ARSM.substitutions================
However, when started IOC I failed to do the operation and the result dislpayed in terminal:
epics> dbpr REMS-ARSM:Neutron:ChangeUnit001
A: 0 ASG: B: 0 C: 0
CALC: A*0.1 D: 0 DESC: DISA: 0
DISP: 0 DISV: 1 E: 0 F: 0
G: 0 H: 0 I: 0 J: 0
K: 0 L: 0 NAME: REMS-ARSM:Neutron:ChangeUnit001
SEVR: INVALID STAT: UDF TPRO: 0 VAL: 0
Could you give me some suggestions and thanks in advance !
Zhefu
|