record(motor, "$(DEVICE):MOTR") {
  field(DESC, "$(MAD)")
  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),$(AXIS))")
  field(MRES, "4e-4")
  field(ERES, "1")
  field(PREC, "4")
  field(EGU, "deg")
  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")
}
##########################################################################
# Description:
# This template contains database for phase shifter gap PVs used from a UI
#
# Macros:
# P 	- Device prefix
# M    	- MOTR              
# DMAX	- Max shaft rotations of of the motor
# GMAX 	- Max allowable gap 
# GMIN  - Minimum allowable gap
##########################################################################

# Gap desired from USER and actual gap reported 
record(ao, "$(DEVICE):GapDes") {
  field(DESC, "Phase shifter GAP setpoint")
  field(PREC, "3")
  field(DRVH, "25")
  field(DRVL, "0")
  field(EGU, "mm")
  field(HIGH, "25")
  field(LOW, "0")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(FLNK, "$(DEVICE):Gap2Deg")
  info(autosaveFields,"DRVH DRVL HIGH LOW VAL")
}

record(ai, "$(DEVICE):GapAct"){
  field(DESC, "Phase Shifter actual gap")
  field(DTYP, "Soft Channel")
  field(INP, "$(DEVICE):Deg2Gap.VAL CP")
  field(PREC, "3")
  field(EGU, "mm")
  field(HIGH, "25")
  field(LOW, "0")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  info(autosaveFields,"HIGH LOW")
}

# As the motor controller calculates the moves in rotations or degrees
# Convert the gap to deg for request
# Convert the deg readback to gap for actual position
record(calc, "$(DEVICE):Gap2Deg") {
  field(CALC, "(A+D)/C*B")
  field(INPA, "$(DEVICE):GapDes PP")
  field(INPB, "$(DEVICE):MaxMotorDeg")
  field(INPC, "$(DEVICE):MaxGap")
  field(INPD, "$(DEVICE):GapOffset")
  field(EGU, "deg")
  info(autosaveFields,"CALC")
}

record(calcout, "$(DEVICE):Deg2Gap") {
  field(FLNK, "$(DEVICE):MOTR")
  field(CALC, "(A/B)*C+D")
  field(INPA, "$(DEVICE):MOTR.RBV CP")
  field(INPB, "$(DEVICE):MaxMotorDeg")
  field(INPC, "$(DEVICE):MaxGap")
  field(INPD, "$(DEVICE):GapOffset")
  field(OUT, "$(DEVICE):GapAct")
  field(EGU, "mm")
  info(autosaveFields,"CALC")
}

# Phase shifter gap range 
record(ao, "$(DEVICE):MaxGap"){
  field(DESC, "Phase Shifter max gap")
  field(PREC, "3")
  field(EGU, "mm")
  field(PINI, "YES")
  field(VAL, "25")
  info(autosaveFields,"VAL EGU")
}

record(ao, "$(DEVICE):MinGap"){
  field(DESC, "Phase Shifter min gap")
  field(PREC, "3")
  field(EGU, "mm")
  field(PINI, "YES")
  field(VAL, "0")
  info(autosaveFields,"VAL EGU")
}

# Phase Shifter max motor shaft rotation
record(ao, "$(DEVICE):MaxMotorDeg"){
  field(DESC, "Phase Shifter max rotation")
  field(EGU, "deg")
  field(PINI, "YES")
  field(VAL, "79900")
  info(autosaveFields,"VAL")
}

# Phase Shifter gap offset
record(ao, "$(DEVICE):GapOffset"){
  field(DESC, "Phase Shifter gap offset")
  field(EGU, "mm")
  field(PINI, "YES")
  field(VAL, 0)
  info(autosaveFields,"VAL")
}

# Move request initiates a sequence
record(bo, "$(DEVICE):TRIM") {
  field(DESC, "Start changing PS gap")
  field(ZNAM, "Standby")
  field(ONAM, "Trim ")
}

record(bi, "$(DEVICE):TRIMSTS") {
  field(DESC, "Trim status")
  field(ZNAM, "Move Done")
  field(ONAM, "Move Requested")
}
record(bi, "$(DEVICE):TRIM_DBG") {
  field(DESC, "Trim debug")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

##########################################################################
# 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):DISTAT") {
  field(DESC, "digital inputs")
  field(PINI, "YES")
  field(DTYP, "stream")
  field(INP, "@aerotech.proto getDINall(@$(AXIS)) $(ASYN_PORT)")
  field(SCAN, "1 second")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
}

