# 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 6650"
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 year model"
echo -text ""
query -text "M2000   M2000A" -var 10 -fk_text
if -var 10 -value 10 -label M2000
if -var 10 -value 20 -label M2000A
if -var 10 -value 30 -label M2000A
if -var 10 -value 40 -label M2000A
if -var 10 -value 50 -label M2000A
goto -label END_LABEL

#M2000
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 TRAFO5
if -var 10 -value 30 -label TRAFO5
if -var 10 -value 40 -label TRAFO5
if -var 10 -value 50 -label TRAFO5
goto -label END_LABEL

#M2000A
echo -text "Select type of external axes config."
echo -text ""
echo -text "No ext = No external axes"
echo -text "V      = External axes V"
echo -text "VW     = External axes V + W"
echo -text "W      = External axes W"
query -text "No ext    V       VW      W" \
      -var 10 -fk_text
if -var 10 -value 10 -label DC5A
if -var 10 -value 20 -label DC5AV
if -var 10 -value 30 -label DC5AVW
if -var 10 -value 40 -label DC5AW
if -var 10 -value 50 -label DC5AW
goto -label END_LABEL

#TRAFO5
echo -text "Installing config for trafo (TRAFO5)"
config -filename  $BOOTPATH/../drive_lib/t40025c1.cfg -domain MOC -internal
goto -label EXTCAB
#DC5
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 EXTCAB
#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
#DC5A
echo -text "Installing config for DC link (DC5A)"
config -filename  $BOOTPATH/../drive_lib/t40025c1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/dc67c1b1l1.cfg -domain MOC -internal
goto -label ROBOT_MODEL
#DC5AV
echo -text "Installing config for DC link (DC5AV)"
config -filename  $BOOTPATH/../drive_lib/t40025c1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/dc67c1b1l1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/drive7_v_c1b1l2.cfg -domain MOC
goto -label ROBOT_MODEL
#DC5AVW
echo -text "Installing config for DC link (DC5AVW)"
config -filename  $BOOTPATH/../drive_lib/t40025c1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/dc67c1b1l1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/drive7_8_vw_c1b2l1.cfg -domain MOC
goto -label ROBOT_MODEL
#DC5AW
echo -text "Installing config for DC link (DC5AW)"
config -filename  $BOOTPATH/../drive_lib/t40025c1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/dc67c1b1l1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/drive7_w_c1b1l2.cfg -domain MOC
goto -label ROBOT_MODEL

#EXTCAB
if -var 9 -value 50 -label USER_QUERY
setvar -var 10 -value 0
getkey -id "DriveSelectExtCab" -var 10 -strvar $ANSWER -errlabel ROBOT_MODEL
goto -strvar $ANSWER
#USER_QUERY
echo -text "Select ext. axes in drive cabinet or DDU"
echo -text ""
echo -text "None  = No external drive cabinet"
echo -text "CAB   = External axes in drive cabinet"
echo -text "DDU   = External axes in DDU"
query -text " None    CAB     DDU" -var 10 -fk_text
if -var 10 -value 10 -label LINK5
if -var 10 -value 20 -label EXT_CAB
if -var 10 -value 30 -label EXT_DDU
if -var 10 -value 40 -label EXT_DDU
if -var 10 -value 50 -label EXT_DDU
goto -label ROBOT_MODEL

#EXT_CAB
echo -text "Select external axes in drive cabinet"
echo -text ""
echo -text "2xGT    = Ext axes 2 x GT"
echo -text "3xGT    = Ext axes 3 x GT"
echo -text "2xECB   = Ext axes 2 x ECB"
echo -text "ECB1xGT = Ext axes 1 x ECB + 1 x GT"
echo -text "ECB2xGT = Ext axes 1 x ECB + 2 x GT"
query -text " 2xGT    3xGT   2xECB   ECB1xGT ECB2xGT" -var 10 -fk_text
if -var 10 -value 10 -label EXT_2GTV
if -var 10 -value 20 -label EXT_3GTV
if -var 10 -value 30 -label EXT_2ECBV
if -var 10 -value 40 -label EXT_ECBGTV
if -var 10 -value 50 -label EXT_ECB2GTV
goto -label ROBOT_MODEL

#EXT_DDU
echo -text "Select external axes in DDU"
echo -text ""
echo -text "DDU-W   = External axes DDU W"
echo -text "DDU-V   = External axes DDU V"
echo -text "DDU-VW  = External axes DDU V + W"
query -text " DDU-W   DDU-V   DDU-VW" -var 10 -fk_text
if -var 10 -value 10 -label EXT_DDU_W
if -var 10 -value 20 -label EXT_DDU_V
if -var 10 -value 30 -label EXT_DDU_VW
if -var 10 -value 40 -label EXT_DDU_VW
if -var 10 -value 50 -label EXT_DDU_VW
goto -label ROBOT_MODEL

