# 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 4  = robot type
#    var 10 = temp use.
echo -text ""
echo -text "IRB 340/2 Family"
echo -text ""
echo -text "Installing configuration "
echo -text "for trafo and DC link"
echo -text ""
config -filename  $BOOTPATH/../drive_lib/dc2_c1b1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/trafo2c1.cfg -domain MOC -internal
# robot config
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 robot type for IRB340/2"
query -text "Type A  Type B  " -var 4 -fk_text
if -var 4 -value 10 -label IRB340_R2
if -var 4 -value 20 -label IRB340_R2_Y
if -var 4 -value 30 -label IRB340_R2_Y
if -var 4 -value 40 -label IRB340_R2_Y
if -var 4 -value 50 -label IRB340_R2_Y
goto -label END_LABEL
#IRB340_R2
echo -text "Installing IRB 340/2 TYPE A"
install -resource Function -name "IRB" -descr "340_R2"
config -filename  $BOOTPATH/irbcfg/m340r2s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/m340r2i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/m340r2e.cfg -domain MOC
config -filename  $BOOTPATH/irbcfg/uncalib4.cfg -domain MOC
goto -label END_LABEL
#IRB340_R2_Y
echo -text "Installing IRB 340/2 TYPE B"
install -resource Function -name "IRB" -descr "340_R2"
config -filename  $BOOTPATH/irbcfg/m340r2ys.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/m340r2yi.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/m340r2ye.cfg -domain MOC
config -filename  $BOOTPATH/irbcfg/uncalib4.cfg -domain MOC
#END_LABEL
