
record(ai, "$(U,undefined):AXIS_STATUS") {
  field(DESC, "$(MAD,undefined) axis status")
  field(PINI, "YES")
  field(DTYP, "stream")
  field(INP, "@$(PROTO,undefined) axisStatus($(AXIS,undefined)) $(PORT,undefined)")
  field(SCAN, "1 second")
}

record(ai, "$(U,undefined):AXIS_FAULT") {
  field(DESC, "$(MAD,undefined) axis fault")
  field(PINI, "YES")
  field(DTYP, "stream")
  field(INP, "@$(PROTO,undefined) axisFault($(AXIS,undefined)) $(PORT,undefined)")
  field(SCAN, "1 second")
}

record(ai, "$(U,undefined):AUTOHOME_FAULT") {
	field(DESC, "$(MAD,undefined) autorun fault")
	field(DTYP, "stream")
	field(INP,  "@$(PROTO,undefined) getIGLOBAL(60) $(PORT,undefined)")
   	field(PINI, "YES")
    field(SCAN,"1 second")
}

record(mbbi, "$(U,undefined):HADFAULT") {
  field(DESC, "$(MAD,undefined) autorun lower bits")
  field(DTYP, "Raw Soft Channel")
  field(INP, "$(U,undefined):AUTOHOME_FAULT CP MS")
  field(ZRVL, "0")
  field(ONVL, "2")
  field(TWVL, "8")
  field(ZRST, "No Fault")
  field(ONST, "Over Current Fault")
  field(TWST, "Feedback Fault")
  field(ZRSV, "NO_ALARM")
  field(ONSV, "MAJOR")
  field(TWSV, "MAJOR")
}

record(mbbiDirect, "$(U,undefined):AXIS_STATUS_S1") {
  field(DESC, "$(MAD,undefined) status lower bits")
  field(DTYP, "Raw Soft Channel")
  field(INP, "$(U,undefined):AXIS_STATUS CP MS")
}

record(mbbiDirect, "$(U,undefined):AXIS_STATUS_S2") {
  field(DESC, "$(MAD,undefined) status higher bits")
  field(DTYP, "Raw Soft Channel")
  field(INP, "$(U,undefined):AXIS_STATUS CP MS")
  field(SHFT, "16")
}

record(mbbiDirect, "$(U,undefined):AXIS_FAULT_S1") {
  field(DESC, "$(MAD,undefined) fault lower bits")
  field(DTYP, "Raw Soft Channel")
  field(INP, "$(U,undefined):AXIS_FAULT CP MS")
}

record(mbbiDirect, "$(U,undefined):AXIS_FAULT_S2") {
  field(DESC, "$(MAD,undefined) fault higher bits")
  field(DTYP, "Raw Soft Channel")
  field(INP, "$(U,undefined):AXIS_FAULT CP MS")
  field(SHFT, "16")
}

record(bi, "$(U,undefined):AXIS_ENABLED") {
  field(DESC, "Axis enabled")
  field(INP,  "$(U,undefined):AXIS_STATUS_S1.B0")
  field(ZNAM, "Disabled")
  field(ONAM, "Enabled")
}

record(bi, "$(U,undefined):MOVE_ACTIVE") {
  field(DESC, "Move active")
  field(INP,  "$(U,undefined):AXIS_STATUS_S1.B3")
  field(ZNAM, "Not moving")
  field(ONAM, "Moving")
}

record(stringout, "$(U,undefined):AXIS_FAULTACK") {
  field(DESC, "Ack fault on axis")
  field(DTYP, "stream")
  field(OUT,  "@$(PROTO,undefined) axisFaultAck($(AXIS,undefined)) $(PORT,undefined)")
}

record(stringout, "$(U,undefined):AXIS_ENABLE") {
  field(DESC, "Enable axis")
  field(DTYP, "stream")
  field(OUT,  "@$(PROTO,undefined) axisEnable($(AXIS,undefined)) $(PORT,undefined)")
}

record(stringout, "$(U,undefined):AXIS_ABORT") {
  field(DESC, "Abort axis")
  field(DTYP, "stream")
  field(OUT,  "@$(PROTO,undefined) axisAbort($(AXIS,undefined)) $(PORT,undefined)")
}

