Go to Post It's not GP, its not un-GP, its just a strategy. - AndyB [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 26-05-2013, 14:07
Program Spartan's Avatar
Program Spartan Program Spartan is offline
Current Vice President of Team 168
AKA: Nathan
FRC #0168 (MIB (Mechanical Investigation bureau))
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Miami,Fl
Posts: 24
Program Spartan is an unknown quantity at this point
Exclamation Help with building LabVIEW code

OK, I have used LabVIEW before but I'm still learning the software. I know how to use the coding techniques but one problem I have always had was building the code onto the cRio. What confuses me is what should I do to build the code. I know you have to use the build specifications option and run the robot main but for some reason, it is not allowing me to use the code for the robot. From the Driver Station, it tells me that the code is starving or there is too much when I run the coding. When I run teleop, the coding is there but I cannot move the robot. My team has used this robot during competition and it worked fine. The only problem was when I tried to use an additional motor, two solenoids, and a compressor, they would not work.
So here are my questions:
1. How can I build coding onto my robot without having to lose the data once the cRio turns off? What is the procedure?
2. What am I doing wrong with the coding?

To clear up the robot's purpose:
For the Ultimate Ascent Challenge, we made a canister to hold Frisbees. In the canister, near the bottom of it, is a solenoid that is suppose to extract once a boolean is pressed and retract once released (used to hit the Frisbees). Of course we use a compressor for air. The coding for it is in the periodic task. It is then launched into a spinning wheel to launch the Frisbees. The wheel is being controlled by a boolean. The main robot drive is operated in arcade drive and talons are being used. Take note, the first joystick is used for driving and the second one is used for shooting the Frisbees. And I have also placed a Wait(ms) function in Robot Main. Additional pictures will show the manipulated coding that I have placed in the project.
Any type of help would be nice.
Click image for larger version

Name:	Teleop.PNG
Views:	82
Size:	29.5 KB
ID:	14879

Click image for larger version

Name:	Begin.PNG
Views:	63
Size:	21.5 KB
ID:	14880

Click image for larger version

Name:	Periodic Task.PNG
Views:	46
Size:	16.7 KB
ID:	14881

Click image for larger version

Name:	Robot Main.PNG
Views:	48
Size:	31.4 KB
ID:	14882

Click image for larger version

Name:	Autonomous pt 1.PNG
Views:	53
Size:	23.7 KB
ID:	14883
__________________

Robots of the future:
"This can be made if we put our minds together to overcome failure (and if we have a lot of money)".
-Nathan J. Hagood
Head Programer
Electrical Intermediate
Reply With Quote
  #2   Spotlight this post!  
Unread 26-05-2013, 14:11
Program Spartan's Avatar
Program Spartan Program Spartan is offline
Current Vice President of Team 168
AKA: Nathan
FRC #0168 (MIB (Mechanical Investigation bureau))
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Miami,Fl
Posts: 24
Program Spartan is an unknown quantity at this point
Re: Help with building LabVIEW code

Click image for larger version

Name:	Autonomous pt 2.PNG
Views:	27
Size:	25.7 KB
ID:	14886

Click image for larger version

Name:	Finish.PNG
Views:	22
Size:	21.3 KB
ID:	14887
__________________

Robots of the future:
"This can be made if we put our minds together to overcome failure (and if we have a lot of money)".
-Nathan J. Hagood
Head Programer
Electrical Intermediate
Reply With Quote
  #3   Spotlight this post!  
Unread 26-05-2013, 14:37
kgzak's Avatar
kgzak kgzak is offline
Registered User
AKA: Kris
FRC #4392 (Decievers) FRC #2075 (Enigma)
Team Role: College Student
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Grand Rapids, Michigan
Posts: 418
kgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to beholdkgzak is a splendid one to behold
Re: Help with building LabVIEW code

I am currently mobile so I can't check your code but to keep the code on the cRIO all the time you have to run it as a startup. In the project window where it says build specifications you have to right click and select build. Then you right click and select run as startup.
Reply With Quote
  #4   Spotlight this post!  
Unread 26-05-2013, 15:09
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Help with building LabVIEW code

You should not make any changes to Robot Main.

Remove the delay that you added to Robot Main.
That is stopping your robot from working correctly.
It prevents your robot from responding to the driver controls for that amount of time (200ms).
When the main drive motors do get an infrequent driver command (1 out of every 10), they will "stick." Luckily they will then be shutdown after 100ms by the motor safety you Enabled in Begin, so you might see random jerky twitching that stop as soon as they try to start.

The Motor Set Output expects values of -1.0 to 1.0.
In Teleop and Autonomous the values 300 & 255 will be interpreted as 1.0
I hope you are using zero somewhere to turn it off.

In Autonomous, what are you doing with the output of the Wait to the Case? I assume you have time Cases for flipping the single solenoids?
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 27-05-2013 at 10:32.
Reply With Quote
  #5   Spotlight this post!  
Unread 27-05-2013, 09:08
Program Spartan's Avatar
Program Spartan Program Spartan is offline
Current Vice President of Team 168
AKA: Nathan
FRC #0168 (MIB (Mechanical Investigation bureau))
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Miami,Fl
Posts: 24
Program Spartan is an unknown quantity at this point
Re: Help with building LabVIEW code

@ kgzak, thanks for the input I will see if it would work tomorrow.
@ Mark, I was attempting to use the solenoids to shoot out about 3 Frisbees from the canister at a every 5 seconds for 15 seconds. Bear with me, I'm not so good at autonomous.
__________________

Robots of the future:
"This can be made if we put our minds together to overcome failure (and if we have a lot of money)".
-Nathan J. Hagood
Head Programer
Electrical Intermediate
Reply With Quote
  #6   Spotlight this post!  
Unread 27-05-2013, 09:21
Program Spartan's Avatar
Program Spartan Program Spartan is offline
Current Vice President of Team 168
AKA: Nathan
FRC #0168 (MIB (Mechanical Investigation bureau))
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Miami,Fl
Posts: 24
Program Spartan is an unknown quantity at this point
Re: Help with building LabVIEW code

And I have also made sure there was a 0 input for the motors.
__________________

Robots of the future:
"This can be made if we put our minds together to overcome failure (and if we have a lot of money)".
-Nathan J. Hagood
Head Programer
Electrical Intermediate
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


All times are GMT -5. The time now is 09:49.

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