Filter löschen
Filter löschen

Realtime data from motor controller

3 Ansichten (letzte 30 Tage)
Chris
Chris am 28 Dez. 2020
Kommentiert: Mario Malic am 21 Jan. 2021
Hello,
I have a question how to plot and show real-time data in App designer, maybe someone can help me, I am beginner in Matlab.
I get my data (e.g. Velocity) easy with webread() in hex and just have to convert into a decimal number, it already works.
But now I don’t know how to write an easy and efficiency program to get actually data e.g. velocity, motor current, torque to show them into two ways in App Designer:
  1. In an EditField to see the Data like a Display
  2. In a plot to see data in a graphic and safe
Thanks a lot for any advice to find a good solution :)

Akzeptierte Antwort

Mario Malic
Mario Malic am 31 Dez. 2020
Hey Christian,
It would be the best if you'd do few introductory examples in App Designer and you'll get an idea how to do your task.
% 1. Set the property value of the Edit Field component this way
app.EditField.Value = 5
% 2. Once you create axes in your app, use plot function
plot(ax, x, y); % ax is the handle to your axes, example app.UIAxes
  21 Kommentare
Chris
Chris am 21 Jan. 2021
Hello Mario,
super! Thanks for create a demo app. Everything is working well.
"Another thought: when velocity is zero, signal you get might not be zero, but very low, let's say 1E-3. On plot it will look like it's jumping around, which it actually is but such small number can be neglected."
Exactly, that was the key I had in the beginning really high measurement errors sometimes (1E+9): Now I limited the range in the beginning and the plot is working well.
Mario Malic
Mario Malic am 21 Jan. 2021
Great to hear, you're welcome.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by