How can I use Bus creator signal and Memory Block with initial conditions together?

조회 수: 4 (최근 30일)
Hi Everyone
I have a problem with my simulink design. I am creating a simple Bus signal with Bus creator ( picture 1)and giving a name as "LettersBus", then I want to delay my signal by using Memory block with initial condition "LettersBus" and checked inherit sample time (picture 2) . When I put a Bus selector after Memory Block , Bus selector doesn't see any signal of my Bus creator (picture 3). I couldn't understand why. Additionally, I have two errors when I run the simulation(picture 4). I don't know why it is giving DatatypeStr error all my constant blocks are Inherit from Constant value type and sample times 0.005.
When I don't use initial condition for Memory Block it shows bus signals after, but I want to use it with initial condition Lettersbus.
Matlab2015a .
Could you please help me? It seems simple but I couldn't find the way out. Helps would be much appriciated.
Picture 1
Picture 2
Picture 3
Picture 4

채택된 답변

Fangjun Jiang
Fangjun Jiang 2019년 9월 13일
"LettersBus" here is just a signal label, or the name of the bus. You can't assign it as the initial condition of the Memory block. Try 0:4 or any other valid value as the initial condition.
  댓글 수: 2
Mete Soylu
Mete Soylu 2019년 9월 13일
Thanks for the answer, but what is the effect of 0:4 for initial condition ? When I write so, would that let those 5 signals from the bus creator pass through as they are or it will give those 5 signals initial conditions as 0 1 2 3 4 and then delay them ?
Fangjun Jiang
Fangjun Jiang 2019년 9월 13일
It sets the initial value as 0:4 and then passes through whatever comes from the bus.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Event Functions에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by