To me synchronisation means input and output tasks would start at the same time and each output value is read at input at same phase. I agree that @2Ms/s for every 8 samples generated 1 would be read. So does it mean that I would lose 7 samples ? or would I run into the buffer overrun as the read vi is slower than output vi ?
You don't "lose" the samples, the output still clocks out all the samples at 2 MHz. The input only clocks samples in at 250 kHz though, so your input buffer won't have a point for each of the output samples. You won't have a buffer overrun/underrun.
"so your input buffer won't have a point for each of the output samples"
Then what happens when the input buffer doesn't have a point for each output sample. ?
I'm not sure I follow. The sample is still generated, but you don't read that particular sample back in.
so I would lose the samples ? then coming back to original question How would I read all the samples without losing them ?
I still don't follow your question. You don't "lose" the samples--they are all still generated.
Obviously you won't read a sample for each one generated if your input sample clock rate is a fraction of your output sample clock rate, if this is what you mean by "losing" samples then you would just make both output and input task run at the same rate.
To me losing samples meant not reading all the samples which are being generated, so I wanted to know if I can read all the samples generated ?
You will read samples at the rate you specify for your input task. You will generate samples at the rate you specify for your output task. If you want to read every sample generated exactly one time then these clocks need to be at the same rate.
Thanks for all the answers