H! :smileyhappy:
I'm trying to read data sent from a DC motor, show on graph and save the necessary information to a text file. when I press the Run button, the code works as I want it to and I don't have any problem with showing on graph or saving. however when I ran execute the code writing to file doesn't start exactly at the beginning. I mean some time later after I have pushed the button it starts saving the data. my guess is it sets time equal to zero whenever it wants. sometimes it works fine but sometimes it doesn't.
I have attached my code and any comment is much appreciated.