필터 지우기
필터 지우기

Synchronize data output with clock pulses.

조회 수: 1 (최근 30일)
Tom
Tom 2011년 3월 28일
Hi. I am using simulink for my project.
How do I pause and hold an uint8 input, so that it can output in a sample time which synchronize with every clock pulses?
I am currently using the Enabled Subsystem with a clock input of 2 period. The input is uint 8, which run infinitely. However, there are missing data at the output at every interval where the clock goes zero.
Urgent. Any reply will be appreciate. Thank you.
  댓글 수: 2
Jarrod Rivituso
Jarrod Rivituso 2011년 3월 28일
Could you be more clear on exactly what the inputs to your Enabled Subsystem are? What is the input to the conditional input port (the one on top) and what is the actual subsystem input? What behavior do you expect that you aren't getting?
Tom
Tom 2011년 3월 29일
I am using a digital clock with an output of '1' & '0' to trigger the enable control input of the enabled subsystem with a period of 2.
The input at the input port 1 can be any random input, example a ramp or repeating sequence stairs.
I used a scope to connect to the output port to observe the output results.
For the output port 1, I configured the output when disabled to reset and set the initial output condition to [0].
I am expecting the result to synchronize with every clock pulses. Which means there is no missing data. For every enabled pulses, the input will release a certain amount of data. For example 123 for the first cycle, then 456 for the next cycle. Instead of what I am getting now, which is 123 for the 1st cycle and 789 for the next cycle. The data 456 is missing, since the input in running continuously. Is there any way to pause the input so that it can synchronise with every clock pulse? So that I will not have missing data. Thank you.

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

답변 (1개)

MarkB
MarkB 2011년 3월 29일
I believe that the issue is with the "Enable" block inside the enabled subsystem. If you double-click on this block, you can access the settings that define how it behaves when the subsystem is disabled. I believe that if you set it to "held" instead of "reset" you will get the behavior that you want.

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by