# Normally scanning moves from inner position to outer
# position, against the force of the vacuum.  If this
# PV is set to true, then $(dev):$(area):$(location)
# will scan from the outer to inner position, moving
# with the force of the vacuum.  The scanner is expected
# to provide best results when moving against the force
# of the vacuum.
#
# Do we need to retain this?
record(bo, "$(dev):$(area):$(location):SCANTOCENTER") {
  field(DESC, "$(mad) will scan inwards")
  field(VAL, "0")
  field(SCAN, "Passive")
  field(PINI, "YES")
  field(ONAM, "Scan to Center")
  field(ZNAM, "Scan from Center")
  info(autosaveFields, "VAL")
}

#
# Angle of $(dev):$(area):$(location) from beam's point of view
#
# Do we need to retain this?
record(ao, "$(dev):$(area):$(location):INSTALLANGLE") {
  field(DESC, "Orientation of $(mad)")
  field(EGU, "degrees")
  field(VAL, "$(orient)")
  field(SCAN, "Passive")
  field(PINI, "YES")
  info(autosaveFields, "VAL")
}

#
# Does $(dev):$(area):$(location) Have a Working X Wire?
#
record(bo, "$(dev):$(area):$(location):HASXWIRE") {
  field(DESC, "Is X Wire Avail. on $(mad)")
  field(VAL, "$(hasx)")
  field(SCAN, "Passive")
  field(PINI, "YES")
  field(ONAM, "X Wire is Usable")
  field(ZNAM, "X Wire NOT Usable")
  info(autosaveFields, "VAL")
}

#
# Will the X Wire from $(dev):$(area):$(location) be Used?
#
record(bo, "$(dev):$(area):$(location):USEXWIRE") {
  field(DESC, "Is X Wire Used on $(mad)")
  field(VAL, "$(hasx)")
  field(SCAN, "Passive")
  field(PINI, "YES")
  field(ONAM, "X Wire Selected")
  field(ZNAM, "X Wire NOT Selected")
  info(autosaveFields, "VAL")
}

#
# Distance of $(dev):$(area):$(location) X Wire from beam centerline,
# when motor is at the 0 position.  The U Wire intersecting with the
# beam centerline is defined as 0.
#
record(ao, "$(dev):$(area):$(location):XWIREOFFSET") {
  field(DESC, "Offset of $(mad) X Wire")
  field(EGU, "$(units)")
  field(VAL, "$(xoffs)")
  field(SCAN, "Passive")
  field(PINI, "YES")
  info(autosaveFields, "VAL")
}

#
# The location at which the X Wire can be positioned to
# start a scan in pull-through-beam mode on $(dev):$(area):$(location)
#
record(longout, "$(dev):$(area):$(location):XWIREOUTER") {
  field(DESC, "Outer X on $(mad)")
  field(VAL, "$(xout)")
  field(EGU, "$(units)")
  field(SCAN, "Passive")
  field(PINI, "YES")
  field(DRVH, "$(hilim)")
  field(DRVL, "$(lolim)")
  field(HOPR, "$(hilim)")
  field(LOPR, "$(lolim)")
  info(autosaveFields, "VAL")
}

#
# The location at which the X Wire can be positioned to
# start a scan in push-through-beam mode on $(dev):$(area):$(location)
#
record(longout, "$(dev):$(area):$(location):XWIREINNER") {
  field(DESC, "Inner X on $(mad)")
  field(VAL, "$(xin)")
  field(EGU, "$(units)")
  field(SCAN, "Passive")
  field(PINI, "YES")
  field(DRVH, "$(hilim)")
  field(DRVL, "$(lolim)")
  field(HOPR, "$(hilim)")
  field(LOPR, "$(lolim)")
  info(autosaveFields, "VAL")
}

#
# Does $(dev):$(area):$(location) Have a Working Y Wire?
#
record(bo, "$(dev):$(area):$(location):HASYWIRE") {
  field(DESC, "Is Y Wire Avail. on $(mad)")
  field(VAL, "$(hasy)")
  field(SCAN, "Passive")
  field(PINI, "YES")
  field(ONAM, "Y Wire is Usable")
  field(ZNAM, "Y Wire NOT Usable")
  info(autosaveFields, "VAL")
}

#
# Will the Y Wire from $(dev):$(area):$(location) be Used?
#
record(bo, "$(dev):$(area):$(location):USEYWIRE") {
  field(DESC, "Is Y Wire Used on $(mad)")
  field(VAL, "0")
  field(SCAN, "Passive")
  field(PINI, "YES")
  field(ONAM, "Y Wire Selected")
  field(ZNAM, "Y Wire NOT Selected")
  info(autosaveFields, "VAL")
}

