# Install.cmd script for the S4C system 
# Install questions
#    var 1  = irb type
#    var 2  = mounting type/dclink type
#    var 3  = irb variant
#    var 10 = temp use.
echo -text ""
echo -text "Industrial Robot Controller (IRC)"
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 DC link:"
query -text " DC1     DC2     DC3     DC5      SCAN" \
     -text2 " DC1A    DC2A    DC3A    DC5A     SCAN" -var 10 -fk_text
if -var 10 -value 10 -label DC1
if -var 10 -value 20 -label DC2
if -var 10 -value 30 -label DC3
if -var 10 -value 40 -label DC5
if -var 10 -value 110 -label DC1A
if -var 10 -value 120 -label DC2A
if -var 10 -value 130 -label DC3A
if -var 10 -value 140 -label DC5A
goto -label END_LABEL
#DC1
echo -text "Installing config for DC link (DC1)"
config -filename  $BOOTPATH/../drive_lib/dc1_c1b1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/trafo1c1.cfg -domain MOC -internal
goto -label DRIVE_UNIT
#DC2
echo -text "Installing config for DC link (DC2)"
config -filename  $BOOTPATH/../drive_lib/dc2_c1b1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/trafo2c1.cfg -domain MOC -internal
goto -label DRIVE_UNIT
#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 DRIVE_UNIT
#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 DRIVE_UNIT
#DC1A
echo -text "Installing config for DC link (DC1)"
config -filename  $BOOTPATH/../drive_lib/dc1_c1b1l1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/trafo1c1.cfg -domain MOC -internal
goto -label DRIVE_UNIT
#DC2A
echo -text "Installing config for DC link (DC2)"
config -filename  $BOOTPATH/../drive_lib/dc2_c1b1l1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/trafo2c1.cfg -domain MOC -internal
goto -label DRIVE_UNIT
#DC3A
echo -text "Installing config for DC link (DC3)"
config -filename  $BOOTPATH/../drive_lib/dc3_c1b1l1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/trafo3c1.cfg -domain MOC -internal
goto -label DRIVE_UNIT
#DC5A
echo -text "Installing config for DC link (DC5)"
config -filename  $BOOTPATH/../drive_lib/t40025c1.cfg -domain MOC -internal
config -filename  $BOOTPATH/../drive_lib/dc67c1b1l1.cfg -domain MOC -internal
goto -label DRIVE_UNIT
#DRIVE_UNIT
if -var 9 -value 50 -label USER_QUERY
setvar -var 10 -value 0
getkey -id "DriveUnit" -var 10 -strvar $ANSWER -errlabel USER_QUERY
goto -strvar $ANSWER
#USER_QUERY
if -var 10 -value 10 label DRIVE_UNIT_DC1
if -var 10 -value 20 label DRIVE_UNIT_DC2
if -var 10 -value 30 label DRIVE_UNIT_DC3
if -var 10 -value 40 label DRIVE_UNIT_DC5
if -var 10 -value 110 label DRIVE_UNIT_DC1
if -var 10 -value 120 label DRIVE_UNIT_DC2
if -var 10 -value 130 label DRIVE_UNIT_DC3
if -var 10 -value 140 label DRIVE_UNIT_DC5
goto -label END_LABEL
#DRIVE_UNIT_DC1
echo -text "Select number of ECB drive unit:"
query -text  "  1       2                           " -var 10 -fk_text
if -var 10 -value 10 -label 1XECB
if -var 10 -value 20 -label 2XECB
if -var 10 -value 30 -label 2XECB
if -var 10 -value 40 -label 2XECB
if -var 10 -value 50 -label 2XECB
goto -label END_LABEL
#DRIVE_UNIT_DC2
echo -text "Select number of GT drive unit:"
query -text  "  1       2       3                   " -var 10 -fk_text
if -var 10 -value 10 -label 1XGT
if -var 10 -value 20 -label 2XGT
if -var 10 -value 30 -label 3XGT
if -var 10 -value 40 -label 3XGT
if -var 10 -value 50 -label 3XGT
goto -label END_LABEL
#DRIVE_UNIT_DC3
echo -text "Select type of drive unit:"
query -text  "  GT    GT+GU     GU                  " -var 10 -fk_text
if -var 10 -value 10 -label DC3_GT
if -var 10 -value 20 -label DC3_GT_GU
if -var 10 -value 30 -label DC3_GU
if -var 10 -value 40 -label DC3_GU
if -var 10 -value 50 -label DC3_GU
goto -label END_LABEL
#DC3_GT
echo -text "Select number of GT drive unit:"
query -text  "  1       2       3                   " -var 10 -fk_text
if -var 10 -value 10 -label 1XGT
if -var 10 -value 20 -label 2XGT
if -var 10 -value 30 -label 3XGT
if -var 10 -value 40 -label 3XGT
if -var 10 -value 50 -label 3XGT
goto -label END_LABEL
#DC3_GT_GU
echo -text "Select number of drive unit:"
echo -text ""
echo -text "1 = 1 x GT + 1 x GU"
echo -text "2 = 2 x GT + 1 x GU"
echo -text "3 = 1 x GT + 2 x GU"
query -text  "  1       2       3                   " -var 10 -fk_text
if -var 10 -value 10 -label 1XGT_1XGU
if -var 10 -value 20 -label 2XGT_1XGU
if -var 10 -value 30 -label 1XGT_2XGU
if -var 10 -value 40 -label 1XGT_2XGU
if -var 10 -value 50 -label 1XGT_2XGU
goto -label END_LABEL
#DC3_GU
echo -text "Select number of GU drive unit:"
query -text  "  1       2       3                   " -var 10 -fk_text
if -var 10 -value 10 -label 1XGU
if -var 10 -value 20 -label 2XGU
if -var 10 -value 30 -label 3XGU
if -var 10 -value 40 -label 3XGU
if -var 10 -value 50 -label 3XGU
goto -label END_LABEL
#DRIVE_UNIT_DC5
echo -text "Select number of VW drive unit:"
query -text  "  1       2       3                   " -var 10 -fk_text
if -var 10 -value 10 -label 1XVW
if -var 10 -value 20 -label 2XVW
if -var 10 -value 30 -label 3XVW
if -var 10 -value 40 -label 3XVW
if -var 10 -value 50 -label 3XVW
goto -label END_LABEL
#1XECB
echo -text "Installing config for drive unit"
echo -text "(1 x ECB)"
config -filename  $BOOTPATH/../drive_lib/drive_1xecb.cfg -domain MOC -internal
goto -label KINEMATIC
#2XECB
echo -text "Installing config for drive unit"
echo -text "(2 x ECB)"
config -filename  $BOOTPATH/../drive_lib/drive_2xecb.cfg -domain MOC -internal
goto -label KINEMATIC
#1XGT
echo -text "Installing config for drive unit"
echo -text "(1 x GT)"
config -filename  $BOOTPATH/../drive_lib/drive_1xgt.cfg -domain MOC -internal
goto -label KINEMATIC
#2XGT
echo -text "Installing config for drive unit"
echo -text "(2 x GT)"
config -filename  $BOOTPATH/../drive_lib/drive_2xgt.cfg -domain MOC -internal
goto -label KINEMATIC
#3XGT
echo -text "Installing config for drive unit"
echo -text "(3 x GT)"
config -filename  $BOOTPATH/../drive_lib/drive_3xgt.cfg -domain MOC -internal
goto -label KINEMATIC
#1XGT_1XGU
echo -text "Installing config for drive unit"
echo -text "(1 x GT + 1 x GU)"
config -filename  $BOOTPATH/../drive_lib/drive_1xgt_1xgu.cfg -domain MOC -internal
goto -label KINEMATIC
#2XGT_1XGU
echo -text "Installing config for drive unit"
echo -text "(2 x GT + 1 x GU)"
config -filename  $BOOTPATH/../drive_lib/drive_2xgt_1xgu.cfg -domain MOC -internal
goto -label KINEMATIC
#1XGT_2XGU
echo -text "Installing config for drive unit"
echo -text "(1 x GT + 2 x GU)"
config -filename  $BOOTPATH/../drive_lib/drive_1xgt_2xgu.cfg -domain MOC -internal
goto -label KINEMATIC
#1XGU
echo -text "Installing config for drive unit"
echo -text "(1 x GU)"
config -filename  $BOOTPATH/../drive_lib/drive_1xgu.cfg -domain MOC -internal
goto -label KINEMATIC
#2XGU
echo -text "Installing config for drive unit"
echo -text "(2 x GU)"
config -filename  $BOOTPATH/../drive_lib/drive_2xgu.cfg -domain MOC -internal
goto -label KINEMATIC
#3XGU
echo -text "Installing config for drive unit"
echo -text "(3 x GU)"
config -filename  $BOOTPATH/../drive_lib/drive_3xgu.cfg -domain MOC -internal
goto -label KINEMATIC
#1XVW
echo -text "Installing config for drive unit"
echo -text "(1 x VW)"
config -filename  $BOOTPATH/../drive_lib/drive_1xvw.cfg -domain MOC -internal
goto -label KINEMATIC
#2XVW
echo -text "Installing config for drive unit"
echo -text "(2 x VW)"
config -filename  $BOOTPATH/../drive_lib/drive_2xvw.cfg -domain MOC -internal
goto -label KINEMATIC
#3XVW
echo -text "Installing config for drive unit"
echo -text "(3 x VW)"
config -filename  $BOOTPATH/../drive_lib/drive_3xvw.cfg -domain MOC -internal
goto -label KINEMATIC

