Why wouldn't serial.readall work outside of DataAvailable?

I’m struggling with monitoring a 9600 baud data stream waiting for a stable reading before continuing with further code. I thought I could use serial.readall in a loop outside of DataAvailable but serial.readall isn’t returning anything for me when it is not inside serial.DataAvailable. If that won’t work, what is an alternative? I’m working on a powder feeder, where I send a command to tare the scale, wait for a stable reading, start the vibratory feeder, and stop the feeder when a target weight is reached. I can’t use a loop to read what DataAvailable collects, as that doesn’t fire when Xojo is executing a loop. In the past DoEvents in the loop has worked, but that is officially frowned on, and I think I’m finally seeing the problems it can cause.

Execute processing loops inside threads, fire events about some status to the main thread using timers?

Instead of DoEvents, use serial.Poll inside your loop.

Rick, I suspected that would be the recommendation, but how to use threads and timers in this case has stumped me.
Thanks Tim, it looks like serial.poll is what I was missing to make DataAvailable fire. I’ve been struggling with this for 3 days, and you solved it for me within 5 minutes of me asking for help. Muchas Gracias!