ISIS Logo
FINS
FINS IOC
zoom-vacuum-commands.template
Go to the documentation of this file.
1 # Zoom Vacuum Commands
2 #
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.
5 #
6 # Each command has a SP and a command that can be directly used by the button
7 # on the OPI
8 #
9 # Macros:
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
26 
27 # Inverse of the value read from the PV
28 # Useful for LEDs on the OPI
29 record(calc, "$(P)$(Q)$(NAME):INV")
30 {
31  field(INPA, "$(P)$(Q)$(NAME) CP")
32  field(CALC, "A!=0?0:1")
33  field(ASG, "READONLY")
34 }
35 
36 record(mbbo, "$(P)$(Q)$(NAME):SP") {
37  field(DTYP, "Raw Soft Channel")
38  field(FLNK, "$(P)$(Q)$(NAME):CALC")
39  field(ZRVL, "0x1")
40  field(ZRST, "$(ZSP)")
41  field(ONVL, "0x2")
42  field(ONST, "$(OSP)")
43 }
44 
45 record(seq,"$(P)$(Q)$(NAME):CALC") {
46  field(SELM, "Mask")
47  field(SELL, "$(P)$(Q)$(NAME):SP.RVAL NPP NMS")
48  field(DLY1, "0")
49  field(DOL1, "0")
50  field(LNK1, "$(P)$(Q):$(NAME):$(ZPV).VAL PP NMS")
51  field(DLY2, "0")
52  field(DOL2, "1")
53  field(LNK2, "$(P)$(Q):$(NAME):$(OPV).VAL PP NMS")
54 }
55 
56 record(bo, "$(P)$(Q)$(NAME):$(ZPV)")
57 {
58  field(ZNAM, "$(ZPV)")
59  field(ONAM, "$(ZPV)")
60  field(DTYP, "Soft Channel")
61  field(DESC, "$(ZDESC)")
62  field(FLNK, "$(P)$(Q)$(NAME):$(ZPV):RAW:VAL")
63 }
64 
65 record(bo, "$(P)$(Q)$(NAME):$(OPV)")
66 {
67  field(ZNAM, "$(OPV)")
68  field(ONAM, "$(OPV)")
69  field(DTYP, "Soft Channel")
70  field(DESC, "$(ODESC)")
71  field(FLNK, "$(P)$(Q)$(NAME):$(OPV):RAW:VAL")
72 }
73 
74 record(longout, "$(P)$(Q)$(NAME):$(ZPV):RAW:VAL")
75 {
76  field(VAL, "1")
77  field(OUT, "$(P)$(Q)$(NAME):$(ZPV):RAW:SP PP")
78 }
79 
80 record(longout, "$(P)$(Q)$(NAME):$(OPV):RAW:VAL")
81 {
82  field(VAL, "1")
83  field(OUT, "$(P)$(Q)$(NAME):$(OPV):RAW:SP PP")
84 }
85 
86 record(longout, "$(P)$(Q)$(NAME):$(ZPV):RAW:SP")
87 {
88  field(VAL, "1")
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")
94 }
95 
96 record(longout, "$(P)$(Q)$(NAME):$(OPV):RAW:SP")
97 {
98  field(VAL, "1")
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")
104 }
105 
106 ### Simulation Records ###
107 
108 record(longout, "$(P)$(Q)SIM:$(NAME):$(ZPV):RAW:SP")
109 {
110  field(SCAN, "Passive")
111  field(DTYP, "Soft Channel")
112 }
113 
114 record(longout, "$(P)$(Q)SIM:$(NAME):$(OPV):RAW:SP")
115 {
116  field(SCAN, "Passive")
117  field(DTYP, "Soft Channel")
118 }
119 
120 
record(longin,"$(P)$(Q)$(NAME):RAW")
Copyright © 2013 Science and Technology Facilities Council | Generated by   doxygen 1.8.5