#EMPTY
goto -label ROBOT_MODEL
#LINK5
echo -text "Installing config for external cabinet"
echo -text "(LINK5)"
config -filename  $BOOTPATH/../drive_lib/dc67c1b1.cfg -domain MOC -internal
goto -label ROBOT_MODEL
#EXT_2GT
echo -text "Installing config for external cabinet"
echo -text "(ext_2gt)"
config -filename  $BOOTPATH/../drive_lib/dc2_c2b2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/trafo2c2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/drive7_10_2xgt_c2b2.cfg -domain MOC
goto -label ROBOT_MODEL
#EXT_3GT
echo -text "Installing config for external cabinet"
echo -text "(ext_3gt)"
config -filename  $BOOTPATH/../drive_lib/dc2_c2b2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/trafo2c2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/drive7_12_3xgt_c2b2.cfg -domain MOC
goto -label ROBOT_MODEL
#EXT_2ECB
echo -text "Installing config for external cabinet"
echo -text "(ext_2ecb)"
config -filename  $BOOTPATH/../drive_lib/dc2_c2b2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/trafo2c2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/drive7_12_2xecb_c2b2.cfg -domain MOC
goto -label ROBOT_MODEL
#EXT_ECBGT
echo -text "Installing config for external cabinet"
echo -text "(ext_ecbgt)"
config -filename  $BOOTPATH/../drive_lib/dc2_c2b2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/trafo2c2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/drive7_10_ecgt_c2b2.cfg -domain MOC
goto -label ROBOT_MODEL
#EXT_ECB2GT
echo -text "Installing config for external cabinet"
echo -text "(ext_ecb2gt)"
config -filename  $BOOTPATH/../drive_lib/dc2_c2b2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/trafo2c2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/drive7_12_ec2xgt_c2b2.cfg -domain MOC
goto -label ROBOT_MODEL

#EXT_2GTV
echo -text "Installing config for external cabinet"
echo -text "(ext_2gtV)"
config -filename  $BOOTPATH/../drive_lib/dc67c1b1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/dc2_c2b2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/trafo2c2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/drive7_10_2xgt_c2b2.cfg -domain MOC
goto -label ROBOT_MODEL
#EXT_3GTV
echo -text "Installing config for external cabinet"
echo -text "(ext_3gtV)"
config -filename  $BOOTPATH/../drive_lib/dc67c1b1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/dc2_c2b2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/trafo2c2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/drive7_12_3xgt_c2b2.cfg -domain MOC
goto -label ROBOT_MODEL
#EXT_2ECBV
echo -text "Installing config for external cabinet"
echo -text "(ext_2ecbV)"
config -filename  $BOOTPATH/../drive_lib/dc67c1b1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/dc2_c2b2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/trafo2c2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/drive7_12_2xecb_c2b2.cfg -domain MOC
goto -label ROBOT_MODEL
#EXT_ECBGTV
echo -text "Installing config for external cabinet"
echo -text "(ext_ecbgtV)"
config -filename  $BOOTPATH/../drive_lib/dc67c1b1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/dc2_c2b2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/trafo2c2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/drive7_10_ecgt_c2b2.cfg -domain MOC
goto -label ROBOT_MODEL
#EXT_ECB2GTV
echo -text "Installing config for external cabinet"
echo -text "(ext_ecb2gtV)"
config -filename  $BOOTPATH/../drive_lib/dc67c1b1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/dc2_c2b2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/trafo2c2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/drive7_12_ec2xgt_c2b2.cfg -domain MOC
goto -label ROBOT_MODEL
#EXT_DDU_W
echo -text "Installing config for DDU W"
config -filename  $BOOTPATH/../drive_lib/dc67c1b1l1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/dc67c2b1l2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/drive7_w_c2b1l2.cfg -domain MOC
goto -label ROBOT_MODEL
#EXT_DDU_VW
echo -text "Installing config for DDU V + W"
config -filename  $BOOTPATH/../drive_lib/dc67c1b1l1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/dc67c2b2l1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/drive7_8_vw_c2b2l1.cfg -domain MOC
goto -label ROBOT_MODEL
#EXT_DDU_V
echo -text "Installing config for DDU V"
config -filename  $BOOTPATH/../drive_lib/dc67c1b1l1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/dc67c2b1l2.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/drive7_v_c2b1l2.cfg -domain MOC
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 type of IRB6650 model"
echo -text ""
query -text "IRB6650        IRB6650ID              " -var 10 -fk_text
if -var 10 -value 10 -label IRB6650
if -var 10 -value 20 -label IRB6650
if -var 10 -value 30 -label IRB6650ID
if -var 10 -value 40 -label IRB6650ID
if -var 10 -value 50 -label IRB6650ID
goto -label END_LABEL

