#!../../bin/rhel6-x86_64/bcsSoft
#==============================================================
#
#  Abs:  Startup Script for Bypass SEctor 26 Beam Containment
#
#  Name: st.cmd
#
#  Facility:  LCLS-II  Beam Containment System
#
#  Auth: 06-Mar-2019, Kristi Luchini    (LUCHINI)
#  Rev:  dd-mmm-yyyy, Reviewer's Name  (USERNAME)
#--------------------------------------------------------------
#  Mod:
#        18-Sep-2019, K. Luchini       (LUCHINI):
#         remove TOP from path as we are already
#         chg author to Mike Dunning
#         at TOP of application at this point.
#        07-Mar-2019, K. Luchini       (LUCHINI):
#         chg init_restore.cmd to init_restore.cmd.soft
#         chg restore.cmd to restore.cmd.soft
#
#==============================================================

# Set environment variables
epicsEnvSet("IOC_NAME", "SIOC:BPN26:BC01")
epicsEnvSet("LOCATION", "L2KG30-7E")

# Load common startup script
# Note: same file works for linuxRT
< ../common/st.cmd.soft

# DSC Beckhoff 
iocshLoad("$(TOP)/iocBoot/common/init_beckhoff_dsc.iocsh", "BKH_PORT=BKH1,BKH_IP=dsc-bpn26-bc01,BKH_P=DSC:BPN26:BC01,LOC=$(LOCATION)")

# Restore PVs
# Note: must be in TOP of app
< iocBoot/common/init_restore.cmd.soft

# Start EPICS
iocInit()

# Start monitoring pvs
< iocBoot/common/restore.cmd.soft

# Initialize caPutLog
caPutLogInit("${EPICS_CA_PUT_LOG_ADDR}")

# End of script

