How do I link to Simulink variable from app designer
Ive created a model in app designer and want to change an image in the app based on the state of a value in the model. For example image is a pump and if the Simulink model state is 0 I want to use the closed pump image, if the state is 1 use the pump running image etc. The image widget doesn’t support bindings. that’s OK I can set up my own function and schedule it to run every second to check the pump state. In the model I have a variable setup that’s being logged. In the app I’m then trying to access that variable using: app.Simulation.LoggedSignals(‘PumpCtrlMdl/PumpState:1’).Values But this returns empty. How would I update my code so I get the value of the output value correctly?Ive created a model in app designer and want to change an image in the app based on the state of a value in the model. For example image is a pump and if the Simulink model state is 0 I want to use the closed pump image, if the state is 1 use the pump running image etc. The image widget doesn’t support bindings. that’s OK I can set up my own function and schedule it to run every second to check the pump state. In the model I have a variable setup that’s being logged. In the app I’m then trying to access that variable using: app.Simulation.LoggedSignals(‘PumpCtrlMdl/PumpState:1’).Values But this returns empty. How would I update my code so I get the value of the output value correctly? Ive created a model in app designer and want to change an image in the app based on the state of a value in the model. For example image is a pump and if the Simulink model state is 0 I want to use the closed pump image, if the state is 1 use the pump running image etc. The image widget doesn’t support bindings. that’s OK I can set up my own function and schedule it to run every second to check the pump state. In the model I have a variable setup that’s being logged. In the app I’m then trying to access that variable using: app.Simulation.LoggedSignals(‘PumpCtrlMdl/PumpState:1’).Values But this returns empty. How would I update my code so I get the value of the output value correctly? simulink, appdesigner MATLAB Answers — New Questions