I hit the send button too early. anyway Basically something like while (stop condition false) read data write data into local array or something wait sample time Thanks marco