● Warning: A timeout occurred before the Terminator was reached
In this warning, terminator is the one that is required to be sent by the device to MATLAB. If you have this warning, serial port object that you open in MATLAB timed out before the required terminator was received.
When might this warning occur?
-When you can't get the required terminator that you defined in MATLAB from the device.
-When you can't get the correct terminator before timeout.
For instance, if you set the parameters as below;
set(SerPIC, 'terminator', 'LF');
set(SerPIC, 'timeout', .1);
you just want to wait for the data and so the linefeed terminator for 0.1 sec. So, your device should send the data with the terminator to MATLAB before 0.1 sec. If it doesn't, you will get this warning.
-When you don't have any data sent by the device.
What should you do?
-You may use "HHD Serial Port Monitor" to check if you have any data and so the terminator received or not. Or you can just use hyperterminal to see what you receive as data.
-Be sure that they're connected to proper COM ports.
-Set the communication parameters like baudrate, parity bit, terminator etc. as the hardware requires.
-Be sure that you use the correct terminator defined in the manual documentation of the device.
-Set the timeout to a proper value.