The setup is very simple with a poti at an analog input as source. The analog input block detects the values and a header and a terminator are added. Then the serial transmit block is used to send the data. This model is built and laoded on to the arduino:
To read the data I´m using another simulink model which is running on my computer. It inlcudes a serial recieve and a serial configuration block.
As long as i set the step-size of both models to a value higher than 20 milliseconds everything is working fine and I recieve data in "real time" so there shouldn´t be a problem with the port or something like that.
But if I reduce the step-size to 10 milliseconds it seems like something is too slow. I still recieve data but it is dalyed and the delay gets bigger until the model hangs.
I tried to run the model for 20 seconds with different step-size and baud rate:
So there is no dependence on the baud rate but if the step-size is decreased there is not enough data transmitted.
Does anyone know about a limitation for the step-size when using the serial transmit block or what else could be the problem? If you need more information about something please ask. Thanks!