############################################################################
# File: aerotechTask.template
# Description: Contains aerotech specific task pv`s and axis name`s
# Macros: 
#        $(U) - MOC:B34:MC01
#        $(PORT) - asyn port name
#        1 - 1 through 4   
#        1 - 1 through 4   
###########################################################################
record(longin, "$(U):TASK1ERROR") {
  field(DESC, "Aerotech controller task error")
  field(SCAN, "1 second")
  field(DTYP, "stream")
  field(INP, "@aerotech.proto taskError(1) $(PORT)")
  field(PINI, "YES")
}

record(longin, "$(U):TASK1STATRAW") {
  field(DESC, "Aerotech controller task state")
  field(SCAN, "1 second")
  field(DTYP, "stream")
  field(INP, "@aerotech.proto taskState(1) $(PORT)")
  field(PINI, "YES")
  field(FLNK, "$(U):TASK1CALC")
}

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

record(mbbi, "$(U):TASK1STAT") {
  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")
}

record(stringout,"$(U):AXIS1NAME"){
  field(DESC, "Aerotech controller axis name")
  field(VAL,"")
  info(autosaveFields, "VAL")
}
############################################################################
# File: aerotechTask.template
# Description: Contains aerotech specific task pv`s and axis name`s
# Macros: 
#        $(U) - MOC:B34:MC01
#        $(PORT) - asyn port name
#        2 - 1 through 4   
#        2 - 1 through 4   
###########################################################################
record(longin, "$(U):TASK2ERROR") {
  field(DESC, "Aerotech controller task error")
  field(SCAN, "1 second")
  field(DTYP, "stream")
  field(INP, "@aerotech.proto taskError(2) $(PORT)")
  field(PINI, "YES")
}

record(longin, "$(U):TASK2STATRAW") {
  field(DESC, "Aerotech controller task state")
  field(SCAN, "1 second")
  field(DTYP, "stream")
  field(INP, "@aerotech.proto taskState(2) $(PORT)")
  field(PINI, "YES")
  field(FLNK, "$(U):TASK2CALC")
}

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

record(mbbi, "$(U):TASK2STAT") {
  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")
}

record(stringout,"$(U):AXIS2NAME"){
  field(DESC, "Aerotech controller axis name")
  field(VAL,"")
  info(autosaveFields, "VAL")
}
############################################################################
# File: aerotechTask.template
# Description: Contains aerotech specific task pv`s and axis name`s
# Macros: 
#        $(U) - MOC:B34:MC01
#        $(PORT) - asyn port name
#        3 - 1 through 4   
#        3 - 1 through 4   
###########################################################################
record(longin, "$(U):TASK3ERROR") {
  field(DESC, "Aerotech controller task error")
  field(SCAN, "1 second")
  field(DTYP, "stream")
  field(INP, "@aerotech.proto taskError(3) $(PORT)")
  field(PINI, "YES")
}

record(longin, "$(U):TASK3STATRAW") {
  field(DESC, "Aerotech controller task state")
  field(SCAN, "1 second")
  field(DTYP, "stream")
  field(INP, "@aerotech.proto taskState(3) $(PORT)")
  field(PINI, "YES")
  field(FLNK, "$(U):TASK3CALC")
}

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

record(mbbi, "$(U):TASK3STAT") {
  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")
}

record(stringout,"$(U):AXIS3NAME"){
  field(DESC, "Aerotech controller axis name")
  field(VAL,"")
  info(autosaveFields, "VAL")
}
############################################################################
# File: aerotechTask.template
# Description: Contains aerotech specific task pv`s and axis name`s
# Macros: 
#        $(U) - MOC:B34:MC01
#        $(PORT) - asyn port name
#        4 - 1 through 4   
#        4 - 1 through 4   
###########################################################################
record(longin, "$(U):TASK4ERROR") {
  field(DESC, "Aerotech controller task error")
  field(SCAN, "1 second")
  field(DTYP, "stream")
  field(INP, "@aerotech.proto taskError(4) $(PORT)")
  field(PINI, "YES")
}

record(longin, "$(U):TASK4STATRAW") {
  field(DESC, "Aerotech controller task state")
  field(SCAN, "1 second")
  field(DTYP, "stream")
  field(INP, "@aerotech.proto taskState(4) $(PORT)")
  field(PINI, "YES")
  field(FLNK, "$(U):TASK4CALC")
}

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

record(mbbi, "$(U):TASK4STAT") {
  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")
}

record(stringout,"$(U):AXIS4NAME"){
  field(DESC, "Aerotech controller axis name")
  field(VAL,"")
  info(autosaveFields, "VAL")
}
############################################################################
# File: aerotechTask.template
# Description: Contains aerotech specific task pv`s and axis name`s
# Macros: 
#        $(U) - MOC:B34:MC01
#        $(PORT) - asyn port name
#        5 - 1 through 4   
#        5 - 1 through 4   
###########################################################################
record(longin, "$(U):TASK5ERROR") {
  field(DESC, "Aerotech controller task error")
  field(SCAN, "1 second")
  field(DTYP, "stream")
  field(INP, "@aerotech.proto taskError(5) $(PORT)")
  field(PINI, "YES")
}

record(longin, "$(U):TASK5STATRAW") {
  field(DESC, "Aerotech controller task state")
  field(SCAN, "1 second")
  field(DTYP, "stream")
  field(INP, "@aerotech.proto taskState(5) $(PORT)")
  field(PINI, "YES")
  field(FLNK, "$(U):TASK5CALC")
}

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

record(mbbi, "$(U):TASK5STAT") {
  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")
}

record(stringout,"$(U):AXIS5NAME"){
  field(DESC, "Aerotech controller axis name")
  field(VAL,"")
  info(autosaveFields, "VAL")
}
############################################################################
# File: aerotechController.template
# Description: Contains aerotech specific pv`s
# Macros: 
#        $(U) - MOC:B34:MC01
#        $(PORT) - asyn port name
###########################################################################
record(stringout, "$(U):LOCA") {
  field(DESC, "Location")
  field(VAL,"")
  info(autosaveFields, "VAL")
}
record(stringout, "$(U):RESET") {
  field(DESC, "Aerotech controller Reset")
  field(DTYP, "stream")
  field(OUT, "@aerotech.proto reset $(PORT)")
}

record(stringout, "$(U):ACKALL") {
  field(DESC, "Aerotech controller Acknowledge All")
  field(DTYP, "stream")
  field(OUT, "@aerotech.proto ackAll $(PORT)")
}

record(stringout, "$(U):TASK4START") {
  field(DESC, "Aerotech task restart")
  field(DTYP, "stream")
  field(OUT, "@aerotech.proto taskRestart $(PORT)")
}

record(ao,"$(U):AXISCOUNT"){
  field(DESC, "Aerotech controller axis count")
  field(VAL,"")
  info(autosaveFields, "VAL")
}
record(asyn,"$(U):ASYN")
{
    field(DTYP,"asynRecordDevice")
    field(PORT,"$(PORT)")
    field(ADDR,"0")
    field(OMAX,"200")
    field(IMAX,"200")
}