#
# Distance of $(dev):$(area):$(location) Y Wire from beam centerline,
# when motor is at the 0 position.  The U Wire intersecting with the
# beam centerline is defined as 0.
#
record(ao, "$(dev):$(area):$(location):YWIREOFFSET") {
  field(DESC, "Offset of $(mad) Y Wire")
  field(EGU, "$(units)")
  field(VAL, "$(yoffs)")
  field(SCAN, "Passive")
  field(PINI, "YES")
  info(autosaveFields, "VAL")
}

#
# The location at which the Y Wire can be positioned to
# start a scan in pull-through-beam mode on $(dev):$(area):$(location)
#
record(longout, "$(dev):$(area):$(location):YWIREOUTER") {
  field(DESC, "Outer Y on $(mad)")
  field(VAL, "$(yout)")
  field(EGU, "$(units)")
  field(SCAN, "Passive")
  field(PINI, "YES")
  field(DRVH, "$(hilim)")
  field(DRVL, "$(lolim)")
  field(HOPR, "$(hilim)")
  field(LOPR, "$(lolim)")
  info(autosaveFields, "VAL")
}

#
# The location at which the Y Wire can be positioned to
# start a scan in push-through-beam mode on $(dev):$(area):$(location)
#
record(longout, "$(dev):$(area):$(location):YWIREINNER") {
  field(DESC, "Inner Y on $(mad)")
  field(VAL, "$(yin)")
  field(EGU, "$(units)")
  field(SCAN, "Passive")
  field(PINI, "YES")
  field(DRVH, "$(hilim)")
  field(DRVL, "$(lolim)")
  field(HOPR, "$(hilim)")
  field(LOPR, "$(lolim)")
  info(autosaveFields, "VAL")
}

# Does $(dev):$(area):$(location) Have a Working U (diagonal) Wire?
#
record(bo, "$(dev):$(area):$(location):HASUWIRE") {
  field(DESC, "Is U Wire Avail. on $(mad)")
  field(VAL, "$(hasu)")
  field(SCAN, "Passive")
  field(PINI, "YES")
  field(ONAM, "U Wire is Usable")
  field(ZNAM, "U Wire NOT Usable")
  info(autosaveFields, "VAL")
}

#
# Will the U Wire from $(dev):$(area):$(location) be Used?
#
record(bo, "$(dev):$(area):$(location):USEUWIRE") {
  field(DESC, "Is U Wire Used on $(mad)")
  field(VAL, "0")
  field(SCAN, "Passive")
  field(PINI, "YES")
  field(ONAM, "U Wire Selected")
  field(ZNAM, "U Wire NOT Selected")
  info(autosaveFields, "VAL")
}

#
# Distance of $(dev):$(area):$(location) U Wire from beam centerline,
# when motor is at the 0 position.  The U Wire intersecting with the
# beam centerline is defined as 0.
#
record(ao, "$(dev):$(area):$(location):UWIREOFFSET") {
  field(DESC, "Offset of $(mad) U Wire")
  field(EGU, "$(units)")
  field(VAL, "0")
  field(SCAN, "Passive")
  field(PINI, "YES")
  info(autosaveFields, "VAL")
}

#
# The location at which the U Wire can be positioned to
# start a scan in pull-through-beam mode on $(dev):$(area):$(location)
#
record(longout, "$(dev):$(area):$(location):UWIREOUTER") {
  field(DESC, "Outer U on $(mad)")
  field(VAL, "$(uout)")
  field(EGU, "$(units)")
  field(SCAN, "Passive")
  field(PINI, "YES")
  field(DRVH, "$(hilim)")
  field(DRVL, "$(lolim)")
  field(HOPR, "$(hilim)")
  field(LOPR, "$(lolim)")
  info(autosaveFields, "VAL")
}

#
# The location at which the U Wire can be positioned to
# start a scan in push-through-beam mode on $(dev):$(area):$(location)
#
record(longout, "$(dev):$(area):$(location):UWIREINNER") {
  field(DESC, "Inner U on $(mad)")
  field(VAL, "$(uin)")
  field(EGU, "$(units)")
  field(SCAN, "Passive")
  field(PINI, "YES")
  field(DRVH, "$(hilim)")
  field(DRVL, "$(lolim)")
  field(HOPR, "$(hilim)")
  field(LOPR, "$(lolim)")
  info(autosaveFields, "VAL")
}


#
# The number of beam pulses which $(dev):$(area):$(location)
# will intercept as it moves across the total range of travel.
# This is typically selected by the user.
#
record(ao, "$(dev):$(area):$(location):SCANPULSES") {
  field(DESC, "Pulses needed by $(mad)")
  field(VAL, "$(pulses)")
  field(SCAN, "Passive")
  field(PINI, "YES")
  info(autosaveFields, "VAL")
}


#
# A textual indication of the status of $(dev):$(area):$(location)
# Do we need this?
record(stringout, "$(dev):$(area):$(location):SCANTEXT") {
  field(DESC, "$(mad) Wire Scan Status")
  field(VAL, "READY to START Wire Scan")
  field(SCAN, "Passive")
  field(PINI, "YES")
}

