View Single Post
  #13   Spotlight this post!  
Unread 21-03-2010, 18:23
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,083
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: switching between Teleoperated enabled and Wathcdog notfed

Quote:
Originally Posted by Mark McLeod View Post
In your case the 5ms timed loop will repeat every 5 ms or as soon as the task scheduler allows after 5ms are up.
The timer vi counts down from the moment it is started, and usually that's co-incident with the loop starting.
Now things are not making sense again:

- At time t=0 the CPU encounters the 5ms timer vi so the CPU goes away and does something else.

- When the CPU comes back to execute the code it is now t=5ms.

- the code takes 1ms to execute. It is now t=6ms.

- the task loops back to the beginning and encounters the 5ms timer vi again. The CPU goes away for 5ms, and when it comes back, it is now t=11ms.

- the code now starts executing again at t=11ms.

Therefore, the period is 11-5 = 6ms, not 5ms.

What is wrong with the above argument?


~

Last edited by Ether : 21-03-2010 at 18:27.
Reply With Quote