########################################################################## # 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, "$(DEVICE):$(LJAW):DISTAT") { field(DESC, "digital inputs") field(PINI, "YES") field(DTYP, "stream") field(INP, "@aerotech.proto getDINall(@$(AXIS1)) $(ASYN_PORT)") field(SCAN, "1 second") } record(mbbiDirect, "$(DEVICE):$(LJAW):DISTATS1") { field(DESC, "Digital input lower bits") field(DTYP, "Raw Soft Channel") field(INP, "$(DEVICE):$(LJAW):DISTAT CP MS") } record(mbbiDirect, "$(DEVICE):$(LJAW):DISTATS2") { field(DESC, "Digital input higher bits") field(DTYP, "Raw Soft Channel") field(INP, "$(DEVICE):$(LJAW):DISTAT CP MS") field(SHFT, "16") } record(ai, "$(DEVICE):$(LJAW):STAT") { field(DESC, "axis status") field(PINI, "YES") field(DTYP, "stream") field(INP, "@aerotech.proto axisStatus(@$(AXIS1)) $(ASYN_PORT)") field(SCAN, "1 second") } record(ai, "$(DEVICE):$(LJAW):FAULT") { field(DESC, "axis fault") field(PINI, "YES") field(DTYP, "stream") field(INP, "@aerotech.proto axisFault(@$(AXIS1)) $(ASYN_PORT)") field(SCAN, "1 second") } record(ai, "$(DEVICE):$(LJAW):AUTOHOMETRIGFAULT") { field(DESC, "fault to trigger autohome") field(DTYP, "stream") field(INP, "@aerotech.proto getIGLOBAL(60) $(ASYN_PORT)") field(PINI, "YES") field(SCAN,"1 second") } record(mbbiDirect, "$(DEVICE):$(LJAW):AUTOHOMETRIGFAULTS1") { field(DESC, "fault lower bits") field(DTYP, "Raw Soft Channel") field(INP, "$(DEVICE):$(LJAW):AUTOHOMETRIGFAULT CP MS") } record(mbbiDirect, "$(DEVICE):$(LJAW):AUTOHOMETRIGFAULTS2") { field(DESC, "fault higher bits") field(DTYP, "Raw Soft Channel") field(INP, "$(DEVICE):$(LJAW):AUTOHOMETRIGFAULT CP MS") field(SHFT, "16") } record(mbbiDirect, "$(DEVICE):$(LJAW):STATS1") { field(DESC, "status lower bits") field(DTYP, "Raw Soft Channel") field(INP, "$(DEVICE):$(LJAW):STAT CP MS") } record(mbbiDirect, "$(DEVICE):$(LJAW):STATS2") { field(DESC, "status higher bits") field(DTYP, "Raw Soft Channel") field(INP, "$(DEVICE):$(LJAW):STAT CP MS") field(SHFT, "16") } record(mbbiDirect, "$(DEVICE):$(LJAW):FAULTS1") { field(DESC, "fault lower bits") field(DTYP, "Raw Soft Channel") field(INP, "$(DEVICE):$(LJAW):FAULT CP MS") } record(mbbiDirect, "$(DEVICE):$(LJAW):FAULTS2") { field(DESC, "fault higher bits") field(DTYP, "Raw Soft Channel") field(INP, "$(DEVICE):$(LJAW):FAULT CP MS") field(SHFT, "16") } record(bi, "$(DEVICE):$(LJAW):ENABLEDSTAT") { field(DESC, "Axis enabled") field(INP, "$(DEVICE):$(LJAW):STATS1.B0 CP MS") field(ZNAM, "Disabled") field(ONAM, "Enabled") } record(bi, "$(DEVICE):$(LJAW):HOMEDSTAT") { field(DESC, "Axis homed") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):CABLESTAT_CALC") { field(DESC, "Motor Cable Status") field(INPA, "$(DEVICE):$(LJAW):STATS2.B6 CP MS") field(INPB, "$(DEVICE):$(LJAW):STATS2.B7 CP MS") field(CALC, "(A&&B)") field(FLNK, "$(DEVICE):$(LJAW):CABLESTAT") } record(bo, "$(DEVICE):$(LJAW):CABLESTAT") { field(DESC, "Motor Cable Status") field(DOL, "$(DEVICE):$(LJAW):CABLESTAT_CALC MS") field(ONAM, "Motor cable disconnected") field(ZNAM, "OK") field(ZSV, "MAJOR") field(OSV, "NO_ALARM") } record(bi, "$(DEVICE):$(LJAW):MOVEACTIVE") { field(DESC, "Move active") field(INP, "$(DEVICE):$(LJAW):STATS1.B3 CP MS") field(ZNAM, "Not moving") field(ONAM, "Moving") } record(stringout, "$(DEVICE):$(LJAW):FAULTACK") { field(DESC, "Ack fault on axis") field(DTYP, "stream") field(OUT, "@aerotech.proto axisFaultAck(@$(AXIS1)) $(ASYN_PORT)") } record(stringout, "$(DEVICE):$(LJAW):ENABLE") { field(DESC, "Enable axis") field(DTYP, "stream") field(OUT, "@aerotech.proto axisEnable(@$(AXIS1)) $(ASYN_PORT)") } record(stringout, "$(DEVICE):$(LJAW):ABORT") { field(DESC, "Abort axis") field(DTYP, "stream") field(OUT, "@aerotech.proto axisAbort(@$(AXIS1)) $(ASYN_PORT)") } record(stringout, "$(DEVICE):$(LJAW):DISABLE") { field(DESC, "Disable axis") field(DTYP, "stream") field(OUT, "@aerotech.proto axisDisable(@$(AXIS1)) $(ASYN_PORT)") } record(stringout, "$(DEVICE):$(LJAW):HOME") { field(DESC, "Home axis") field(DTYP, "stream") field(OUT, "@aerotech.proto axisHome(@$(AXIS1)) $(ASYN_PORT)") } record(ai, "$(DEVICE):$(LJAW):IDES") { field(DESC, "axis current") field(PINI, "YES") field(DTYP, "stream") field(INP, "@aerotech.proto getCur(@$(AXIS1)) $(ASYN_PORT)") field(SCAN, "1 second") field(PREC, 2) } record(ai, "$(DEVICE):$(LJAW):EXTPOSN") { field(DESC, "Aux Encoder Position") field(PINI, "YES") field(DTYP, "stream") field(INP, "@aerotech.proto extPos(@$(AXIS1)) $(ASYN_PORT)") field(SCAN, "1 second") field(PREC, 3) field(LINR, "SLOPE") info(autosaveFields, "ESLO EOFF EGU") } record(ai, "$(DEVICE):$(LJAW):EncOffset") { field(DESC, "$(MAD)-$(LJAW) Encoder offset") field(DTYP, "stream") field(INP, "@aerotech.proto getEncOff(@$(AXIS1)) $(ASYN_PORT) ") field(PINI, "YES") field(PREC, "3") field(EGU, "mm") } # 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, "$(DEVICE):$(LJAW):DIP0IN0") { field(DESC, "Port 0 Input 0") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP0IN1") { field(DESC, "Port 0 Input 1") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP0IN2") { field(DESC, "Port 0 Input 2") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP0IN3") { field(DESC, "Port 0 Input 3") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP0IN4") { field(DESC, "Port 0 Input 4") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP0IN5") { field(DESC, "Port 0 Input 5") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP1IN0") { field(DESC, "Port 1 Input 0") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP1IN1") { field(DESC, "Port 1 Input 1") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP1IN2") { field(DESC, "Port 1 Input 2") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP1IN3") { field(DESC, "Port 1 Input 3") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP1IN4") { field(DESC, "Port 1 Input 4") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP1IN5") { field(DESC, "Port 1 Input 5") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP1IN6") { field(DESC, "Port 1 Input 6") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP1IN7") { field(DESC, "Port 1 Input 7") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP2IN0") { field(DESC, "Port 2 Input 0") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP2IN1") { field(DESC, "Port 2 Input 1") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP2IN2") { field(DESC, "Port 2 Input 2") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP2IN3") { field(DESC, "Port 2 Input 3") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP2IN4") { field(DESC, "Port 2 Input 4") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP2IN5") { field(DESC, "Port 2 Input 5") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP2IN6") { field(DESC, "Port 2 Input 6") field(INP, "$(DEVICE):$(LJAW):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, "$(DEVICE):$(LJAW):DIP2IN7") { field(DESC, "Port 2 Input 7") field(INP, "$(DEVICE):$(LJAW):DISTATS1.B7 CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } ########################################################################## # 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, "$(DEVICE):$(RJAW):DISTAT") { field(DESC, "digital inputs") field(PINI, "YES") field(DTYP, "stream") field(INP, "@aerotech.proto getDINall(@$(AXIS2)) $(ASYN_PORT)") field(SCAN, "1 second") } record(mbbiDirect, "$(DEVICE):$(RJAW):DISTATS1") { field(DESC, "Digital input lower bits") field(DTYP, "Raw Soft Channel") field(INP, "$(DEVICE):$(RJAW):DISTAT CP MS") } record(mbbiDirect, "$(DEVICE):$(RJAW):DISTATS2") { field(DESC, "Digital input higher bits") field(DTYP, "Raw Soft Channel") field(INP, "$(DEVICE):$(RJAW):DISTAT CP MS") field(SHFT, "16") } record(ai, "$(DEVICE):$(RJAW):STAT") { field(DESC, "axis status") field(PINI, "YES") field(DTYP, "stream") field(INP, "@aerotech.proto axisStatus(@$(AXIS2)) $(ASYN_PORT)") field(SCAN, "1 second") } record(ai, "$(DEVICE):$(RJAW):FAULT") { field(DESC, "axis fault") field(PINI, "YES") field(DTYP, "stream") field(INP, "@aerotech.proto axisFault(@$(AXIS2)) $(ASYN_PORT)") field(SCAN, "1 second") } record(ai, "$(DEVICE):$(RJAW):AUTOHOMETRIGFAULT") { field(DESC, "fault to trigger autohome") field(DTYP, "stream") field(INP, "@aerotech.proto getIGLOBAL(60) $(ASYN_PORT)") field(PINI, "YES") field(SCAN,"1 second") } record(mbbiDirect, "$(DEVICE):$(RJAW):AUTOHOMETRIGFAULTS1") { field(DESC, "fault lower bits") field(DTYP, "Raw Soft Channel") field(INP, "$(DEVICE):$(RJAW):AUTOHOMETRIGFAULT CP MS") } record(mbbiDirect, "$(DEVICE):$(RJAW):AUTOHOMETRIGFAULTS2") { field(DESC, "fault higher bits") field(DTYP, "Raw Soft Channel") field(INP, "$(DEVICE):$(RJAW):AUTOHOMETRIGFAULT CP MS") field(SHFT, "16") } record(mbbiDirect, "$(DEVICE):$(RJAW):STATS1") { field(DESC, "status lower bits") field(DTYP, "Raw Soft Channel") field(INP, "$(DEVICE):$(RJAW):STAT CP MS") } record(mbbiDirect, "$(DEVICE):$(RJAW):STATS2") { field(DESC, "status higher bits") field(DTYP, "Raw Soft Channel") field(INP, "$(DEVICE):$(RJAW):STAT CP MS") field(SHFT, "16") } record(mbbiDirect, "$(DEVICE):$(RJAW):FAULTS1") { field(DESC, "fault lower bits") field(DTYP, "Raw Soft Channel") field(INP, "$(DEVICE):$(RJAW):FAULT CP MS") } record(mbbiDirect, "$(DEVICE):$(RJAW):FAULTS2") { field(DESC, "fault higher bits") field(DTYP, "Raw Soft Channel") field(INP, "$(DEVICE):$(RJAW):FAULT CP MS") field(SHFT, "16") } record(bi, "$(DEVICE):$(RJAW):ENABLEDSTAT") { field(DESC, "Axis enabled") field(INP, "$(DEVICE):$(RJAW):STATS1.B0 CP MS") field(ZNAM, "Disabled") field(ONAM, "Enabled") } record(bi, "$(DEVICE):$(RJAW):HOMEDSTAT") { field(DESC, "Axis homed") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):CABLESTAT_CALC") { field(DESC, "Motor Cable Status") field(INPA, "$(DEVICE):$(RJAW):STATS2.B6 CP MS") field(INPB, "$(DEVICE):$(RJAW):STATS2.B7 CP MS") field(CALC, "(A&&B)") field(FLNK, "$(DEVICE):$(RJAW):CABLESTAT") } record(bo, "$(DEVICE):$(RJAW):CABLESTAT") { field(DESC, "Motor Cable Status") field(DOL, "$(DEVICE):$(RJAW):CABLESTAT_CALC MS") field(ONAM, "Motor cable disconnected") field(ZNAM, "OK") field(ZSV, "MAJOR") field(OSV, "NO_ALARM") } record(bi, "$(DEVICE):$(RJAW):MOVEACTIVE") { field(DESC, "Move active") field(INP, "$(DEVICE):$(RJAW):STATS1.B3 CP MS") field(ZNAM, "Not moving") field(ONAM, "Moving") } record(stringout, "$(DEVICE):$(RJAW):FAULTACK") { field(DESC, "Ack fault on axis") field(DTYP, "stream") field(OUT, "@aerotech.proto axisFaultAck(@$(AXIS2)) $(ASYN_PORT)") } record(stringout, "$(DEVICE):$(RJAW):ENABLE") { field(DESC, "Enable axis") field(DTYP, "stream") field(OUT, "@aerotech.proto axisEnable(@$(AXIS2)) $(ASYN_PORT)") } record(stringout, "$(DEVICE):$(RJAW):ABORT") { field(DESC, "Abort axis") field(DTYP, "stream") field(OUT, "@aerotech.proto axisAbort(@$(AXIS2)) $(ASYN_PORT)") } record(stringout, "$(DEVICE):$(RJAW):DISABLE") { field(DESC, "Disable axis") field(DTYP, "stream") field(OUT, "@aerotech.proto axisDisable(@$(AXIS2)) $(ASYN_PORT)") } record(stringout, "$(DEVICE):$(RJAW):HOME") { field(DESC, "Home axis") field(DTYP, "stream") field(OUT, "@aerotech.proto axisHome(@$(AXIS2)) $(ASYN_PORT)") } record(ai, "$(DEVICE):$(RJAW):IDES") { field(DESC, "axis current") field(PINI, "YES") field(DTYP, "stream") field(INP, "@aerotech.proto getCur(@$(AXIS2)) $(ASYN_PORT)") field(SCAN, "1 second") field(PREC, 2) } record(ai, "$(DEVICE):$(RJAW):EXTPOSN") { field(DESC, "Aux Encoder Position") field(PINI, "YES") field(DTYP, "stream") field(INP, "@aerotech.proto extPos(@$(AXIS2)) $(ASYN_PORT)") field(SCAN, "1 second") field(PREC, 3) field(LINR, "SLOPE") info(autosaveFields, "ESLO EOFF EGU") } record(ai, "$(DEVICE):$(RJAW):EncOffset") { field(DESC, "$(MAD)-$(RJAW) Encoder offset") field(DTYP, "stream") field(INP, "@aerotech.proto getEncOff(@$(AXIS2)) $(ASYN_PORT) ") field(PINI, "YES") field(PREC, "3") field(EGU, "mm") } # 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, "$(DEVICE):$(RJAW):DIP0IN0") { field(DESC, "Port 0 Input 0") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP0IN1") { field(DESC, "Port 0 Input 1") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP0IN2") { field(DESC, "Port 0 Input 2") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP0IN3") { field(DESC, "Port 0 Input 3") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP0IN4") { field(DESC, "Port 0 Input 4") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP0IN5") { field(DESC, "Port 0 Input 5") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP1IN0") { field(DESC, "Port 1 Input 0") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP1IN1") { field(DESC, "Port 1 Input 1") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP1IN2") { field(DESC, "Port 1 Input 2") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP1IN3") { field(DESC, "Port 1 Input 3") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP1IN4") { field(DESC, "Port 1 Input 4") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP1IN5") { field(DESC, "Port 1 Input 5") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP1IN6") { field(DESC, "Port 1 Input 6") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP1IN7") { field(DESC, "Port 1 Input 7") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP2IN0") { field(DESC, "Port 2 Input 0") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP2IN1") { field(DESC, "Port 2 Input 1") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP2IN2") { field(DESC, "Port 2 Input 2") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP2IN3") { field(DESC, "Port 2 Input 3") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP2IN4") { field(DESC, "Port 2 Input 4") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP2IN5") { field(DESC, "Port 2 Input 5") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP2IN6") { field(DESC, "Port 2 Input 6") field(INP, "$(DEVICE):$(RJAW):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, "$(DEVICE):$(RJAW):DIP2IN7") { field(DESC, "Port 2 Input 7") field(INP, "$(DEVICE):$(RJAW):DISTATS1.B7 CP NMS") field(ZNAM, "Off") field(ONAM, "On") info(autosaveFields, "DESC") } record(motor, "$(DEVICE):$(LJAW):MOTR") { field(DESC, "$(MAD)-$(LJAW)") field(DTYP, "asynMotor") field(DIR, "Pos") field(VELO, "2") field(VBAS, "1") field(VMAX, "4") field(ACCL, "0.1") field(BDST, "0") field(OUT, "@asyn($(MOTOR_PORT),$(AXIS1))") field(MRES, "4e-4") field(ERES, "1") field(PREC, "4") field(EGU, "mm") 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(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") } record(motor, "$(DEVICE):$(RJAW):MOTR") { field(DESC, "$(MAD)-$(RJAW)") field(DTYP, "asynMotor") field(DIR, "Pos") field(VELO, "2") field(VBAS, "1") field(VMAX, "4") field(ACCL, "0.1") field(BDST, "0") field(OUT, "@asyn($(MOTOR_PORT),$(AXIS2))") field(MRES, "4e-4") field(ERES, "1") field(PREC, "4") field(EGU, "mm") 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(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") } # Collimator Database Entries for $(DEVICE) # This collimator has 2 jaws, each driven by a motor. # Looking upbeam (towards the gun) # On the right - $(DEVICE):$(RJAW):MOTR # On the left - $(DEVICE):$(LJAW):MOTR # # Macros: # device - device name eg: COLL # mad - MAD device name eg: CEHTR (check MAD deck) # units - user units (mm) # higap - set hi gap for collimator # logap - set logap for the collimator # jump - set jog value # hipos - max set jog value # lopos - min set jog value # leftjaw - Left jaw attribute # rightjaw - Right jaw attribute #------------------------------------------------------------------------------- # Mod: # 10-Mar-2020, N. Balakrishnan (namrata): # Added Pv to calculate collimator state. # 19-Nov-2020, N. Balakrishnan (namrata): # CATER 138562 Error in Gap calculation around set center value. #------------------------------------------------------------------------------- # Store if device is in position record(bi, "$(DEVICE):State"){ field(DESC, "Collimator usable") field(ZNAM, "Active") field(ONAM, "Locked Off") } record(ao, "$(DEVICE):SETGAP") { field(DESC, "Set $(MAD) Collimator Gap") field(EGU, "mm") field(OMSL, "supervisory") field(DRVH, "104") field(DRVL, "2") field(SCAN, "Passive") field(FLNK, "$(DEVICE):MAKEGAP") info(autosaveFields, "DRVH DRVL") } record(calcout, "$(DEVICE):UPGAP") { field(DESC, "$(MAD) center Increment") field(EGU, "mm") field(SCAN, "Passive") field(INPA, "$(DEVICE):UPGAPJUMP") field(INPB, "$(DEVICE):GETGAP") field(CALC, "B+A") field(OUT, "$(DEVICE):SETGAP PP") } record(calcout, "$(DEVICE):DNGAP") { field(DESC, "$(MAD) center Decrement") field(EGU, "mm") field(SCAN, "Passive") field(INPA, "$(DEVICE):DNGAPJUMP") field(INPB, "$(DEVICE):GETGAP") field(CALC, "B-A") field(OUT, "$(DEVICE):SETGAP PP") } record(ao, "$(DEVICE):UPGAPJUMP") { field(DESC, "$(MAD) Gap Up Jump") # field(PINI, "YES") # field(ASG, "COLLUSER") field(EGU, "mm") field(OMSL, "supervisory") field(VAL, "1") field(DRVH, "104") field(DRVL, "2") field(SCAN, "Passive") info(autosaveFields, "VAL DRVH DRVL") } record(ao, "$(DEVICE):DNGAPJUMP") { field(DESC, "$(MAD) Gap Dn Jump") field(EGU, "mm") field(OMSL, "supervisory") field(VAL, "1") field(DRVH, "104") field(DRVL, "2") field(SCAN, "Passive") info(autosaveFields, "VAL DRVH DRVL") } record(calc, "$(DEVICE):GETGAP") { field(DESC, "Get $(MAD) Collimator Gap") field(EGU, "mm") field(SCAN, ".1 second") field(INPA, "$(DEVICE):$(LJAW):MOTR.RBV") field(INPB, "$(DEVICE):$(RJAW):MOTR.RBV") field(CALC, "-A+B") } # # Each jaw has it's own calc record # record(fanout, "$(DEVICE):MAKEGAP") { field(DESC, "$(MAD) Coll Gap Sync") field(SCAN, "Passive") field(SELM, "Mask") field(SELL, "3") field(LNK1, "$(DEVICE):$(RJAW):GAPCALC") field(LNK2, "$(DEVICE):$(LJAW):GAPCALC") } # # both records add to CENTER, since they each increase # in distance as they move away from CENTER. # record(calcout, "$(DEVICE):$(RJAW):GAPCALC") { field(DESC, "$(MAD) Right Gap Calc") field(EGU, "mm") field(SCAN, "Passive") field(INPA, "$(DEVICE):GETCENTER") field(INPB, "$(DEVICE):SETGAP") field(CALC, "A+(B/2)") field(OUT, "$(DEVICE):$(RJAW):MOTR PP") } record(calcout, "$(DEVICE):$(LJAW):GAPCALC") { field(DESC, "$(MAD) Left Gap Calc") field(EGU, "mm") field(SCAN, "Passive") field(INPA, "$(DEVICE):GETCENTER") field(INPB, "$(DEVICE):SETGAP") field(CALC, "A-(B/2)") field(OUT, "$(DEVICE):$(LJAW):MOTR PP") } # # CENTER the collimator gap for $(DEVICE) # record(ao, "$(DEVICE):SETCENTER") { field(DESC, "$(MAD) Collimator center") field(EGU, "mm") field(OMSL, "supervisory") field(DRVH, "104") field(DRVL, "2") field(SCAN, "Passive") field(FLNK, "$(DEVICE):MAKECEN") info(autosaveFields, "DRVH DRVL") } record(calcout, "$(DEVICE):UPCENTER") { field(DESC, "$(MAD) center Increment") field(EGU, "mm") field(SCAN, "Passive") field(INPA, "$(DEVICE):CENTERJUMP") field(INPB, "$(DEVICE):GETCENTER") field(CALC, "B+A") field(OUT, "$(DEVICE):SETCENTER PP") } record(calcout, "$(DEVICE):DNCENTER") { field(DESC, "$(MAD) center Decrement") field(EGU, "mm") field(SCAN, "Passive") field(INPA, "$(DEVICE):CENTERJUMP") field(INPB, "$(DEVICE):GETCENTER") field(CALC, "B-A") field(OUT, "$(DEVICE):SETCENTER PP") } record(ao, "$(DEVICE):CENTERJUMP") { field(DESC, "$(MAD) Coll. Jump") field(EGU, "mm") field(OMSL, "supervisory") field(VAL, "1") field(DRVH, "104") field(DRVL, "2") field(SCAN, "Passive") field(PINI, "YES") info(autosaveFields, "VAL DRVH DRVL") } record(fanout, "$(DEVICE):MAKECEN") { field(DESC, "$(MAD) Coll center Sync") field(SCAN, "Passive") field(SELM, "Mask") field(SELL, "3") field(LNK1, "$(DEVICE):$(RJAW):CENCALC") field(LNK2, "$(DEVICE):$(LJAW):CENCALC") } record(calcout, "$(DEVICE):$(RJAW):CENCALC") { field(DESC, "$(MAD) Right Jaw Calc") field(EGU, "mm") field(SCAN, "Passive") field(INPA, "$(DEVICE):SETCENTER") field(INPB, "$(DEVICE):GETGAP") field(CALC, "A+(B/2)") field(OUT, "$(DEVICE):$(RJAW):MOTR PP") } record(calcout, "$(DEVICE):$(LJAW):CENCALC") { field(DESC, "$(MAD) Left Jaw Calc") field(EGU, "mm") field(SCAN, "Passive") field(INPA, "$(DEVICE):SETCENTER") field(INPB, "$(DEVICE):GETGAP") field(CALC, "A-(B/2)") field(OUT, "$(DEVICE):$(LJAW):MOTR PP") } record(calc, "$(DEVICE):GETCENTER") { field(DESC, "Get $(MAD) Coll Posn") field(EGU, "mm") field(SCAN, ".1 second") field(INPA, "$(DEVICE):$(RJAW):MOTR.RBV") field(INPB, "$(DEVICE):$(LJAW):MOTR.RBV") field(CALC, "((A+B)/2)") } record(dfanout, "$(DEVICE):STOP") { field(DESC, "$(MAD) Stop Motion") field(SCAN, "Passive") field(DOL, "1") field(OMSL, "supervisory") field(OUTA, "$(DEVICE):$(LJAW):MOTR.STOP PP") field(OUTB, "$(DEVICE):$(RJAW):MOTR.STOP PP") } record(dfanout, "$(DEVICE):EXTRACT") { field(DESC, "$(MAD) Retract Jaws") field(SCAN, "Passive") field(DOL, "1") field(OMSL, "supervisory") field(OUTA, "$(DEVICE):$(LJAW):MOTRLO PP") field(OUTB, "$(DEVICE):$(RJAW):MOTRHI PP") } record(ao, "$(DEVICE):$(LJAW):MOTRLO") { field(DESC, "Move $(MAD) Low") field(EGU, "mm") field(OMSL, "closed_loop") field(OIF, "Full") field(DOL, "$(DEVICE):$(LJAW):MOTR.LLM") field(DRVH, "4000000000") field(DRVL, "-4000000000") field(SCAN, "Passive") field(OUT, "$(DEVICE):$(LJAW):MOTR.VAL") field(FLNK, "$(DEVICE):$(LJAW):MOTR") } record(ao, "$(DEVICE):$(LJAW):MOTRHI") { field(DESC, "Move $(MAD) High") field(EGU, "mm") field(OMSL, "closed_loop") field(OIF, "Full") field(DOL, "$(DEVICE):$(LJAW):MOTR.HLM") field(DRVH, "4000000000") field(DRVL, "-4000000000") field(SCAN, "Passive") field(OUT, "$(DEVICE):$(LJAW):MOTR.VAL") field(FLNK, "$(DEVICE):$(LJAW):MOTR") } record(ao, "$(DEVICE):$(RJAW):MOTRHI") { field(DESC, "Move $(MAD) High") field(EGU, "mm") field(OMSL, "closed_loop") field(OIF, "Full") field(DOL, "$(DEVICE):$(RJAW):MOTR.HLM") field(DRVH, "4000000000") field(DRVL, "-4000000000") field(SCAN, "Passive") field(OUT, "$(DEVICE):$(RJAW):MOTR.VAL") field(FLNK, "$(DEVICE):$(RJAW):MOTR") } record(ao, "$(DEVICE):$(RJAW):MOTRLO") { field(DESC, "Move $(MAD) Low") field(EGU, "mm") field(OMSL, "closed_loop") field(OIF, "Full") field(DOL, "$(DEVICE):$(RJAW):MOTR.LLM") field(DRVH, "4000000000") field(DRVL, "-4000000000") field(SCAN, "Passive") field(OUT, "$(DEVICE):$(RJAW):MOTR.VAL") field(FLNK, "$(DEVICE):$(RJAW):MOTR") } record(calc, "$(DEVICE):DONEMOVING") { field(DESC, "$(MAD) Moving") field(SCAN, ".1 second") field(INPA, "$(DEVICE):$(RJAW):MOTR.DMOV") field(INPB, "$(DEVICE):$(LJAW):MOTR.DMOV") field(CALC, "A&B") } record(calcout, "$(DEVICE):$(LJAW):CALCNEGPOS") { field(SCAN, "1 second") field(DTYP, "Soft Channel") field(FLNK, "$(DEVICE):$(LJAW):LVPOSDISP") field(CALC, "-1*A") field(INPA, "$(DEVICE):$(LJAW):LVPOS") field(OUT, "$(DEVICE):$(LJAW):LVPOSDISP.VAL") } record(ao, "$(DEVICE):$(LJAW):LVPOSDISP") { } record(calcout, "$(DEVICE):$(LJAW):CALCNEGMOTR") { field(SCAN, "1 second") field(DTYP, "Soft Channel") field(FLNK, "$(DEVICE):$(LJAW):MOTRDISP") field(CALC, "-1*A") field(INPA, "$(DEVICE):$(LJAW):MOTR.RBV") field(OUT, "$(DEVICE):$(LJAW):MOTRDISP.VAL") } record(ao, "$(DEVICE):$(LJAW):MOTRDISP") { } ## Template for using modbus to read from LabJackT7 record(ai, "$(DEVICE):$(LJAW):LVRAW") { field(DESC, "LVDT Raw Data") field(DTYP, "asynFloat64") field(SCAN, ".2 second") field(PREC, "6") field(FLNK, "$(DEVICE):$(LJAW):LVRAW_AVERAGED") field(EGU, "V") field(INP, "@asyn($(LJPORT), $(AI_OFFSET1), 1)FLOAT32_BE") } record(compress, "$(DEVICE):$(LJAW):LVRAW_AVERAGED") { field(DESC, "LVDT Averaged Value") field(INP, "$(DEVICE):$(LJAW):LVRAW MS") field(FLNK, "$(DEVICE):$(LJAW):LVPOS_SUB") field(ALG, "N to 1 Average") field(PREC, "4") field(N, "10") } record(sub, "$(DEVICE):$(LJAW):LVPOS_SUB") { field(DESC, " Position") field(SCAN, "Passive") field(INPA, "-21.9456") field(INPB, "-3.35519") field(INPC, "0.0107526") field(INPD, "0.00210737") field(INPE, "-8.71188e-05") field(INPF, "0.0") field(INPG, "0.0") field(INPH, "0.0") field(INPL, "$(DEVICE):$(LJAW):LVRAW_AVERAGED MS") field(PREC, "4") field(PINI, "YES") field(INAM, "InitPoly") field(SNAM, "CalcPoly") info(autosaveFields, "A B C D E F G H") } record(ao, "$(DEVICE):$(LJAW):LVPOS") { field(DESC, "LVDT position calculated") field(SCAN, ".1 second") field(DOL, "$(DEVICE):$(LJAW):LVPOS_SUB.VAL") field(OMSL, "closed_loop") field(PREC, "4") field(EGU, "mm") field(HIHI, "35") field(LOLO, "34") field(HIGH, "34.8") field(LOW, "34.2") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(HSV, "MINOR") field(LSV, "MINOR") info(autosaveFields, "LOW LOLO HIGH HIHI HHSV LLSV HSV LSV") } record(ao, "$(DEVICE):$(LJAW):XACT") { field(DESC, "LVDT position") field(SCAN, ".1 second") field(DOL, "$(DEVICE):$(LJAW):MOTR.RBV") field(OMSL, "closed_loop") field(PREC, "4") field(EGU, "mm") } record(bo, "$(DEVICE):$(LJAW):TRIM_DBG") { field(DTYP, "Raw Soft Channel") field(DESC, "Trim debug flag") field(VAL, "0") field(ZNAM, "Debug Off") field(ONAM, "Debug On") } ## Template for using modbus to read from LabJackT7 record(ai, "$(DEVICE):$(RJAW):LVRAW") { field(DESC, "LVDT Raw Data") field(DTYP, "asynFloat64") field(SCAN, ".2 second") field(PREC, "6") field(FLNK, "$(DEVICE):$(RJAW):LVRAW_AVERAGED") field(EGU, "V") field(INP, "@asyn($(LJPORT), $(AI_OFFSET2), 1)FLOAT32_BE") } record(compress, "$(DEVICE):$(RJAW):LVRAW_AVERAGED") { field(DESC, "LVDT Averaged Value") field(INP, "$(DEVICE):$(RJAW):LVRAW MS") field(FLNK, "$(DEVICE):$(RJAW):LVPOS_SUB") field(ALG, "N to 1 Average") field(PREC, "4") field(N, "10") } record(sub, "$(DEVICE):$(RJAW):LVPOS_SUB") { field(DESC, " Position") field(SCAN, "Passive") field(INPA, "23.1767") field(INPB, "3.26685") field(INPC, "-0.00385633") field(INPD, "-0.00493726") field(INPE, "3.81212e-05") field(INPF, "2.82327e-05") field(INPG, "0.0") field(INPH, "0.0") field(INPL, "$(DEVICE):$(RJAW):LVRAW_AVERAGED MS") field(PREC, "4") field(PINI, "YES") field(INAM, "InitPoly") field(SNAM, "CalcPoly") info(autosaveFields, "A B C D E F G H") } record(ao, "$(DEVICE):$(RJAW):LVPOS") { field(DESC, "LVDT position calculated") field(SCAN, ".1 second") field(DOL, "$(DEVICE):$(RJAW):LVPOS_SUB.VAL") field(OMSL, "closed_loop") field(PREC, "4") field(EGU, "mm") field(HIHI, "35") field(LOLO, "34") field(HIGH, "34.8") field(LOW, "34.2") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(HSV, "MINOR") field(LSV, "MINOR") info(autosaveFields, "LOW LOLO HIGH HIHI HHSV LLSV HSV LSV") } record(ao, "$(DEVICE):$(RJAW):XACT") { field(DESC, "LVDT position") field(SCAN, ".1 second") field(DOL, "$(DEVICE):$(RJAW):MOTR.RBV") field(OMSL, "closed_loop") field(PREC, "4") field(EGU, "mm") } record(bo, "$(DEVICE):$(RJAW):TRIM_DBG") { field(DTYP, "Raw Soft Channel") field(DESC, "Trim debug flag") field(VAL, "0") field(ZNAM, "Debug Off") field(ONAM, "Debug On") } record(bi,"$(DEVICE):$(LJAW):CORRECT") { field(DESC, "CORRECT Button") field(DTYP, "Soft Channel") field(OSV, "MINOR") field(ZSV, "NO_ALARM") field(PINI, "YES") field(INP, "0") field(ZNAM, "OFF") field(ONAM, "On") } record(bi,"$(DEVICE):$(LJAW):VERIFY") { field(DESC, "VERIFY Button") field(DTYP, "Soft Channel") field(OSV, "MINOR") field(ZSV, "NO_ALARM") field(PINI, "YES") field(INP, "0") field(ZNAM, "OFF") field(ONAM, "On") } record(bi,"$(DEVICE):$(LJAW):SETMODEALARM") { field(DESC, "Set Button Alarm") field(DTYP, "Soft Channel") field(OSV, "MAJOR") field(ZSV, "NO_ALARM") field(PINI, "YES") field(INP, "0") field(ZNAM, "OFF") field(ONAM, "On") } record(bi,"$(DEVICE):$(RJAW):CORRECT") { field(DESC, "CORRECT Button") field(DTYP, "Soft Channel") field(OSV, "MINOR") field(ZSV, "NO_ALARM") field(PINI, "YES") field(INP, "0") field(ZNAM, "OFF") field(ONAM, "On") } record(bi,"$(DEVICE):$(RJAW):VERIFY") { field(DESC, "VERIFY Button") field(DTYP, "Soft Channel") field(OSV, "MINOR") field(ZSV, "NO_ALARM") field(PINI, "YES") field(INP, "0") field(ZNAM, "OFF") field(ONAM, "On") } record(bi,"$(DEVICE):$(RJAW):SETMODEALARM") { field(DESC, "Set Button Alarm") field(DTYP, "Soft Channel") field(OSV, "MAJOR") field(ZSV, "NO_ALARM") field(PINI, "YES") field(INP, "0") field(ZNAM, "OFF") field(ONAM, "On") } record(bo, "$(DEVICE):$(LJAW):MOTR_ALRM") { field(DESC, "In Beam Alarm") field(DOL, "$(DEVICE):$(LJAW):MOTRERROR MS") field(OMSL, "closed_loop") field(ZNAM, "IN_BEAM") field(ONAM, "OUT_OF_BEAM") field(ZSV, "MAJOR") field(OSV, "NO_ALARM") } record(calcout, "$(DEVICE):$(LJAW):MOTRERROR") { field(CALC, "ABS(A-B)>C?1:0") field(FLNK, "$(DEVICE):$(LJAW):MOTR_ALRM") field(SCAN, "1 second") field(INPA, "$(DEVICE):$(LJAW):MOTR.RBV NPP MS") field(INPB, "$(DEVICE):$(LJAW):LVPOS") field(INPC, "2") field(HIGH, "1") field(LOW, "0") field(HSV, "MAJOR") field(LSV, "NO_ALARM") info(autosaveFields, "CALC INPA INPB INPC") } record(bo, "$(DEVICE):$(RJAW):MOTR_ALRM") { field(DESC, "In Beam Alarm") field(DOL, "$(DEVICE):$(RJAW):MOTRERROR MS") field(OMSL, "closed_loop") field(ZNAM, "IN_BEAM") field(ONAM, "OUT_OF_BEAM") field(ZSV, "MAJOR") field(OSV, "NO_ALARM") } record(calcout, "$(DEVICE):$(RJAW):MOTRERROR") { field(CALC, "ABS(A-B)>C?1:1") field(FLNK, "$(DEVICE):$(RJAW):MOTR_ALRM") field(SCAN, "1 second") field(INPA, "$(DEVICE):$(RJAW):MOTR.RBV NPP MS") field(INPB, "$(DEVICE):$(RJAW):LVPOS") field(INPC, "2") field(HIGH, "1") field(LOW, "0") field(HSV, "MAJOR") field(LSV, "NO_ALARM") info(autosaveFields, "CALC INPA INPB INPC") }