Simulink Block Images

From MotoHawk
Jump to navigationJump to search

You can add and edit pictures for subsystem blocks in Simulink.


Right click the subsystem block and select "Edit Mask"


Under the first tab "Icon & Ports" add the line "image(img);" in the Icon Drawing commands.

Iconandportstab.jpg


Under the second tab "Parameters" add a Variable called "IMG" as seen in the image below.

Parameterstab.jpg


Under the third tab "Initialization" add the following commands "block = gcb; img = imread(IMG);"

Initializationtab.jpg


Click apply after all three changes have been completed.

Maskparametersimage.jpg


Right click the subsystem block and select "Mask Parameters..." The following box should appear.


All that is left is to type the name of the picture in the "Image File" parameter. Make sure that the picture is in the "Images" folder of your Motohawk project.