function Update()
local Total = mDuration:GetValue()
local Real = mPosition:GetValue()
local State = mState:GetValue() == 1 and 1 or 0
local Stopped = mState:GetValue() == 0 and 1 or 0
if Stopped == 1 then
return 0
elseif Counter == 0 or math.abs(Fake-Real)>SafetyRange then
Fake = Real
else
Fake = Fake + State * (UpdatePeriod/1000)
end