-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmotorUtil.db
133 lines (121 loc) · 4.76 KB
/
motorUtil.db
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#! Generated by VisualDCT v2.5
#! DBDSTART
#! DBDEND
# Setting VAL to "stop", stops ALL motorRecord's in this IOC.
# $(P)allstop.VAL is monitored by motorUtil.
record(bo, "$(P)allstop") {
field(ZNAM, "release")
field(ONAM, "stop")
field(DESC, "Stop All IOC motors.")
}
# Monitors the global STOP:ALL PV. When this PV changes, '1' is
# sent to $(P)allstop over channel access.
record(calcout, "$(P)allstop:MONITOR") {
field(DESC, "Stop All IOC motors.")
field(INPA, "$(PVPREFIX)CS:MOT:STOP:ALL CP")
field(OOPT, "When Non-zero")
field(CALC, "A")
field(DOPT, "Use OCAL")
field(OCAL, 1)
field(OUT, "$(P)allstop.VAL CA")
}
# Indicates if all motors in this IOC are done moving.
# Set by motorUtil when $(P)moving.VAL == 0.
record(bi, "$(P)alldone") {
field(ZNAM, "moving")
field(ONAM, "done")
field(VAL, "1")
field(DESC, "All IOC motors done moving.")
}
# process "Every Time" so value can be re-applied by periodic processing by _FAN2
record(calcout, "$(P)_MOVING")
{
field(SCAN, "Passive")
field(INPA, "$(P)alldone CP")
field(CALC, "A")
field(VAL, "1")
field(OOPT, "Every Time")
field(DOPT, "Use OCAL")
field(OCAL, "A = 0 ? 1 : 0")
field(OUT, "$(P)_FAN PP")
}
## this file get loaded by each motor IOC, it needs to
## set a different calc field in MOVING for each IOC
##
## it is OK to reuse OUTA in the lines when they refer to a
## specific IOC and no two lines will get loaded at one. However
## it is IMPORTANT to not re-use one of the outputs on the
## MOVING or _MOVING1 etc calc record target
## don't write to the L fields of MOVING, _MOVING1 and _MOVING2
## as this is written to already - see INSTETC.db
record(dfanout, "$(P)_FAN")
{
field(OMSL, "supervisory")
field(SELM, "All")
$(IFIOC_GALIL_01=#) field(OUTA, "$(PVPREFIX)CS:MOT:MOVING.A CA")
$(IFIOC_GALIL_02=#) field(OUTA, "$(PVPREFIX)CS:MOT:MOVING.B CA")
$(IFIOC_GALIL_03=#) field(OUTA, "$(PVPREFIX)CS:MOT:MOVING.C CA")
$(IFIOC_GALIL_04=#) field(OUTA, "$(PVPREFIX)CS:MOT:MOVING.D CA")
$(IFIOC_GALIL_05=#) field(OUTA, "$(PVPREFIX)CS:MOT:MOVING.E CA")
$(IFIOC_GALIL_06=#) field(OUTA, "$(PVPREFIX)CS:MOT:MOVING.F CA")
$(IFIOC_GALIL_07=#) field(OUTA, "$(PVPREFIX)CS:MOT:MOVING.G CA")
$(IFIOC_GALIL_08=#) field(OUTA, "$(PVPREFIX)CS:MOT:MOVING.H CA")
$(IFIOC_GALIL_09=#) field(OUTA, "$(PVPREFIX)CS:MOT:MOVING.I CA")
$(IFIOC_GALIL_10=#) field(OUTA, "$(PVPREFIX)CS:MOT:MOVING.J CA")
$(IFIOC_SMC100_01=#) field(OUTA, "$(PVPREFIX)CS:MOT:_MOVING1.A CA")
$(IFIOC_CONEXAGP_01=#) field(OUTA, "$(PVPREFIX)CS:MOT:_MOVING1.B CA")
$(IFIOC_MCLEN_01=#) field(OUTA, "$(PVPREFIX)CS:MOT:_MOVING1.C CA")
$(IFIOC_MCLEN_02=#) field(OUTA, "$(PVPREFIX)CS:MOT:_MOVING1.D CA")
$(IFIOC_MCLEN_03=#) field(OUTA, "$(PVPREFIX)CS:MOT:_MOVING1.E CA")
$(IFIOC_LINMOT_01=#) field(OUTA, "$(PVPREFIX)CS:MOT:_MOVING1.F CA")
$(IFIOC_LINMOT_02=#) field(OUTA, "$(PVPREFIX)CS:MOT:_MOVING1.G CA")
$(IFIOC_LINMOT_03=#) field(OUTA, "$(PVPREFIX)CS:MOT:_MOVING1.H CA")
$(IFIOC_BKHOFF_01=#) field(OUTA, "$(PVPREFIX)CS:MOT:_MOVING1.I CA")
$(IFIOC_PIMOT_01=#) field(OUTA, "$(PVPREFIX)CS:MOT:_MOVING1.J CA")
$(IFIOC_SM300_01=#) field(OUTA, "$(PVPREFIX)CS:MOT:_MOVING1.K CA")
## _MOVING2.A is used by reflectometry ioc
$(IFIOC_NWPRTXPS_01=#) field(OUTA, "$(PVPREFIX)CS:MOT:_MOVING2.B CA")
}
# force periodic processing to catch up any missing, shouldn't
# be necessary but no harm to be careful
record(fanout, "$(P)_FAN2")
{
field(SCAN, "10 second")
field(SELM, "All")
field(LNK1, "$(P)_MOVING.PROC")
field(SDIS, "$(P)_MOVING.PACT")
field(DISV, 1)
}
# The number of motors moving in this IOC.
# $(P)moving.VAL is set by motorUtil.
record(longout, "$(P)moving") {
field(DESC, "Motors moving count.")
}
# Used by xxx.adl to blink "Moving" indicator.
#record(calc, "$(P)alldoneBlink") {
# field(SCAN, ".5 second")
# field(CALC, "A?0:!B")
# field(INPA, "$(P)alldone")
# field(INPB, "$(P)alldoneBlink")
#}
# Allow smart clients to maintain a list of moving motors
record(waveform, "$(P)movingDiff") {
field(DESC, "Motor w/ last dmov change")
field(NELM, "62")
field(FTVL, "CHAR")
}
#! Further lines contain data used by VisualDCT
#! View(50,124,1.3)
#! Record("$(P)allstop",100,343,0,0,"$(P)allstop")
#! Record("$(P)alldone",340,343,0,0,"$(P)alldone")
#! Field("$(P)alldone.VAL",16777215,1,"$(P)alldone.VAL")
#! Visibility("$(P)alldone.DESC",1)
#! Record("$(P)moving",100,490,0,0,"$(P)moving")
#! Record("$(P)alldoneBlink",620,357,0,0,"$(P)alldoneBlink")
#! Field("$(P)alldoneBlink.INPA",16777215,0,"$(P)alldoneBlink.INPA")
#! Link("$(P)alldoneBlink.INPA","$(P)alldone.VAL")
#! Field("$(P)alldoneBlink.VAL",16777215,0,"$(P)alldoneBlink.VAL")
#! Field("$(P)alldoneBlink.INPB",16777215,0,"$(P)alldoneBlink.INPB")
#! Link("$(P)alldoneBlink.INPB","$(P)alldoneBlink.VAL")
#! Visibility("$(P)alldoneBlink.INPA",2)
#! Visibility("$(P)alldoneBlink.INPB",2)