Using Simulink | ![]() ![]() |
Sample Time Colors
Simulink can color-code the blocks and lines in your model to indicate the sample rates at which the blocks operate.
To enable the sample time colors feature, select Sample Time Colors from the Format menu.
Simulink does not automatically recolor the model with each change you make to it, so you must select Update Diagram from the Edit menu to explicitly update the model coloration. To return to your original coloring, disable sample time coloration by again choosing Sample Time Colors.
When using sample time colors, the color assigned to each block depends on its sample time with respect to other sample times in the model.
It is important to note that Mux and Demux blocks are simply grouping operators - signals passing through them retain their timing information. For this reason, the lines emanating from a Demux block may have different colors if they are driven by sources having different sample times. In this case, the Mux and Demux blocks are color coded as hybrids (yellow) to indicate that they handle signals with multiple rates.
Similarly, Subsystem blocks that contain blocks with differing sample times are also colored as hybrids, because there is no single rate associated with them. If all of the blocks within a subsystem run at a single rate, then the Subsystem block is colored according to that rate.
![]() | Using Drop Shadows | Connecting Blocks | ![]() |