record(stringout, "$(U,undefined):AXIS_DISABLE") {
  field(DESC, "Disable axis")
  field(DTYP, "stream")
  field(OUT,  "@$(PROTO,undefined) axisDisable($(AXIS,undefined)) $(PORT,undefined)")
}
record(ai, "$(U,undefined):IDES") {
  field(DESC, "$(MAD,undefined) axis current")
  field(PINI, "YES")
  field(DTYP, "stream")
  field(INP, "@$(PROTO,undefined) getCur($(AXIS,undefined)) $(PORT,undefined)")
  field(SCAN, ".1 second")
}
record(stringout, "$(U,undefined):AEROTECH_RESET") {
  field(DESC, "Aerotech controller Reset")
  field(DTYP, "stream")
  field(OUT, "@$(PROTO,undefined) reset $(PORT)")
}

record(stringout, "$(U,undefined):AEROTECH_ACKALL") {
  field(DESC, "Aerotech controller Acknowledge All")
  field(DTYP, "stream")
  field(OUT, "@$(PROTO,undefined) ackAll $(PORT)")
}

record(stringout, "$(U,undefined):AEROTECH_TASK4_START") {
  field(DESC, "Aerotech task restart")
  field(DTYP, "stream")
  field(OUT, "@$(PROTO,undefined) taskRestart $(PORT)")
}

# File: aeroTask.template
# Description:
# This database retrieves the Aerotech task error status and run state

record(longin, "$(U,undefined):AEROTECH_TASK1_ERROR") {
  field(DESC, "Aerotech controller task error")
  field(SCAN, "1 second")
  field(DTYP, "stream")
  field(INP, "@$(PROTO,undefined) taskError(1) $(PORT,undefined)")
  field(PINI, "YES")
}

record(longin, "$(U,undefined):AEROTECH_TASK1_STATE_IN") {
  field(DESC, "Aerotech controller task state")
  field(SCAN, "1 second")
  field(DTYP, "stream")
  field(INP, "@$(PROTO,undefined) taskState(1) $(PORT,undefined)")
  field(PINI, "YES")
  field(FLNK, "$(U,undefined):AEROTECH_TASK1_CALC")
}

record(calcout, "$(U,undefined):AEROTECH_TASK1_CALC") {
  field(DESC, "Aerotech task state calculation")
  field(INPA, "$(U,undefined):AEROTECH_TASK1_STATE_IN")
  field(CALC, "2^A")
  field(OUT,  "$(U,undefined):AEROTECH_TASK1_STATE PP NMS")
  field(OOPT, "Every Time")
}

record(mbbi, "$(U,undefined):AEROTECH_TASK1_STATE") {
  field(DESC, "Aerotech controller task state")
  field(ZRST, "Inactive")
  field(ONST, "Idle")
  field(TWST, "Program Ready")
  field(THST, "Program Running")
  field(FRST, "Program Paused")
  field(FVST, "Program Complete")
  field(SXST, "Error")
  field(TEST, "Running Plugin")
}


# File: aeroTask.template
# Description:
# This database retrieves the Aerotech task error status and run state

record(longin, "$(U,undefined):AEROTECH_TASK2_ERROR") {
  field(DESC, "Aerotech controller task error")
  field(SCAN, "1 second")
  field(DTYP, "stream")
  field(INP, "@$(PROTO,undefined) taskError(2) $(PORT,undefined)")
  field(PINI, "YES")
}

record(longin, "$(U,undefined):AEROTECH_TASK2_STATE_IN") {
  field(DESC, "Aerotech controller task state")
  field(SCAN, "1 second")
  field(DTYP, "stream")
  field(INP, "@$(PROTO,undefined) taskState(2) $(PORT,undefined)")
  field(PINI, "YES")
  field(FLNK, "$(U,undefined):AEROTECH_TASK2_CALC")
}

record(calcout, "$(U,undefined):AEROTECH_TASK2_CALC") {
  field(DESC, "Aerotech task state calculation")
  field(INPA, "$(U,undefined):AEROTECH_TASK2_STATE_IN")
  field(CALC, "2^A")
  field(OUT,  "$(U,undefined):AEROTECH_TASK2_STATE PP NMS")
  field(OOPT, "Every Time")
}

record(mbbi, "$(U,undefined):AEROTECH_TASK2_STATE") {
  field(DESC, "Aerotech controller task state")
  field(ZRST, "Inactive")
  field(ONST, "Idle")
  field(TWST, "Program Ready")
  field(THST, "Program Running")
  field(FRST, "Program Paused")
  field(FVST, "Program Complete")
  field(SXST, "Error")
  field(TEST, "Running Plugin")
}


# File: aeroTask.template
# Description:
# This database retrieves the Aerotech task error status and run state

record(longin, "$(U,undefined):AEROTECH_TASK3_ERROR") {
  field(DESC, "Aerotech controller task error")
  field(SCAN, "1 second")
  field(DTYP, "stream")
  field(INP, "@$(PROTO,undefined) taskError(3) $(PORT,undefined)")
  field(PINI, "YES")
}

