FIRST Tech Challenge Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Case structure freezing the NXT?

I have students working on autonomous mode programming and they want to use a case structure to choose between different scenarios.  However, when they use a case structure, the NXT freezes (the battery has to be removed and then put back in for the NXT to be usable again).  Has anyone else run into this issue with this year's LabVIEW?  I have last year's LabVIEW on my Mac and I don't have this problem with running code with case structures on the NXT, but my students have this year's LabVIEW on Windows 8.  If it comes to it, we can use my computer to program autonomous mode, but I would prefer not to have to do that.

We determined that it was the case structure causing the problem by disabling code and then re-enabling sections at a time. When the case structure section was re-enabled, the NXT foze up.  I had them put together a minimal bit of code in a brand new project to test if it froze the NXT and it did:

IMG_3044.JPG

For the purposes of this minimal bit of code, the True case in the case structure does the same thing as shown for the False case (just passes through the boolean to the stop condition).

Any ideas out there?

Thanks!

Julie

Mentor, FTC7314

0 Kudos
Message 1 of 4
(6,043 Views)

Hi,

This appears to be a critical bug with the compiler. For now, try creating indicators for all of the outputs of the Motor Status VI (as shown), and let me know if that fixes the brick crash.

I will post here once I have more information.

compiler bug.PNG

0 Kudos
Message 2 of 4
(5,287 Views)

Although I have not seen it in person yet, my programmers have told me that wiring the other outputs of the motor status VI to indicators does not prevent the NXT from freezing.

We are attending a competition this coming Saturday, so we are focusing on that for now, using a student's computer which has last year's LabVIEW so that the programmers can use case structures. After the competition, I should be able to report more definitively about the effectiveness of the idea above.

Thanks,

Julie

0 Kudos
Message 3 of 4
(5,287 Views)

Hi Julie,

The problem was identified, and turned out to be a bug in the compiler indeed. Creating indicators on unused output terminals will solve the problem. If you are still seeing a crash, make sure all output terminals are wired.

Unfortunately, NI will not be able to provide a patch during this FTC season. The fix will be included in next year's FTC toolkit. Please post here if you experience trouble working around this issue.

Thanks,

Garrett

0 Kudos
Message 4 of 4
(5,287 Views)