record(motor, "$(U):MOTR") { field(DESC, "$(MAD)") field(DTYP, "asynMotor") field(DIR, "Pos") field(VELO, "10000") field(VBAS, "1000") field(VMAX, "30000") field(ACCL, "0.02") field(BDST, "0") field(OUT, "@asyn($(ASYN_MOTOR),0)") field(MRES, "1") field(ERES, "1") field(PREC, "1") field(EGU, "um") field(DHLM, "0") field(DLLM, "0") field(UEIP, "1") field(TWV, "1") field(FOFF, "Frozen") field(OFF, "0") field(URIP, "0") field(RRES, "1") field(RTRY, "0") field(RDBL, "") field(RDBD, "1") field(DLY, "0") field(ASG, "$(ASG)") field(SCAN, "Passive") info(autosaveFields_pass0, "VAL") info(autosaveFields, "DIR DESC VMAX VBAS ACCL VELO MRES ERES PREC EGU DHLM DLLM DLY TWV RDBL RRES RTRY URIP UEIP FOFF OFF FRAC JVEL JAR HVEL HLM LLM") } ########################################################################## # Description: # This database gets the digital input status from the Aerotech controller # and splits it into two MBBI records. # This database also gets axis specifc status and fault pv`s # Disableallpvs PV can be used to disable all the pv`s for the device # # Macros: # U - Device prefix # PORT - Aerotech asyn port # AXIS - Aerotech axis identifier # SCAN - Desired scan rate # MAD - mad device name ########################################################################## record(ai, "$(U):DISTAT") { field(DESC, "digital inputs") field(PINI, "YES") field(DTYP, "stream") field(INP, "@aerotech.proto getDINall(@0) $(ASYN)") field(SCAN, "1 second") } record(mbbiDirect, "$(U):DISTATS1") { field(DESC, "Digital input lower bits") field(DTYP, "Raw Soft Channel") field(INP, "$(U):DISTAT CP MS") } record(mbbiDirect, "$(U):DISTATS2") { field(DESC, "Digital input higher bits") field(DTYP, "Raw Soft Channel") field(INP, "$(U):DISTAT CP MS") field(SHFT, "16") } record(ai, "$(U):STAT") { field(DESC, "axis status") field(PINI, "YES") field(DTYP, "stream") field(INP, "@aerotech.proto axisStatus(@0) $(ASYN)") field(SCAN, "1 second") } record(ai, "$(U):FAULT") { field(DESC, "axis fault") field(PINI, "YES") field(DTYP, "stream") field(INP, "@aerotech.proto axisFault(@0) $(ASYN)") field(SCAN, "1 second") } record(ai, "$(U):AUTOHOMETRIGFAULT") { field(DESC, "fault to trigger autohome") field(DTYP, "stream") field(INP, "@aerotech.proto getIGLOBAL(60) $(ASYN)") field(PINI, "YES") field(SCAN,"1 second") } record(mbbiDirect, "$(U):AUTOHOMETRIGFAULTS1") { field(DESC, "fault lower bits") field(DTYP, "Raw Soft Channel") field(INP, "$(U):AUTOHOMETRIGFAULT CP MS") } record(mbbiDirect, "$(U):AUTOHOMETRIGFAULTS2") { field(DESC, "fault higher bits") field(DTYP, "Raw Soft Channel") field(INP, "$(U):AUTOHOMETRIGFAULT CP MS") field(SHFT, "16") } record(mbbiDirect, "$(U):STATS1") { field(DESC, "status lower bits") field(DTYP, "Raw Soft Channel") field(INP, "$(U):STAT CP MS") field(NOBT, "16") } record(mbbiDirect, "$(U):STATS2") { field(DESC, "status higher bits") field(DTYP, "Raw Soft Channel") field(INP, "$(U):STAT CP MS") field(SHFT, "16") field(NOBT, "16") } record(mbbiDirect, "$(U):FAULTS1") { field(DESC, "fault lower bits") field(DTYP, "Raw Soft Channel") field(INP, "$(U):FAULT CP MS") field(NOBT, "16") } record(mbbiDirect, "$(U):FAULTS2") { field(DESC, "fault higher bits") field(DTYP, "Raw Soft Channel") field(INP, "$(U):FAULT CP MS") field(SHFT, "16") field(NOBT, "16") } record(bi, "$(U):ENABLEDSTAT") { field(DESC, "Axis enabled") field(INP, "$(U):STATS1.B0 CP MS") field(ZNAM, "Disabled") field(ONAM, "Enabled") } record(bi, "$(U):HOMEDSTAT") { field(DESC, "Axis homed") field(INP, "$(U):STATS1.B1 CP MS") field(ZNAM, "Not Homed") field(ONAM, "Homed") field(ZSV, "MAJOR") field(OSV, "NO_ALARM") } # If both limit switch show as active record(calcout, "$(U):CABLESTAT_CALC") { field(DESC, "Motor Cable Status") field(INPA, "$(U):STATS2.B6 CP MS") field(INPB, "$(U):STATS2.B7 CP MS") field(CALC, "(A&&B)") field(FLNK, "$(U):CABLESTAT") } record(bo, "$(U):CABLESTAT") { field(DESC, "Motor Cable Status") field(DOL, "$(U):CABLESTAT_CALC MS") field(ONAM, "Motor cable disconnected") field(ZNAM, "OK") field(ZSV, "MAJOR") field(OSV, "NO_ALARM") } record(bi, "$(U):MOVEACTIVE") { field(DESC, "Move active") field(INP, "$(U):STATS1.B3 CP MS") field(ZNAM, "Not moving") field(ONAM, "Moving") field(OSV, "MINOR") field(ZSV, "NO_ALARM") } # When Move Active PV transitions to 0. # Then, Move complete. # Then count up. record(calcout, "$(U):CALC_COUNTER1") { field(DESC, "Check if moving") field(CALC, "A") field(INPA, "$(U):MOVEACTIVE CP") field(OUT, "$(U):USECYCLES.PROC") # When Transition to Zero field(OOPT, "4") field(ASG, "Internal") } # Store device use in counts. # This record counts up 1 after every collimator use record(calc, "$(U):USECYCLES") { field(DESC, "Counts the times collimator is used") field(CALC, "VAL+1") field(HIHI, "900") field(HIGH, "800") field(HHSV, "MAJOR") field(HSV, "MINOR") info(autosaveFields, "VAL") } # When Move Active PV transitions to 0. # Then move is complete # Then start sequence to delay by 8 seconds # Set Done move Bit after 8 seconds # Done to compensate for slow LVDT! # Kludge record(calcout, "$(U):CALC_COUNTER2") { field(DESC, "Check if moving") field(CALC, "A") field(INPA, "$(U):MOVEACTIVE CP") field(OUT, "$(U):DONEMOVE_SEQ.PROC") # When Transition to Zero field(OOPT, "4") field(ASG, "Internal") field(FLNK, "$(U):DONEMOVE_SEQ") } record(seq, "$(U):DONEMOVE_SEQ") { field(DESC, "Done Move") field(DLY1, "8") field(DOL1, "0") field(LNK1, "$(U):DONEMOVE CA") field(ASG, "Internal") } record(bi, "$(U):DONEMOVE") { field(DESC, "Move active") field(ZNAM, "Move complete") field(ONAM, "Move active") } # When Move Active transitions to 1. # Then device active # Then set DONEMOVEPV appropriately record(calcout, "$(U):CALC_COUNTER3") { field(DESC, "Check if moving") field(CALC, "A") field(INPA, "$(U):MOVEACTIVE CP") field(OUT, "$(U):DONEMOVE CA") # When Transition to One field(OOPT, "5") field(ASG, "Internal") } record(stringout, "$(U):FAULTACK") { field(DESC, "Ack fault on axis") field(DTYP, "stream") field(OUT, "@aerotech.proto axisFaultAck(@0) $(ASYN)") } record(stringout, "$(U):ENABLE") { field(DESC, "Enable axis") field(DTYP, "stream") field(OUT, "@aerotech.proto axisEnable(@0) $(ASYN)") } record(stringout, "$(U):ABORT") { field(DESC, "Abort axis") field(DTYP, "stream") field(OUT, "@aerotech.proto axisAbort(@0) $(ASYN)") } record(stringout, "$(U):DISABLE") { field(DESC, "Disable axis") field(DTYP, "stream") field(OUT, "@aerotech.proto axisDisable(@0) $(ASYN)") } record(stringout, "$(U):HOME") { field(DESC, "Home axis") field(DTYP, "stream") field(OUT, "@aerotech.proto axisHome(@0) $(ASYN)") } record(ai, "$(U):IDES") { field(DESC, "axis current") field(PINI, "YES") field(DTYP, "stream") field(INP, "@aerotech.proto getCur(@0) $(ASYN)") field(SCAN, "1 second") field(PREC, 2) } record(ai, "$(U):VFBK") { field(DESC, "axis velocity") field(PINI, "YES") field(DTYP, "stream") field(INP, "@aerotech.proto getVelo(@0) $(ASYN)") field(SCAN, "1 second") field(PREC, 2) } record(ai, "$(U):EXTPOSN") { field(DESC, "Aux Encoder Position") field(PINI, "YES") field(DTYP, "stream") field(INP, "@aerotech.proto extPos(@0) $(ASYN)") field(SCAN, "1 second") field(PREC, 3) field(LINR, "SLOPE") info(autosaveFields, "ESLO EOFF EGU") } record(ai, "$(U):EncOffset") { field(DESC, "$(MAD) Encoder offset") field(DTYP, "stream") field(INP, "@aerotech.proto getEncOff(@0) $(ASYN) ") field(PINI, "YES") field(PREC, "3") field(EGU, "mm") } # # Record set Average Current Threshold to controller # record(ao, "$(U):SET_AVG_CURRENT") { field(DESC, "Set avg current to AB") field(DTYP, "stream") field(EGU, "A") field(OUT, "@aerotech.proto setAvgCurrent(@0) $(ASYN)") } # # RBV for Average Current Threshold # record(ai, "$(U):GET_AVG_CURRENT") { field(DESC, "RBV for avg current") field(DTYP, "stream") field(INP, "@aerotech.proto getAvgCurrent(@0) $(ASYN)") field(EGU, "A") field(PINI, "YES") field(SCAN,"1 second") } # # Record set Max Current Clamp to controller # record(ao, "$(U):SET_MAX_CURRENT") { field(DESC, "Set Max Current Clamp") field(DTYP, "stream") field(EGU, "A") field(OUT, "@aerotech.proto setMaxCurrentClamp(@0) $(ASYN)") } # # RBV for Max Current Clamp # record(ai, "$(U):GET_MAX_CURRENT") { field(DESC, "RBV for Max Current Clamp") field(DTYP, "stream") field(INP, "@aerotech.proto getMaxCurrentClamp(@0) $(ASYN)") field(EGU, "A") field(PINI, "YES") field(SCAN,"1 second") } # # Commit Parameters after set parameters # record(stringout, "$(U):COMMITPARAM") { field(DESC, "Commit Parameters") field(DTYP, "stream") field(OUT, "@aerotech.proto commitParameters $(ASYN)") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP0IN0") { field(DESC, "Port 0 Input 0") field(INP, "$(U):DISTATS0.B0 CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP0IN1") { field(DESC, "Port 0 Input 1") field(INP, "$(U):DISTATS0.B1 CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP0IN2") { field(DESC, "Port 0 Input 2") field(INP, "$(U):DISTATS0.B2 CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP0IN3") { field(DESC, "Port 0 Input 3") field(INP, "$(U):DISTATS0.B3 CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP0IN4") { field(DESC, "Port 0 Input 4") field(INP, "$(U):DISTATS0.B4 CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP0IN5") { field(DESC, "Port 0 Input 5") field(INP, "$(U):DISTATS0.B5 CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP1IN0") { field(DESC, "Port 1 Input 0") field(INP, "$(U):DISTATS0.B8 CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP1IN1") { field(DESC, "Port 1 Input 1") field(INP, "$(U):DISTATS0.B9 CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP1IN2") { field(DESC, "Port 1 Input 2") field(INP, "$(U):DISTATS0.BA CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP1IN3") { field(DESC, "Port 1 Input 3") field(INP, "$(U):DISTATS0.BB CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP1IN4") { field(DESC, "Port 1 Input 4") field(INP, "$(U):DISTATS0.BC CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP1IN5") { field(DESC, "Port 1 Input 5") field(INP, "$(U):DISTATS0.BD CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP1IN6") { field(DESC, "Port 1 Input 6") field(INP, "$(U):DISTATS0.BE CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP1IN7") { field(DESC, "Port 1 Input 7") field(INP, "$(U):DISTATS0.BF CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP2IN0") { field(DESC, "Port 2 Input 0") field(INP, "$(U):DISTATS1.B0 CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP2IN1") { field(DESC, "Port 2 Input 1") field(INP, "$(U):DISTATS1.B1 CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP2IN2") { field(DESC, "Port 2 Input 2") field(INP, "$(U):DISTATS1.B2 CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP2IN3") { field(DESC, "Port 2 Input 3") field(INP, "$(U):DISTATS1.B3 CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP2IN4") { field(DESC, "Port 2 Input 4") field(INP, "$(U):DISTATS1.B4 CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP2IN5") { field(DESC, "Port 2 Input 5") field(INP, "$(U):DISTATS1.B5 CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP2IN6") { field(DESC, "Port 2 Input 6") field(INP, "$(U):DISTATS1.B6 CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } # Borrowed # File: xleap_din_bit.template # Author: Wayne Lewis # Date: 2017-05-08 # # Description: # This database is the template for the generic Aerotech # digital input PVs. # # Macros: # U - Device prefix # Port - Aerotech input port number (port is Aerotech terminology) # In . - Input number # Word - MBBI word (from aerotech_din.db) # Bit - Bit number from word record(bi, "$(U):DIP2IN7") { field(DESC, "Port 2 Input 7") field(INP, "$(U):DISTATS1.B7 CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } record(bo, "$(U):MOTR_ALRM") { field(DESC, "In Beam Alarm") field(DOL, "$(U):MOTRERROR MS") field(OMSL, "closed_loop") field(ONAM, "IN_BEAM") field(ZNAM, "OUT_OF_BEAM") field(OSV, "MAJOR") field(ZSV, "NO_ALARM") } record(calcout, "$(U):MOTRERROR") { field(CALC, "(A>=B)?1:0") field(FLNK, "$(U):MOTR_ALRM") field(SCAN, "1 second") field(INPA, "$(U):MOTR.RBV NPP MS") field(INPB, "3000") field(INPC, "0") field(HIGH, "1") field(LOW, "0") field(HSV, "MAJOR") field(LSV, "NO_ALARM") info(autosaveFields, "CALC INPA INPB INPC") } # Init sequence record. Initialized by pressing :MOTR_INIT button. # The init_seq, # a) turns off and then turns on the motor within 0.5s # c) pushes 0 to home_check disable field and then homes the motor after 0.5s record(bo, "$(U):MOTR_INIT") { field(DESC, "Init or Re Init") field(ZNAM, "Standby") field(ONAM, "Initialize ") } record(bo, "$(U):MOTR_INIT_DBG") { field(DTYP, "Raw Soft Channel") field(DESC, "Init debug flag") field(VAL, "0") field(ZNAM, "Debug Off") field(ONAM, "Debug On") } # Error acknowledge command initiates acknowledge sequence # For linmot, disbale and then enable the motor to clear the error. record(bo, "$(U):MOTR_ERR_ACK_CMD") { field(DESC, "Error Ack CMD") field(FLNK, "$(U):FAULTACK") field(ZNAM, "NO ACK") field(ONAM, "ACK") } record(seq, "$(U):ACK_ERR_SEQ") { field(DESC, "Acknowledge error") field(DLY1, "2") field(DOL1, "0") field(LNK1, "$(U):MOTR.CNEN") field(DOL2, "1") field(LNK2, "$(U):MOTR.CNEN") field(ASG, "Internal") } # Motor switch on command # Motor can be turned on by # a) MOTR.CNEN and MOTR_SWITCH_ON_CMD # To ensure that both the commands work and not counter one another, calc records used # and both the PV`s should be updated if one does. record(bo, "$(U):MOTR_SWITCH_ON_CMD") { field(DESC, "Motor switch on CMD") field(ZNAM, "OFF") field(ONAM, "ON") } record(calcout, "$(U):CALC_ENABLE") { field(DESC, "Check ON cmd is pressed") field(CALC, "(A#B)?1:0") field(INPA, "$(U):MOTR_SWITCH_ON_CMD CP") field(INPB, "$(U):MOTR.CNEN") field(OUT, "$(U):ENABLE_BO.PROC") field(OOPT, "When Non-zero") field(ASG, "Internal") } record(bo, "$(U):ENABLE_BO") { field(DESC, "copies switch on to cnen") field(DOL, "$(U):MOTR_SWITCH_ON_CMD") field(OUT, "$(U):MOTR.CNEN PP") field(OMSL, "closed_loop") field(ASG, "Internal") } record(calcout, "$(U):CALC_CNEN") { field(DESC, "Check CNEN is pressed") field(CALC, "(A#B)?1:0") field(INPA, "$(U):MOTR.CNEN CP") field(INPB, "$(U):MOTR_SWITCH_ON_CMD") field(OUT, "$(U):CNEN_BO.PROC") field(OOPT, "When Non-zero") field(ASG, "Internal") } record(bo, "$(U):CNEN_BO") { field(DESC, "copies switch on to bo") field(DOL, "$(U):MOTR.CNEN") field(OUT, "$(U):MOTR_SWITCH_ON_CMD PP") field(OMSL, "closed_loop") field(ASG, "Internal") } # Motor home command # Motor can be homed by # a) MOTR.HOMR , HOML and MOTR_HOME_CMD # To ensure that both the commands work and not counter one another, calc records used # and both the PV`s should be updated if one does. record(bo, "$(U):MOTR_HOME_CMD") { field(DESC, "MOtor Home CMD") field(ZNAM, "OFF") field(ONAM, "HOME") } record(calcout, "$(U):CALC_HCMD") { field(DESC, "Check HOME cmd is pressed") field(CALC, "(A#B)?1:0") field(INPA, "$(U):MOTR_HOME_CMD CP") field(INPB, "$(U):MOTR.HOMR") field(OUT, "$(U):HCMD_BO.PROC") field(OOPT, "When Non-zero") field(ASG, "Internal") } record(bo, "$(U):HCMD_BO") { field(DESC, "copies home cmd to homr_bo") field(DOL, "$(U):MOTR_HOME_CMD") field(OUT, "$(U):MOTR.HOMR PP") field(OMSL, "closed_loop") field(ASG, "Internal") } record(calcout, "$(U):CALC_HOMR") { field(DESC, "Check HOMR is pressed") field(CALC, "(A#B)?1:0") field(INPA, "$(U):MOTR.HOMR CP") field(INPB, "$(U):MOTR_HOME_CMD") field(OUT, "$(U):HOMR_BO.PROC") field(OOPT, "When Non-zero") field(ASG, "Internal") } record(bo, "$(U):HOMR_BO") { field(DESC, "copies HOMR to HCMD_bo") field(DOL, "$(U):MOTR.HOMR") field(OUT, "$(U):MOTR_HOME_CMD PP") field(OMSL, "closed_loop") field(ASG, "Internal") } # Retract pv inititates the retract sequence # Retract equence homes and disables the motor record(bo, "$(U):MOTR_RETRACT") { field(DESC, "Motor Home and Disable") field(ZNAM, "Standby") field(ONAM, "Retract") } # As counter is incremental, reset counter sequence is used. # This sequence check`s if motor is homed and then resets the counter value. # To check if motor is homed, motion active status should transition to zero. # If motor record readback and external encoder readback are different # Initiates a sequence which updates teh motor readback to match encoder # Also make sure the retract position is higher than lower limit # Ensure the links are passive process. # No need for passive process for POSN. It updates as I/O interrupt record(bo, "$(U):CORRECT"){ field(DESC, "Update POSN value into MOTR value") field(FLNK, "$(U):CORRECT_SEQ") field(ZNAM, "No Update") field(ONAM, "Updating") } record(calcout, "$(U):CORRECT_CALC") { field(DESC, "Diff btw POSN and MOTR.VAL") field(CALC, "A-B+C") field(INPA, "$(U):POSN") field(INPB, "$(U):MOTR.RBV PP") field(INPC, "$(U):MOTR.OFF PP") field(ASG, "Internal") } record(seq, "$(U):CORRECT_SEQ") { field(DESC, "Update POSN value into MOTR value") field(DOL1, "1") field(LNK1, "$(U):MOTR.SET PP") field(DOL2, "$(U):CORRECT_CALC.VAL PP") field(LNK2, "$(U):MOTR.OFF") field(DLY2, "1") field(DOL3, "0") field(LNK3, "$(U):MOTR.SET PP") field(DLY3, "1") field(DLY4, "1") field(DOL4, "$(U):MOTR_RETRACT_POS_CALC PP") field(LNK4, "$(U):MOTR_RETRACT_POS.VAL PP") field(DLY5, "1") field(DOL5, "1") field(LNK5, "$(U):CORRECT_STS PP") field(ASG, "Internal") } record(calcout, "$(U):MOTR_RETRACT_POS_CALC") { field(DESC, "Diff btw lower limit and retract pos") field(CALC, "A+100") field(INPA, "$(U):MOTR.LLM PP") field(ASG, "Internal") } record(bi, "$(U):CORRECT_STS") { field(DESC, "readback correct status") field(ZNAM, "No Update") field(ONAM, "Readback corrected") } # Store control architecture record(bo, "$(U):ARCHITECTURE") { field(DESC, "set control architecture") field(SCAN, "Passive") field(ZNAM, "ATCA") field(ONAM, "APCI") field(VAL, "1") info(autosaveFields, "VAL") } # Wirescanner safety tasks record(stringout, "$(U):TASK1START") { field(DESC, "Aerotech task restart") field(DTYP, "stream") field(OUT, "@aerotech.proto taskWsManagerRestart $(ASYN)") } record(stringout, "$(U):TASK4START") { field(DESC, "Aerotech task restart") field(DTYP, "stream") field(OUT, "@aerotech.proto taskFaultRestart $(ASYN)") } record(stringout, "$(U):TASK3START") { field(DESC, "Aerotech task restart") field(DTYP, "stream") field(OUT, "@aerotech.proto taskRecoveryRestart $(ASYN)") } # File: wirescanner_status.db # # Description: # This database is used to get the status PV on EDM # Homes and encoder # It uses the motor record to get PV`s used used by HLA # # Macros: # P - Controller prefix # M - motor record(bi, "$(U):MOTR_ENABLED_STS") { field(DESC, "Enabled status") field(ZNAM, "Not Ready for WireScan") field(ONAM, "Ready for wirescan") } record(calcout, "$(U):CALC_ENABLED_STS") { field(DESC, "Check if enabled") field(CALC, "A&&B&&C") field(INPA, "$(U):MOTR_INIT_STS CP") field(INPB, "$(U):MOTR_ON_STS CP") field(INPC, "$(U):MOTR_HOMED_STS CP") field(OUT, "$(U):MOTR_ENABLED_STS PP") } record(bi, "$(U):MOTR_INIT_STS") { field(DESC, "Init status") field(ZNAM, "Not Initialized") field(ONAM, "Initialized") } record(bi, "$(U):MOTR_ON_STS") { field(DESC, "Torque status") field(INP, "$(U):STATS1.B0 CP") field(ZNAM, "Torque OFF") field(ONAM, "Torque ON") } record(bi, "$(U):MOTR_HOMED_STS") { field(DESC, "Homed") field(INP, "$(U):STATS1.B1 CP") field(ZNAM, "Not Homed") field(ONAM, "Homed") } record(bi, "$(U):MOTR_MOTION_ACT_STS") { field(DESC, "Motion Active") field(INP, "$(U):STATS1.B3 CP") field(ZNAM, "Not Moving") field(ONAM, "Moving") } record(bi, "$(U):MOTR_ERROR_STS") { field(DESC, "Error Status") field(INP, "$(U):AXIS_ERROR_CALC CP") field(ZNAM, "No Error") field(ONAM, "ERROR") field(ZSV, "NO_ALARM") field(OSV, "MAJOR") } record(calcout, "$(U):AXIS_ERROR_CALC") { field(DESC, "Check if Axis at fault") field(CALC, "(A>0)?1:0") field(INPA, "$(U):FAULT CP") field(OUT, "$(U):MOTR_ERROR_STS PP") field(ASG, "Internal") } # Get the home position from the motor record lower limit record(ao, "$(U):MOTR_RETRACT_POS") { field(ASG, "Internal") field(DESC, "Motor retract position") field(VAL, "0") info(autosaveFields, "VAL") } record(ao, "$(U):MOTR_TIMEOUT") { field(DTYP, "Raw Soft Channel") field(DESC, "Wait time before homing") field(VAL, "30") field(EGU, "sec") info(autosaveFields, "VAL") } record(ao, "$(U):MOTR_LTIMEOUT") { field(DTYP, "Raw Soft Channel") field(DESC, "Wait time at home to turn off") field(VAL, "30") field(EGU, "sec") info(autosaveFields, "VAL") } record(bo, "$(U):MOTR_TIMEOUTEN") { field(DTYP, "Raw Soft Channel") field(DESC, "Enable timeout: retract motor") field(ZNAM, "Disabled") field(ONAM, "Enabled") info(autosaveFields, "VAL") } record(bo, "$(U):MOTR_TIMEOUT_DBG") { field(DTYP, "Raw Soft Channel") field(DESC, "Timeout debug flag") field(VAL, "0") field(ZNAM, "Debug Off") field(ONAM, "Debug On") } # Wire Scanner Database Entries for $(U) # # # Start or Stop Scanning $(U) # record(bo, "$(U):STARTSCAN") { field(DESC, "Start Wire Scan with $(MAD)") field(ASG, "WIREUSER") field(VAL, "0") field(SCAN, "Passive") field(PINI, "YES") field(ONAM, "Scanning") field(ZNAM, "Scan Stopped") } # # Normally scanning moves from inner position to outer # position, against the force of the vacuum. If this # PV is set to true, then $(U) # will scan from the outer to inner position, moving # with the force of the vacuum. The scanner is expected # to provide best results when moving against the force # of the vacuum. # record(bo, "$(U):SCANTOCENTER") { field(DESC, "$(MAD) will scan inwards") field(ASG, "WIREUSER") field(VAL, "0") field(SCAN, "Passive") field(PINI, "YES") field(ONAM, "Scan to Center") field(ZNAM, "Scan from Center") info(autosaveFields, "VAL") } # # Angle of $(U) from beam's point of view # record(ao, "$(U):INSTALLANGLE") { field(DESC, "Orientation of $(MAD)") field(ASG, "WIREADMIN") field(EGU, "degrees") field(VAL, "-45") field(SCAN, "Passive") field(PINI, "YES") info(autosaveFields, "VAL") } # # Repeatability of $(U) when doing a wire scan. # If the motion returns to the original LVDT-measured position, within # POSNTHRESH um, the scan is considered successful. If not, then # RETRIES number of scans (in total) will be attempted. # record(ao, "$(U):POSNTHRESH") { field(DESC, "$(MAD) Position Deadband") field(ASG, "WIREUSER") field(EGU, "um") field(VAL, "1000") field(SCAN, "Passive") field(PINI, "YES") info(autosaveFields, "VAL") } # # Calculated time for wire scan; actual time that wire is spent moving. # record(ao, "$(U):SCANTIME") { field(DESC, "$(MAD) Calc. Scan Time") field(ASG, "WIREUSER") field(EGU, "seconds") field(VAL, "0") field(SCAN, "Passive") field(PINI, "YES") } # # The most recent scan $(U) # was considered to have successfully moved. # record(mbbo, "$(U):HADSUCCESS") { field(DESC, "$(MAD) Scan Successful") field(ASG, "$WIREUSER") field(OMSL, "supervisory") field(VAL, "0") field(SCAN, "Passive") field(DTYP, "Raw Soft Channel") field(NOBT, "32") field(ZRST, "No Scan Attempt") field(ZRVL, "0") field(ONST, "Scan Successful") field(ONVL, "1") field(TWST, "Scan Failed") field(TWVL, "2") field(PINI, "YES") } # # The total number of scans to be done by $(U) # for a given scan request; if the scanner motion does not return # to POSNTHRESH um of where it started, then a retry is made. # record(ao, "$(U):RETRIES") { field(DESC, "$(MAD) Retries to Do") field(ASG, "WIREUSER") field(VAL, "0") field(SCAN, "Passive") field(PINI, "YES") info(autosaveFields, "VAL") } # # The current retry attempt of $(U) to # perform a scan. Up to RETRIES attempts will be made, and this # value indicates which attempt is currently underway. # record(ao, "$(U):CURRENTRETRY") { field(DESC, "$(MAD) Current Retry Count") field(ASG, "WIREUSER") field(VAL, "0") field(SCAN, "Passive") field(PINI, "YES") } # # Does $(U) Have a Working X Wire? # record(bo, "$(U):HASXWIRE") { field(DESC, "Is X Wire Avail. on $(MAD)") field(ASG, "WIREADMIN") field(VAL, "1") field(SCAN, "Passive") field(PINI, "YES") field(ONAM, "X Wire is Usable") field(ZNAM, "X Wire NOT Usable") info(autosaveFields, "VAL") } # # Will the X Wire from $(U) be Used? # record(bo, "$(U):USEXWIRE") { field(DESC, "Is X Wire Used on $(MAD)") field(ASG, "WIREUSER") field(VAL, "1") field(SCAN, "Passive") field(PINI, "YES") field(ONAM, "X Wire Selected") field(ZNAM, "X Wire NOT Selected") info(autosaveFields, "VAL") } # # Distance of $(U) X Wire from beam centerline, # when motor is at the 0 position. The U Wire intersecting with the # beam centerline is defined as 0. # record(ao, "$(U):XWIREOFFSET") { field(DESC, "Offset of $(MAD) X Wire") field(ASG, "WIREADMIN") field(EGU, "um") field(VAL, "25000") field(SCAN, "Passive") field(PINI, "YES") info(autosaveFields, "VAL") } # # The location at which the X Wire can be positioned to # start a scan in pull-through-beam mode on $(U) # record(longout, "$(U):XWIREOUTER") { field(DESC, "Outer X on $(MAD)") field(ASG, "WIREUSER") field(VAL, "27000") field(EGU, "um") field(SCAN, "Passive") field(PINI, "YES") field(DRVH, "46000") field(DRVL, "100") field(HOPR, "46000") field(LOPR, "100") info(autosaveFields, "VAL") } # # The location at which the X Wire can be positioned to # start a scan in push-through-beam mode on $(U) # record(longout, "$(U):XWIREINNER") { field(DESC, "Inner X on $(MAD)") field(ASG, "WIREUSER") field(VAL, "23000") field(EGU, "um") field(SCAN, "Passive") field(PINI, "YES") field(DRVH, "46000") field(DRVL, "100") field(HOPR, "46000") field(LOPR, "100") info(autosaveFields, "VAL") } # # Does $(U) Have a Working Y Wire? # record(bo, "$(U):HASYWIRE") { field(DESC, "Is Y Wire Avail. on $(MAD)") field(ASG, "WIREADMIN") field(VAL, "1") field(SCAN, "Passive") field(PINI, "YES") field(ONAM, "Y Wire is Usable") field(ZNAM, "Y Wire NOT Usable") info(autosaveFields, "VAL") } # # Will the Y Wire from $(U) be Used? # record(bo, "$(U):USEYWIRE") { field(DESC, "Is Y Wire Used on $(MAD)") field(ASG, "WIREUSER") field(VAL, "0") field(SCAN, "Passive") field(PINI, "YES") field(ONAM, "Y Wire Selected") field(ZNAM, "Y Wire NOT Selected") info(autosaveFields, "VAL") } # # Distance of $(U) Y Wire from beam centerline, # when motor is at the 0 position. The U Wire intersecting with the # beam centerline is defined as 0. # record(ao, "$(U):YWIREOFFSET") { field(DESC, "Offset of $(MAD) Y Wire") field(ASG, "WIREADMIN") field(EGU, "um") field(VAL, "36200") field(SCAN, "Passive") field(PINI, "YES") info(autosaveFields, "VAL") } # # The location at which the Y Wire can be positioned to # start a scan in pull-through-beam mode on $(U) # record(longout, "$(U):YWIREOUTER") { field(DESC, "Outer Y on $(MAD)") field(ASG, "WIREUSER") field(VAL, "38200") field(EGU, "um") field(SCAN, "Passive") field(PINI, "YES") field(DRVH, "46000") field(DRVL, "100") field(HOPR, "46000") field(LOPR, "100") info(autosaveFields, "VAL") } # # The location at which the Y Wire can be positioned to # start a scan in push-through-beam mode on $(U) # record(longout, "$(U):YWIREINNER") { field(DESC, "Inner Y on $(MAD)") field(ASG, "WIREUSER") field(VAL, "34200") field(EGU, "um") field(SCAN, "Passive") field(PINI, "YES") field(DRVH, "46000") field(DRVL, "100") field(HOPR, "46000") field(LOPR, "100") info(autosaveFields, "VAL") } # Does $(U) Have a Working U (diagonal) Wire? # record(bo, "$(U):HASUWIRE") { field(DESC, "Is U Wire Avail. on $(MAD)") field(ASG, "WIREADMIN") field(VAL, "1") field(SCAN, "Passive") field(PINI, "YES") field(ONAM, "U Wire is Usable") field(ZNAM, "U Wire NOT Usable") info(autosaveFields, "VAL") } # # Will the U Wire from $(U) be Used? # record(bo, "$(U):USEUWIRE") { field(DESC, "Is U Wire Used on $(MAD)") field(ASG, "WIREUSER") field(VAL, "0") field(SCAN, "Passive") field(PINI, "YES") field(ONAM, "U Wire Selected") field(ZNAM, "U Wire NOT Selected") info(autosaveFields, "VAL") } # # Distance of $(U) U Wire from beam centerline, # when motor is at the 0 position. The U Wire intersecting with the # beam centerline is defined as 0. # record(ao, "$(U):UWIREOFFSET") { field(DESC, "Offset of $(MAD) U Wire") field(ASG, "WIREADMIN") field(EGU, "um") field(VAL, "0") field(SCAN, "Passive") field(PINI, "YES") info(autosaveFields, "VAL") } # # The location at which the U Wire can be positioned to # start a scan in pull-through-beam mode on $(U) # record(longout, "$(U):UWIREOUTER") { field(DESC, "Outer U on $(MAD)") field(ASG, "WIREUSER") field(VAL, "19700") field(EGU, "um") field(SCAN, "Passive") field(PINI, "YES") field(DRVH, "46000") field(DRVL, "100") field(HOPR, "46000") field(LOPR, "100") info(autosaveFields, "VAL") } # # The location at which the U Wire can be positioned to # start a scan in push-through-beam mode on $(U) # record(longout, "$(U):UWIREINNER") { field(DESC, "Inner U on $(MAD)") field(ASG, "WIREUSER") field(VAL, "15700") field(EGU, "um") field(SCAN, "Passive") field(PINI, "YES") field(DRVH, "46000") field(DRVL, "100") field(HOPR, "46000") field(LOPR, "100") info(autosaveFields, "VAL") } # # The position at which the current scan will start, set to # the value of :XWIREOUTER, :YWIREOUTER or UWIREOUTER if in # pull-through-beam mode, or set to :XWIREINNER, :YWIREINNER # or UWIREINNER if in push-through-beam mode, for $(U) # record(ao, "$(U):SCANPOSSTART") { field(DESC, "$(MAD) Wire Start Pos") field(ASG, "WIREUSER") field(VAL, "23000") field(EGU, "um") field(SCAN, "Passive") field(PINI, "YES") info(autosaveFields, "VAL") } # # The position at which the current scan will stop, set to # the value of :XWIREOUTER, :YWIREOUTER or UWIREOUTER if in # push-through-beam mode, or set to :XWIREINNER, :YWIREINNER # or UWIREINNER if in pull-through-beam mode, for $(U) # record(ao, "$(U):SCANPOSSTOP") { field(DESC, "$(MAD) Stop Position") field(ASG, "WIREUSER") field(VAL, "27000") field(EGU, "um") field(SCAN, "Passive") field(PINI, "YES") info(autosaveFields, "VAL") } # # The number of beam pulses which $(U) # will intercept as it moves across the total range of travel. # This is typically selected by the user. # record(ao, "$(U):SCANPULSES") { field(DESC, "Pulses needed by $(MAD)") field(ASG, "WIREUSER") field(VAL, "100") field(SCAN, "Passive") field(PINI, "YES") info(autosaveFields, "VAL") } # # The time to delay between motion stop and position readout # record(ao, "$(U):SCANDELAY") { field(DESC, "$(MAD) Position Delay Time") field(ASG, "WIREUSER") field(VAL, "1.5") field(EGU, "seconds") field(SCAN, "Passive") field(PINI, "YES") info(autosaveFields, "VAL") } # # An indication of progress in terms of percent # completion of $(U) # record(ao, "$(U):SCANPROGRESS") { field(DESC, "Progress $(MAD) WireScan") field(ASG, "WIREUSER") field(VAL, "0") field(EGU, "percent") field(HOPR, "100") field(LOPR, "0") field(PREC, "0") field(SCAN, "Passive") field(PINI, "YES") } # # A textual indication of the status of $(U) # record(stringout, "$(U):SCANTEXT") { field(DESC, "$(MAD) Wire Scan Status") field(ASG, "WIREUSER") field(VAL, "READY to START Wire Scan") field(SCAN, "Passive") field(PINI, "YES") } # # Angle of $(U) from beam's point of view # record(ao, "$(U):XWIRESIZE") { field(DESC, "Diam. of $(MAD) x wire") field(ASG, "WIREADMIN") field(EGU, "microns") field(VAL, "40") field(SCAN, "Passive") field(PINI, "YES") info(autosaveFields, "VAL") } record(ao, "$(U):YWIRESIZE") { field(DESC, "Diam. of $(MAD) y wire") field(ASG, "WIREADMIN") field(EGU, "microns") field(VAL, "40") field(SCAN, "Passive") field(PINI, "YES") info(autosaveFields, "VAL") } record(ao, "$(U):UWIRESIZE") { field(DESC, "Diam. of $(MAD) u wire") field(ASG, "WIREADMIN") field(EGU, "microns") field(VAL, "40") field(SCAN, "Passive") field(PINI, "YES") info(autosaveFields, "VAL") } # Normally scanning moves from inner position to outer # position, against the force of the vacuum. If this # PV is set to true, then $(U) # will scan from the outer to inner position, moving # with the force of the vacuum. The scanner is expected # to provide best results when moving against the force # of the vacuum. # # Do we need to retain this? # # # Record send First Wire moving start position to AeroBasic # record(ao, "$(U):1:WIRESTARTPOSN") { field(DESC, "First Wire Scan start position to AB") field(VAL, "0") field(DTYP, "stream") field(EGU, "um") field(OUT, "@aerotech.proto setDGLOBAL(0) $(ASYN)") } # # RBV for First Wire moving start position to AeroBasic # record(ai, "$(U):1:WIRESTARTPOSN_RBV") { field(DESC, "RBV for First Wire Scan start position") field(DTYP, "stream") field(EGU, "um") field(INP, "@aerotech.proto getDGLOBAL(0) $(ASYN)") field(PINI, "YES") field(SCAN,"1 second") } # # Record send First Wire moving end position to AeroBasic # record(ao, "$(U):1:WIREENDPOSN") { field(DESC, "First Wire moving end position to AB") field(VAL, "0") field(DTYP, "stream") field(EGU, "um") field(OUT, "@aerotech.proto setDGLOBAL(1) $(ASYN)") } # # RBV for First Wire moving end position to AeroBasic # record(ai, "$(U):1:WIREENDPOSN_RBV") { field(DESC, "RBV for First Wire Scan End position") field(DTYP, "stream") field(INP, "@aerotech.proto getDGLOBAL(1) $(ASYN)") field(EGU, "um") field(PINI, "YES") field(SCAN,"1 second") } # # Record send First Wire moving velocity to AeroBasic # record(ao, "$(U):1:WIRESCANSPEED") { field(DESC, "XFirst Wire moving velocity to AeroBasic") field(VAL, "0") field(DTYP, "stream") field(EGU, "um/s") field(OUT, "@aerotech.proto setDGLOBAL(6) $(ASYN)") } # # RBV for First Wire moving velocity to AeroBasic # record(ai, "$(U):1:WIRESCANSPEED_RBV") { field(DESC, "RBV for First Wire Scan moving velocity") field(DTYP, "stream") field(INP, "@aerotech.proto getDGLOBAL(6) $(ASYN)") field(EGU, "um/s") field(PINI, "YES") field(SCAN,"1 second") } # # Record send Second Wire moving start position to AeroBasic # record(ao, "$(U):2:WIRESTARTPOSN") { field(DESC, "Second Wire Scan start position to AB") field(VAL, "0") field(DTYP, "stream") field(EGU, "um") field(OUT, "@aerotech.proto setDGLOBAL(2) $(ASYN)") } # # RBV for Second Wire moving start position to AeroBasic # record(ai, "$(U):2:WIRESTARTPOSN_RBV") { field(DESC, "RBV for Second Wire Scan start position") field(DTYP, "stream") field(INP, "@aerotech.proto getDGLOBAL(2) $(ASYN)") field(PINI, "YES") field(EGU, "um") field(SCAN,"1 second") } # # Record send Second Wire moving end position to AeroBasic # record(ao, "$(U):2:WIREENDPOSN") { field(DESC, "Second Wire moving end position to AB") field(VAL, "0") field(DTYP, "stream") field(EGU, "um") field(OUT, "@aerotech.proto setDGLOBAL(3) $(ASYN)") } # # RBV for Second Wire moving end position to AeroBasic # record(ai, "$(U):2:WIREENDPOSN_RBV") { field(DESC, "RBV for Second Wire Scan end position") field(DTYP, "stream") field(INP, "@aerotech.proto getDGLOBAL(3) $(ASYN)") field(EGU, "um") field(PINI, "YES") field(SCAN,"1 second") } # # Record send Second Wire moving velocity to AeroBasic # record(ao, "$(U):2:WIRESCANSPEED") { field(DESC, "Second Wire moving velocity to AB") field(VAL, "0") field(DTYP, "stream") field(EGU, "um/s") field(OUT, "@aerotech.proto setDGLOBAL(7) $(ASYN)") } # # RBV for Second Wire moving velocity to AeroBasic # record(ai, "$(U):2:WIRESCANSPEED_RBV") { field(DESC, "RBV for Second Wire Scan moving velocity") field(DTYP, "stream") field(INP, "@aerotech.proto getDGLOBAL(7) $(ASYN)") field(EGU, "um/s") field(PINI, "YES") field(SCAN,"1 second") } # # Record receive Scan Speed Readback value from AeroBasic # record(ai, "$(U):SCANSPEED_RBV") { field(DESC, "Scan Speed RBD from AB") field(DTYP, "stream") field(INP, "@aerotech.proto getIGLOBAL(9) $(ASYN)") field(EGU, "um/s") field(PINI, "YES") field(SCAN,".1 second") } # # Record send Third Wire moving start position to AeroBasic # record(ao, "$(U):3:WIRESTARTPOSN") { field(DESC, "Third Wire Scan start position to AB") field(VAL, "0") field(DTYP, "stream") field(EGU, "um") field(OUT, "@aerotech.proto setDGLOBAL(4) $(ASYN)") } # # RBV for Third Wire moving start position to AeroBasic # record(ai, "$(U):3:WIRESTARTPOSN_RBV") { field(DESC, "RBV for Third Wire Scan start position") field(DTYP, "stream") field(INP, "@aerotech.proto getDGLOBAL(4) $(ASYN)") field(EGU, "um") field(PINI, "YES") field(SCAN,"1 second") } # # Record send Third Wire moving end position to AeroBasic # record(ao, "$(U):3:WIREENDPOSN") { field(DESC, "Third Wire moving end position to AB") field(VAL, "0") field(DTYP, "stream") field(EGU, "um") field(OUT, "@aerotech.proto setDGLOBAL(5) $(ASYN)") } # # RBV for Third Wire moving end position to AeroBasic # record(ai, "$(U):3:WIREENDPOSN_RBV") { field(DESC, "RBV for Third Wire Scan end position") field(DTYP, "stream") field(INP, "@aerotech.proto getDGLOBAL(5) $(ASYN)") field(EGU, "um") field(PINI, "YES") field(SCAN,"1 second") } # # Record send Third Wire moving velocity to AeroBasic # record(ao, "$(U):3:WIRESCANSPEED") { field(DESC, "Third Wire moving velocity to AB") field(VAL, "0") field(DTYP, "stream") field(EGU, "um/s") field(OUT, "@aerotech.proto setDGLOBAL(8) $(ASYN)") } # # RBV for Third Wire moving velocity to AeroBasic # record(ai, "$(U):3:WIRESCANSPEED_RBV") { field(DESC, "RBV for Third Wire Scan moving velocity") field(DTYP, "stream") field(INP, "@aerotech.proto getDGLOBAL(8) $(ASYN)") field(EGU, "um/s") field(PINI, "YES") field(SCAN,"1 second") } # # Record set Max Scan Position to AeroBasic # record(ao, "$(U):STAGEMAXPOSN") { field(DESC, "Set Max Scan POSN to AB") field(DTYP, "stream") field(EGU, "mm") field(OUT, "@aerotech.proto setDGLOBAL(10) $(ASYN)") } # # RBV for Scan Speed # record(ai, "$(U):STAGEMAXPOSN_RBV") { field(DESC, "RBV for Max Scan POSN") field(DTYP, "stream") field(INP, "@aerotech.proto getDGLOBAL(10) $(ASYN)") field(EGU, "mm") field(PINI, "YES") field(SCAN,"1 second") } # # Record set Max Scan Speed to AeroBasic # record(ao, "$(U):SLOWSCAN_VMAX") { field(DESC, "Set Max Scan Spd to AB") field(DTYP, "stream") field(EGU, "mm/s") field(OUT, "@aerotech.proto setDGLOBAL(11) $(ASYN)") } # # RBV for Scan Speed # record(ai, "$(U):SLOWSCAN_VMAX_RBV") { field(DESC, "RBV for Max Scan Spd") field(DTYP, "stream") field(INP, "@aerotech.proto getDGLOBAL(11) $(ASYN)") field(EGU, "mm/s") field(PINI, "YES") field(SCAN,"1 second") } # # Record set Scan Acceleration to AeroBasic # record(ao, "$(U):SCANACCL") { field(DESC, "Set Scan Acc to AB") field(DTYP, "stream") field(EGU, "um/s^2") field(OUT, "@aerotech.proto setDGLOBAL(12) $(ASYN)") } # # RBV for Scan Acceleration # record(ai, "$(U):SCANACCL_RBV") { field(DESC, "RBV for Scan Acc") field(DTYP, "stream") field(INP, "@aerotech.proto getDGLOBAL(12) $(ASYN)") field(EGU, "um/s^2") field(PINI, "YES") field(SCAN,"1 second") } # # Record set Scan Deceleration to AeroBasic # record(ao, "$(U):SCANDCCL") { field(DESC, "Set Scan Dcc to AB") field(DTYP, "stream") field(EGU, "um/s^2") field(OUT, "@aerotech.proto setDGLOBAL(13) $(ASYN)") } # # RBV for Scan Deceleration # record(ai, "$(U):SCANDCCL_RBV") { field(DESC, "RBV for Scan DAcc") field(DTYP, "stream") field(INP, "@aerotech.proto getDGLOBAL(13) $(ASYN)") field(EGU, "um/s^2") field(PINI, "YES") field(SCAN,"1 second") } # # Record set Retract speed to AeroBasic # record(ao, "$(U):RETRACTSPEED") { field(DESC, "Set Retract SPD to AB") field(DTYP, "stream") field(EGU, "um/s") field(OUT, "@aerotech.proto setDGLOBAL(15) $(ASYN)") } # # RBV for Scan Retract speed # record(ai, "$(U):RETRACTSPEED_RBV") { field(DESC, "RBV for Retract SPD ") field(DTYP, "stream") field(INP, "@aerotech.proto getDGLOBAL(15) $(ASYN)") field(EGU, "um/s") field(PINI, "YES") field(SCAN,"1 second") } # # Record set Retract position to AeroBasic # record(ao, "$(U):RETRACTPOSN") { field(DESC, "Set Retract POSN to AB") field(DTYP, "stream") field(EGU, "um") field(OUT, "@aerotech.proto setDGLOBAL(16) $(ASYN)") } # # RBV for Scan Retract position # record(ai, "$(U):RETRACTPOSN_RBV") { field(DESC, "RBV for Retract POSN ") field(DTYP, "stream") field(INP, "@aerotech.proto getDGLOBAL(16) $(ASYN)") field(PINI, "YES") field(EGU, "um") field(SCAN,"1 second") } record(bo, "$(U):STARTWIRESCAN") { field(DTYP, "stream") field(VAL, "0") field(OUT, "@aerotech.proto setIGLOBAL(1) $(ASYN)") } # # Record send Wires Used Number to AeroBasic # record(longout, "$(U):WIRESUSED") { field(DESC, "Wires Used Number to AeroBasic") field(DTYP, "stream") field(OUT, "@aerotech.proto setIGLOBAL(10) $(ASYN)") } # # Record receive Scan Fault Status from AeroBasic # record(longin, "$(U):SCANFAULT") { field(DESC, "Scan Fault Status from AB") field(DTYP, "stream") field(INP, "@aerotech.proto getIGLOBAL(11) $(ASYN)") field(PINI, "YES") field(SCAN,".5 second") } # # Record receive Scan Result Status from AeroBasic # record(longin, "$(U):SCANSTAT") { field(DESC, "Scan Result Status from AB") field(DTYP, "stream") field(INP, "@aerotech.proto getIGLOBAL(12) $(ASYN)") field(PINI, "YES") field(SCAN,".1 second") } # # Record receive Scope Request from AeroBasic # #record(longin, "$(U):SCOPEREQUEST") { # field(DESC, "Scope Request from AB") # field(DTYP, "stream") # field(INP, "@aerotech.proto getIGLOBAL(98) $(ASYN)") # field(PINI, "YES") # field(SCAN,".1 second") #} # # Record receive Scope Data Length from AeroBasic # #record(longin, "$(U):SCOPELENGTH") { # field(DESC, "Scopedata Length from AB") # field(DTYP, "stream") # field(INP, "@aerotech.proto getIGLOBAL(99) $(ASYN)") # field(PINI, "YES") # field(SCAN,".1 second") #} # # Record receive Scan Fault Status from AeroBasic # # record(calcout, "$(U):SCANFAULT_RESET") { # field(DESC, "Scan Fault Status Reset AB") # field(DTYP, "stream") # field(CALC, "A=1? 0:B") # field(INPA, "$(U):ACKALL.PROC CP") # field(INPB, "$(U):SCANFAULT CP") # field(OUT, "@aerotech.proto setIGLOBAL(11) $(ASYN)") # } # # # Record to calc WireX speed # record(calc, "$(U):WIREXSPEED_CALC") { field(DESC, "Calc Wire X Speed") field(INPA, "$(U):XWIREOUTER CP") field(INPB, "$(U):XWIREINNER CP") field(INPC, "$(U):BEAMRATE CP") field(INPD, "$(U):SCANPULSES CP") field(EGU,"um/s") field(CALC, "ABS((A-B))*C/D") } # # Record to calc WireU speed # record(calc, "$(U):WIREUSPEED_CALC") { field(DESC, "Calc Wire U Speed") field(INPA, "$(U):UWIREOUTER CP") field(INPB, "$(U):UWIREINNER CP") field(INPC, "$(U):BEAMRATE CP") field(INPD, "$(U):SCANPULSES CP") field(EGU,"um/s") field(CALC, "ABS((A-B))*C/D") } # # Record to calc WireY speed # record(calc, "$(U):WIREYSPEED_CALC") { field(DESC, "Calc Wire Y Speed") field(INPA, "$(U):YWIREOUTER CP") field(INPB, "$(U):YWIREINNER CP") field(INPC, "$(U):BEAMRATE CP") field(INPD, "$(U):SCANPULSES CP") field(EGU,"um/s") field(CALC, "ABS((A-B))*C/D") } # # A textual indication of the status of $(U) # Do we need this? record(stringout, "$(U):SCANTEXT") { field(DESC, "$(MAD) Wire Scan Status") field(VAL, "READY to START Wire Scan") field(SCAN, "Passive") field(PINI, "YES") } # # An indication of progress in terms of percent # completion of $(U) # record(ao, "$(U):SCANPROGRESS") { field(DESC, "Progress $(MAD) WireScan") field(ASG, "WIREUSER") field(VAL, "0") field(EGU, "percent") field(HOPR, "100") field(LOPR, "0") field(PREC, "0") field(SCAN, "Passive") field(PINI, "YES") } record(ai, "$(U):BEAMCHARGE_USER") { field(DESC, "SetBeamCharge") field(VAL, "350") } record(ai, "$(U):BEAMCHARGE") { field(DESC, "Beam Charge") field(EGU,"pC") field(VAL, "353") } record(longout, "$(U):BEAMRATE_USER") { field(DESC, "SetBeamRate") field(VAL, "120") field(EGU, "Hz") } record(longin, "$(U):BEAMRATE") { field(DESC, "BeamRate") field(VAL, "123") field(EGU, "Hz") } # # Record to calc mps speed # record(calcout, "$(U):MPSSPEED") { field(DESC, "Calc MPS Speed") field(INPA, "$(U):BEAMRATE CA") field(PREC, "4") field(EGU,"mm/s") field(SCAN,"1 second") field(CALC, "239*2*A/600000") # field(OUT, "$(U):ENC_CNT_CALC") field(FLNK, "$(U):ENC_CNT_CALC") } # # Record to Calc MPS Timeout count # record(calcout, "$(U):ENC_CNT_CALC") { field(DESC, "Calc MPS Timeout count") field(INPA, "$(U):COEFSPEED") field(INPB, "$(U):MPSSPEED") field(CALC, "A/(B*1000)") field(OUT, "$(U):MPSSPEEDTIMEOUT") field(FLNK, "$(U):MPSSPEEDTIMEOUT") } #Calc Beam Rate and set to $(IOC):BEAMRATE record(calcout, "$(WIRE):SET_BEAMRATE"){ field(DESC, "Beamrate Cacluation") field(SCAN, "1 second") field(INPA, "$(IOC):FACMODE") field(INPB, "$(NC_BEAMRATE)") field(INPC, "$(SC_BEAMRATE)") field(INPD, "$(IOC):FACMODE_AUTO") field(INPE, "$(WIRE):BEAMRATE_USER") field(CALC, "D?(!A?B:C):E") field(OUT, "$(WIRE):BEAMRATE") field(FLNK, "$(WIRE):BEAMRATE") } #Calc beam mode to monitor beam rate stat record(calcout, "$(WIRE):BEAMRATESTAT_CALC"){ field(DESC, "Beamrate Stat Cacluation") field(SCAN, "1 second") field(INPA, "$(WIRE):BEAMRATE") field(INPB, "$(IOC):FACMODE") field(INPC, "$(NC_BEAMRATE)") field(INPD, "$(SC_BEAMRATE)") field(INPE, "$(IOC):FACMODE_AUTO") field(CALC, "(E=0)?1:((A#(B?D:(C*1000)))?0:2)") field(OUT, "$(WIRE):BEAMRATE_STAT") field(FLNK, "$(WIRE):BEAMRATE_STAT") } #Beam rate stat pv for alarm usage record(mbbi, "$(WIRE):BEAMRATE_STAT") { field(DESC, "Beam Rate Status") field(INP, "$(WIRE):BEAMRATESTAT_CALC MSI") field(ZRVL, "0") field(ZRST, "Mismatch") field(ZRSV, "MAJOR") field(ONVL, "1") field(ONST, "Local Control") field(ONSV, "MINOR") field(TWVL, "2") field(TWST, "OK") field(TWSV, "NO_ALARM") } record(calcout, "$(WIRE):SET_BEAMCHARGE"){ field(DESC, "Beamcharge Cacluation") field(SCAN, "1 second") field(INPA, "$(IOC):FACMODE") field(INPB, "$(NC_BEAMCHARGE)") field(INPC, "$(SC_BEAMCHARGE)") field(INPD, "$(IOC):FACMODE_AUTO") field(INPE, "$(WIRE):BEAMCHARGE_USER") field(CALC, "D?(!A?B:C):E") field(OUT, "$(WIRE):BEAMCHARGE") field(FLNK, "$(WIRE):BEAMCHARGE") } #Calc beam mode to monitor beam charge stat record(calcout, "$(WIRE):BEAMCHARGE_CALC"){ field(DESC, "Beamcharge Stat Cacluation") field(SCAN, "1 second") field(INPA, "$(WIRE):BEAMCHARGE") field(INPB, "$(IOC):FACMODE") field(INPC, "$(NC_BEAMCHARGE)") field(INPD, "$(SC_BEAMCHARGE)") field(INPE, "$(IOC):FACMODE_AUTO") field(CALC, "(E=0)?1:((A#(B?D:C))?0:2)") field(OUT, "$(WIRE):BEAMCHARGE_STAT") field(FLNK, "$(WIRE):BEAMCHARGE_STAT") } #Beam charge stat pv for alarm usage record(mbbi, "$(WIRE):BEAMCHARGE_STAT") { field(DESC, "Beamcharge Status") field(INP, "$(WIRE):BEAMCHARGE_CALC MSI") field(ZRVL, "0") field(ZRST, "Mismatch") field(ZRSV, "MAJOR") field(ONVL, "1") field(ONST, "Local Control") field(ONSV, "MINOR") field(TWVL, "2") field(TWST, "OK") field(TWSV, "NO_ALARM") } record(bo, "$(U):Reset") { field(DESC, "trigger LLS Sw control reset - atca") field(SCAN, "Passive") field(ZNAM, "Idle") field(ONAM, "Reset") field(OUT, "$(U):LLS_SWCTRL_TOGGLE.PROC PP") } record(seq, "$(U):LLS_SWCTRL_TOGGLE") { field(DESC, "toggle LLS SW control - atca") ## Used while debugging field(TPRO, "1") field(DOL1, "0") field(LNK1, "$(U):LLSSwCtrl PP") field(DLY2, "1") field(DOL2, "1") field(LNK2, "$(U):LLSSwCtrl PP") field(DLY3, "1") field(DOL3, "0") field(LNK3, "$(U):LLSSwCtrl PP") }