In the R2022b release, no composer can directly print out something. However, we can work around this limitation by using "create Simulink Behavior".
In the Simulink block library, there is a block named "MATLAB Function" that can print out "Hello World" using a 'fprintf' statement. We can add this block into the System Composer model as a Simulink behavior. Then the print statements will be included in generated code.
To accomplish this, please follow the below steps:
1. Open the system composer model.
2. Add a new Component.
3. Right click the selected component and click "Create Simulink behavior".
4. In the dialog, set the Type dropdown to "Subsystem" and click ok. (Attention: in R2021a, there is no "Subsystem" in "Type" selection.)
5. Then, double click and navigate inside the component and add a MATLAB function block.
6. Write the MATLAB script to print anything you want using "fprintf".
7. Using the appropriate .TLC to generate code, you will see the code about "print out".
Remember a Component that has Simulink behavior of subsystem type is just like Simulink. You can add almost any block in Simulink library to a System Composer model.
Please note the difference in R2021a, the linked Simulink model is the referenced Simulink model by default, but in R2022b, you can select the type (Step 4).
Note: This is not a usual requirement in System Composer.