################################################################################
#
#  Install subject: cnv (Conveyor Tracking) with dsqc354 or dsqc377
#  $Revision: 1.16 $
#
# MODIFICATIONS
# $Log $
#
#
################################################################################
# Install.cmd script for installation of the Conveyor Tracking Option with
#	      consideration of Queue Tracking Option.
#
# Use:
#      this file will be included by the root to the main installation script
#      with the specific 'include' command.
#    var 15 =1  Sensor sync option alone installed 
#    var 15 =2  Conveyor tracking  option alone installed
#    var 15 =3  Sensor sync + CNV option alone installed 
################################################################################
#
#
# Beginning #
#

setvar -var 10 -value 0
getkey -id "SensyncMedia" -var 10 -strvar $ANSWER -errlabel CNVOPT

setvar -var 10 -value 0
getkey -id "CnvMedia" -var 10 -strvar $ANSWER -errlabel NOCNV1
if -var 15 -value 3 -label ALDONE1
echo -text " "
echo -text "Installing Sens Sync+Convey Option"

#
# Language Dependent files for Rapid and MMC, EIO System Parameters
#
text -filename $BOOTPATH/cnv_mmc.$LANG -package 0
text -filename $BOOTPATH/eio_354.$LANG -package 0
text -filename $BOOTPATH/eio_377.$LANG -package 0
#

#
# Config files for Rapid and MMC System Parameters
#

setvar -var 10 -value 0
getkey -id "MocParMmc" -var 10 -strvar $ANSWER -errlabel STD_PAR1
goto -label ADVANCE_PAR1
#STD_PAR1
config -filename $BOOTPATH/cnv_mmc.cfg -domain MMC -internal
goto -label CONFIG_NEXT1
#ADVANCE_PAR1
config -filename $BOOTPATH/cnv_mmcS.cfg -domain MMC -internal
#CONFIG_NEXT1

config -filename $BOOTPATH/sens_sys.cfg -domain SYS -internal
config -filename $BOOTPATH/cnv_sys.cfg -domain SYS -internal
config -filename $BOOTPATH/dsqc354.cfg -domain EIO -internal
config -filename $BOOTPATH/mmc_354.cfg -domain MMC -internal
config -filename $BOOTPATH/dsqc377.cfg -domain EIO -internal
config -filename $BOOTPATH/mmc_377.cfg -domain MMC -internal
#
# Config files for Encoder Board
#
config -filename $BOOTPATH/cnv1_eio.cfg -domain EIO
config -filename $BOOTPATH/cnv2_eio.cfg -domain EIO
#
# Initialize the Conveyor IPM process, this is required in order
# to be able to load the process cfg file.
#
invoke -entry convey_init

#

# Load the configuration files for the Specific Conveyor
#
config -filename $BOOTPATH/syn1_prc.cfg -domain PROC
config -filename $BOOTPATH/syn1_moc.cfg -domain MOC
config -filename $BOOTPATH/cnv2_prc.cfg -domain PROC
config -filename $BOOTPATH/cnv2_moc.cfg -domain MOC

setvar -var 15 -value 3
#
# Append the conveyor ipm process 'new' command to the options.cmd disk
#
append -from $BOOTPATH/opt_cnv.cmd -to option.cmd

goto -label END

#NOCNV1
if -var 15 -value 1 -label ALDONE2
echo -text " "
echo -text "Installing Sensor Sync Option"
#
# Language Dependent files for Rapid and MMC, EIO System Parameters
#
text -filename $BOOTPATH/sync_mmc.$LANG -package 0
text -filename $BOOTPATH/eio_354.$LANG -package 0
text -filename $BOOTPATH/eio_377.$LANG -package 0
#

#
# Config files for Rapid and MMC System Parameters
#
setvar -var 10 -value 0
getkey -id "MocParMmc" -var 10 -strvar $ANSWER -errlabel STD_PAR2
goto -label ADVANCE_PAR2
#STD_PAR2
config -filename $BOOTPATH/cnv_mmc.cfg -domain MMC -internal
goto -label CONFIG_NEXT2
#ADVANCE_PAR2
config -filename $BOOTPATH/cnv_mmcS.cfg -domain MMC -internal
#CONFIG_NEXT2

config -filename $BOOTPATH/sens_sys.cfg -domain SYS -internal
config -filename $BOOTPATH/dsqc354.cfg -domain EIO -internal
config -filename $BOOTPATH/mmc_354.cfg -domain MMC -internal
config -filename $BOOTPATH/dsqc377.cfg -domain EIO -internal
config -filename $BOOTPATH/mmc_377.cfg -domain MMC -internal
#
# Config files for Encoder Board
#
config -filename $BOOTPATH/cnv1_eio.cfg -domain EIO
#
# Initialize the Conveyor IPM process, this is required in order
# to be able to load the process cfg file.
#
invoke -entry convey_init

#

# Load the configuration files for the Specific Conveyor
#
config -filename $BOOTPATH/syn1_prc.cfg -domain PROC
config -filename $BOOTPATH/syn1_moc.cfg -domain MOC

setvar -var 15 -value 1
#
# Append the conveyor ipm process 'new' command to the options.cmd disk
#
append -from $BOOTPATH/opt_cnv.cmd -to option.cmd

