I need to use the comm port to control an equipment.
In order to get some initial information about the equipment, I need to "Send" and "receive" several commands to the equipment automatically at the beginning of the program.

I've tried several Serial Classes from the internet, even the MSComm Control, but none of them can suit my need. They will either can only "receive" the reply for the first commands or bring in communication errors and hangs the whole program.

Is there a better way to "Send" and "Receive" several commands one by one and received all the answers without causing problem? Please help.

By the way, once the comm port has error, how to clear it and let it return back to normal state?

Thanks