Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions iocBoot/iocAny/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ iocxxxLinux_registerRecordDeviceDriver(pdbbase)
#dbLoadRecords("$(OPTICS)/opticsApp/Db/2slit.db","P=xxx:,SLIT=Slit1V,mXp=m3,mXn=m4")
#dbLoadRecords("$(OPTICS)/opticsApp/Db/2slit.db","P=xxx:,SLIT=Slit1H,mXp=m5,mXn=m6")

## VMAS (white beam slits)
iocshLoad("$(OPTICS)/opticsApp/iocsh/vmas.iocsh", "P=$(PREFIX),S=slits,HORIZONTAL=m1,DIAGONAL=m2,PITCH=m3,YAW=m4")

### soft motor slits
dbLoadRecords("$(OPTICS)/opticsApp/Db/2slit_soft.vdb","P=xxx:,SLIT=Slit2V,mXp=m3,mXn=m4")
dbLoadRecords("$(OPTICS)/opticsApp/Db/2slit_soft.vdb","P=xxx:,SLIT=Slit2H,mXp=m5,mXn=m6")
Expand Down
41 changes: 0 additions & 41 deletions opticsApp/iocsh/EXAMPLE_vmas.substitutions

This file was deleted.

32 changes: 20 additions & 12 deletions opticsApp/iocsh/vmas.iocsh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#- determine aperture size.
#
#- PREFIX - IOC Prefix (e.g. xxx:)
#- S - slit assembly (e.g. US or DS)
#- YAW - yaw motor (horizontal size)
#- PITCH - pitch motor (vertical size)
#- HORIZONTAL - horizontal motor (horizontal position)
Expand All @@ -20,25 +21,32 @@


# Load motor records
dbLoadTemplate("EXAMPLE_vmas.substitutions","P=$(PREFIX),YAW=$(YAW),PITCH=$(PITCH),HOR=$(HORIZONTAL),DIA=$(DIAGONAL)")
dbLoadTemplate("substitutions/vmas.substitutions","P=$(PREFIX),S=$(S),YAW=$(YAW),PITCH=$(PITCH),H=$(HORIZONTAL),DIA=$(DIAGONAL)")

########################################################################
# Set the weighting to account for the angle of the diagonal stage
# used in the slits (14 degrees).
doAfterIocInit("dbpf('$(PREFIX)hCenterC1', '1.0')")
doAfterIocInit("dbpf('$(PREFIX)hCenterC2', '0.97029573')")
doAfterIocInit("dbpf('$(PREFIX)vCenterC1', '0.0')")
doAfterIocInit("dbpf('$(PREFIX)vCenterC2', '0.24192189')")
doAfterIocInit("dbpf('$(PREFIX)$(S):hCenterC1', '1.0')")
doAfterIocInit("dbpf('$(PREFIX)$(S):hCenterC2', '0.97029573')")
doAfterIocInit("dbpf('$(PREFIX)$(S):vCenterC1', '0.0')")
doAfterIocInit("dbpf('$(PREFIX)$(S):vCenterC2', '0.24192189')")

########################################################################
# C1 = aperture size when mask angle is 0 degrees
# C1 = aperture size when mask fully open
# C2 = ratio of edge separation to motor lever arm

doAfterIocInit("dbpf('$(PREFIX)hSizeC1', '4.03')")
#Using Motor coord: 0.8889; Using encoder coord: 0.9364
doAfterIocInit("dbpf('$(PREFIX)hSizeC2', '0.9364')")
#Canted: Using Motor coord: 0.8923; Using encoder coord: 1.235
#doAfterIocInit("dbpf('$(PREFIX)$(S):hSizeC1', '4')")
#doAfterIocInit("dbpf('$(PREFIX)$(S):hSizeC2', '1.235')")

doAfterIocInit("dbpf('$(PREFIX)vSizeC1', '3.01')")
#Using Motor coord: 0.3534 or 0.4008; Using encoder coord:
doAfterIocInit("dbpf('$(PREFIX)vSizeC2', '0.4008')")
#HHL: Using Motor coord: 1.335; Using encoder coord: 1.847
doAfterIocInit("dbpf('$(PREFIX)$(S):hSizeC1', '2')")
doAfterIocInit("dbpf('$(PREFIX)$(S):hSizeC2', '1.847')")