record(mbbiDirect, "$(DEVICE):DISTATS1") {
  field(DESC, "Digital input lower bits")
  field(DTYP, "Raw Soft Channel")
  field(INP, "$(DEVICE):DISTAT CP MS")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
}

record(mbbiDirect, "$(DEVICE):DISTATS2") {
  field(DESC, "Digital input higher bits")
  field(DTYP, "Raw Soft Channel")
  field(INP, "$(DEVICE):DISTAT CP MS")
  field(SHFT, "16")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
}

record(ai, "$(DEVICE):STAT") {
  field(DESC, "axis status")
  field(PINI, "YES")
  field(DTYP, "stream")
  field(INP, "@aerotech.proto axisStatus(@$(AXIS)) $(ASYN_PORT)")
  field(SCAN, "1 second")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
}

record(ai, "$(DEVICE):FAULT") {
  field(DESC, "axis fault")
  field(PINI, "YES")
  field(DTYP, "stream")
  field(INP, "@aerotech.proto axisFault(@$(AXIS)) $(ASYN_PORT)")
  field(SCAN, "1 second")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
}

record(ai, "$(DEVICE):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")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
}

record(mbbiDirect, "$(DEVICE):AUTOHOMETRIGFAULTS1") {
  field(DESC, "fault lower bits")
  field(DTYP, "Raw Soft Channel")
  field(INP, "$(DEVICE):AUTOHOMETRIGFAULT CP MS")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
}

record(mbbiDirect, "$(DEVICE):AUTOHOMETRIGFAULTS2") {
  field(DESC, "fault higher bits")
  field(DTYP, "Raw Soft Channel")
  field(INP, "$(DEVICE):AUTOHOMETRIGFAULT CP MS")
  field(SHFT, "16")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
}

record(mbbiDirect, "$(DEVICE):STATS1") {
  field(DESC, "status lower bits")
  field(DTYP, "Raw Soft Channel")
  field(INP, "$(DEVICE):STAT CP MS")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
}

record(mbbiDirect, "$(DEVICE):STATS2") {
  field(DESC, "status higher bits")
  field(DTYP, "Raw Soft Channel")
  field(INP, "$(DEVICE):STAT CP MS")
  field(SHFT, "16")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
}

record(mbbiDirect, "$(DEVICE):FAULTS1") {
  field(DESC, "fault lower bits")
  field(DTYP, "Raw Soft Channel")
  field(INP, "$(DEVICE):FAULT CP MS")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
}

record(mbbiDirect, "$(DEVICE):FAULTS2") {
  field(DESC, "fault higher bits")
  field(DTYP, "Raw Soft Channel")
  field(INP, "$(DEVICE):FAULT CP MS")
  field(SHFT, "16")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
}

record(bi, "$(DEVICE):ENABLEDSTAT") {
  field(DESC, "Axis enabled")
  field(INP,  "$(DEVICE):STATS1.B0")
  field(ZNAM, "Disabled")
  field(ONAM, "Enabled")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
}

record(bi, "$(DEVICE):HOMEDSTAT") {
  field(DESC, "Axis homed")
  field(INP,  "$(DEVICE):STATS1.B1")
  field(ZNAM, "Not Homed")
  field(ONAM, "Homed")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
}

record(bi, "$(DEVICE):MOVEACTIVE") {
  field(DESC, "Move active")
  field(INP,  "$(DEVICE):STATS1.B3")
  field(ZNAM, "Not moving")
  field(ONAM, "Moving")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
}

record(stringout, "$(DEVICE):FAULTACK") {
  field(DESC, "Ack fault on axis")
  field(DTYP, "stream")
  field(OUT,  "@aerotech.proto axisFaultAck(@$(AXIS)) $(ASYN_PORT)")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
}

record(stringout, "$(DEVICE):ENABLE") {
  field(DESC, "Enable axis")
  field(DTYP, "stream")
  field(OUT,  "@aerotech.proto axisEnable(@$(AXIS)) $(ASYN_PORT)")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
}