#KINEMATIC
if -var 9 -value 50 -label USER_QUERY
setvar -var 3 -value 0
getkey -id "KinematicModel" -var 3 -strvar $ANSWER -errlabel USER_QUERY
goto -strvar $ANSWER
#USER_QUERY
echo -text "Select kinematic group:"
echo -text ""
echo -text "1 = Generic Position Control"
echo -text "2 = Area Gantry"
echo -text "3 = Linear Gantry"
echo -text "4 = Doppin Feeder"
echo -text "5 = Toploader"
query -text  "  1       2       3       4       5   " -var 3 -fk_text
if -var 3 -value 10 -label GPC
if -var 3 -value 20 -label AREA_GANTRY
if -var 3 -value 30 -label LINEAR_GANTRY
if -var 3 -value 40 -label DOPPIN
if -var 3 -value 50 -label TOPLOADER
goto -label END_LABEL
#AREA_GANTRY
echo -text "Select kinematic model:"
echo -text ""
echo -text "1 = X_Y_Z"
echo -text "2 = X_Y_Z_CZ"
echo -text "3 = X_Y_Z_BX"
echo -text "4 = X_Y_Z_BY"
echo -text "5 = X_Y_Z_BX_AZ"
echo -text "6 = X_Y_Z_BY_AZ"
echo -text "7 = X_Y_Z_CZ_BX_AZ"
query -text  "  1       2       3       4       SCAN" \
      -text2 "  5       6       7               SCAN" -var 3 -fk_text
