I want to read data from incremental encoder using arduino and simulink. I have programmed the external interrupt zero in order to get thew pulses from the encoder and send them to simulink via serial communication. It works but, it's slow, I reduced the time on block sample time in serial receive block but it's still slow. When the motor turns one revolution, simulink is stil receiving data, and after some time I get all values. How can I improve the data communication in order to get a good response in real time?
PD: I set the baud rate till the maximum value (115200 bauds) but it's still slow.