Molana,
you have both reads in one single while loop. This means both reads are
executed once in each iteration., independently if there are any data
availabel for them or not.
As the devices are running independently, I'd suggest to use two independently running whiles, one for each device.
If there are any data to share between both devices or with a third
process (in a 3rd independent while loop), use a named queue or
similar means to share data. Stop the loops with one single boolean
control or indicator that connects to the termination terminal of one
of those loops. Use locals of this control to stop the other while
loops.
Do not forget to discard /release the named queue after leaving the while(s).
HTH and
Greetings from Germany!<br>-- <br>Uwe