Hi There,
Is there a reason to communicate with your device via code component rather than the inbuild parallel/serial port components? (Details here)
If your keyboard response is ending the routine you can then have a second routine with a parallel/serial port at the start?
Becca