#Canted: Using Motor coord: 0.3553; Using encoder coord: 0.621
#doAfterIocInit("dbpf('$(PREFIX)$(S):vSizeC1', '3')")
#doAfterIocInit("dbpf('$(PREFIX)$(S):vSizeC2', '0.621')")

#HHL: Using Motor coord: 0.514; Using encoder coord: 1.098
doAfterIocInit("dbpf('$(PREFIX)$(S):vSizeC1', '2')")
doAfterIocInit("dbpf('$(PREFIX)$(S):vSizeC2', '1.098')")
41 changes: 41 additions & 0 deletions opticsApp/iocsh/vmas.substitutions
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# The new slits (variable mask aperture slits) in the APS Upgrade
# use a combination of stages to create both the horizontal
# and vertical center position of the aperture. Pitch and yaw stages
# determine aperture size.

# transform2D handles the center position
# transformVMAS turns the pitch and yaw stages into vertical and
# horizontal sizes, respectively
#
# hSize - horizontal size pseudomotor
# vSize - vertical size pseudomotor
# hCenter - horizontal position pseudomotor
# vCenter - vertical postion pseudomotor
#


file "$(MOTOR)/motorApp/Db/pseudoMotor.db"
{
pattern
{M, DINP, OUT, RDBL, STOO, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, RRES, PREC, DHLM, DLLM}
{"$(S):hSize", "$(P)$(S):size1Done NPP NMS", "$(P)$(S):hSizeDVAL.VAL PP MS", "$(P)$(S):size1Readback.G NPP NMS", "$(P)$(S):size1Stop PP MS", "$(S) Slits hor size", mm, Pos, 1, .1, .1, 0, 1, .1, .1, 1.0, 6, 100, -100}
{"$(S):vSize", "$(P)$(S):size2Done NPP NMS", "$(P)$(S):vSizeDVAL.VAL PP MS", "$(P)$(S):size2Readback.G NPP NMS", "$(P)$(S):size2Stop PP MS", "$(S) Slits vert size", mm, Pos, 1, .1, .1, 0, 1, .1, .1, 1.0, 6, 100, -100}
{"$(S):hCenter", "$(P)$(S):centerDone NPP NMS", "$(P)$(S):hCenterDVAL.VAL PP MS", "$(P)$(S):centerReadback.G NPP NMS", "$(P)$(S):centerStop PP MS", "$(S) Slits hor center", mm, Pos, 1, .1, .1, 0, 1, .1, .1, 1.0, 6, 100, -100}
{"$(S):vCenter", "$(P)$(S):centerDone NPP NMS", "$(P)$(S):vCenterDVAL.VAL PP MS", "$(P)$(S):centerReadback.H NPP NMS", "$(P)$(S):centerStop PP MS", "$(S) Slits vert center", mm, Pos, 1, .1, .1, 0, 1, .1, .1, 1.0, 6, 100, -100}
}

file "$(OPTICS)/db/transform2D.db"
{
pattern
{T, HOR, VERT, M1DRV, M1RBV, M2DRV, M2RBV, M1STOP, M1DONE, M2STOP, M2DONE, PREC}
{"$(S):center", "$(S):hCenter", "$(S):vCenter", "$(H).VAL", "$(H).RBV", "$(DIA).VAL", "$(DIA).RBV", "$(H).STOP", "$(H).DMOV", "$(DIA).STOP", "$(DIA).DMOV", 8}
}

file "$(OPTICS)/db/transformVMAS.db"
{
pattern
{T, VMAS, M1DRV, M1RBV, M1STOP, M1DONE, PREC}
{"$(S):size1", "$(S):hSize", "$(YAW).VAL", "$(YAW).RBV", "$(YAW).STOP", "$(YAW).DMOV", 8}
{"$(S):size2", "$(S):vSize", "$(PITCH).VAL", "$(PITCH).RBV", "$(PITCH).STOP", "$(PITCH).DMOV", 8}
}

2 changes: 1 addition & 1 deletion opticsApp/op/ui/maskApertureSlit.ui
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
<enum>EPushButton::WidthAndHeight</enum>
</property>
<property name="channel" stdset="0">
<string>25ida:allstop.VAL</string>
<string>$(P)allstop.VAL</string>
</property>
<property name="label">
<string>All Stop</string>
Expand Down
Loading
Loading