Go to Post For all of you thinking three alliances... how big of a pain would it be to have three different bumper colors? - Jon Stratis [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-02-2009, 23:18
Technic-R-C Technic-R-C is offline
Registered User
FRC #2358
 
Join Date: Dec 2008
Location: Chicago
Posts: 21
Technic-R-C is an unknown quantity at this point
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.
Reply With Quote
  #2   Spotlight this post!  
Unread 19-02-2009, 00:13
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #3   Spotlight this post!  
Unread 19-02-2009, 01:20
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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.
Reply With Quote
  #4   Spotlight this post!  
Unread 19-02-2009, 23:14
Technic-R-C Technic-R-C is offline
Registered User
FRC #2358
 
Join Date: Dec 2008
Location: Chicago
Posts: 21
Technic-R-C is an unknown quantity at this point
Re: Basic Framework

Quote:
Originally Posted by Alan Anderson View Post
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
Reply With Quote
  #5   Spotlight this post!  
Unread 19-02-2009, 23:44
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Basic Framework

Quote:
Originally Posted by Technic-R-C View Post
(even though it takes like an hour to build the program......)
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.
Reply With Quote
  #6   Spotlight this post!  
Unread 20-02-2009, 08:12
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #7   Spotlight this post!  
Unread 22-02-2009, 11:36
Technic-R-C Technic-R-C is offline
Registered User
FRC #2358
 
Join Date: Dec 2008
Location: Chicago
Posts: 21
Technic-R-C is an unknown quantity at this point
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:
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\ni-rt\startup\NI_FPGA_Interface.lvlib_NIFPGA Watchdog
Thank you

Technic-R-C
Reply With Quote
  #8   Spotlight this post!  
Unread 22-02-2009, 12:45
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Basic Framework

Quote:
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\ni-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.
Reply With Quote
  #9   Spotlight this post!  
Unread 22-02-2009, 13:44
Technic-R-C Technic-R-C is offline
Registered User
FRC #2358
 
Join Date: Dec 2008
Location: Chicago
Posts: 21
Technic-R-C is an unknown quantity at this point
Re: Basic Framework

Quote:
Originally Posted by Alan Anderson View Post
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
Reply With Quote
  #10   Spotlight this post!  
Unread 26-02-2009, 00:33
Technic-R-C Technic-R-C is offline
Registered User
FRC #2358
 
Join Date: Dec 2008
Location: Chicago
Posts: 21
Technic-R-C is an unknown quantity at this point
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
Reply With Quote
  #11   Spotlight this post!  
Unread 26-02-2009, 00:58
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 21:41.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi