- The trick here is to read the block's "parameter" instead of the block's output "signal".
- Note that a "signal" value can only be generated during simulation. So, as you rightly stated, reading a signal would mean starting the simulation.
- You can use the "get_param" function to get the parameter values of the constant block in your model. For more information refer to this link:
- Use "get_param" in the "startFcn" and show an error dialog if the value of the constant block is 0 using the "errordlg" function. Refer to the following link for more details: