- Integrate “SimEvents” with the App Designer GUI: In the “SimEvents” model, utilize the “eventSend” block or a custom block to send events when an entity reaches the last server. Write a MATLAB callback function that receives these events and updates the GUI accordingly. This callback function can be defined within the App Designer code or in a separate MATLAB function file.
- Update the GUI in real time: In the callback function, update the status of the buttons based on the received events. Use appropriate MATLAB functions, such as set or “app.Button.Value”, to change the state or appearance of the buttons. You can also update the label or indicator to display the status information.
- Start the “SimEvents” simulation, which will generate events based on the model logic and run the App Designer GUI, which will display the buttons and update them in real time based on the events received.
Real time interface using App Designer for Simevents?
1 次查看(过去 30 天)
显示 更早的评论
Is there a way to make a real time interface using App Designer for Simevents?
I have an entity attribute called color, and when the entity reaches the last server, I want to show the user that the corresponding button of color is pressed. Is there a way to do this?
0 个评论
回答(1 个)
Hari
2023-9-5
Hi Ho Jung Kim,
I understand that you have a “SimEvents” model where entities move through servers, each with a "color" attribute. You want to create a real-time interface using App Designer to show the user that the corresponding color button is pressed when an entity reaches the last server.
It is possible to do so using App Designer. I assume, you have created an App Designer GUI with all the visual elements required in your app. You can follow the below steps:
By following these steps, you can create a real-time interface using App Designer to visualize the status of entities in a “SimEvents” model.
Refer to the below documentations “Callbacks in App Designer” and “Events and Listeners” for more information.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Discrete-Event Simulation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!