record(longin, "$(U,undefined):AEROTECH_TASK3_STATE_IN") {
  field(DESC, "Aerotech controller task state")
  field(SCAN, "1 second")
  field(DTYP, "stream")
  field(INP, "@$(PROTO,undefined) taskState(3) $(PORT,undefined)")
  field(PINI, "YES")
  field(FLNK, "$(U,undefined):AEROTECH_TASK3_CALC")
}

record(calcout, "$(U,undefined):AEROTECH_TASK3_CALC") {
  field(DESC, "Aerotech task state calculation")
  field(INPA, "$(U,undefined):AEROTECH_TASK3_STATE_IN")
  field(CALC, "2^A")
  field(OUT,  "$(U,undefined):AEROTECH_TASK3_STATE PP NMS")
  field(OOPT, "Every Time")
}

record(mbbi, "$(U,undefined):AEROTECH_TASK3_STATE") {
  field(DESC, "Aerotech controller task state")
  field(ZRST, "Inactive")
  field(ONST, "Idle")
  field(TWST, "Program Ready")
  field(THST, "Program Running")
  field(FRST, "Program Paused")
  field(FVST, "Program Complete")
  field(SXST, "Error")
  field(TEST, "Running Plugin")
}


# File: aeroTask.template
# Description:
# This database retrieves the Aerotech task error status and run state

record(longin, "$(U,undefined):AEROTECH_TASK4_ERROR") {
  field(DESC, "Aerotech controller task error")
  field(SCAN, "1 second")
  field(DTYP, "stream")
  field(INP, "@$(PROTO,undefined) taskError(4) $(PORT,undefined)")
  field(PINI, "YES")
}

record(longin, "$(U,undefined):AEROTECH_TASK4_STATE_IN") {
  field(DESC, "Aerotech controller task state")
  field(SCAN, "1 second")
  field(DTYP, "stream")
  field(INP, "@$(PROTO,undefined) taskState(4) $(PORT,undefined)")
  field(PINI, "YES")
  field(FLNK, "$(U,undefined):AEROTECH_TASK4_CALC")
}

record(calcout, "$(U,undefined):AEROTECH_TASK4_CALC") {
  field(DESC, "Aerotech task state calculation")
  field(INPA, "$(U,undefined):AEROTECH_TASK4_STATE_IN")
  field(CALC, "2^A")
  field(OUT,  "$(U,undefined):AEROTECH_TASK4_STATE PP NMS")
  field(OOPT, "Every Time")
}

record(mbbi, "$(U,undefined):AEROTECH_TASK4_STATE") {
  field(DESC, "Aerotech controller task state")
  field(ZRST, "Inactive")
  field(ONST, "Idle")
  field(TWST, "Program Ready")
  field(THST, "Program Running")
  field(FRST, "Program Paused")
  field(FVST, "Program Complete")
  field(SXST, "Error")
  field(TEST, "Running Plugin")
}


# File: aeroTask.template
# Description:
# This database retrieves the Aerotech task error status and run state

record(longin, "$(U,undefined):AEROTECH_TASK5_ERROR") {
  field(DESC, "Aerotech controller task error")
  field(SCAN, "1 second")
  field(DTYP, "stream")
  field(INP, "@$(PROTO,undefined) taskError(5) $(PORT,undefined)")
  field(PINI, "YES")
}

record(longin, "$(U,undefined):AEROTECH_TASK5_STATE_IN") {
  field(DESC, "Aerotech controller task state")
  field(SCAN, "1 second")
  field(DTYP, "stream")
  field(INP, "@$(PROTO,undefined) taskState(5) $(PORT,undefined)")
  field(PINI, "YES")
  field(FLNK, "$(U,undefined):AEROTECH_TASK5_CALC")
}

record(calcout, "$(U,undefined):AEROTECH_TASK5_CALC") {
  field(DESC, "Aerotech task state calculation")
  field(INPA, "$(U,undefined):AEROTECH_TASK5_STATE_IN")
  field(CALC, "2^A")
  field(OUT,  "$(U,undefined):AEROTECH_TASK5_STATE PP NMS")
  field(OOPT, "Every Time")
}

record(mbbi, "$(U,undefined):AEROTECH_TASK5_STATE") {
  field(DESC, "Aerotech controller task state")
  field(ZRST, "Inactive")
  field(ONST, "Idle")
  field(TWST, "Program Ready")
  field(THST, "Program Running")
  field(FRST, "Program Paused")
  field(FVST, "Program Complete")
  field(SXST, "Error")
  field(TEST, "Running Plugin")
}


