Greetings everybody, at first i want to excuse my terrible english, but i am gonna do my best 
description:
I am in my summerholidays, working in a company which produces electrcal maschines.
My job is it to measure the time and de distance which passes by between the moment an emergency-stop occured and the point where the velocity of my machine is < 0,01 m/s
As you can see in my Vi (attachments) i programmed an eventstructure where i can handle some options through the frontpanel.
My question is about the event-case MESSUNG.
In this Event-Case i Measure the Period and de Count_Edges from my Encorder after a Trigger starts. This trigger starts after the emergency-stopp-button is set to true.
in the while-loop i always take 10 samples from the buffer and calculate the velocity, proof that this velocity is >0,01m/s, store the Counter-Sample in an array, give 5 V to an analog output.
When the velocity is <0,01m/s the while-loop stops and i calculate
way = max.counter.value *0,1mm
time = number of measured samples/sampleRate
This process i repead 11 times, because i have to make 11 measures and then take the worst case out of them.
Today i tried my program on a machine and failed.
1) Question
i took Implicit- Timing for my Period-measurement and Sample-Clock Timing for my Counter-Measurement. Otherwise it didn´t work.
2) Problem
When the velocity is < 0,001 m/s the while-loop doesn´t stopp, but an error 20028 occures at the Read-VI from the Period.
3) the values i get are often wrong, seldom write. I just don´t know whay it doesn´t work as i want.
Can anybody help me and give me some tipps or tell me what i am doing wrong?
i just work with labview for 2 weeks, i know that i know nothing 
would be very nice of you.