#IRB6650
echo -text "Select IRB6650 model :"
query -text "2.75-200 3.0-200 3.2-125 3.5-125  SCAN" \
     -text2 "2.75-200 TYPE B  3.2-125 TYPE B   SCAN" -var 3 -fk_text
if -var 3 -value 10 -label IRB6650_2_75_200
if -var 3 -value 20 -label IRB6650S_3_00_200
if -var 3 -value 30 -label IRB6650_3_20_125
if -var 3 -value 40 -label IRB6650S_3_50_125
if -var 3 -value 110 -label IRB6650_2_75_200_TYPEB
if -var 3 -value 120 -label IRB6650_2_75_200_TYPEB
if -var 3 -value 130 -label IRB6650_3_20_125_TYPEB
if -var 3 -value 140 -label IRB6650_3_20_125_TYPEB
goto -label END_LABEL

#IRB6650ID
echo -text "Select IRB6650ID model :"
query -text "2.75-170                              " -var 3 -fk_text
if -var 3 -value 10 -label IRB6650ID_2_75_170
if -var 3 -value 20 -label IRB6650ID_2_75_170
if -var 3 -value 30 -label IRB6650ID_2_75_170
if -var 3 -value 40 -label IRB6650ID_2_75_170
if -var 3 -value 50 -label IRB6650ID_2_75_170
goto -label END_LABEL

#IRB6650_2_75_200
echo -text "Installing IRB 6650/2.75-200"
install -resource Function -name "IRB" -descr "6650/2.75-200"
config -filename  $BOOTPATH/irbcfg/6652752s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/6652752i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/6652752e.cfg -domain MOC
config -filename  $BOOTPATH/irbcfg/runchn.cfg -domain MOC -internal
goto -label END_LABEL
#IRB6650_2_75_200_TYPEB
echo -text "Installing IRB 6650/2.75-200 type B"
install -resource Function -name "IRB" -descr "6650/2.75-200"
config -filename  $BOOTPATH/irbcfg/6652752_TYPEB_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/6652752_TYPEB_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/6652752_TYPEB_e.cfg -domain MOC
config -filename  $BOOTPATH/irbcfg/runchn.cfg -domain MOC -internal
goto -label END_LABEL
#IRB6650_3_20_105
echo -text "Installing IRB 6650/3.2-105"
install -resource Function -name "IRB" -descr "6650/3.2-105"
config -filename  $BOOTPATH/irbcfg/6653210s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/6653210i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/6653210e.cfg -domain MOC
config -filename  $BOOTPATH/irbcfg/runchn.cfg -domain MOC -internal
goto -label END_LABEL
#IRB6650_3_20_125
echo -text "Installing IRB 6650/3.2-125"
install -resource Function -name "IRB" -descr "6650/3.2-125"
config -filename  $BOOTPATH/irbcfg/6653212s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/6653212i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/6653212e.cfg -domain MOC
config -filename  $BOOTPATH/irbcfg/runchn.cfg -domain MOC -internal
goto -label END_LABEL
#IRB6650_3_20_125_TYPEB
echo -text "Installing IRB 6650/3.2-125 type B"
install -resource Function -name "IRB" -descr "6650/3.2-125"
config -filename  $BOOTPATH/irbcfg/6653212_TYPEB_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/6653212_TYPEB_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/6653212_TYPEB_e.cfg -domain MOC
config -filename  $BOOTPATH/irbcfg/runchn.cfg -domain MOC -internal
goto -label END_LABEL
#IRB6650S_3_00_200
echo -text "Installing IRB 6650S/3.0-200"
install -resource Function -name "IRB" -descr "6650S/3.0-200"
config -filename  $BOOTPATH/irbcfg/6653020s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/6653020i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/6653020e.cfg -domain MOC
config -filename  $BOOTPATH/irbcfg/runchn.cfg -domain MOC -internal
goto -label END_LABEL
#IRB6650S_3_50_125
echo -text "Installing IRB 6650S/3.5-125"
install -resource Function -name "IRB" -descr "6650S/3.5-125"
config -filename  $BOOTPATH/irbcfg/6653512s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/6653512i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/6653512e.cfg -domain MOC
config -filename  $BOOTPATH/irbcfg/runchn.cfg -domain MOC -internal
goto -label END_LABEL
#IRB6650ID_2_75_170
echo -text "Installing IRB 6650ID/2.75-170"
install -resource Function -name "IRB" -descr "6650ID/2.75-170"
config -filename  $BOOTPATH/irbcfg/665ID275170s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/665ID275170i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irbcfg/665ID275170e.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
