I am running a while loop which is constantly checking the state of a pump (motor frquency).  I am also needing to read from the serial port data coming in from another computer which is being written to a file.  Can I hold that data coming in from the other computer until it is needed?  We only write to the file every 90 seconds, and if the timing is off, then the data coming in doesn't get written to the file.  Is there a way to store data coming in to a buffer, then when it is written to the file clearing the buffer for the next data set?  Or just overwrite the last set of data.