Basic Framework

Hello,

I am currently trying to incorporate all of our LabView code into the basic framework FRC project. I have put all our teleoperated code into the Basic Robot Main vi. and the Autonomous mode in the Autonomous Independent.vi and then enabled the structure from false to true for autonomous mode. Next, I download the Basic Robot Main.vi with teleoperated mode onto the robot and everything worked while the driver station switch was set to teleoperated. However the problem occured when the driver station switch was changed to autonomous mode… the autonomous code phase does not run at all even though the autonomous code was tested independently by downloading the autonomous independent.vi directly to the robot… Is there another vi or some kind of master compiling that I have to do in order to run the entire code and then be able to switch between autonomous and teleoperated?

Thank you,

Technic-R-C

P.S. The autonomous code being used is the one that came preloaded with the Basic Framework Project.

Make sure that you are downloading the build spec deployment and not just some VIs.

This sounds like what other teams were doing when they right-clicked on a VI and deployed just that VI or Deploy All.

So, go to the very bottom, open the build spec, and build and deploy and set as startup on the item under build specs.

Greg McKaskle

Just run the Basic Robot Main VI. It’ll bring along all the other VIs necessary for the Autonomous/Teleoperated selection to work.

But make sure you clicked the little T/F constant in the top left corner of the Autonomous Independent VI in order to set it to TRUE. If you leave it FALSE, the whole autonomous loop will be skipped and the watchdog will kick in immediately.

I have tried this method and tele/autonomous will refuse to work at the same time! Are you 100% sure that this is the method to downloading and running both codes at once (driver station switch?) I will try the build specification procedure (even though it takes like an hour to build the program…) and will get back to you guys with the results.

Thank you

Technic-R-C

A clue!

It’s possible that your autonomous code is actually running, but it’s being slowed down enough with front panel updates that the watchdog is shutting down the outputs. That happens to me when I use an older laptop to run the program.

Your build is an hour? Make sure to open the deployment build spec by double clicking on it. Click to the Additional Exclusions page, and set the checkbox about libraries to keep only the VIs you are using. Set the checkbox beneath to leave the source libraries alone.

This was changed as a workaround in the beta, and unfortunately when used with certain libraries the build time explodes. This is simply putting it back to the original, default setting.

Greg McKaskle

Thank you for the help guys,

However, while attempting to build the real time application I received an error… Can anyone provide some insight into this problem

Here are the steps I took to create a real time application.

  1. Right Clicked Build Specification under RT CompactRIO and created new real time application.
  2. Changed Target Filename to FinalCodeCompleted.rtexe
  3. Changed Build Specifications Name to SmokeyCodeFinal
  4. Added only the Basic Robot Main.vi into the startup VI’s list
  5. Under Additional Exclusions there are checks next to the middle two boxes which are “remove unused polymorphic vi instances” and remove unused members of project libraries (which was never checked until now… this resulted in an hour long build time (thanks guys))
  6. Previewed to check VI’s
  7. Clicked OK
  8. Right clicked Smokey Code Final Real Time Application and clicked build… the the error came up which is pasted below…

Visit the Request Support page at ni.com/ask to learn more about resolving this problem. Use the following information as a reference:

Error 6 occurred at Create Folder in Create Directory Recursive.vi->AB_Destination.lvclass:Create_Destination.vi->AB_Build.lvclass:Create_Destinations.vi->AB_Application.lvclass:Create_Destinations.vi->AB_Build.lvclass:Build.vi->AB_RTEXE.lvclass:Build.vi->AB_Engine_Build.vi->AB_Build_Invoke.vi->AB_Build_Invoke.vi.ProxyCaller

Possible reason(s):

LabVIEW: Generic file I/O error.

F:\Team2358CODE COMPLETED\Users\Robert\FRC 2358 code\FinalVersion 2-15-09\F\FinalCode\Documents and Settings\Student\My Documents\LabVIEW Data\builds\Smokey2358Code\RT CompactRIO Target (10.23.58.2)\SmokeyCodeFinal\c
i-rt\startup\NI_FPGA_Interface.lvlib_NIFPGA Watchdog

Thank you

Technic-R-C

LabVIEW: Generic file I/O error.

F:\Team2358CODE COMPLETED\Users\Robert\FRC 2358 code\FinalVersion 2-15-09\F\FinalCode\Documents and Settings\Student\My Documents\LabVIEW Data\builds\Smokey2358Code\RT CompactRIO Target (10.23.58.2)\SmokeyCodeFinal\c
i-rt\startup\NI_FPGA_Interface.lvlib_NIFPGA Watchdog

That’s an awfully long path name. I think there’s an issue when it gets to 255 characters; yours exceeds that by a lot.

Exactly! This issue crossed my mind but I thought nothing of it… however when I tried a different (shorter) directory everything worked. I will try running the code tomorrow at school to see if both teleoperated and autonomous work together using driver station switch to toggle between the different modes. By the way the build time decreased from over an hour to exactly 4-5 minutes!!! This is exactly what I wanted to accomplish. I will get back to you tomorrow with my results.

Thank you for your help!

Regards

Technic-R-C

So everything works when I open a new Basic Framework, but when I run my modified version the autonomous does not work… I think I might have come across the solution to my problem (tho untested). Do I have to have a Watchdog Feed VI in the robot main tele code area in orded to run the autonomous??? I tried removing it from the untouched basic framework and the tele part of the code would not even turn on, so i’m assuming the WATCHDOG is an important part of the code. What exactly does it do and is it necesarry?

Thank you

Technic-R-C

The watchdog adds a safety element to the outputs on the robot. The watchdog you are feeding, referred to as the user watchdog should be fed in the code that updates the motor speeds. That way if that code stops running for some reason – logic error, breakpoint, infinite loop, etc. – then the motors will turn off if not fed in 0.5 sec rather than keeping their old values and probably running into the desk/wall/person.

Greg McKaskle