How can i select 1 of the 2 outputs on the basis of conditions?

2 ビュー (過去 30 日間)
Mati
Mati 2017 年 6 月 27 日
コメント済み: Mati 2017 年 7 月 3 日
I am designing a controller. I have certain logical conditions on which one of the two controllers i.e. Main controller and sub controller is to be selected . I am using an "if block" with two "if action" sub blocks for selection. The output of both the controllers is a 3x1 vector. Now "if block" will select the controller based on certain conditions. But how to select one of two outputs from the controllers is my problem!! Kindly see the attached Simulink model for more clear idea of my problem. I have already tried merge and mux blocks but both of these cannot select one of the outputs.
  1 件のコメント
Image Analyst
Image Analyst 2017 年 6 月 27 日
編集済み: Image Analyst 2017 年 6 月 27 日
Nothing is attached. Edit your original post and this time, use the paperclip icon to attach a file, or the frame icon to insert a picture.

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

採用された回答

Astik Sachan
Astik Sachan 2017 年 6 月 28 日
Merge Block will work fine here as 1 output at a time will be enabled by IfElse Block.
  6 件のコメント
Astik Sachan
Astik Sachan 2017 年 6 月 30 日
編集済み: Astik Sachan 2017 年 6 月 30 日
No, Switch Block is not at all encouraged for combining two inputs from If action Subsystems.Merge block is what MathWorks also suggest.
Please enable signal Dimension and Port data type so that I will be able to see what is coming from If Action Subsystem.
  1. Goto: Display>>signal Dimension
  2. Goto: Display>>Port data type
and if possible attach the model here I will look into it. or reach me on mail astiksachan8@gmail.com
Mati
Mati 2017 年 7 月 3 日
Thanks Alot Astik. The Merge block is working and there was a problem in my model in if else block. Thanks for your support.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSchedule Model Components についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by