Go to Post You know you've been in FIRST way too long when you can remember all those hints... even down to exact wording... and only have to look up the most recent. - EricH [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 22-03-2012, 19:31
team_4224 team_4224 is offline
Registered User
FRC #4224
 
Join Date: Mar 2012
Location: Naples, Floridia
Posts: 3
team_4224 is an unknown quantity at this point
100% cpu and twitchy too

We are a rookie team and with our telop code we are getting random twitchies and 100% cpu usage, do we have to much code in telop or is it a networking problem. There is a copy of our telop code attached.
Attached Files
File Type: vi Teleop.vi (32.4 KB, 26 views)
Reply With Quote
  #2   Spotlight this post!  
Unread 22-03-2012, 20:16
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,748
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: 100% cpu and twitchy too

Your teleop is certainly not doing too much. It may be throwing errors, or the slowdown could be elsewhere in your application.

First, check the Diagnostics tab to see if errors are piling up. They are often due to misspellings in the I/O names or old code that is updating channels that were never opened, etc.

The parallel code could be vision or periodic tasks, and they could be causing the teleop to run more slowly since most of the CPU is taken up by them.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 23-03-2012, 07:54
team_4224 team_4224 is offline
Registered User
FRC #4224
 
Join Date: Mar 2012
Location: Naples, Floridia
Posts: 3
team_4224 is an unknown quantity at this point
Re: 100% cpu and twitchy too

Thanks.
We have disable vison and only the compressor control loop is in periodictask.vi and still get the same problem. Also when we run the code we get
Watchdog Expiration: System 1, User 0
Watchdog Expiration: System 2, User 0
Watchdog Expiration: System 3, User 0
Watchdog Expiration: System 4, User 0
and so on.

Last edited by team_4224 : 23-03-2012 at 11:50.
Reply With Quote
  #4   Spotlight this post!  
Unread 23-03-2012, 21:19
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,748
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: 100% cpu and twitchy too

Do the system watchdog messages correspond to the twitches? If so, look at the charts tab and see if you have lots of lost packets. That also correspond.

Greg Mckaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 25-03-2012, 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: 100% cpu and twitchy too

I'm still somewhat inexperienced with LabView, but I've never fed Watchdog in Teleop, or frankly, did anything with Watchdog; I just let the default code handle that. The programmer of my past team never did either...though Watchdog has shown that it does function, confirmed with the system watchdog expiration messages when the robot goes to teleop/auto disable. My first team, doing java, had to mess with it since that code I think is built ground up, but I've never done anything with it in LabView.

Teleop doesn't seem to be doing anything that can overload the cRIO though. The bot just keeps twitching, and it doesn't stop doing that within a reasonable timeframe, right?

Last edited by ablahblah : 25-03-2012 at 19:04.
Reply With Quote
  #6   Spotlight this post!  
Unread 25-03-2012, 21:35
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,748
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: 100% cpu and twitchy too

If you didn't explicitly Open and enable the watchdog, you do not need to feed it. Watchdogs are a useful concept for making systems safe, but a few years ago, all languages moved the watchdog underneath the RobotDrive and other outputs and made the feed be a part of the update.

I agree that your teleop isn't causing the CPU usage or the twitches, but since I haven't seen the rest of your code, I can't tell you where the issue is. If you want to solve it yourself, look at vision and periodic tasks. Specifically, look for code that is setting the twitchy motors in parallel with teleop.

Greg McKaskle
Reply With Quote
  #7   Spotlight this post!  
Unread 25-03-2012, 21:47
Peck's Avatar
Peck Peck is offline
worse then failing: proving murphy
FRC #1619 (Up-A-Creek Robotics) and FTC # 4633)
Team Role: College Student
 
Join Date: Mar 2012
Rookie Year: 2007
Location: Colorado
Posts: 237
Peck will become famous soon enough
Re: 100% cpu and twitchy too

Just a quick recommendation, cheek the wireless in the area, The driver station says cpu is at 100% as a default when you loose the packets related to cpu level. If there are to many wirelesses on the same frequency, connection starts to suffer (yes, that is the reason for the no unnecessary wireless networks in competition area) and that can manifest as packet loss which can cause the cpu to show 100% and can also give you microscopically small loss of coms which results in a twitchy robot.
__________________
Cad, Electrical, Machining, Debugging (old school), PR, Distraction elimination


TEAM 1619
__UP-A-Creek Robotics__
It ain't done till it's over-done
Reply With Quote
  #8   Spotlight this post!  
Unread 25-03-2012, 21:53
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,748
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: 100% cpu and twitchy too

Actually, if packets are lost, CPU usage usually drops. This is true for the default LV framework, and I believe for C++ and Java too. If packets don't arrive, some parts of the system will run timed tasks, but other portions will stay asleep.

While it is possible for an excessive number of wifi networks to impact the connection to the robot, especially on 2.4 GHz, this will not cause CPU usage to rise on the robot. The charts tab will show whether the robot is losing comms, getting watchdogged, or running as prescribed. If you post a photo of the log file viewer, I can help point out the patterns.

Greg McKaskle
Reply With Quote
  #9   Spotlight this post!  
Unread 25-03-2012, 22:03
Peck's Avatar
Peck Peck is offline
worse then failing: proving murphy
FRC #1619 (Up-A-Creek Robotics) and FTC # 4633)
Team Role: College Student
 
Join Date: Mar 2012
Rookie Year: 2007
Location: Colorado
Posts: 237
Peck will become famous soon enough
Re: 100% cpu and twitchy too

Quote:
Originally Posted by Greg McKaskle View Post
Actually, if packets are lost, CPU usage usually drops. This is true for the default LV framework, and I believe for C++ and Java too. If packets don't arrive, some parts of the system will run timed tasks, but other portions will stay asleep.

While it is possible for an excessive number of wifi networks to impact the connection to the robot, especially on 2.4 GHz, this will not cause CPU usage to rise on the robot. The charts tab will show whether the robot is losing comms, getting watchdogged, or running as prescribed. If you post a photo of the log file viewer, I can help point out the patterns.

Greg McKaskle
kk, i was speaking on what the software sub team told me to watch for when driving the robot at our regional. they may have altered something.
__________________
Cad, Electrical, Machining, Debugging (old school), PR, Distraction elimination


TEAM 1619
__UP-A-Creek Robotics__
It ain't done till it's over-done
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 08:43.

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