How to display the current value of a TagetPC-Signal in a numeric edit field (App Designer) and update the value automatically every timestep ?
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I tried to display a realtime value of my TargetPC on the app designer by the following code:
% Value changed function: AEditField
function AEditFieldValueChanged(app, event)
A= app.AEditField.Value;
app.AEditField.Value = getsignal(tg,'Path',1)
end
It works, but unfortunately i have to press enter in the EditField to update the value. I just want to display the current realtime value on my GUI.
0 comentarios
Respuesta aceptada
Jonas
el 14 de Jul. de 2021
Inside the myTimerFcn, write:
app.AEditField.Value = getsignal(tg,'Path',1);
Más respuestas (1)
Jonas
el 9 de Jul. de 2021
- You need to create a timer object
- Attach a function call to the timer object
- Put your code to assign the realtime value to the EditField in the function
Ver también
Categorías
Más información sobre Target Computer Setup en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!