I have a simple MATLAB code which reads the serial port and displays the output of *IDN? . I am using the deploytool to compile it (to serialRead.exe) and use it on a different machine without MATLAB (MCR installed).
1. When serialRead.exe is executed, it doesn't display anything, and I get back to the command prompt. It appears as if there is no output. However, after about 2 minutes I see a message with the output of *IDN?
2. At the end of execution the .exe file doesn't give back the control (ie, I don't see the command prompt; The cursor keeps blinking. I get the control back only when I issue a CTRL+C.
Any idea what I am doing wrong? (The output is OK, but the delay and the behavior of the program is not.)