フィルターのクリア

Reusing Signal Builder Generator in another Simulink model

6 ビュー (過去 30 日間)
Kevin Bachovchin
Kevin Bachovchin 2018 年 9 月 19 日
コメント済み: Kevin Bachovchin 2018 年 9 月 24 日
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 件のコメント
Kevin Bachovchin
Kevin Bachovchin 2018 年 9 月 19 日
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 2018 年 9 月 19 日
@Fangjun Jiang, I'm using MATLAB R2016a. Thanks.

サインインしてコメントする。

採用された回答

Fangjun Jiang
Fangjun Jiang 2018 年 9 月 20 日
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 件のコメント
Kevin Bachovchin
Kevin Bachovchin 2018 年 9 月 24 日
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.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by