Dear members of the community, In trying to make more interactive simulations, I looked into the functions WSMRealTimeSimulate and WSMRealTimePlot. I am using Wolfram Desktop. My code is like this.
s1 = SystemModel[
"Modelica.Blocks.Sources.Sine", <|
"ParameterValues" -> {"freqHz" -> 50.0, "amplitude" -> 0.5}|>];
To simply simulate a sinusoidal signal with frequency=50 Hz and an amplitude of 0.5. I also use the WSM link
Needs["WSMLink`"];
Then,
conn = WSMRealTimeSimulate[s1]
and to visualize the signal
WSMRealTimePlot[conn, "y", 0.1, PlotRange -> All]
The connection seems to work, but the viewed signal is always zero. I like to ask if someone may help with this. Simulating the block with the traditional SystemModelSimulate seems fine. Thanks in advance.
Jesus