Go to Post I hope there are people in this world who love you too much to let you mentor while you are in college - PayneTrain [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-02-2010, 11:10
RedHeadRobotics's Avatar
RedHeadRobotics RedHeadRobotics is offline
Registered User
AKA: Brigid
FRC #2081 (Icarus)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Peoria, IL
Posts: 87
RedHeadRobotics will become famous soon enoughRedHeadRobotics will become famous soon enough
SOFTWARE PROBLEM!!!! PLEASE HELP!!!

We are having trouble with our controls. We have tried many things. The software will lag and respond in two or more seconds. This problem is sporatic and we think that is has been fixed, but then it returns. We have kept the same setup and it still changes. We have checked the battery, made sure that the battery we used was new, freshly charged. Our software team even had us move where the wireless bridge was to see if it received code better (probably knew this wouldn't work because it does the same while tethered.)

Even more confusing is that the mechanisms delay more than the drive train. It is not just the pneumatic devices, motors also delay more than our drivetrain does even though they are connected in the same manner.

If Anyone has any ideas or suggestions, it would be great. Thank you!
__________________
  #2   Spotlight this post!  
Unread 19-02-2010, 11:20
EthanMiller EthanMiller is offline
Lead Programmer
AKA: Socks
FTC #4356 (The Zip Ties)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Clayton, NY
Posts: 121
EthanMiller has a spectacular aura aboutEthanMiller has a spectacular aura aboutEthanMiller has a spectacular aura about
Re: SOFTWARE PROBLEM!!!! PLEASE HELP!!!

Depending on the programming language, there's different things that could cause it. What language are you using?

Also, look to see if you have any loops that may take a couple of seconds to complete.
__________________
When all else fails, read the manual.

FRC 1713 K Island Gears 2009, 2010 (Not 2011 due to budget, hopefully 2012!) - Fingerlakes Regional

FTC 4356 The Zip Ties 2010-2011 Season - NNYRC (2010 9th seed).
  #3   Spotlight this post!  
Unread 19-02-2010, 12:16
birkejf birkejf is offline
Jeffrey Birkel
AKA: Jeffrey Birkel
FRC #2081 (Icarus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Peoria, Illinois
Posts: 3
birkejf is an unknown quantity at this point
Re: SOFTWARE PROBLEM!!!! PLEASE HELP!!!

We are using LabView.
  #4   Spotlight this post!  
Unread 19-02-2010, 12:37
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,810
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: SOFTWARE PROBLEM!!!! PLEASE HELP!!!

If you care to zip up the entire project and post it we can help diagnose code delays. Time is getting short...

Any messages on the Driver station Diagnostic screen?
Any lengthy "Watchdog not Feed" statuses showing up in the lower left corner box?
Any oddly behaving status lights?
Does the RSL have a consistent long-on/short-off blink sequence or is it disrupted?
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #5   Spotlight this post!  
Unread 19-02-2010, 13:56
bronxbomber92 bronxbomber92 is offline
Registered User
FRC #1551 (Grapes of Wrath)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Naples
Posts: 75
bronxbomber92 is an unknown quantity at this point
Re: SOFTWARE PROBLEM!!!! PLEASE HELP!!!

Are you constantly running the camera and processing the images for ellipses. If you don't have this running quickly, that could drop your the speed pretty drastically, I suppose.
  #6   Spotlight this post!  
Unread 19-02-2010, 15:07
nick1023 nick1023 is offline
Registered User
FRC #1023
 
Join Date: Dec 2008
Location: Toledo, Ohio
Posts: 19
nick1023 will become famous soon enough
Re: SOFTWARE PROBLEM!!!! PLEASE HELP!!!

Perhaps you have a "wait" somewhere?

If there is a "wait" anywhere in your teleop take it out. Each time the loop executes you will have to wait for that time to pass.

frcmastery.com has a state machine video that shows how to use timers properly inside a loop using a shift register and a tick count.
__________________
1023 Bedford Express

Last edited by nick1023 : 19-02-2010 at 15:29.
  #7   Spotlight this post!  
Unread 19-02-2010, 15:48
lscime lscime is offline
Registered User
AKA: Luke Scime
FRC #2614 (Mountaineer Area RoboticS (MARS))
Team Role: Alumni
 
Join Date: Jun 2008
Rookie Year: 2008
Location: Morgantown, WV
Posts: 73
lscime is a splendid one to beholdlscime is a splendid one to beholdlscime is a splendid one to beholdlscime is a splendid one to beholdlscime is a splendid one to beholdlscime is a splendid one to behold
Re: SOFTWARE PROBLEM!!!! PLEASE HELP!!!

There are a couple of things that could be causing this. If you are getting "watchdogs" in the box at the bottom left corner of the driver station (where it usually says enabled or disabled) it is possible that you are running a loop (say for reading sensors) that has no time delay in it. This will cause the loop to run flat-out and result in lag-times. Also there can be pretty serious lag if you are running non-deployed code (i.e. you are running the code on your programming laptop and not the on cRIO alone). Try building your project and permanently deploying your code to the cRIO and see if the lag persists.

More information would be helpful in debugging your problem.

-Luke
  #8   Spotlight this post!  
Unread 19-02-2010, 17:05
jawebste's Avatar
jawebste jawebste is offline
Mentor - HAZMATs 2145
AKA: Jean-Ann Webster
FRC #2145 (HAZMATs)
Team Role: Mentor
 
Join Date: Sep 2008
Rookie Year: 2007
Location: Lake Fenton
Posts: 27
jawebste is a jewel in the roughjawebste is a jewel in the roughjawebste is a jewel in the roughjawebste is a jewel in the rough
Re: SOFTWARE PROBLEM!!!! PLEASE HELP!!!

Hello from 2145
Our team is having the same problem with the delay between when we push a button/move an axis and when the motor moves. In our code we are trying to control 7 motors and two servos could there be a limit to what the digital side car and/or the cRIO can handle? We have built our project and deployed the code but the delay continues.

I am posting our code with the hope that some one can help us. This code is pre-update before last Saturday or Sunday, so right now we are redoing it on from the Robot Project Sample in the updated Labview, but I predict that we will still have a lag if some one can help us fix it on the old code we can probably use it to fix our new code.

When we enable teleop on the driver station it flashes between Teleop enabled and Watchdog Not Feed could the Watchdog have something to do with the lag?
Attached Files
File Type: zip 2145.zip (1.70 MB, 22 views)
  #9   Spotlight this post!  
Unread 19-02-2010, 17:40
lscime lscime is offline
Registered User
AKA: Luke Scime
FRC #2614 (Mountaineer Area RoboticS (MARS))
Team Role: Alumni
 
Join Date: Jun 2008
Rookie Year: 2008
Location: Morgantown, WV
Posts: 73
lscime is a splendid one to beholdlscime is a splendid one to beholdlscime is a splendid one to beholdlscime is a splendid one to beholdlscime is a splendid one to beholdlscime is a splendid one to behold
Re: SOFTWARE PROBLEM!!!! PLEASE HELP!!!

The fluctuation between watchdog and telop enabled will certainly cause lag. After briefly looking at your code I don't see anything that is likely to cause a watchdog error. Although it appears that you have forgotten to close all of your devices (ie motors) in the "finish.vi." This may cause issues.

The best way to debug this kind of issue is to go back a couple of steps. For instance, did you start noticing the lag after writing a particular piece of code?

PS - the cRIO is incredibly powerful, it is highly unlikely you are taxing its processor (remember, it is designed to have all 8 slots filled with stuff).

-Luke
  #10   Spotlight this post!  
Unread 19-02-2010, 18:10
pSYeNCe's Avatar
pSYeNCe pSYeNCe is offline
Programaster
AKA: James
FRC #2010 (Lightning Bots)
Team Role: Alumni
 
Join Date: Feb 2010
Rookie Year: 2007
Location: Ohio
Posts: 58
pSYeNCe is a splendid one to beholdpSYeNCe is a splendid one to beholdpSYeNCe is a splendid one to beholdpSYeNCe is a splendid one to beholdpSYeNCe is a splendid one to beholdpSYeNCe is a splendid one to beholdpSYeNCe is a splendid one to behold
Count us in too...

Team 2010 is also experiencing similar problems. We're getting a 1/2 to 1 second delay from moving the controls to a response. We don't have any loops other than the teleop.vi While loop that encompasses everything, so I think I'll try to time delay that a little bit and see what happens.
  #11   Spotlight this post!  
Unread 19-02-2010, 18:21
lscime lscime is offline
Registered User
AKA: Luke Scime
FRC #2614 (Mountaineer Area RoboticS (MARS))
Team Role: Alumni
 
Join Date: Jun 2008
Rookie Year: 2008
Location: Morgantown, WV
Posts: 73
lscime is a splendid one to beholdlscime is a splendid one to beholdlscime is a splendid one to beholdlscime is a splendid one to beholdlscime is a splendid one to beholdlscime is a splendid one to behold
Re: SOFTWARE PROBLEM!!!! PLEASE HELP!!!

I'm sorry for any confusion. The telop loop does not need to be delayed as it requires a lot of processor time (in other words, it won't be running flat out). The vision loop similarly should be fine without a time delay. Loops that are reading sensor values etc. don't take much processor time and so do need to be delayed. Check the "periodic tasks.vi" for such loops. Also, make sure you have fully updated LabVIEW, the cRIO, and your Driver Station.

-Luke
  #12   Spotlight this post!  
Unread 19-02-2010, 18:22
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: SOFTWARE PROBLEM!!!! PLEASE HELP!!!

We use java and get a similar problem, try a reboot of the robot
  #13   Spotlight this post!  
Unread 19-02-2010, 18:31
birkejf birkejf is offline
Jeffrey Birkel
AKA: Jeffrey Birkel
FRC #2081 (Icarus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Peoria, Illinois
Posts: 3
birkejf is an unknown quantity at this point
Re: SOFTWARE PROBLEM!!!! PLEASE HELP!!!

Thanks for everyone's advice. It was a mis-named variable and we were getting excessive watchdog error messages! We now know what to look for next time.
  #14   Spotlight this post!  
Unread 19-02-2010, 18:50
flameout flameout is offline
AKA Ryan Van Why
FRC #0957 (SWARM)
Team Role: Alumni
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Oregon
Posts: 168
flameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to all
Re: SOFTWARE PROBLEM!!!! PLEASE HELP!!!

I'd like to add that we are having the same problem. It has sprung up since the last set of updates (LabVIEW and DS.)

It is vision related, since unplugging the camera will prevent the problem. It appears to be taking around 200 milliseconds per frame, and I think it is starving the teleop task.

This applies to all our code, including our "clean" project.

Does anyone have a clue? Thank you for any help.
  #15   Spotlight this post!  
Unread 19-02-2010, 19:15
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,810
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: Count us in too...

Quote:
Originally Posted by pSYeNCe View Post
Team 2010 is also experiencing similar problems. We're getting a 1/2 to 1 second delay from moving the controls to a response. We don't have any loops other than the teleop.vi While loop that encompasses everything, so I think I'll try to time delay that a little bit and see what happens.
There shouldn't be a teleop While loop unless it is less than 1/50 sec.

Quote:
Originally Posted by jawebste View Post
Hello from 2145
Several of the Hook Motor Set Speed's are without a speed or motor reference. Of the three case statements for the Hook motor look at the False case on top, the False case in the middle, and the True case at the bottom. The pink wire needs to be wired across and the bottom speed needs a constant value.
I don't see anything else that would account for the delay you're seeing.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Closed Thread


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
Please help; HUGE mplab problem brennerator Programming 5 09-01-2007 01:25
IFI_Loader Problem, please help. winners Programming 9 18-01-2006 17:54
BIG Problem, please help me!! Srkasner FIRST Tech Challenge 2 11-01-2006 12:45
gearing problem. Help please! camsrobotics Motors 9 22-01-2005 20:45
BIG PNUEMATIC PROBLEM NEED HELP PLEASE!!!! archiver 2001 1 24-06-2002 00:30


All times are GMT -5. The time now is 07:54.

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