#=====================================================================
#
# AnalogOutputs.template file
#
# Purpose: Defines records for handling channel $CHANNEL=$(CHANNEL) analog 
# outputs. There are only two outputs per channel, one to control
# the target lamp intensity and another to control the grid lamp
# intensity
#
# Macros:
# $DEVICE:       Profile Monitor base PV name 
# $CHANNEL:      Profile Monitor channel (from 1 to 4), used for
#                  information only
# $OUT_DEVICE:   EL4008 device name, links these records with the
#                  EL4008.template records
# $OUT_CHANNEL1: EL4008 channel number (from 1 to 8), for target lamp
# $OUT_CHANNEL2: EL4008 channel number (from 1 to 8), for grid lamp
#
#=====================================================================

#=====================================================================
# Output #1 - Target lamp intensity control
#=====================================================================
record(ao, "$(DEVICE):TGT_LAMP_CTRL") {
  field(DESC, "Target lamp intensity (Ch $(CHANNEL))")
  field(OUT, "$(OUT_DEVICE):OUTPUT$(OUT_CHANNEL1):ANALOGOUTPUT_VOLTS")
  field(FLNK, "$(OUT_DEVICE):OUTPUT$(OUT_CHANNEL1):ANALOGOUTPUT_VOLTS")
  field(PINI, "YES")
  field("DRVH", "10")
  field("DRVL", "0")
  field("EGU", "V")
}

#=====================================================================
# Output #2 - Grid lamp intensity control
#=====================================================================
record(ao, "$(DEVICE):GRID_LAMP_CTRL") {
  field(DESC, "Grid lamp intensity (Ch $(CHANNEL))")
  field(OUT, "$(OUT_DEVICE):OUTPUT$(OUT_CHANNEL2):ANALOGOUTPUT_VOLTS")
  field(FLNK, "$(OUT_DEVICE):OUTPUT$(OUT_CHANNEL2):ANALOGOUTPUT_VOLTS")
  field(PINI, "YES")
  field("DRVH", "10")
  field("DRVL", "0")
  field("EGU", "V")
}

