I need to capture data from a sensing device from serial port using MATLAB. The program needs to read 500 miliseconds of data (sampled at 1000 Hz) and stay idle until a new data package arrives with the results of the calculations that the sensing device perform in the meantime. How can I handle this idle state without making the timeout exception from serialread terminate my program?
Every time I collect the initial data the port remains open expecting new data, however, if new data is not coming, the program terminates abruptly
joardemu85 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.