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

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

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

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

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

record(ai, "$(DEVICE):X: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):X:AUTOHOMETRIGFAULTS1") {
  field(DESC, "fault lower bits")
  field(DTYP, "Raw Soft Channel")
  field(INP, "$(DEVICE):X:AUTOHOMETRIGFAULT CP MS")
}

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

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

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

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

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

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

record(bi, "$(DEVICE):X:HOMEDSTAT") {
  field(DESC, "Axis homed")
  field(INP,  "$(DEVICE):X: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):X:CABLESTAT_CALC") {
  field(DESC, "Motor Cable Status")
  field(INPA, "$(DEVICE):X:STATS2.B6 CP MS")
  field(INPB, "$(DEVICE):X:STATS2.B7 CP MS")
  field(CALC, "(A&&B)")
  field(FLNK, "$(DEVICE):X:CABLESTAT")
}

record(bo, "$(DEVICE):X:CABLESTAT") {
  field(DESC, "Motor Cable Status")
  field(DOL,  "$(DEVICE):X:CABLESTAT_CALC MS")
  field(ONAM, "Motor cable disconnected")
  field(ZNAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
}

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

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

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

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

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

record(stringout, "$(DEVICE):X:HOME") {
  field(DESC, "Home axis")
  field(DTYP, "stream")
  field(OUT,  "@aerotech.proto axisHome(@0) $(ASYN_PORT)")
}

record(ai, "$(DEVICE):X:IDES") {
  field(DESC, "axis current")
  field(PINI, "YES")
  field(DTYP, "stream")
  field(INP, "@aerotech.proto getCur(@0) $(ASYN_PORT)")
  field(SCAN, "1 second")
  field(PREC, 2)
}

record(ai, "$(DEVICE):X:EXTPOSN") {
  field(DESC, "Aux Encoder Position")
  field(PINI, "YES")
  field(DTYP, "stream")
  field(INP, "@aerotech.proto extPos(@0) $(ASYN_PORT)")
  field(SCAN, "1 second")
  field(PREC, 3)
  field(LINR, "SLOPE")
  info(autosaveFields, "ESLO EOFF EGU")
}

record(ai, "$(DEVICE):X:EncOffset") {
    field(DESC, "ZPEPPEx Encoder offset")
    field(DTYP, "stream")
    field(INP, "@aerotech.proto getEncOff(@0) $(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):X:DIP0IN0") {
  field(DESC, "Port 0 Input 0")
  field(INP,  "$(DEVICE):X: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):X:DIP0IN1") {
  field(DESC, "Port 0 Input 1")
  field(INP,  "$(DEVICE):X: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):X:DIP0IN2") {
  field(DESC, "Port 0 Input 2")
  field(INP,  "$(DEVICE):X: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):X:DIP0IN3") {
  field(DESC, "Port 0 Input 3")
  field(INP,  "$(DEVICE):X: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):X:DIP0IN4") {
  field(DESC, "Port 0 Input 4")
  field(INP,  "$(DEVICE):X: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):X:DIP0IN5") {
  field(DESC, "Port 0 Input 5")
  field(INP,  "$(DEVICE):X: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):X:DIP1IN0") {
  field(DESC, "Port 1 Input 0")
  field(INP,  "$(DEVICE):X: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):X:DIP1IN1") {
  field(DESC, "Port 1 Input 1")
  field(INP,  "$(DEVICE):X: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):X:DIP1IN2") {
  field(DESC, "Port 1 Input 2")
  field(INP,  "$(DEVICE):X: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):X:DIP1IN3") {
  field(DESC, "Port 1 Input 3")
  field(INP,  "$(DEVICE):X: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):X:DIP1IN4") {
  field(DESC, "Port 1 Input 4")
  field(INP,  "$(DEVICE):X: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):X:DIP1IN5") {
  field(DESC, "Port 1 Input 5")
  field(INP,  "$(DEVICE):X: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):X:DIP1IN6") {
  field(DESC, "Port 1 Input 6")
  field(INP,  "$(DEVICE):X: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):X:DIP1IN7") {
  field(DESC, "Port 1 Input 7")
  field(INP,  "$(DEVICE):X: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):X:DIP2IN0") {
  field(DESC, "Port 2 Input 0")
  field(INP,  "$(DEVICE):X: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):X:DIP2IN1") {
  field(DESC, "Port 2 Input 1")
  field(INP,  "$(DEVICE):X: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):X:DIP2IN2") {
  field(DESC, "Port 2 Input 2")
  field(INP,  "$(DEVICE):X: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):X:DIP2IN3") {
  field(DESC, "Port 2 Input 3")
  field(INP,  "$(DEVICE):X: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):X:DIP2IN4") {
  field(DESC, "Port 2 Input 4")
  field(INP,  "$(DEVICE):X: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):X:DIP2IN5") {
  field(DESC, "Port 2 Input 5")
  field(INP,  "$(DEVICE):X: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):X:DIP2IN6") {
  field(DESC, "Port 2 Input 6")
  field(INP,  "$(DEVICE):X: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):X:DIP2IN7") {
  field(DESC, "Port 2 Input 7")
  field(INP,  "$(DEVICE):X: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):Y:DISTAT") {
  field(DESC, "digital inputs")
  field(PINI, "YES")
  field(DTYP, "stream")
  field(INP, "@aerotech.proto getDINall(@1) $(ASYN_PORT)")
  field(SCAN, "1 second")
}

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

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

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

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

record(ai, "$(DEVICE):Y: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):Y:AUTOHOMETRIGFAULTS1") {
  field(DESC, "fault lower bits")
  field(DTYP, "Raw Soft Channel")
  field(INP, "$(DEVICE):Y:AUTOHOMETRIGFAULT CP MS")
}

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

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

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

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

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

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

record(bi, "$(DEVICE):Y:HOMEDSTAT") {
  field(DESC, "Axis homed")
  field(INP,  "$(DEVICE):Y: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):Y:CABLESTAT_CALC") {
  field(DESC, "Motor Cable Status")
  field(INPA, "$(DEVICE):Y:STATS2.B6 CP MS")
  field(INPB, "$(DEVICE):Y:STATS2.B7 CP MS")
  field(CALC, "(A&&B)")
  field(FLNK, "$(DEVICE):Y:CABLESTAT")
}

record(bo, "$(DEVICE):Y:CABLESTAT") {
  field(DESC, "Motor Cable Status")
  field(DOL,  "$(DEVICE):Y:CABLESTAT_CALC MS")
  field(ONAM, "Motor cable disconnected")
  field(ZNAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
}

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

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

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

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

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

record(stringout, "$(DEVICE):Y:HOME") {
  field(DESC, "Home axis")
  field(DTYP, "stream")
  field(OUT,  "@aerotech.proto axisHome(@1) $(ASYN_PORT)")
}

record(ai, "$(DEVICE):Y:IDES") {
  field(DESC, "axis current")
  field(PINI, "YES")
  field(DTYP, "stream")
  field(INP, "@aerotech.proto getCur(@1) $(ASYN_PORT)")
  field(SCAN, "1 second")
  field(PREC, 2)
}

record(ai, "$(DEVICE):Y:EXTPOSN") {
  field(DESC, "Aux Encoder Position")
  field(PINI, "YES")
  field(DTYP, "stream")
  field(INP, "@aerotech.proto extPos(@1) $(ASYN_PORT)")
  field(SCAN, "1 second")
  field(PREC, 3)
  field(LINR, "SLOPE")
  info(autosaveFields, "ESLO EOFF EGU")
}

record(ai, "$(DEVICE):Y:EncOffset") {
    field(DESC, "ZPEPPEx Encoder offset")
    field(DTYP, "stream")
    field(INP, "@aerotech.proto getEncOff(@1) $(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):Y:DIP0IN0") {
  field(DESC, "Port 0 Input 0")
  field(INP,  "$(DEVICE):Y: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):Y:DIP0IN1") {
  field(DESC, "Port 0 Input 1")
  field(INP,  "$(DEVICE):Y: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):Y:DIP0IN2") {
  field(DESC, "Port 0 Input 2")
  field(INP,  "$(DEVICE):Y: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):Y:DIP0IN3") {
  field(DESC, "Port 0 Input 3")
  field(INP,  "$(DEVICE):Y: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):Y:DIP0IN4") {
  field(DESC, "Port 0 Input 4")
  field(INP,  "$(DEVICE):Y: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):Y:DIP0IN5") {
  field(DESC, "Port 0 Input 5")
  field(INP,  "$(DEVICE):Y: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):Y:DIP1IN0") {
  field(DESC, "Port 1 Input 0")
  field(INP,  "$(DEVICE):Y: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):Y:DIP1IN1") {
  field(DESC, "Port 1 Input 1")
  field(INP,  "$(DEVICE):Y: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):Y:DIP1IN2") {
  field(DESC, "Port 1 Input 2")
  field(INP,  "$(DEVICE):Y: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):Y:DIP1IN3") {
  field(DESC, "Port 1 Input 3")
  field(INP,  "$(DEVICE):Y: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):Y:DIP1IN4") {
  field(DESC, "Port 1 Input 4")
  field(INP,  "$(DEVICE):Y: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):Y:DIP1IN5") {
  field(DESC, "Port 1 Input 5")
  field(INP,  "$(DEVICE):Y: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):Y:DIP1IN6") {
  field(DESC, "Port 1 Input 6")
  field(INP,  "$(DEVICE):Y: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):Y:DIP1IN7") {
  field(DESC, "Port 1 Input 7")
  field(INP,  "$(DEVICE):Y: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):Y:DIP2IN0") {
  field(DESC, "Port 2 Input 0")
  field(INP,  "$(DEVICE):Y: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):Y:DIP2IN1") {
  field(DESC, "Port 2 Input 1")
  field(INP,  "$(DEVICE):Y: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):Y:DIP2IN2") {
  field(DESC, "Port 2 Input 2")
  field(INP,  "$(DEVICE):Y: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):Y:DIP2IN3") {
  field(DESC, "Port 2 Input 3")
  field(INP,  "$(DEVICE):Y: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):Y:DIP2IN4") {
  field(DESC, "Port 2 Input 4")
  field(INP,  "$(DEVICE):Y: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):Y:DIP2IN5") {
  field(DESC, "Port 2 Input 5")
  field(INP,  "$(DEVICE):Y: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):Y:DIP2IN6") {
  field(DESC, "Port 2 Input 6")
  field(INP,  "$(DEVICE):Y: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):Y:DIP2IN7") {
  field(DESC, "Port 2 Input 7")
  field(INP,  "$(DEVICE):Y:DISTATS1.B7 CP NMS")
  field(ZNAM, "Off")
  field(ONAM, "On")
  info(autosaveFields, "DESC")
}

record(motor, "$(DEVICE):X:MOTR") {
  field(DESC, "ZPEPPEx X")
  field(DTYP, "asynMotor")
  field(DIR, "Neg")
  field(VELO, "1")
  field(VBAS, "0.1")
  field(VMAX, "1")
  field(ACCL, "0.5")
  field(BDST, "0")
  field(OUT, "@asyn($(MOTOR_PORT),0)")
  field(MRES, "5e-5")
  field(ERES, "5e-5")
  field(PREC, "3")
  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):Y:MOTR") {
  field(DESC, "ZPEPPEx Y")
  field(DTYP, "asynMotor")
  field(DIR, "Pos")
  field(VELO, "0.75")
  field(VBAS, "0.1")
  field(VMAX, "0.75")
  field(ACCL, "0.5")
  field(BDST, "0")
  field(OUT, "@asyn($(MOTOR_PORT),1)")
  field(MRES, "5e-5")
  field(ERES, "5e-5")
  field(PREC, "3")
  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(ai, "$(DEVICE):X:EncRdbk") {
    field(DESC, "ZPEPPEx X Encoder Readback")
    field(DTYP, "stream")
    field(PINI, "YES")
    field(INP,  "@aerotech.proto getDGLOBAL(0) $(ASYN_PORT)")
    field(SCAN, "1 second")
    field(PREC, "3")
    field(EGU, "mm")
}
record(ai, "$(DEVICE):Y:EncRdbk") {
    field(DESC, "ZPEPPEx Y Encoder Readback")
    field(DTYP, "stream")
    field(PINI, "YES")
    field(INP,  "@aerotech.proto getDGLOBAL(1) $(ASYN_PORT)")
    field(SCAN, "1 second")
    field(PREC, "3")
    field(EGU, "mm")
}
