Simulink wire different colors

조회 수: 149 (최근 30일)
Vansh
Vansh 2023년 7월 9일
댓글: Vansh 2023년 7월 9일
My Simulink model is a pretty basic one. When I compile it, a few connections appear in Black and others in Red. There is no differentiator also like input, output, wire/bus, virtual/non-virtual bus, etc. How do I change the color of the wires to all Red?

채택된 답변

Sahas Marwah
Sahas Marwah 2023년 7월 9일
Hi @Vansh,
Assuming you are using R2023a version,
The color of wires are dependent on the "sample time" of your model. Different colors may be due to constants, or other blocks having different "sample times".
One can change that by double clicking the said block, and change the sample time to "-1", which is also the default and should match the colors of different wires coming in and out of that block.
Alternately, one can also click on the two arrow lines on the left pane of Simulink view (image attached) to open "Timing Legends" and change the colors of different types of blocks from there.
Alternately, if one wants no colors except the default ones, they can go to "Debug" tab --> "Information Overlays" --> "Colors" and disable colors.
  댓글 수: 1
Vansh
Vansh 2023년 7월 9일
Thanks @Sahas Marwah for the quick answer.
I had to first enable colors from Information Overalys and then select same color for all blocks in Timing Legends. But it worked out.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

태그

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by