# Install.cmd script for the robot system rel 4.0
#
# Install questions
#    var 1  = irb type
#    var 2  = mounting type
#    var 3  = irb variant
#    var 10 = temp use.
echo -text ""
echo -text "IRB 9410"
echo -text ""
if -var 9 -value 50 -label USER_QUERY
setvar -var 10 -value 0
getkey -id "DriveSelect" -var 10 -strvar $ANSWER -errlabel USER_QUERY
goto -strvar $ANSWER
#USER_QUERY
echo -text "Select type of external axes config."
echo -text ""
echo -text "No ext  = No external axes"
echo -text "Extaxdc = Ext axes only in drive cabinet"
query -text "No ext  Extaxdc" \
      -var 10 -fk_text
if -var 10 -value 10 -label NO_EXT
if -var 10 -value 20 -label DC3
if -var 10 -value 30 -label DC3
if -var 10 -value 40 -label DC3
if -var 10 -value 50 -label DC3
goto -label END_LABEL
#DC3
echo -text "Installing config for DC link (DC3)"
config -filename  $BOOTPATH/../drive_lib/dc3_c1b1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/trafo3c1.cfg -domain MOC -internal
goto -label ROBOT_TYPE
#NO_EXT
echo -text "Installing config for DC link (DC3)"
config -filename  $BOOTPATH/../drive_lib/dc3_c1b1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/trafo3c1.cfg -domain MOC -internal
goto -label ROBOT_TYPE
#ROBOT_TYPE
if -var 9 -value 50 -label USER_QUERY
setvar -var 10 -value 0
getkey -id "IrbSelect" -var 10 -strvar $ANSWER -errlabel USER_QUERY
goto -strvar $ANSWER
#USER_QUERY
echo -text "Select 9410 model :"
echo -text ""
query -text "2.5-300" -var 3 -fk_text
if -var 3 -value 10 -label IRB9410_2_5_300
if -var 3 -value 20 -label IRB9410_2_5_300
if -var 3 -value 30 -label IRB9410_2_5_300
if -var 3 -value 40 -label IRB9410_2_5_300
if -var 3 -value 50 -label IRB9410_2_5_300
goto -label END_LABEL
#IRB9410_2_5_300
echo -text "Installing IRB 9410/2.5-300"
install -resource Function -name "IRB" -descr "9410/2.5-300"
config -filename  $BOOTPATH/irbcfg/9410253s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/9410253i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/9410253e.cfg -domain MOC
goto -label END_LABEL
#END_LABEL
echo -text "No calibration data available"
config -filename  $BOOTPATH/irbcfg/uncalib.cfg -domain MOC
