Effacer les filtres
Effacer les filtres

Reusing Signal Builder Generator in another Simulink model

6 vues (au cours des 30 derniers jours)
Kevin Bachovchin
Kevin Bachovchin le 19 Sep 2018
Hello,
In one Simulink model, I created a signal builder generator by right clicking and going to "Create and Connect Generator" >> "Simulink" >> "Signal Builder". I would like to re-use that signal created in that model in another Simulink model.
Is there any object I can copy/paste into the new Simulink model? (It doesn't seem to let me copy the text that gets created when I created the signal builder generator (by right clicking and going to "Create and Connect Generator" >> "Simulink" >> "Signal Builder").
I also tried unsuccessfully to export the signal builder from my old model and import into my new model. (I opened the signal builder window in the old Simulink model. Then I went to File, Export to Workspace, and saved the resulting struct in the workspace as a .mat file. Then I created a signal builder object in my new Simulink model and went to File, Import from File, and tried to load that .mat file I created but I got an error saying the file 'channels.mat' does not comply with the Signal Builder required format.)
Can anyone help me with how I can re-use the signal builder generator signals in another Simulink model? I have 88 complicated signals in the signal group in my old Simulink model, so it would be very time-consuming to have to completely re-create these signals in the new Simulink model.
Thanks, Kevin
  3 commentaires
Kevin Bachovchin
Kevin Bachovchin le 19 Sep 2018
In case what I said wasn't clear, the Signal Builder Generator I created is like in this example:
https://www.mathworks.com/help/simulink/ug/signal-and-scope-manager.html
Is there any way to be able to copy that Signal Builder Generator to another Simulink File? When I right click on that the Signal Builder Generator name and select "Generator Parameters", it opens up the Signal Builder window with the 88 signals I have there. Is there a hidden Signal Builder object somewhere that I can copy/paste into the new Simulink model?
Kevin Bachovchin
Kevin Bachovchin le 19 Sep 2018
@Fangjun Jiang, I'm using MATLAB R2016a. Thanks.

Connectez-vous pour commenter.

Réponse acceptée

Fangjun Jiang
Fangjun Jiang le 20 Sep 2018
Viewers and generators are not blocks. One way to resolve this:
1. "Select All" and delete all the blocks in your current model
2. "Select All" and copy&Paste all the blocks from your new model
3. Save the model file as your new model
4. Viewers and generators (including the signals in the Signal Builder) are saved.
  1 commentaire
Kevin Bachovchin
Kevin Bachovchin le 24 Sep 2018
Thanks, that will work, I was just wondering if there was an easier way to copy signal generators. It really seems strange and cumbersome that you can't export a signal and then import the exported signal directly.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by