フィルターのクリア

trigger block in simulink

6 ビュー (過去 30 日間)
Rahul kumar
Rahul kumar 2012 年 9 月 4 日
I need to have a trigger block, which should trigger only one block at a time.
For example
I have 2 blocks A , B connected to the trigger block T, this triggering block T should trigger one of these A, B blocks at different instances. i.e trigger A at instant 0, A at instant 1, B at instant 2, A at instant 2 and so on.
which triggering block should i use?
And should i use any code to have this timed triggering
waiting fr ur valuable response
Thank you
  3 件のコメント
Rahul kumar
Rahul kumar 2012 年 9 月 5 日
it should fire contiously.. as i am trying to convert a synchronous data flow graph into a synchronous block diagram..!
when A block is triggered should produce some tokens ( 2 for my model) when B block is triggered should consume some tokens ( 3 for my model)
Rahul kumar
Rahul kumar 2012 年 9 月 5 日
編集済み: Rahul kumar 2012 年 9 月 5 日
So like this i need to form a producer-consumer model!! the trigger can be in any order.!
But preferably A,A,B,A,B because when A is fired twice (2+2 tokens produced), it is sufficient for B to get 3 tokens from double firing of A, then so on.

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

採用された回答

TAB
TAB 2012 年 9 月 5 日
編集済み: TAB 2012 年 9 月 5 日
[Edited]
Please see the model snapshot below:
  4 件のコメント
Rahul kumar
Rahul kumar 2012 年 9 月 5 日
Yes the trigger sequence is as expected!! thank you,
And which block did you use for A, B is it triggered subsystem block?
TAB
TAB 2012 年 9 月 5 日
編集済み: TAB 2012 年 9 月 5 日
Yes it is triggered subsystem with rising edge trigger type.
Initially at t=0, output of unit delay block will be 1 (Initial condition:1). So switch block will send the input-1 to the output which is equal to 1.
Afterward, output of switch block will come from input-3 connected to repeating sequence stair.
Repeating sequence stair will generate the sequence of 0 & 1 continuously.
So
Sample Time : 0 1 2 3 4 5 6 ....
Switch Blk Intput-1: 1 1 1 1 1 1 1 ....
Switch Blk Intput-2: 0 1 0 1 0 1 0 ....
Switch Blk output : 1 1 0 1 0 1 0 ....
NOT Blk output : 0 0 1 0 1 0 1 ....
Hope now it is clear.

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

その他の回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2012 年 9 月 4 日
編集済み: Azzi Abdelmalek 2012 年 9 月 4 日
try this
  1. set all sample time block to ts
  2. set initial value of unit delay block to 1
  35 件のコメント
Rahul kumar
Rahul kumar 2012 年 9 月 9 日
Rahul kumar
Rahul kumar 2012 年 9 月 10 日
Any ideas azzi abdelmalek?

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

カテゴリ

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