number from simulink to guide
Mostrar comentarios más antiguos
Hello I have a problem in simulink. As I can monitor my program guide (static-text) result (integer) That gives me a display of simulink
3 comentarios
Gerd
el 1 de Jul. de 2011
Hi Felipe,
could you please be a little bit more precise in your question. I do not get it so far...
Gerd
el 1 de Jul. de 2011
Are you already able to see the result in the matlab command window?
Felipe Arriagada
el 1 de Jul. de 2011
Respuestas (2)
Gerd
el 1 de Jul. de 2011
0 votos
OK, now I think I know what you want. If you take a constant block in Simulink and write a variable name for the "Constant Value" you can change that value from the workspace. This procedure is also working when using a gui. You have to make sure to convert the number to a string num2str() in order to display the right value in text box. set(handles.textbox,'String',num2str(variable));
Gerd
1 comentario
Felipe Arriagada
el 1 de Jul. de 2011
Paulo Silva
el 2 de Jul. de 2011
%Your system must be already open or loaded, if not do it!!!!
set_param(gcs, 'SimulationCommand', 'start') %start the simulation
while (strcmp(get_param(gcs, 'SimulationStatus'),'running'))
rto = get_param([gcs '/Display'],'RuntimeObject')
set(handles.text1,'string',num2str(rto.InputPort(1).Data))
pause(0.3) %wait 0.3 seconds, this is the refresh rate
end
1 comentario
Felipe Arriagada
el 7 de Jul. de 2011
Categorías
Más información sobre Simulink Environment Customization en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!