3 # This is a template for generating a set of PVs which have commands which
4 # can be toggled by buttons. E.g. Monitor 2 can be inserted and extracted.
6 # Each command has a SP and a command that can be directly used by the button
10 # - P = Instrument name prefix
11 # - Q = Name for this piece of equipment
12 # - NAME = Name of the thing we're controlling (e.g. MONITOR:2)
13 # - ZPV = Name to call the action when $(NAME):SP is ZERO (e.g. EXTARCT)
14 # - OPV = Name to call the action when $(NAME):SP is ONE (e.g. INSERT)
15 # - RADDR = The address to read status from
16 # - EADDR = The address to read error state from
17 # - RBIT = The bit to read state from
18 # - EBIT = The bit to read error state from
19 # - EBIT = The bit to read error state from
20 # - ZADDR = The address to write to when $(NAME):SP is ZERO
21 # - OADDR = The address to write to when $(NAME):SP is ONE
22 # - ZDESC = Description for the ZERO action
23 # - ODESC = Description for the ONE action
24 # - ZSP = Description for when the SP is ZERO
25 # - OSP = Description for when the SP is ONE
27 # Inverse of the value read from the PV
28 # Useful for LEDs on the OPI
31 field(INPA,
"$(P)$(Q)$(NAME) CP")
32 field(CALC,
"A!=0?0:1")
33 field(ASG,
"READONLY")
37 field(DTYP,
"Raw Soft Channel")
38 field(FLNK,
"$(P)$(Q)$(NAME):CALC")
47 field(SELL,
"$(P)$(Q)$(NAME):SP.RVAL NPP NMS")
50 field(LNK1,
"$(P)$(Q):$(NAME):$(ZPV).VAL PP NMS")
53 field(LNK2,
"$(P)$(Q):$(NAME):$(OPV).VAL PP NMS")
60 field(DTYP,
"Soft Channel")
61 field(DESC,
"$(ZDESC)")
62 field(FLNK,
"$(P)$(Q)$(NAME):$(ZPV):RAW:VAL")
69 field(DTYP,
"Soft Channel")
70 field(DESC,
"$(ODESC)")
71 field(FLNK,
"$(P)$(Q)$(NAME):$(OPV):RAW:VAL")
74 record(longout,
"$(P)$(Q)$(NAME):$(ZPV):RAW:VAL")
77 field(OUT,
"$(P)$(Q)$(NAME):$(ZPV):RAW:SP PP")
80 record(longout,
"$(P)$(Q)$(NAME):$(OPV):RAW:VAL")
83 field(OUT,
"$(P)$(Q)$(NAME):$(OPV):RAW:SP PP")
86 record(longout,
"$(P)$(Q)$(NAME):$(ZPV):RAW:SP")
89 field(DTYP,
"asynInt32")
90 field(DESC,
"$(ZDESC)")
91 field(OUT,
"@asyn(PLC, $(ZADDR), 5.0) FINS_DM_WRITE")
92 field(SIML,
"$(P)$(Q)SIM")
93 field(SIOL,
"$(P)$(Q)SIM:$(NAME):$(ZPV):RAW:SP")
96 record(longout,
"$(P)$(Q)$(NAME):$(OPV):RAW:SP")
99 field(DTYP,
"asynInt32")
100 field(DESC,
"$(ODESC)")
101 field(OUT,
"@asyn(PLC, $(OADDR), 5.0) FINS_DM_WRITE")
102 field(SIML,
"$(P)$(Q)SIM")
103 field(SIOL,
"$(P)$(Q)SIM:$(NAME):$(OPV):RAW:SP")
106 ### Simulation Records ###
108 record(longout,
"$(P)$(Q)SIM:$(NAME):$(ZPV):RAW:SP")
110 field(SCAN,
"Passive")
111 field(DTYP,
"Soft Channel")
114 record(longout,
"$(P)$(Q)SIM:$(NAME):$(OPV):RAW:SP")
116 field(SCAN,
"Passive")
117 field(DTYP,
"Soft Channel")
record(longin,"$(P)$(Q)$(NAME):RAW")