goto -label END

#ALDONE1
echo -text " "
echo -text "Allready inst sens+cnv"
goto -label END


#ALDONE2
echo -text " "
echo -text "Allready inst sens"
goto -label END



#CNVOPT
echo -text " "
setvar -var 10 -value 0
getkey -id "CnvMedia" -var 10 -strvar $ANSWER -errlabel NOCNV
if -var 15 -value 2 -label ALDONE3
echo -text "Installing Conveyor Option"

goto -label CNV1
#NOCNV
echo -text "No Conveyor Option"
goto -label END

#CNV1
#
# Language Dependent files for Rapid and MMC, EIO System Parameters
#
text -filename $BOOTPATH/cnv_mmc.$LANG -package 0
text -filename $BOOTPATH/eio_354.$LANG -package 0
#
#
# Config files for Rapid and MMC System Parameters
#
setvar -var 10 -value 0
getkey -id "MocParMmc" -var 10 -strvar $ANSWER -errlabel STD_PAR3
goto -label ADVANCE_PAR3
#STD_PAR3
config -filename $BOOTPATH/cnv_mmc.cfg -domain MMC -internal
goto -label CONFIG_NEXT3
#ADVANCE_PAR3
config -filename $BOOTPATH/cnv_mmcS.cfg -domain MMC -internal
#CONFIG_NEXT3

config -filename $BOOTPATH/cnv_sys.cfg -domain SYS -internal
config -filename $BOOTPATH/dsqc354.cfg -domain EIO -internal
config -filename $BOOTPATH/mmc_354.cfg -domain MMC -internal
config -filename $BOOTPATH/dsqc377.cfg -domain EIO -internal
config -filename $BOOTPATH/mmc_377.cfg -domain MMC -internal

setvar -var 10 -value 0
getkey -id "EXPROVMedia" -var 10 -strvar $ANSWER -errlabel NEXT
goto -strvar $ANSWER
#EXPROV
config -filename $BOOTPATH/cnvif.cfg -domain EIO -internal
config -filename $BOOTPATH/mmc_cnvif.cfg -domain MMC -internal

#NEXT
setvar -var 10 -value 0
getkey -id "EncoderNode" -var 10 -strvar $ANSWER -errlabel DSQC354
goto -strvar $ANSWER

#DSQC354
#
#
# Config files for Encoder Board
#
config -filename $BOOTPATH/cnv1_eio.cfg -domain EIO
#
text -filename $BOOTPATH/eio_377.$LANG -package 0
#

# Initialize the Conveyor IPM process, this is required in order
# to be able to load the process cfg file.
#
invoke -entry convey_init

#
# Load the configuration files for the Specific Conveyor
#
config -filename $BOOTPATH/cnv1_prc.cfg -domain PROC
config -filename $BOOTPATH/cnv1_moc.cfg -domain MOC
#
# Append the conveyor ipm process 'new' command to the options.cmd disk
#
append -from $BOOTPATH/opt_cnv.cmd -to option.cmd
setvar -var 15 -value 2
goto -label ACT_UNIT

#ALDONE3
echo -text " "
echo -text "Allready inst cnv"
goto -label END


#DSQC377
#
# Config files for Queue Traking Board
#
config -filename $BOOTPATH/cnvq_eio.cfg -domain EIO
#
#Text file
#
text -filename $BOOTPATH/eio_377.$LANG -package 0
#
# Initialize the Conveyor IPM process, this is required in order
# to be able to load the process cfg file.
#
invoke -entry convey_init

#
# Load the configuration files for the Specific Conveyor
#
config -filename $BOOTPATH/cnvq_prc.cfg -domain PROC
config -filename $BOOTPATH/cnv1_moc.cfg -domain MOC

setvar -var 15 -value 2
#
# Append the conveyor ipm process 'new' command to the options.cmd disk
#
append -from $BOOTPATH/opt_cnv.cmd -to option.cmd

goto -label ACT_UNIT

#Cnvif
#
#Config files for virtual conveyor tracking node on ACA
#
config -filename $BOOTPATH/cnvif_eio.cfg -domain EIO
#
#Text file
#
text -filename $BOOTPATH/eiocnvif.$LANG -package 0
#
# Initialize the Conveyor IPM process, this is required in order
# to be able to load the process cfg file.
#
invoke -entry convey_init
#
# Load the configuration files for the Specific Conveyor
#
config -filename $BOOTPATH/cnvif_prc.cfg -domain PROC
config -filename $BOOTPATH/cnv1_moc.cfg -domain MOC
setvar -var 15 -value 2
#
# Append the conveyor ipm process 'new' command to the options.cmd disk
#
append -from $BOOTPATH/opt_cnv.cmd -to option.cmd
#
#ACT_UNIT
# If paintware is installed the conveyor will be activated at startup
#
setvar -var 10 -value 0
getkey -id "EXPROVMedia" -var 10 -strvar $ANSWER -errlabel END
goto -strvar $ANSWER
#EXPROV
config -filename $BOOTPATH/cnv_pnt.cfg -domain MOC -replace
#END
#
echo -text "...done"



