Who Remembers Last Years Framework?

i am used to programming that way; the way they expanded and made everything relatively confusing
when i put something in telop it DOESNT run in TELEOP.
im currently programming off of lastyears robot; im just trying to learn the new framework but its not working any heeelp?

In the Project Explorer window you’ll see “Team Code”. These are the files you will be changing. Leave the others alone. Here are the most important vi’s:

  • Begin.vi
  • this is where you should Open all the devices you’ll be using. - Finish.vi
  • this corresponds to Begin.vi and is where you should close all your devices. - Teleop.vi
  • is your regular teleoperated driver code (what was inside the infinite While loop last year. Don’t use an infinite While loop here anymore.*]Autonomous Independent.vi - where you’ll program your autonomous moves.

do i really have to open the stuff in the begin vi?

Im having the same issues as well, Im used to opening say a motor or joystick out of the loop, doing whatever in the loop, and closing outside it. This year you cant do that in the sub vi and in lost, but for testing purposes I was able to place some code that worked in the same case structure as the teleop sub vi and it worked but is that legal? If someone could get last years default would we beable to use that?

You don’t /have/ to open anything in the Begin.vi, however it only runs once at startup and is ideal to open everything in one easy to remember place.

The idea with this framework is to open a given motor in the begin and use the setref .vi to give it a name.

Then in teleop.vi, outside of the case statement there, use the getref vi with the correct name, wire it into the case statement to do whatever you need to do with it.

If you look at how they set up the arcade drive in the default project you’ll get a good idea of how to do it.

The precise reason they changed it this year is to make it easier for teams to help others - there will no longer be confusion about which framework you’re using. All you have to say is “labview” now and everyone who has used labview can help you figure it out. It will require relearning a bit if you used the basic framework last year, but the default project is a great starting point to see how to do it.

It sounds like you used the simple framework last year. The changes between last years advanced framework and this years are pretty subtle. I find their use of references really helps clean up the code.

If you have more specific questions, we are here to help.

Good luck.

The trouble with adding an Open/Close directly to Teleop is that in this framework we leave and reenter Teleop 50 times a second, so you’ll be opening and closing your device really fast- more than 6,700 times during a single match, and probably as high as 10,000 times counting delays of game.

Last year’s Basic Framework remained in the infinite Teleop loop, so the Opens and Closes outside the infinite loop only got executed once.
Autonomous was the same way, so your devices probably got Opened and Closed, maybe 2 times in a whole match.

You can also do the opens in the init case in telop.vi, which is only called the first time telop.vi is called after being in a different mode. You can do the close in the stop case.