FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

"Basic Robot Main.vi" FRC Template Question

Quick question about the Basic Robot Main.vi template that comes in the project with the second FRCLabVIEW Update. In the "Update Motors and I/O based upon communications" loop (loop for Tele Op control) why is the loop stop terminal wired to a constant. In looking at the code with this configuration the VIs to close the joystick and motor references will never be called. During competition, am I correct to assume that the stop value will actually come from the dashboard set by the FRC competition system. Is there a reason this wasn't wired for the template?

Thanks.

0 Kudos
Message 1 of 2
(6,177 Views)

Hi

The Basic Template was derived from a more complete Template in which the Teleop loop exit condition came from a button.

When that button is pressed, the loop exits and the devices are closed.

It looks like the Simple template kept some of this logic in, but simply hard wired the loop condition to true.

In reality, this loop wil NEVER exit, so there is no real oportunity to close the joystick and drive.

This program will keep looping unil it's forcably terminated or the cRIO power is removed.  In either case there is no need to close those devices.

However, if you were to modify the template to put in some early termination condition, then the two close VI are good to have there.

As a rule, you should always put in a close for any open that you have done.

Phil.

Get a life? This IS my life!
0 Kudos
Message 2 of 2
(2,712 Views)