Non-uniform sampling time to read data from Arduino Due in Simulink

3 views (last 30 days)
Hello
I wrote an S function (Builder) to read data from one of analog inputs of Arduino Due. I know the signal on that pin is sinusoidal with frequency of 20Hz. When I read data in Simulink in realtime with scope block and To-workspace block, the data I am receiving, does not have uniform sampling time. It seems it sends packages of 3 sampled data (with different of 0.001 second in time = my settings in solver). And it waits for some time (around 0.1 second) and then again send another package of 3 sampled data with right sampling rate of 0.001.
I use the fixed-step size solver with the step size of 0.001 in simulink.
What is the reason of it and how can I remove that undesirable 0.1 waiting time?
Thanks in Advance.
Yousof
  1 Comment
Camila Schuck
Camila Schuck on 12 Mar 2018
I'm having the same problem. Did you find a way to solve it, since it was a long time ago?
Thank you.

Sign in to comment.

Answers (0)

Categories

Find more on Arduino Hardware in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!