Here…Lemme put into comments what need to be fixed:
'********************
counter var word
counter=0
IF auton mode = 1 THEN 'needs to be auton_mode
select counter
IF rc_sw1=1 THEN start_left: 'lose the colon…
IF rc_sw2=1 THEN start_right: 'lose the colon
'Starting on left side of field
start_left:
(left auto program here)
goto imdone:
'Starting on right side of field
start_right:
(right auto program here)
goto imdone:
ELSE 'Resume Human Control
imdone:
'**************************
Here is what it should look like corrected (with a few tweaks added for efficency):
'**************************
counter var word
counter=0
IF auton_mode = 1 THEN
goto auton_on
else
goto imdone
endif
auton_on:
select counter
IF rc_sw1=1 THEN start_left
IF rc_sw2=1 THEN start_right
'Starting on left side of field
start_left:
(left auto program here)
goto imdone
'Starting on right side of field
start_right:
(right auto program here)
goto imdone
'Resume Human Control
imdone:
'**********************
You could also just use 1 switch for the left-right selection. Have it if the switch is open, then it goes left, else it goes right. This way, you avoid the instance of having both acidetally closed or open. Here is what your code would look like:
'**********************
counter var word
counter=0
IF auton_mode = 1 THEN
goto auton_on
else
goto imdone
endif
auton_on:
select counter
IF rc_sw1=1 THEN
goto start_left
else
goto start_right
endif
'Starting on left side of field
start_left:
(left auto program here)
goto imdone
'Starting on right side of field
start_right:
(right auto program here)
goto imdone
'Resume Human Control
imdone:
'*********************
Hope this helps.
Bill B.