On demand data parsing from 2 serial ports

i am a learner in arduino coding. I am working on a project in which I have used teensy3.6 and its 2 soft serial ports to read the data from two instruments. Instrument 1 is sending 1 second continuous data on serial2 in the following format 123456.0 99999.99 99 /n I cant change its formatting to be used with start and end markers as suggested in the post https://forum.arduino.cc/index.php?topic=288234.0

and the second instrument is a ADAM 16 Channel ADC on which 3 differential channels are used to sample 3 analog data. ADAm send data on request means I have to send "#01/r" to get the data from adam and it sends data in the following format


I want to log this data every 5 second in an excel file. Problem is with instrument 1 which is sending continuous data. I am unable to clear its serial buffer. whenever I read its serial port it throughs 3-4 line of such data at single shot. How do I flush or restrict its data on serial port. I just want that whenever I ask the serial2 to send the data only then it sends its string. I tried Serial.parsefloat and Serial.parseint functions.Though it worked but the results are not full proof.it misses or prints garbage values in between. here's my function to read two serial ports.

void Serial_read_and_print() { Serial3.write("#012\r"); float Iz = Serial3.parseFloat(); //****************

Serial3.write("#010\r"); float Ih = Serial3.parseFloat();//****************

Serial3.write("#011\r"); float Id = Serial3.parseFloat(); //****************

float date=Serial2.Parsefloat(); Fval = Serial2.parseFloat(); int sgnal = Serial2.parseInt(); // F=44000;

sprintf (timebuff, "%02d:%02d:%02d ", hour(), minute(), second()); Serial.print(timebuff); sprintf (buff, " $%10.3f%10.3f%10.3f%10.2f", IH, ID, IZ, date,Fval ); Serial.println(buff);

coilData.print(timebuff); coilData.print(buff); }

123456.0 99999.99 99 /n has an end marker that can be used as a start marker.

+0.0000+0.0000+0.0000/r has both start and end markers

Please edit your original post, put the code inside code tags after removing the excessive number of blank lines.