FIRST Tech Challenge Discussions

Showing results for 
Search instead for 
Did you mean: 

Program Chooser runs the wrong teleop program

I ran into an odd issue using program chooser - it doesn't appear to update the teleop program selection until after the NXT is power cycled. Using LabVIEW 2012 with the f5 patch and current FTC Competition toolkit.

Steps to reproduce:.

  1. Set up a teleop program, controller 1 right Y controls right motor, left Y left motor
  2. Deploy to NXT as TEST1, select as teleop program using Program Chooser
  3. Test using FCS - TEST1 operates as expected
  4. Set up another teleop program, controller 1 right X controls right motor, left X left motor (something completely different  from TEST1)
  5. Deploy to NXT as TEST2
  6. select TEST2 as teleop program using Program Chooser
  7. Test using FCS, teleop still uses Y axis for motor controls (TEST1)
  8. 'Details' button on FCS shows the teleop program is TEST1
  9. Download FTCConfig.txt from the NXT, the teleop file is correct (TEST2)
  10. Power cycle NXT
  11. Test using FCS, teleop now runs TEST2 (X axis controls), Details shows TEST2

I also tried deleting TEST1 from the NXT after TEST2 is deployed - running teleop in FCS gives 'file not found' error until NXT is power cycled

I'm going to try a few more test cases, for now I'm advising our Michigan teams to power cycle the NXT after running Program Chooser

Brian Smith

Affiliate Partner, FIRST in Michigan FTC

Technical and Equipment Support

0 Kudos
Message 1 of 11

I have 2 questions regardig your 'Steps to Reproduce' list,

  • are you 'deploying' through the wi-fi connection made by the FCS (thereby never breaking the FCS connection)?
  • do you ever re-'CHOOSE' the NXT from the FCS after running 'Program Chooser'?

By powering off the NXT, you then re-establish the FCS connection by 'CHOOSE'-ing it; this would make the FCS read the current .txt file.

I don't know how often the FCS goes out to read the FTCofig.txt file, but that might be what is creating your issue.

0 Kudos
Message 2 of 11

Deploy is done over USB, so the FCS connection is broken.

I don't think I ever re-chose the bot from the FCS, just reconnected after downloading the new program and running Program Chooser. I'm planning on playing with this a little more this weekend to see if I can narrow down the issue.

Robots programmed with RobotC don't require a power cycle after running Program Chooser - the change to FTCConfig.txt is recognized the next time the teleop period is started, so at least for RobotC the file is read every time teleop starts.

0 Kudos
Message 3 of 11

I can't imagine that the FCS would treat LV and RobotC differently on when it goes out to read the file. So, that lends to the idea that the NXT file might not be closed properly by Program Chooser. However, if that were the case, wouldn't it be necessary to restart the NXT even the very first time you run P.C.?

Do you exit out of Program Chooser completely? Maybe could try going to a higher NXT sub-menu?

We just had a 30 hour 4-team lockin meeting and expereinced the issue you describe a couple of times, but escaped it most of the time. But since we had multiple programmers using different laptops - we had a lot of NXT power ups and downs. Next time we have the FCS up, we'll do some more targeted experimenting on this issue.

0 Kudos
Message 4 of 11

I got completely out of program chooser, started the autonomous program and ran the FCS just like at a competition.

0 Kudos
Message 5 of 11

My experience is that the FCS does NOT re-read the selected teleop program each time it runs a match (or even connects).

I've seen this several times during software inspections, when teams change the selected teleop program, and it continues to run the old one.

You need to be more pro-active to force the FCS to re-read the program name.

Exiting the FCS and re-starting definately has the desired effect.  So this indicates to me that it's not an NXT problem.

It may be enought to manually disconenct the NXT (from the FCS) and then re-connect.


Get a life? This IS my life!
0 Kudos
Message 6 of 11

Bottom line is that the NXT firmware is still 1.31 and the FCS is still v3.0.6 - the same as last season. The change is the LabVIEW 2012 release. Last season these files came in during 'firmware update'; this year we bring them in by running the NXT in 'direct mode' once, as per NI's advisement. (re: Program Chooser, Samostat, NXTShell)

When tracking down the 'Program Chooser' files between the LVLM 2010 and LVLM 2012 releases I noticed a few different sizes in  kB for the .rxe's located (and generated). I posed this queston to  NI a while back. I have posted instructions for locating the .vi and compiling a fresh .rxe using LVLM 2012.

Today I'll try a fresh compile, instead of relying on the .rxe in the \subs directory where the 'NXTShell' and 'Samostat' .rxe's live also (the ones downloaded too th NXT when you first run in 'direct mode').

Another option to try is using last season's .rxe for Program Chooser - However, if the 2012 version of the 1.31 firmware is not identical to the 2010, this might not work - in fact, that could be what's happening here.

If a good Program Chooser .rxe is made (found), then it could be moved into the \subs directory used for auto-download during 'direct mode'.

I'll provide an update regarding my file locations found (used) and test results within a few days - maybe some of you can beat me to this

0 Kudos