Clear Filters
Clear Filters

How to plot data from serial port against actual time in Simulink S-functions?

1 view (last 30 days)
I am receiving data through serial port from a microcontroller in a custom S-function block. Microcontroller is sending data sampled data after every 100msec (but it's not constant) whereas my simulation time step is 1msec. Matlab is making a plot against simulation time that is first sample at time t=0 and second sample at time t = 1msec. But I want to make a plot with the delay equal to the incoming data rate.

Answers (0)

Categories

Find more on Block and Blockset Authoring 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!