record(stringout, "$(DEVICE):ABORT") {
  field(DESC, "Abort axis")
  field(DTYP, "stream")
  field(OUT,  "@aerotech.proto axisAbort(@$(AXIS)) $(ASYN_PORT)")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
}

record(stringout, "$(DEVICE):DISABLE") {
  field(DESC, "Disable axis")
  field(DTYP, "stream")
  field(OUT,  "@aerotech.proto axisDisable(@$(AXIS)) $(ASYN_PORT)")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
}

record(bo, "$(DEVICE):DISABLEALLPVS") {
  field(DESC, "Disable all pvs")
  field(ZNAM, "Device unavailable")
  field(ONAM, "Active")
}

record(ai, "$(DEVICE):IDES") {
  field(DESC, "axis current")
  field(PINI, "YES")
  field(DTYP, "stream")
  field(INP, "@aerotech.proto getCur(@$(AXIS)) $(ASYN_PORT)")
  field(SCAN, "1 second")
  field(PREC, 2)
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
}
# 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):DIP0IN0") {
  field(DESC, "Port 0 Input 0")
  field(INP,  "$(DEVICE):DISTATS0.B0 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP0IN1") {
  field(DESC, "Port 0 Input 1")
  field(INP,  "$(DEVICE):DISTATS0.B1 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP0IN2") {
  field(DESC, "Port 0 Input 2")
  field(INP,  "$(DEVICE):DISTATS0.B2 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP0IN3") {
  field(DESC, "Port 0 Input 3")
  field(INP,  "$(DEVICE):DISTATS0.B3 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP0IN4") {
  field(DESC, "Port 0 Input 4")
  field(INP,  "$(DEVICE):DISTATS0.B4 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP0IN5") {
  field(DESC, "Port 0 Input 5")
  field(INP,  "$(DEVICE):DISTATS0.B5 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP1IN0") {
  field(DESC, "Port 1 Input 0")
  field(INP,  "$(DEVICE):DISTATS0.B8 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP1IN1") {
  field(DESC, "Port 1 Input 1")
  field(INP,  "$(DEVICE):DISTATS0.B9 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP1IN2") {
  field(DESC, "Port 1 Input 2")
  field(INP,  "$(DEVICE):DISTATS0.BA CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP1IN3") {
  field(DESC, "Port 1 Input 3")
  field(INP,  "$(DEVICE):DISTATS0.BB CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP1IN4") {
  field(DESC, "Port 1 Input 4")
  field(INP,  "$(DEVICE):DISTATS0.BC CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP1IN5") {
  field(DESC, "Port 1 Input 5")
  field(INP,  "$(DEVICE):DISTATS0.BD CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP1IN6") {
  field(DESC, "Port 1 Input 6")
  field(INP,  "$(DEVICE):DISTATS0.BE CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP1IN7") {
  field(DESC, "Port 1 Input 7")
  field(INP,  "$(DEVICE):DISTATS0.BF CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP2IN0") {
  field(DESC, "Port 2 Input 0")
  field(INP,  "$(DEVICE):DISTATS1.B0 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP2IN1") {
  field(DESC, "Port 2 Input 1")
  field(INP,  "$(DEVICE):DISTATS1.B1 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP2IN2") {
  field(DESC, "Port 2 Input 2")
  field(INP,  "$(DEVICE):DISTATS1.B2 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP2IN3") {
  field(DESC, "Port 2 Input 3")
  field(INP,  "$(DEVICE):DISTATS1.B3 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP2IN4") {
  field(DESC, "Port 2 Input 4")
  field(INP,  "$(DEVICE):DISTATS1.B4 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP2IN5") {
  field(DESC, "Port 2 Input 5")
  field(INP,  "$(DEVICE):DISTATS1.B5 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP2IN6") {
  field(DESC, "Port 2 Input 6")
  field(INP,  "$(DEVICE):DISTATS1.B6 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  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):DIP2IN7") {
  field(DESC, "Port 2 Input 7")
  field(INP,  "$(DEVICE):DISTATS1.B7 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  field(SDIS, "$(DEVICE):DISABLEALLPVS")
  info(autosaveFields, "DESC")
}

