Go to Post Everyone better enjoy the broadcast, Dave had to cancel a shuttle launch to make it happen :D - The Lucas [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 10-03-2011, 15:25
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: Program overloading the cRIO?

As mentioned, the "loop" the message is referring to is a repetitive task and not necessarily a For or While loop. If you need to investigate further, the Getting Started window for LV contains a Troubleshooting tutorial. Midway through the tutorial, it discusses the Safety VIs and how to measure more accurately how long different loops are taking. If you follow the tutorial and place the Elapsed Time VI into your teleop and perhaps into other periodic or vision loops, it will give you a better idea of how the code on the robot is actually running.

If you post the code, I'm sure you'll get more detailed advice.

Greg McKaskle
Reply With Quote
  #2   Spotlight this post!  
Unread 10-03-2011, 16:44
ablahblah ablahblah is offline
The Blaghh!
AKA: Alex
FRC #4404 (The Nuts 'N Colts)
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2009
Location: USA
Posts: 27
ablahblah is an unknown quantity at this point
Re: Program overloading the cRIO?

Alright, I'll go and get the code on a USB stick today in our meeting and post it up. I'm assuming just the Teleop VI is sufficient?
Reply With Quote
  #3   Spotlight this post!  
Unread 10-03-2011, 19:46
DavidGitz's Avatar
DavidGitz DavidGitz is offline
Lead Technical Advisor
FRC #1208 (MeTool Brigade)
Team Role: Coach
 
Join Date: Dec 2006
Rookie Year: 1996
Location: O'Fallon, IL
Posts: 341
DavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud of
Send a message via AIM to DavidGitz Send a message via MSN to DavidGitz Send a message via Yahoo to DavidGitz
Re: Program overloading the cRIO?

I would post at a minimum Autonomous Independent, Begin, Teleop and Periodic Tasks.
__________________
Reply With Quote
  #4   Spotlight this post!  
Unread 11-03-2011, 16:39
ablahblah ablahblah is offline
The Blaghh!
AKA: Alex
FRC #4404 (The Nuts 'N Colts)
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2009
Location: USA
Posts: 27
ablahblah is an unknown quantity at this point
Re: Program overloading the cRIO?

*facepalms* forgot to get the code last night. Well, we're meeting Saturday as well...gonna have to remember that time. The code managed to successfully execute on the cRIO though, after the tweak so that the motors are always getting orders; bare cRIO was hooked up though with only the sidecar and nothing else (no jags, not even a breakout board).
Reply With Quote
  #5   Spotlight this post!  
Unread 12-03-2011, 19:00
ablahblah ablahblah is offline
The Blaghh!
AKA: Alex
FRC #4404 (The Nuts 'N Colts)
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2009
Location: USA
Posts: 27
ablahblah is an unknown quantity at this point
Re: Program overloading the cRIO?

Uhh...I'm guessing I should be using Megaupload or some other file-hosting service to put up code, right? Or is there a built in upload option here?
Reply With Quote
  #6   Spotlight this post!  
Unread 13-03-2011, 10:01
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,833
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: Program overloading the cRIO?

zip the code and just add it to your post as an attachment.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #7   Spotlight this post!  
Unread 13-03-2011, 21:21
ablahblah ablahblah is offline
The Blaghh!
AKA: Alex
FRC #4404 (The Nuts 'N Colts)
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2009
Location: USA
Posts: 27
ablahblah is an unknown quantity at this point
Re: Program overloading the cRIO?

Here's Begin and Teleop
Attached Files
File Type: zip Code.zip (59.2 KB, 15 views)
Reply With Quote
  #8   Spotlight this post!  
Unread 14-03-2011, 10:48
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,833
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: Program overloading the cRIO?

DIO 4 is Opened twice as "A UP" and "IR3" so those aren't likely to work.

Can't see why or how you modified the library code in DavidsWPIRobotDriveMotors.

Having your outputs from one case statement leave through an outer case statement, then come back in before it feeds the next case statement is not good...
That can lead to a lockup condition.
Any particular reason for not keeping it within the outer Case structure?

It looks like you are misusing feed forward nodes.
Why did you put them in there at all?

It's traditional to have inputs come from the left rather than from the right of the block diagram.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 14-03-2011 at 10:52.
Reply With Quote
  #9   Spotlight this post!  
Unread 14-03-2011, 16:44
ablahblah ablahblah is offline
The Blaghh!
AKA: Alex
FRC #4404 (The Nuts 'N Colts)
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2009
Location: USA
Posts: 27
ablahblah is an unknown quantity at this point
Re: Program overloading the cRIO?

Eheh, that program's been tweaked over and and over again, didn't follow standard input left - output right format because I haven't had time to really organize it the way I'd like it to.

The motor drive program was something our head programmer modified up a bit, I've no real clue of what modifications was made. I think it was just made so that all 4 wheels could independently be configured, or something like that. Don't have the VI on me at the moment though *facepalms again*

So, with the outputs, you're referring to having the multipliers outside of the main drive case structure...right? Wasn't too sure whether I should've done that or not either, been without some supervision lately in programming and I never asked about it now that I think of it.

Eh....what's a feed forward node ....Not too familiar with LabView quite yet, I just learned simple wire connecting basics, VI locations, constant/indicator creation, and variable creation from the head, and figured out everything myself.
Reply With Quote
  #10   Spotlight this post!  
Unread 14-03-2011, 16:57
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,833
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: Program overloading the cRIO?

Quote:
Originally Posted by ablahblah View Post
So, with the outputs, you're referring to having the multipliers outside of the main drive case structure...right? Wasn't too sure whether I should've done that or not either, been without some supervision lately in programming and I never asked about it now that I think of it.
The way the LabVIEW data flow works is that nothing inside a programming structure (like a Case Statement or a While loop) will get executed until All the data inputs are present and accounted for.

By having outputs leave the Case statement and immediately come back in, the Case statement will wait for those inputs before starting...

Of course, the outputs won't occur before the Case statement executes either...

So the Case statement gets locked up waiting for itself to complete before it starts...


Quote:
Originally Posted by ablahblah View Post
Eh....what's a feed forward node
It's that thingy with the big arrow.
Normally, it is used to remember what a value was the last time it was executed. That way you can compare the last value with the current value.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #11   Spotlight this post!  
Unread 15-03-2011, 21:16
ablahblah ablahblah is offline
The Blaghh!
AKA: Alex
FRC #4404 (The Nuts 'N Colts)
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2009
Location: USA
Posts: 27
ablahblah is an unknown quantity at this point
Re: Program overloading the cRIO?

Patched up the code, what'd you guys think...?

Tried to keep outputs in the same case structure this time, though I'm not sure whether the amount of case structures in it is too much.
Attached Files
File Type: vi Teleop.vi (42.0 KB, 11 views)
Reply With Quote
  #12   Spotlight this post!  
Unread 17-03-2011, 13:34
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,833
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: Program overloading the cRIO?

Looks better.

To check how long this takes to execute, you can use the Elapsed Times.vi located under Support Code in the Project Explorer window.
Just drag and drop a copy anywhere in your Teleop, double-click to open its' front panel, then use Run in Robot Main.vi to try it out on the cRIO. Watch the Elapsed Times front panel to see how long Teleop is taking. You don't want it to be longer than 100ms, in fact less than 20ms is best.

You might have an issue with your checks for x+y /= 0
Joysticks at rest don't always equal 0. There can be a trace non-zero value, way too small to move the motors, but the cases depending on exactly zero might never be active for that reason.
Depends on the game controller though, so it might not be an issue.

Did you consider making a single button on each joystick a toggle?
Last joystick to push the button gets all control.
Stick with what makes the most sense to you though.

P.S.
I'm pretty sure that you'll find that your Teleop is too slow.
You can isolate and identify the slowest parts by using the Diagram Disable Structure to gradually comment out groups of statements to see what causes the slow down.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 17-03-2011 at 18:49.
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 20:45.

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