|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
Re: Basic Framework
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 |
|
#3
|
|||||
|
|||||
|
Re: Basic Framework
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. |
|
#4
|
|||
|
|||
|
Re: Basic Framework
Quote:
Thank you Technic-R-C |
|
#5
|
|||||
|
|||||
|
Re: Basic Framework
Quote:
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. |
|
#6
|
|||
|
|||
|
Re: Basic Framework
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 |
|
#7
|
|||
|
|||
|
Re: Basic Framework
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.... Quote:
Technic-R-C |
|
#8
|
|||||
|
|||||
|
Re: Basic Framework
Quote:
|
|
#9
|
|||
|
|||
|
Re: Basic Framework
Quote:
Thank you for your help! Regards Technic-R-C |
|
#10
|
|||
|
|||
|
Re: Basic Framework
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 |
|
#11
|
|||
|
|||
|
Re: Basic Framework
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 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Basic Robot Framework | JimC2550 | Electrical | 1 | 14-02-2009 21:09 |
| CRio Framework | Shadow_Cat | NI LabVIEW | 1 | 13-02-2009 21:18 |
| Camera on basic framework | Arcre | NI LabVIEW | 2 | 11-02-2009 04:17 |
| FRC Framework Guide | Jon236 | FRC Control System | 0 | 17-11-2008 18:18 |
| Robot Framework | lord Purity | Pneumatics | 3 | 21-01-2007 15:57 |