echo -text "Installing 4 Channel BrushControl "

invoke -entry pwinst_init

text -filename $BOOTPATH/pwinst.$LANG -package 0
text -filename $BOOTPATH/pwdata.eng -package 0
text -filename $BOOTPATH/rlpw.eng -package 0
text -filename $BOOTPATH/pwmmc.$LANG -package 0

config -filename $BOOTPATH/teach_po.cfg -domain EIO
#config -filename $BOOTPATH/pw_eio.cfg -domain EIO
config -filename $BOOTPATH/pw_sys.cfg -domain SYS  -internal
config -filename $BOOTPATH/rlpw.cfg -domain MMC -internal
config -filename $BOOTPATH/pwmmc.cfg -domain MMC

#Files specific for 4 channel brush control
setvar -var 11 -value 40
config -filename $BOOTPATH/pwinst.cfg -domain MMC -internal
setvar -var 10 -value 0
getkey -id "NuAppl" -var 10 -strvar $ANSWER -errlabel NEXT
goto -label END
#NEXT
setvar -var 10 -value 0
getkey -id "IrbSelect" -var 10 -strvar $ANSWER -errlabel EIOPW
ifstr -strvar $ANSWER -value "IRB540_02_T00F11B21V21m1H21m1" -label PWACA
ifstr -strvar $ANSWER -value "IRB540_12_T00F11B21V21m1H21m1" -label PWACA
ifstr -strvar $ANSWER -value "IRB540_15_T00F11B21V21m1H21m1" -label PWACA
ifstr -strvar $ANSWER -value "IRB540_05_T00F11B21V21m2H21m1" -label PWACA
#EIOPW
config -filename $BOOTPATH/eiopw.cfg -domain EIO -replace
goto -label NEXT
#PWACA
config -filename $BOOTPATH/eio540pw.cfg -domain EIO -replace
#NEXT
setvar -var 10 -value 0
getkey -id "IrbSelect" -var 10 -strvar $ANSWER -errlabel NEXT
ifstr -strvar $ANSWER -value "IRT5454_2B" -label APP2
ifstr -strvar $ANSWER -value "IRT5454_3B" -label APP3
ifstr -strvar $ANSWER -value "IRT5455_3B" -label APP3
ifstr -strvar $ANSWER -value "IRT5455_4B" -label APP4
ifstr -strvar $ANSWER -value "IRT5465_2B" -label APP2
ifstr -strvar $ANSWER -value "IRT5465_3B" -label APP3
ifstr -strvar $ANSWER -value "IRT5466_3B" -label APP3
ifstr -strvar $ANSWER -value "IRT5466_4B" -label APP4
config -filename $BOOTPATH/pwa1ch4.cfg -domain PROC
goto -label NEXT
#APP2
config -filename $BOOTPATH/pwa2ch4.cfg -domain PROC
goto -label NEXT
#APP3
config -filename $BOOTPATH/pwa3ch4.cfg -domain PROC
goto -label NEXT
#APP4
config -filename $BOOTPATH/pwa4ch4.cfg -domain PROC
goto -label NEXT
#NEXT
#END
append -from $BOOTPATH/startup.cmd -to option.cmd
echo -text "... done"


