Go to Post I did research before asking a question on CD..blasphemous I know - rachelholladay [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 16-04-2011, 14:50
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Wait Function

Quote:
Originally Posted by Mark McLeod View Post
Some of the descriptions are probably over simplified.
Would this be an example?
Quote:
a single Timed Loop set for 1ms and a higher priority will lockout your driver controls or make response very erratic, because the Teleop loop will never get time on the CPU.
I assume the above is true only if the code in the 1ms loop takes some significant percentage of 1ms to execute? In other words, the context switching overhead is nowhere near 1ms, is it?


Reply With Quote
  #2   Spotlight this post!  
Unread 17-04-2011, 08:24
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: Wait Function

It is nowhere near 1ms. And the overhead of the loop is relatively small. Of course it very much depends on what you put in it, and whether you configure it to try to regain the schedule or slip it.

If you want to look at it under a microscope, you modify those sample loops to call into the RT Trace toolkit and that will let you see all the details of the scheduling. I've attached one of the example log screenshots. I would attach a typical 20ms teleop execution, but again, no cRIO at home.

Greg McKaskle
Attached Thumbnails
Click image for larger version

Name:	Clipboard 1.png
Views:	24
Size:	72.9 KB
ID:	10594  
Reply With Quote
  #3   Spotlight this post!  
Unread 17-04-2011, 15:58
WizenedEE's Avatar
WizenedEE WizenedEE is offline
Registered User
AKA: Adam
FRC #3238 (Cyborg Ferrets)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Anacortes, WA
Posts: 395
WizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to all
Re: Wait Function

None of your posts really say why a loop with a 10ms delay would run at 500hz consistently, just why it may be noisy. I think the original poster meant that it was pretty consistent with its 2ms time.

The probably may be that you didn't wire up a string to the "name" part of the vi, and you're calling it twice within the same vi. Not wiring up a name is fine for teleop, where there's only one loop, but you probably want to do it in periodic tasks, where there may be multiple loops you want to measure.
Reply With Quote
  #4   Spotlight this post!  
Unread 17-04-2011, 19:45
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: Wait Function

Doh. That would explain a lot. I normally wire the string, but it was built so that when unwired, it will use the VI name. Are you calling the Elapsed time multiple times with the same string -- unwired from the same VI? Because honestly, I wasn't liking my explanation. I wouldn't expect more than about 2ms of noise jitter.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 17-04-2011, 20:32
cabbagekid2 cabbagekid2 is offline
Registered User
#0368 (Kika Mana)
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Honolulu, HI
Posts: 85
cabbagekid2 has a spectacular aura aboutcabbagekid2 has a spectacular aura aboutcabbagekid2 has a spectacular aura about
Re: Wait Function

No, we only call the elapsed time vi once in periodic task and once in teleop. Both times we left them un-named. But it should be okay since we only dropped it in one of the while loops in periodic task and not multiple loops?
Reply With Quote
  #6   Spotlight this post!  
Unread 17-04-2011, 23:27
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: Wait Function

Something is incorrect.
Care to zip and post the project as-is?

I ran a test on the default framework to be sure and I get 10-11ms
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
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:41.

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