Go to Post Heat Gun(n.):Your build season replacement for a microwave. - jajabinx124 [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
  #16   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,906
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
  #17   Spotlight this post!  
Unread 19-03-2011, 00:43
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?

Ran too slow on site, and had no time to test and remake code. Eventually I just dictated that the odds of a joystick failing are so slim that the redundancies were pointless, and I stuck in the backup non-redundancy program that i made the night before. Works the way we want it to now, I thought redundancies weren't too worth it in the beginning anyways. Ty for the support nevertheless though, certainly another pebble in the pile of programming knowledge that I've been building up!
Reply With Quote
  #18   Spotlight this post!  
Unread 24-03-2011, 01:05
edzenitis edzenitis is offline
Registered User
FRC #2141
 
Join Date: Jan 2011
Location: Danville
Posts: 3
edzenitis is an unknown quantity at this point
Re: Program overloading the cRIO?

We had similar problems to team 2893. After Autonomous mode finished, Teleop mode would work only half the time. I don't know if these are related or separate problems, but we were getting error messages about Robot drive being too slow, when Teleop did work it was sometimes sluggish, and data rate on the field was taking twice as long as the other teams. There seemed to be a pattern where we would deploy the code, it would work in Auto and Teleop. Then the next round, Teleop wouldn't work. When the code was redeployed, the same thing happened. This was repeated ~6 times during the tournament. We raised the radio up higher for the last two rounds, but had similar issues. We never experienced this when tethered to the cRIO.

We don't have a spare cRIO or I would try running the software using the Elapsed Times.vi to see if Teleop is running too slowly and try to isolate the problem. I'm posting the code if anyone is willing to take a look at it or possibly run it to see if the timing is reasonable or not.
Attached Files
File Type: zip 2141 Code.zip (110.8 KB, 7 views)
Reply With Quote
  #19   Spotlight this post!  
Unread 24-03-2011, 07:52
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,756
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?

I believe that deleting the compressor code will solve the problem.

The compressor code is a bit more complex than it needs to be, and it looks to me like the GetEnabledState was intended to be placed a periodic task. The timeout of 100ms means that this is slowing down your TeleOp and causing the safety VIs to kick in.

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


All times are GMT -5. The time now is 10:59.

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