View Single Post
  #11   Spotlight this post!  
Unread 12-12-2015, 20:30
cpapplefamily cpapplefamily is offline
Registered User
FRC #3244 (Granite City Gearheads)
Team Role: Mentor
 
Join Date: May 2015
Rookie Year: 2015
Location: Minnesota
Posts: 243
cpapplefamily has a spectacular aura aboutcpapplefamily has a spectacular aura about
Re: Command based code secan

All this input is great. When it comes right down to it, attempt to assure the methods completes before the next iteration of the command < 20ms. I maybe beating this to death but it must be predicable what would happen if the method was not complete on the next iteration like item 1 it initialize() was not complete would the execute() simply start in the first positive clock after it completed. Same with item 2 if the execute() was not complete would the isFinshed() still run and a new execute() start only after the previous finished on a positive clock cycle.

These timing charts are what I expect may happen. The last timing chart has not been discussed here but if the command is scheduled to run but has not finished. Would the end() method run and a new initialize() start?

In the PLC world I work with professionally if I have a periodic task that does not complete before the next period I get a minor error and that iteration is skipped nothing horrific happens only I loose a scan.
Attached Thumbnails
Click image for larger version

Name:	Command Period 2.JPG
Views:	16
Size:	113.3 KB
ID:	19549  
Reply With Quote