Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Autonomous questions (Labview) and some general issues (http://www.chiefdelphi.com/forums/showthread.php?t=71472)

Daniel_H 07-01-2009 07:44

Autonomous questions (Labview) and some general issues
 
I can't get the autonomous to work, when I switch from TELEOP to AUTO at the DS, nothing happens. Could it be my very simple autonomous test code?
here's my code:



btw, should I remove all controls and indicators from the VI if I want to use the robot not connected to the PC?

Thanks!

XXShadowXX 07-01-2009 08:16

Re: Autonomous questions (Labview) and some general issues
 
all i know is most programs in labview don't work until they are within a while loop,(so you can control them from the dash board) trying creating a while loop to execute when in autonomous mode. If you use a case statement, that is fine, but the control panel won't see that their is anything to run the program with, it needs a while loop to run in labview, idk about in the cRIO.

Russ Beavis 07-01-2009 08:17

Re: Autonomous questions (Labview) and some general issues
 
Are you clicking the run button on Basic Robot Main.vi or Autonomous Independent.vi? I don't believe that the Autonomous Ind VI will run on its own. I think that everything needs to be setup by using Basic Robot Main.vi as the highest-level VI (especially Ethernet comm).

Russ

Daniel_H 07-01-2009 08:28

Re: Autonomous questions (Labview) and some general issues
 
I click RUN at the Basic Robot Main.vi

I changed very few from the original autonomous code

XXShadowXX 07-01-2009 08:30

Re: Autonomous questions (Labview) and some general issues
 
do you mind if i start working with dx/dt for the joysticks, that is an amazing idea

Daniel_H 07-01-2009 08:45

Re: Autonomous questions (Labview) and some general issues
 
Quote:

Originally Posted by XXShadowXX (Post 794643)
do you mind if i start working with dx/dt for the joysticks, that is an amazing idea

go ahead, and tell me your findings :)

I already got it working, but didn't implement it on traction control yet. I want to add some inertia to the controls to improva acceleration, since sudden fulls on the joysticks will make you slip

XXShadowXX 07-01-2009 08:47

Re: Autonomous questions (Labview) and some general issues
 
I haven't started on traction control, I'm still working on ballistics, and tracking. But 3d calculus is giving me a headache so I'll see what i can come up with.

Labview can do trig right?

Russ Beavis 07-01-2009 09:00

Re: Autonomous questions (Labview) and some general issues
 
You don't need to remove the controls and indicators before building and deploying as a startup application. I don't believe that these will impact the final performance at all when running as a startup app since the "compiler" will strip off the UI goodies when unnecessary.

I'd recommend that you set some breakpoints in Autonomous Independent.vi and see if the application actually jumps to that VI when you toggle the switch on the DS. Maybe the changes that you've made to Basic Robot Main.vi have somehow defeated Autonomous Independent.vi. For example (and I haven't dug deep enough into the architecture to know whether this is easily accomplished), an infinite loop in teleop may never let the main state machine jump to Auto Ind VI.

What's shown on the DS screen when you switch to Auto?

Russ

Daniel_H 07-01-2009 09:37

Re: Autonomous questions (Labview) and some general issues
 
somehow it is toogling teleop to auto again, but it still needs to be connected to the PC and running, otherwise nothing happens.

Russ Beavis 07-01-2009 10:03

Re: Autonomous questions (Labview) and some general issues
 
In order to run without your development PC attached, you need to build the app, deploy and set it to "run as startup".

http://decibel.ni.com/content/servlet/JiveServlet/previewBody/2631-102-2-4099/FRC_Programming_Guide.pdf;jsessionid=82a40f1a30d63 f03c468b58846e5bb8cdea6056bf7c4.e3mNbNaPb3iNe34Tbx aPbhuMchb0n6jAmljGr0

All teams should check out the above link. It's the complete (IMHO) LabVIEW for FRC guide and includes instructions for deploying and running.

If the above link breaks for some reason, the document can easily be accessed through FIRST's Control System portal at http://www.usfirst.org/community/frc....aspx?id=10934 (see LabVIEW Robotics Programming Guide).

Russ

EricVanWyk 07-01-2009 10:06

Re: Autonomous questions (Labview) and some general issues
 
Quote:

Originally Posted by Daniel_H (Post 794693)
somehow it is toogling teleop to auto again, but it still needs to be connected to the PC and running, otherwise nothing happens.

Hitting the run button only loads the program into RAM. You will need to build->deploy->run as startup for it to persist.

Daniel_H 07-01-2009 16:12

Re: Autonomous questions (Labview) and some general issues
 
Quote:

Originally Posted by EricVanWyk (Post 794708)
Hitting the run button only loads the program into RAM. You will need to build->deploy->run as startup for it to persist.

Do you mean that I never really wrote a code that would be there after I reboot the cRIO? omg

I think I didn't understand how to do that. Where are those commands?

Jon236 07-01-2009 16:39

Re: Autonomous questions (Labview) and some general issues
 
There is an entire section in the manual which Russ referenced which goes over building, then deploying an application. Try it out.....it's easy. At least you didn't lose your code.

Daniel_H 08-01-2009 18:11

Re: Autonomous questions (Labview) and some general issues
 
Quote:

Originally Posted by Jon236 (Post 795051)
There is an entire section in the manual which Russ referenced which goes over building, then deploying an application. Try it out.....it's easy. At least you didn't lose your code.

I read chapter 5, but I'm not used to the terminology yet, so what does it mean to "Create a Stand-Alone FRC Application" from page 45 and "Deploying the FRC cRIO Robot Project" from page 41? Don't both of them work for the software to persist?

Anyway, I went to Build Especifications under RT CompactRIO Target (10.11.56.02), right-clicked it and hit "Build All" and i got the following error message:


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.

C:\Program Files\National Instruments\LabVIEW 8.5\resource\plugins\NewDialogFiles\ProjectWizards \FRC\FRC Templates\builds\FRC cRIO Project\RT CompactRIO Target (0.0.0.0)
\FRC Basic Robot Deployment\c\ni-rt\startup\NI_FPGA_Interface.lvlib_NIFPGA System

Russ Beavis 08-01-2009 20:56

Re: Autonomous questions (Labview) and some general issues
 
I believe that the Error 6 message is the result of known bug in the 1.0 LabVIEW FRC version. You need to upgrade to 2.0 using http://joule.ni.com/nidu/cds/view/p/lang/en/id/1180. Be careful, I think that you'll need to open a new FRC cRIO Project after installing the upgrade since your old project will have old links (you might be able to copy/paste, though). Also, you'll need to reimage your cRIO.

You should also check out the LabVIEW resources at http://www.usfirst.org/community/frc....aspx?id=10934 to help understand program flow, deploying and the different templates.

Russ


All times are GMT -5. The time now is 08:46.

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