hello all,
I am using Labwindows to store the data to a file , which is sent continueously from microcontroller to PC via USB (Byte by Byte) .
I am copying the data to a ring buffer (PC side)and at the same time I want to write the data to a file without disturbing the process copying to ring buffer.
I tried with Multithread functions ,but when it jumps in between those functions(ex. first threadfunction is copying the data continueously to ring buffer and 2ndthread function is writing data to file) ,they are not synchronised and I am loosing the data because of overflowing of ring buffer.
If I write the data to file with in the loop of copying to ring buffer, I loose the time for writing data to file i.e receiving data continueously from controller will be slow.
please suggest me to run both functions synchronously .
thank you
raj