How exchange values between Simulink and App Designer?
I am currently using App designer for the first time to create an interface for a Simulink model. This app must be capable of both monitoring the Simulink continuously (aka: change lamp colour once value output is greater than one) and inputting information into the Simulink (aka: switches that stop/start particular Simulink functions).
Getting switches to control the Simulink was simple, but I am struggling with getting the app to constantly monitor the Simulink. The closest I have gotten is using event listeners (add_exec_event_listener). However, when they are just based in the app I seem to need to be continuously doing a triggering event in the app to run the code which is not a viable option. An alternative I found was to put the listeners inside Model Properties, Callbacks but then the other parts of the app seem to refuse to run (Switch no longer interact with Simulink).
As this is my first time using app I do not know if this is due to failings on my own part or limitations of the system. If anyone know if this is possible with event listeners, could you let me know so I can continue working on my code. Or if they know this won’t work and can offer alternative suggestions that would be incredible.I am currently using App designer for the first time to create an interface for a Simulink model. This app must be capable of both monitoring the Simulink continuously (aka: change lamp colour once value output is greater than one) and inputting information into the Simulink (aka: switches that stop/start particular Simulink functions).
Getting switches to control the Simulink was simple, but I am struggling with getting the app to constantly monitor the Simulink. The closest I have gotten is using event listeners (add_exec_event_listener). However, when they are just based in the app I seem to need to be continuously doing a triggering event in the app to run the code which is not a viable option. An alternative I found was to put the listeners inside Model Properties, Callbacks but then the other parts of the app seem to refuse to run (Switch no longer interact with Simulink).
As this is my first time using app I do not know if this is due to failings on my own part or limitations of the system. If anyone know if this is possible with event listeners, could you let me know so I can continue working on my code. Or if they know this won’t work and can offer alternative suggestions that would be incredible. I am currently using App designer for the first time to create an interface for a Simulink model. This app must be capable of both monitoring the Simulink continuously (aka: change lamp colour once value output is greater than one) and inputting information into the Simulink (aka: switches that stop/start particular Simulink functions).
Getting switches to control the Simulink was simple, but I am struggling with getting the app to constantly monitor the Simulink. The closest I have gotten is using event listeners (add_exec_event_listener). However, when they are just based in the app I seem to need to be continuously doing a triggering event in the app to run the code which is not a viable option. An alternative I found was to put the listeners inside Model Properties, Callbacks but then the other parts of the app seem to refuse to run (Switch no longer interact with Simulink).
As this is my first time using app I do not know if this is due to failings on my own part or limitations of the system. If anyone know if this is possible with event listeners, could you let me know so I can continue working on my code. Or if they know this won’t work and can offer alternative suggestions that would be incredible. app designer, simulink, event listener MATLAB Answers — New Questions









