I am using the Serial Port ActiveX control to communicate with 6 serial ports simultaneously. When I send some data through Port1, the device on that port is answering immediately. So I am trying to write a function, which is sending data to all of the ports and is collecting the answers from the devices. The problem is that when I send to the Port1 I have to wait until I receive all the data from Port1, before sending on Port2. My question is, how to make my send_to_all function first handle the received bytes, before send to the next port. OnRxCharSportax is not interrupting the send_to_all function, so I cannot handle the data. I suppose, I am missing something. Is there a way to interrupt the sending loop, handle the data and send to the next port. When I am working with only one port everything is OK, I am handling the data in the OnRxCharSportax1 function.
Thank you!