Using just the Get of a GetSet signal (or at least supressing the Set initialization)

1 visualizzazione (ultimi 30 giorni)
I have some code which worked in MatLab 2008b, defining mpt.Signal objects for my Simulink model's inputs and then auto-coding my model. These inputs come from other modules in my larger codeset, so it is necessary for me to "Get" these values, but to never write to them. While the GetSet custom storage class required me to specify both a "Get" and a "Set" interface, the model never wrote to these inputs so the "Set" interfaces never appeared in the generated code. This is necessary both because these variables belong to other modules and I am not to write to them, and also because the "Set" interfaces are not even defined in the external code.
The problem came when these scripts were used in MatLab 2011a. Now the E-Coder finds it necessary to initalize my GetSet signals, using their "Set" commands. This causes my overall codeset compile to crash, since these "Set" interfaces are never defined. I looked into using other signal types like ImportedExtern and ImportFromfile, but for arrays (which many of these are) they use square-brackets around the index, not parantheses as needed. I also noticed that MatLab 2011a does not initalize all of my inputs through "Set" commands, just some of them, though I cannot figure out the pattern of which ones get initialized and which ones don't.
What I need, simply, is for all of them to not be initialized.

Risposte (0)

Categorie

Scopri di più su Simulink Coder in Help Center e File Exchange

Tag

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by