Go to Post Dave: THEY'RE NOT DOLLIES THEY'RE MY FRIENDS! - Dorienne [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 10-02-2013, 23:25
piguy123 piguy123 is offline
Registered User
FRC #4751
Team Role: Programmer
 
Join Date: Nov 2012
Rookie Year: 2012
Location: Canada
Posts: 6
piguy123 is an unknown quantity at this point
Re: Error While Making Relay Work For Certain Time

Quote:
Originally Posted by Mark McLeod View Post
That message means that your code is too slow to handle the command packets received from the Driver Station 50 times a second.
For instance, if you tried to run this code in Teleop.vi, because Teleop handles the Driver packets directly and subsequently cannot take longer than 20ms to execute.

Code that is allowed to run just as fast as it possibly can (like your example) will also suck all the life out of the cRIO CPU and prevent other code from running in a timely manner.

So, two points:
  1. A delay sequence like this belongs in Periodic Tasks.vi where it won't slow down Teleop
  2. Every loop you use must have a Wait built into it to slow it down, and Waits act to release the CPU for use by other tasks, like Teleop.
The code as written will never end.
Relay's do not have to be in wait loops.

Here's an example of a Relay sequence, a double sequence really, but just ignore the second one for your purposes.
http://www.chiefdelphi.com/forums/at...chmentid=13775
Thanks for the awesome reply! I'll try that out!
In your example, after Button 1, there is an arrow with an asterix underneath it. How do I make that?

Thanks again!
Reply With Quote
 


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 12:13.

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