if -var 3 -value 10 -label X_Y_Z
if -var 3 -value 20 -label X_Y_Z_CZ
if -var 3 -value 30 -label X_Y_Z_BX
if -var 3 -value 40 -label X_Y_Z_BY
if -var 3 -value 110 -label X_Y_Z_BX_AZ
if -var 3 -value 120 -label X_Y_Z_BY_AZ
if -var 3 -value 130 -label X_Y_Z_CZ_BX_AZ
if -var 3 -value 140 -label X_Y_Z_CZ_BX_AZ
goto -label END_LABEL
#LINEAR_GANTRY
echo -text "Select kinematic model:"
echo -text ""
echo -text "1 = Y_Z"
echo -text "2 = Y_Z_CZ"
echo -text "3 = Y_Z_BX"
echo -text "4 = Y_Z_BY"
echo -text "5 = Y_Z_BX_AZ"
echo -text "6 = Y_Z_BY_AZ"
echo -text "7 = Y_Z_CZ_BX_AZ"
query -text  "  1       2       3       4       SCAN" \
      -text2 "  5       6       7               SCAN" -var 3 -fk_text
if -var 3 -value 10 -label Y_Z
if -var 3 -value 20 -label Y_Z_CZ
if -var 3 -value 30 -label Y_Z_BX
if -var 3 -value 40 -label Y_Z_BY
if -var 3 -value 110 -label Y_Z_BX_AZ
if -var 3 -value 120 -label Y_Z_BY_AZ
if -var 3 -value 130 -label Y_Z_CZ_BX_AZ
if -var 3 -value 140 -label Y_Z_CZ_BX_AZ
goto -label END_LABEL
#DOPPIN
echo -text "Select kinematic model:"
echo -text ""
echo -text "1 = Doppin Feeder 2 Axes"
echo -text "2 = Doppin Feeder 3 Axes"
query -text  "  1       2                           " -var 3 -fk_text
if -var 3 -value 10 -label DOPPIN_2_AXES
if -var 3 -value 20 -label DOPPIN_3_AXES
if -var 3 -value 30 -label DOPPIN_3_AXES
if -var 3 -value 40 -label DOPPIN_3_AXES
if -var 3 -value 50 -label DOPPIN_3_AXES
goto -label END_LABEL
#TOPLOADER
echo -text "Select kinematic model:"
echo -text ""
echo -text "1 = Y_EY_DY_CZ_BY_AZ"
echo -text "2 = Y_EY_DY_BY_AZ"
echo -text "3 = ROBOFLEX125"
echo -text "4 = ROBOFLEX100"
echo -text "5 = ROBOFLEX80"
query -text  "  1       2       3        4       5  " -var 3 -fk_text
if -var 3 -value 10 -label Y_EY_DY_CZ_BY_AZ
if -var 3 -value 20 -label Y_EY_DY_BY_AZ
if -var 3 -value 30 -label ROBOFLEX125
if -var 3 -value 40 -label ROBOFLEX100
if -var 3 -value 50 -label ROBOFLEX80
goto -label END_LABEL
#GPC
echo -text "Installing kinematic model"
echo -text "Generic Position Control"
config -filename  $BOOTPATH/irccfg/GPC_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/GPC_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/GPC_e.cfg -domain MOC
goto -label EXTCAB
#X_Y_Z
echo -text "Installing kinematic model"
echo -text "X_Y_Z"
config -filename  $BOOTPATH/irccfg/X_Y_Z_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/X_Y_Z_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/X_Y_Z_e.cfg -domain MOC
goto -label EXTCAB
#X_Y_Z_CZ
echo -text "Installing kinematic model"
echo -text "X_Y_Z_CZ"
config -filename  $BOOTPATH/irccfg/X_Y_Z_CZ_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/X_Y_Z_CZ_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/X_Y_Z_CZ_e.cfg -domain MOC
goto -label EXTCAB
#X_Y_Z_BX
echo -text "Installing kinematic model"
echo -text "X_Y_Z_BX"
config -filename  $BOOTPATH/irccfg/X_Y_Z_BX_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/X_Y_Z_BX_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/X_Y_Z_BX_e.cfg -domain MOC
goto -label EXTCAB
#X_Y_Z_BY
echo -text "Installing kinematic model"
echo -text "X_Y_Z_BY"
config -filename  $BOOTPATH/irccfg/X_Y_Z_BY_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/X_Y_Z_BY_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/X_Y_Z_BY_e.cfg -domain MOC
goto -label EXTCAB
#X_Y_Z_BX_AZ
echo -text "Installing kinematic model"
echo -text "X_Y_Z_BX_AZ"
config -filename  $BOOTPATH/irccfg/X_Y_Z_BX_AZ_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/X_Y_Z_BX_AZ_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/X_Y_Z_BX_AZ_e.cfg -domain MOC
goto -label EXTCAB
#X_Y_Z_BY_AZ
echo -text "Installing kinematic model"
echo -text "X_Y_Z_BY_AZ"
config -filename  $BOOTPATH/irccfg/X_Y_Z_BY_AZ_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/X_Y_Z_BY_AZ_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/X_Y_Z_BY_AZ_e.cfg -domain MOC
goto -label EXTCAB
#X_Y_Z_CZ_BX_AZ
echo -text "Installing kinematic model"
echo -text "X_Y_Z_CZ_BX_AZ"
config -filename  $BOOTPATH/irccfg/X_Y_Z_CZ_BX_AZ_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/X_Y_Z_CZ_BX_AZ_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/X_Y_Z_CZ_BX_AZ_e.cfg -domain MOC
goto -label EXTCAB
#Y_Z
echo -text "Installing kinematic model"
echo -text "Y_Z"
config -filename  $BOOTPATH/irccfg/Y_Z_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/Y_Z_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/Y_Z_e.cfg -domain MOC
goto -label EXTCAB
#Y_Z_CZ
echo -text "Installing kinematic model"
echo -text "Y_Z_CZ"
config -filename  $BOOTPATH/irccfg/Y_Z_CZ_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/Y_Z_CZ_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/Y_Z_CZ_e.cfg -domain MOC
goto -label EXTCAB
#Y_Z_BX
echo -text "Installing kinematic model"
echo -text "Y_Z_BX"
config -filename  $BOOTPATH/irccfg/Y_Z_BX_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/Y_Z_BX_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/Y_Z_BX_e.cfg -domain MOC
goto -label EXTCAB
#Y_Z_BY
echo -text "Installing kinematic model"
echo -text "Y_Z_BY"
config -filename  $BOOTPATH/irccfg/Y_Z_BY_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/Y_Z_BY_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/Y_Z_BY_e.cfg -domain MOC
goto -label EXTCAB
#Y_Z_BX_AZ
echo -text "Installing kinematic model"
echo -text "Y_Z_BX_AZ"
config -filename  $BOOTPATH/irccfg/Y_Z_BX_AZ_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/Y_Z_BX_AZ_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/Y_Z_BX_AZ_e.cfg -domain MOC
goto -label EXTCAB
#Y_Z_BY_AZ
echo -text "Installing kinematic model"
echo -text "Y_Z_BY_AZ"
config -filename  $BOOTPATH/irccfg/Y_Z_BY_AZ_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/Y_Z_BY_AZ_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/Y_Z_BY_AZ_e.cfg -domain MOC
goto -label EXTCAB
#Y_Z_CZ_BX_AZ
echo -text "Installing kinematic model"
echo -text "Y_Z_CZ_BX_AZ"
config -filename  $BOOTPATH/irccfg/Y_Z_CZ_BX_AZ_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/Y_Z_CZ_BX_AZ_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/Y_Z_CZ_BX_AZ_e.cfg -domain MOC
goto -label EXTCAB
#DOPPIN_2_AXES
echo -text "Installing kinematic model"
echo -text "Doppin Feeder 2 Axes"
config -filename  $BOOTPATH/irccfg/DOPPIN_2_AXES_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/DOPPIN_2_AXES_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/DOPPIN_2_AXES_e.cfg -domain MOC
goto -label EXTCAB
#DOPPIN_3_AXES
echo -text "Installing kinematic model"
echo -text "Doppin Feeder 3 Axes"
config -filename  $BOOTPATH/irccfg/DOPPIN_3_AXES_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/DOPPIN_3_AXES_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/DOPPIN_3_AXES_e.cfg -domain MOC
goto -label EXTCAB
#Y_EY_DY_CZ_BY_AZ
echo -text "Installing kinematic model"
echo -text "Y_EY_DY_CZ_BY_AZ"
config -filename  $BOOTPATH/irccfg/Y_EY_DY_CZ_BY_AZ_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/Y_EY_DY_CZ_BY_AZ_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/Y_EY_DY_CZ_BY_AZ_e.cfg -domain MOC
goto -label EXTCAB
#Y_EY_DY_BY_AZ
echo -text "Installing kinematic model"
echo -text "Y_EY_DY_BY_AZ"
config -filename  $BOOTPATH/irccfg/Y_EY_DY_BY_AZ_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/Y_EY_DY_BY_AZ_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/Y_EY_DY_BY_AZ_e.cfg -domain MOC
goto -label EXTCAB
#ROBOFLEX125
echo -text "Installing kinematic model"
echo -text "ROBOFLEX125"
config -filename  $BOOTPATH/irccfg/ROBOFLEX_0_0_125_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/ROBOFLEX_0_0_125_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/ROBOFLEX_0_0_125_e.cfg -domain MOC
goto -label EXTCAB
#ROBOFLEX100
echo -text "Installing kinematic model"
echo -text "ROBOFLEX100"
config -filename  $BOOTPATH/irccfg/ROBOFLEX_0_3_100_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/ROBOFLEX_0_3_100_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/ROBOFLEX_0_3_100_e.cfg -domain MOC
goto -label EXTCAB
#ROBOFLEX80
echo -text "Installing kinematic model"
echo -text "ROBOFLEX80"
config -filename  $BOOTPATH/irccfg/ROBOFLEX_0_5_80_s.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/ROBOFLEX_0_5_80_i.cfg -domain MOC -internal
config -filename  $BOOTPATH/irccfg/ROBOFLEX_0_5_80_e.cfg -domain MOC
goto -label EXTCAB

#EXTCAB
if -var 9 -value 50 -label USER_QUERY
setvar -var 10 -value 0
getkey -id "DriveSelectExtCab" -var 10 -strvar $ANSWER -errlabel USER_QUERY
goto -strvar $ANSWER
#USER_QUERY
echo -text "Select external axes in drive cabinet."
echo -text ""
echo -text "None    = No external drive cabinet"
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  " None    2xGT     3xGT   2xECB    SCAN" \
      -text2 "ECB1xGT ECB2xGT                   SCAN" -var 10 -fk_text
if -var 10 -value 10 -label EMPTY
if -var 10 -value 20 -label EXT_2GT
if -var 10 -value 30 -label EXT_3GT
if -var 10 -value 40 -label EXT_2ECB
if -var 10 -value 110 -label EXT_ECBGT
if -var 10 -value 120 -label EXT_ECB2GT
if -var 10 -value 130 -label EXT_ECB2GT
if -var 10 -value 140 -label EXT_ECB2GT

#EMPTY
goto -label END_LABEL
#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 END_LABEL
#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 END_LABEL
#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 END_LABEL
#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 END_LABEL
#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 END_LABEL

#END_LABEL