Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable/Comment a block in Simulink

Is it possible to comment out the block in Simulink like it is possible in any programming languages ? I mean, using logic, I can disable the block. but its not the best solution all the time.

I would rather disable / comment out the part of the block in my Model to test individual modules in Simulink.

like image 525
Kiran Avatar asked Sep 05 '11 14:09

Kiran


People also ask

How do I disable a block in Simulink?

Simulink allows you to disable linked blocks in a model. Simulink ignores disabled links when simulating a model. To disable a link, select the link, choose Link options from the model window's Edit or context menu, then choose Disable link.

What does Ctrl d do in Simulink?

The Simulink compilation phase propagates signal and sample time attributes. It is equivalent to selecting the "Edit -> Update Diagram" (Ctrl-D) menu item from the Simulink menubar. Before every simulation and when the user requests it, Simulink performs an 'Update Diagram' (Ctrl-D) to ready the model for simulation.

How do I add comments to Simulink?

Create Text AnnotationsDouble-click the canvas where you want to create the annotation and select Create Annotation from the menu. Click the annotation box on the Simulink Editor palette and then click the canvas. Drag the annotation box on the Simulink Editor palette to the canvas.

How do I hide my block name in Simulink?

However you may right-click the name (or shift-left click) and press delete. It will hide the name of the block.


1 Answers

I just wanted to add that in Simulnk 2012b, it is now possible to explicitly comment out blocks. Simply right-click on the block and select the option "Comment Out".

When run, the model will act as if the commented out block is not there at all. This means that input/output signals to/from this block are essentially just left open. So for example, if you commented out a gain block, the input signal would not simply pass through to the output signal.

like image 51
grungetta Avatar answered Oct 03 '22 03:10

grungetta