WOLFRAM SYSTEMMODELER LINK PACKAGE SYMBOL

WSMRealTimePlot

WSMRealTimePlot[conn,{"v1","v2",},dt]
plots the latest dt seconds of variables vi from WSMSimulationConnection conn.

WSMRealTimePlot[conn,{"v1",}]
accumulates data until the simulation is stopped.

WSMRealTimePlot["mmodel",{"v1","v2",},dt]
plots from a new real-time simulation of mmodel.

DetailsDetails

  • WSMRealTimePlot has the same options as ListPlot, with the additions and changes:
  • PaneledTrueshow panel with buttons
    ShrinkingDelayAutomatictime before shrinking plot range
    Ticks"Relative"tick labels and behavior
    WSMPlotUpdatingAutomaticupdating behavior
  • WSMRealTimePlot defaults to PlotLegends->Automatic and uses variable names vi in the legend.
  • Ticks accepts the following values:
  • "Relative"time relative to current simulation time
    "Absolute"time since simulation start
  • WSMPlotUpdating accepts the following values:
  • "Scrolling"max extra space after last data
    "Overwrite"overwrite earlier plot data
    {"mode","p1"->v1,}use mode with suboptions pi

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

Load Wolfram SystemModeler Link:

In[1]:=
Click for copyable input

Start a real-time simulation and plot two variables:

In[1]:=
Click for copyable input
Out[1]=

Plot the last seven seconds of simulation:

In[2]:=
Click for copyable input
Out[2]=

Start the simulation:

In[3]:=
Click for copyable input

Stop the simulation:

In[4]:=
Click for copyable input

Plot with an overwriting scroll mode:

In[1]:=
Click for copyable input
Out[1]=

Plot the last seven seconds of simulation:

In[2]:=
Click for copyable input
Out[2]=

Start the simulation:

In[3]:=
Click for copyable input

Stop the simulation:

In[4]:=
Click for copyable input

Show a plot of a new real-time simulation of a model:

In[1]:=
Click for copyable input
Out[1]=