# Install.cmd script for the robot system rel 4.0
#
# Install questions
#    var 1  = irb type
#    var 2  = mounting type/dclink type
#    var 3  = irb variant
#    var 10 = temp use.
echo -text ""
echo -text "IRB 9420"
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
#NO_EXT
echo -text "Installing config for DC link (DC5)"
config -filename  $BOOTPATH/../drive_lib/t40025c1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/dc67c1b1.cfg -domain MOC -internal
goto -label ROBOT_MODEL

#ROBOT_MODEL
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 IRB9420 model :"
query -text "1.6-165" \
      -var 3 -fk_text
if -var 3 -value 10 -label IRB9420_1_6_165
if -var 3 -value 20 -label IRB9420_1_6_165
if -var 3 -value 30 -label IRB9420_1_6_165
if -var 3 -value 40 -label IRB9420_1_6_165
if -var 3 -value 50 -label IRB9420_1_6_165
goto -label END_LABEL

#IRB9420_1_6_165
echo -text "Installing IRB IRB9420/1.6-165"
install -resource Function -name "IRB" -descr "9420/1.6-165"
config -filename  $BOOTPATH/irbcfg/9421616s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/9421616i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/9421616e.cfg -domain MOC
config -filename  $BOOTPATH/irbcfg/runchn.cfg -domain MOC -internal
goto -label END_LABEL

#END_LABEL
echo -text "No calibration data available"
config -filename  $BOOTPATH/irbcfg/uncalib.cfg -domain MOC