# File: aerotech_din.db
# Author: Wayne Lewis
# Date: 2017-05-08
# erotech_din.template
# Description:
# This database gets the digital input status from the Aerotech controller
# and splits it into two MBBI records.
#
# Macros:
# U 	- Controller prefix
# PROTO - Protocol file (e.g., aerotech.proto)
# PORT 	- Aerotech asyn port
# AXIS 	- Aerotech axis identifier
# SCAN 	- Desired scan rate

record(ai, "$(U,undefined):ALL_DIN") {
  field(DESC, "$(U,undefined) controller digital inputs")
  field(PINI, "YES")
  field(DTYP, "stream")
  field(INP, "@$(PROTO,undefined) getDINall($(AXIS,undefined)) $(PORT,undefined)")
  field(SCAN, "1 second")
}

record(mbbiDirect, "$(U,undefined):DIN_S0") {
  field(DESC, "Digital input lower bits")
  field(DTYP, "Raw Soft Channel")
  field(INP, "$(U,undefined):ALL_DIN CP MS")
}

record(mbbiDirect, "$(U,undefined):DIN_S1") {
  field(DESC, "Digital input higher bits")
  field(DTYP, "Raw Soft Channel")
  field(INP, "$(U,undefined):ALL_DIN CP MS")
  field(SHFT, "16")
}
#
# 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 		- Controller 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,undefined):P0IN0") {
  field(DESC, "Port 0 Input 0")
  field(INP,  "$(U,undefined):DIN_S0.B0 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P0IN1") {
  field(DESC, "Port 0 Input 1")
  field(INP,  "$(U,undefined):DIN_S0.B1 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P0IN2") {
  field(DESC, "Port 0 Input 2")
  field(INP,  "$(U,undefined):DIN_S0.B2 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P0IN3") {
  field(DESC, "Port 0 Input 3")
  field(INP,  "$(U,undefined):DIN_S0.B3 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P0IN4") {
  field(DESC, "Port 0 Input 4")
  field(INP,  "$(U,undefined):DIN_S0.B4 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P0IN5") {
  field(DESC, "Port 0 Input 5")
  field(INP,  "$(U,undefined):DIN_S0.B5 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P1IN0") {
  field(DESC, "Port 1 Input 0")
  field(INP,  "$(U,undefined):DIN_S0.B8 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P1IN1") {
  field(DESC, "Port 1 Input 1")
  field(INP,  "$(U,undefined):DIN_S0.B9 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P1IN2") {
  field(DESC, "Port 1 Input 2")
  field(INP,  "$(U,undefined):DIN_S0.BA CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P1IN3") {
  field(DESC, "Port 1 Input 3")
  field(INP,  "$(U,undefined):DIN_S0.BB CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P1IN4") {
  field(DESC, "Port 1 Input 4")
  field(INP,  "$(U,undefined):DIN_S0.BC CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P1IN5") {
  field(DESC, "Port 1 Input 5")
  field(INP,  "$(U,undefined):DIN_S0.BD CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P1IN6") {
  field(DESC, "Port 1 Input 6")
  field(INP,  "$(U,undefined):DIN_S0.BE CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P1IN7") {
  field(DESC, "Port 1 Input 7")
  field(INP,  "$(U,undefined):DIN_S0.BF CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P2IN0") {
  field(DESC, "Port 2 Input 0")
  field(INP,  "$(U,undefined):DIN_S1.B0 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P2IN1") {
  field(DESC, "Port 2 Input 1")
  field(INP,  "$(U,undefined):DIN_S1.B1 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P2IN2") {
  field(DESC, "Port 2 Input 2")
  field(INP,  "$(U,undefined):DIN_S1.B2 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P2IN3") {
  field(DESC, "Port 2 Input 3")
  field(INP,  "$(U,undefined):DIN_S1.B3 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P2IN4") {
  field(DESC, "Port 2 Input 4")
  field(INP,  "$(U,undefined):DIN_S1.B4 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P2IN5") {
  field(DESC, "Port 2 Input 5")
  field(INP,  "$(U,undefined):DIN_S1.B5 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P2IN6") {
  field(DESC, "Port 2 Input 6")
  field(INP,  "$(U,undefined):DIN_S1.B6 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

#
# 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 		- Controller 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,undefined):P2IN7") {
  field(DESC, "Port 2 Input 7")
  field(INP,  "$(U,undefined):DIN_S1.B7 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
}

