Hi Fenny,
Nice that it works. I did only some minor changes. In the �Simulation share� the row value for getting Bera Toe and Ro Toe was wrong. On the other hand �Segment_loop� was too complicated for searching errors.
In the future I recommend you to run programs both in the Asyst and LabView and to follow the execution step by step to localize an error. However this looks boring it is inevitable translating a code that is a bit complicated.
good luck
Andres