#==============================================================
#
#  Abs:  Initalize Genesys Power Supply with RS232/RS485 
#
#  Name: init_asyn.cmd.soft
#
#  Side:  This script expectes the following 
#         macros tobe defined upon entry
#           TS_NODE   - Terminal server node     (ie. ts-as01-nw03)
#           TS_PORT   - Terminal server port no. (ie. 01-16)
#           PORT_NAME - Asyn portname            (ie. LGPS_AS01_1)
#
#  Facility: SLAC Magnet Controls   
#
#  Auth: 01-Aug-2014, Kristi Luchini  (LUCHINI)
#  Rev:  dd-mmm-yyyy, Reviewer's Name (USERNAME)
#--------------------------------------------------------------
#  Mod:
#        28-Aug-2019, K. Luchini      (LUCHINI):
#         rename from init_asyn.soft.cmd to init_asyn.cmd.soft
#        26-Sep-2018, K. Luchini      (LUCHINI):
#         chg env var for asynSetTraceMask and
#         asynSetTraceIOMask from TS_NAME to 
#         PORT_NAME
#
#==============================================================
#
# Genesys ps: Setup serial connection
drvAsynIPPortConfigure( "${PORT_NAME}","${TS_NODE}:21${TS_PORT}",0,0,0)

# Use the following commands for serial ASCII
asynOctetSetOutputEos(  "${PORT_NAME}",0,"\r")
asynOctetSetInputEos(   "${PORT_NAME}",0,"\r")

# Diagnostics
#asynSetTraceMask(  "${PORT_NAME}" ,-1,0x9)
#asynSetTraceIOMask("${PORT_NAME}}" ,-1,0x2)

# End of script

