- Ensure Signal Logging is Enabled: Make sure that signal logging is enabled for the specific signal you are trying to bind. You can do this by right-clicking the signal in Simulink and selecting "Log Selected Signal."
- Check Signal Logging Configuration: Verify that the signal is correctly configured to be logged in the Simulink model. You can do this by opening the "Configuration Parameters" dialog, navigating to the "Data Import/Export" pane, and ensuring that "Signal logging" is checked.
- Use Correct Signal Path: Double-check that the signal path you are using in the bind function is correct. Signal paths are case-sensitive and must match exactly.
- Model Name Consistency: Ensure that the model name used in simulation and the path used in bind are consistent and correctly referenced.
- Compilation Differences: Sometimes, there are differences in behavior between running a model in Simulink and running a compiled version. Ensure that all necessary dependencies and configurations are included in the compiled app.
- Error Handling: Add error handling to capture and log more detailed information about the issue when the app is compiled. This can help you diagnose the problem more effectively.
App Designer (using uitimescope in standalone app)
14 views (last 30 days)
Show older comments
Hello,
I am having trouble getting my app to work when compiled as a standalone app. Specifically, the app is connected to a Simulink model, and I have created a custom "Run" button which creates a simulation object. I then try and bind a signal to a uitimescope. This works fine in App Designer, but when compiled I get an error that no signal is logged at output port 1 of Gain 7. I have included a snippet of the code below. Any suggestions would be very much appreciated!
app.TimeScope = uitimescope(app.UIFigure);
app.simObj = simulation("ModelNameHere","LoadModel",true);
bind(app.simObj.LoggedSignals, [app.simObj.ModelName '/Gain7:1'], app.TimeScope);
start(app.simObj);
0 Comments
Answers (1)
Ruchika Parag
on 26 Jun 2024
Hi Sune,
It sounds like the issue might be related to the way signals are logged in your Simulink model when the app is compiled. Here are a few suggestions to troubleshoot and resolve the issue:
It would be helpful in investigating this issue if you could attach the model and related data.
0 Comments
See Also
Categories
Find more on Create Apps to Control Simulations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!