View Single Post
  #3   Spotlight this post!  
Unread 09-08-2012, 15:05
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,753
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: default behavior for thread overrun

Quote:
Originally Posted by Ether View Post
What happens ...
The behavior depends on what element of the language we are discussing. The regular framework really doesn't expose the realtime features of LV. I think the best answer to your question regarding LV is to explain what the timed loop can do and what it does by default.

In LV RT, the periodic code is placed into a timed loop with the priority, period, and policy inputs either wired or configured. The loop waits until the start deadline, schedules the code, and makes available much of the desired data about the execution.

The left photo shows all loop parameters. The inside left edge of the loop has been grown to expose all of the data that the loop computes and provides to the code regarding how it is running and how the previous iteration ran. Most interesting is the Boolean that identifies if the last iteration finished late. The other values will allow the task to log or potentially adjust its operation. Additionally, the inner right edge of the loop allows the code to modify the next loop iteration's priority, rate, or policy.

The policy has a number of values, shown in the center photo. The default policy is to Discard missed and Maintain phase. This is equivalent to number 2 in your list.

The third dialog shows other settings, with the policy controlled by the checkboxes in the lower right.

To accomplish #1 in your list, change the settings to not discard. #3 is accomplished by the code checking its own progress. There is no built-in termination as that isn't worth the pain it causes, especially in a dataflow language. #4 could be accomplished with a different pattern where you determine the instances by having waiting instances and trigger them yourself from your timed loop. The loop semantics never mean that loop iterations overlap unless it is a ParallelFor loop.



Quote:
Is a unique error counter incremented for each of these possibilities?
If (1), how deep is the queue?
If (4), is there a limit to the re-entry level?
It isn't considered an error, but a Boolean data value with time info.
The LV execution queue size if BIG, like ~two billion big.
You determine the limit if you choose to use this pattern.

Greg McKaskle
Attached Thumbnails
Click image for larger version

Name:	Clipboard 3.png
Views:	26
Size:	18.0 KB
ID:	12922  Click image for larger version

Name:	Clipboard 2.png
Views:	16
Size:	9.6 KB
ID:	12923  Click image for larger version

Name:	Clipboard 1.png
Views:	15
Size:	33.1 KB
ID:	12924