How can I force the encoder to calculate both upstream branches of a switch?
Show older comments
I have a Simulink model that has a switch block that chooses to pass the output of lookup table "A" or the output of lookup table "B" based on a switch condition. In the C-Code that the encoder produces, it (logically) only calculates and passes the output from the table that is "selected" and does not determine the output from the other table. For purposes of data collection for debugging and analysis, I would like the outputs from both tables to be calculated all the time and then have the switch pass the selected value. What is the easiest way for me to force the encoder to generate code that will calculate the output from both tables all the time?
Simularily (and again, for debug and analysis purposes), I would like to know how to force the encoder to create "global" variables for any intermediate signal I would like to monitor. I have had some luck with just giving signals a specific name but I wanted to find out if there were any other ways.
Thank you!
Answers (1)
Glen Tallarek
on 23 Aug 2022
0 votes
Categories
Find more on General Applications 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!