diff --git a/iocBoot/iocAny/st.cmd b/iocBoot/iocAny/st.cmd index c1c6d3e..1399fe8 100644 --- a/iocBoot/iocAny/st.cmd +++ b/iocBoot/iocAny/st.cmd @@ -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") diff --git a/opticsApp/iocsh/EXAMPLE_vmas.substitutions b/opticsApp/iocsh/EXAMPLE_vmas.substitutions deleted file mode 100644 index 61fb461..0000000 --- a/opticsApp/iocsh/EXAMPLE_vmas.substitutions +++ /dev/null @@ -1,41 +0,0 @@ -# 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} -{hSize, "$(P)size1Done NPP NMS", "$(P)hSizeDVAL.VAL PP MS", "$(P)size1Readback.G NPP NMS", "$(P)size1Stop PP MS", "Slits hor size", mm, Pos, 1, .1, .1, 0, 1, .1, .1, 1.0, 6, 100, -100} -{vSize, "$(P)size2Done NPP NMS", "$(P)vSizeDVAL.VAL PP MS", "$(P)size2Readback.G NPP NMS", "$(P)size2Stop PP MS", "Slits vert size", mm, Pos, 1, .1, .1, 0, 1, .1, .1, 1.0, 6, 100, -100} -{hCenter, "$(P)centerDone NPP NMS", "$(P)hCenterDVAL.VAL PP MS", "$(P)centerReadback.G NPP NMS", "$(P)centerStop PP MS", "Slits hor center", mm, Pos, 1, .1, .1, 0, 1, .1, .1, 1.0, 6, 100, -100} -{vCenter, "$(P)centerDone NPP NMS", "$(P)vCenterDVAL.VAL PP MS", "$(P)centerReadback.H NPP NMS", "$(P)centerStop PP MS", "Slits vert center", mm, Pos, 1, .1, .1, 0, 1, .1, .1, 1.0, 6, 100, -100} -} - -file "$(TOP)/db/transform2D.db" -{ -pattern -{T, HOR, VERT, M1DRV, M1RBV, M2DRV, M2RBV, M1STOP, M1DONE, M2STOP, M2DONE, PREC} -{center, hCenter, vCenter, "$(HOR).VAL", "$(HOR).RBV", "$(DIA).VAL", "$(DIA).RBV", "$(HOR).STOP", "$(HOR).DMOV", "$(DIA).STOP", "$(DIA).DMOV", 8} -} - -file "$(TOP)/db/transformVMAS.db" -{ -pattern -{T, VMAS, M1DRV, M1RBV, M1STOP, M1DONE, PREC} -{size1, hSize, "$(YAW).VAL", "$(YAW).RBV", "$(YAW).STOP", "$(YAW).DMOV", 8} -{size2, vSize, "$(PITCH).VAL", "$(PITCH).RBV", "$(PITCH).STOP", "$(PITCH).DMOV", 8} -} - diff --git a/opticsApp/iocsh/vmas.iocsh b/opticsApp/iocsh/vmas.iocsh index b87b995..43eb8e4 100644 --- a/opticsApp/iocsh/vmas.iocsh +++ b/opticsApp/iocsh/vmas.iocsh @@ -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) @@ -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')") diff --git a/opticsApp/iocsh/vmas.substitutions b/opticsApp/iocsh/vmas.substitutions new file mode 100644 index 0000000..ef46422 --- /dev/null +++ b/opticsApp/iocsh/vmas.substitutions @@ -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} +} + diff --git a/opticsApp/op/ui/maskApertureSlit.ui b/opticsApp/op/ui/maskApertureSlit.ui index cbbc283..293a419 100644 --- a/opticsApp/op/ui/maskApertureSlit.ui +++ b/opticsApp/op/ui/maskApertureSlit.ui @@ -117,7 +117,7 @@ EPushButton::WidthAndHeight - 25ida:allstop.VAL + $(P)allstop.VAL All Stop diff --git a/opticsApp/op/ui/maskApertureSlit_calibration.ui b/opticsApp/op/ui/maskApertureSlit_calibration.ui index 27a291e..980f71d 100644 --- a/opticsApp/op/ui/maskApertureSlit_calibration.ui +++ b/opticsApp/op/ui/maskApertureSlit_calibration.ui @@ -118,7 +118,7 @@ - 15 + 13 @@ -365,7 +365,7 @@ - 15 + 16 75 true @@ -443,7 +443,7 @@ - 15 + 16 75 true @@ -524,7 +524,7 @@ - 15 + 16 75 true @@ -605,7 +605,7 @@ - 15 + 16 75 true @@ -771,7 +771,7 @@ - 15 + 16 75 true @@ -849,7 +849,7 @@ - 15 + 16 75 true @@ -930,7 +930,7 @@ - 15 + 16 75 true @@ -1096,7 +1096,7 @@ - 15 + 16 75 true @@ -1174,7 +1174,7 @@ - 15 + 16 75 true @@ -1255,7 +1255,7 @@ - 15 + 16 75 true @@ -1434,7 +1434,7 @@ - 15 + 14 75 true @@ -1494,7 +1494,7 @@ - 15 + 16 75 true @@ -1578,7 +1578,7 @@ - 15 + 16 75 true @@ -1716,7 +1716,7 @@ - 15 + 14 75 true @@ -1776,7 +1776,7 @@ - 15 + 16 75 true @@ -1860,7 +1860,7 @@ - 15 + 16 75 true @@ -2093,7 +2093,7 @@ - 17 + 19 @@ -2103,7 +2103,7 @@ Qt::AlignCenter - + 200 @@ -2203,14 +2203,14 @@ - + 0 0 - 18 + 20 75 true @@ -2242,9 +2242,15 @@ + + + 0 + 0 + + - 35 + 33 @@ -2335,14 +2341,14 @@ - + 0 0 - 15 + 16 75 true @@ -2416,14 +2422,14 @@ - + 0 0 - 15 + 16 75 true @@ -2500,14 +2506,14 @@ - + 0 0 - 15 + 16 75 true @@ -2583,7 +2589,7 @@ - + 0 0 @@ -2674,14 +2680,14 @@ - + 0 0 - 15 + 16 75 true @@ -2755,14 +2761,14 @@ - + 0 0 - 15 + 16 75 true @@ -2839,14 +2845,14 @@ - + 0 0 - 15 + 16 75 true @@ -2923,9 +2929,15 @@ + + + 0 + 0 + + - 35 + 33 @@ -2935,7 +2947,7 @@ - + 200 @@ -3035,14 +3047,14 @@ - + 0 0 - 18 + 20 75 true @@ -3074,6 +3086,12 @@ + + + 0 + 0 + + ( @@ -3162,14 +3180,14 @@ - + 0 0 - 15 + 16 75 true @@ -3243,14 +3261,14 @@ - + 0 0 - 15 + 16 75 true @@ -3327,14 +3345,14 @@ - + 0 0 - 15 + 16 75 true @@ -3410,7 +3428,7 @@ - + 0 0 @@ -3501,14 +3519,14 @@ - + 0 0 - 15 + 16 75 true @@ -3582,14 +3600,14 @@ - + 0 0 - 15 + 16 75 true @@ -3666,14 +3684,14 @@ - + 0 0 - 15 + 16 75 true @@ -3750,6 +3768,12 @@ + + + 0 + 0 + + ) @@ -3850,7 +3874,7 @@ - 15 + 16 75 true @@ -3928,7 +3952,7 @@ - 15 + 16 75 true @@ -4009,7 +4033,7 @@ - 15 + 16 75 true @@ -4090,7 +4114,7 @@ - 15 + 16 75 true