Table of Contents
Stop with Message
Stops the model and displays the error message in a dialog.
Library
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
qc_open_library('quarc_library/Sinks/Error Handling')Description
The Stop with Message block displays the error message in a dialog box on the host and stops the model when its input is non-zero. Unlike the Stop with Error block, the error does not appear in the Simulink Diagnostics window and the model is terminated normally, not with the error status set. A fixed error message string can be provided as the error message, or it can interpret its input as a standard QUARC error code and supply the corresponding error message. If the input is interpreted as an error code then only negative inputs cause the block to issue an error message. The model will stop and return the error message. The model termination code is run so that any cleanup or final outputs are performed.
The dialog containing the message does not close when the model is terminated. The user must close it manually. However, if the model is restarted, it will reuse the same dialog so that a series of dialogs are not created every time the model is restarted.
Input Ports
This block has a single input port. The model is stopped with the error message when this input becomes non-zero or negative, depending on the setting of the Message type parameter.
Output Ports
This block has no output ports.
Data Type Support
The Stop with Message block accepts signals of any of the built-in Simulink data types at its input. Fixed point is not currently supported.
Parameters and Dialog Box
Message type
The type of error message to issue. If this parameter is set to Fixed error
message then it uses the contents of the Error message
parameter as the error message. If the Message type parameter is set to Interpret input as error code
then it interprets the input
as a QUARC error code and issues the corresponding error message.
Message icon
The type of icon to display in the dialog.
Error message
The error message to issue when the model stops. The error message is treated as a string. It is not evaluated so Matlab workspace
variables cannot be used. This parameter is ignored if the Message type parameter is set to Interpret input as error code
.
Targets
Target Name |
Compatible* |
Model Referencing |
Comments |
---|---|---|---|
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
Last fully supported in QUARC 2018. |
|
Rapid Simulation (RSIM) Target |
Yes |
Yes |
|
S-Function Target |
No |
N/A |
Old technology. Use model referencing instead. |
Normal simulation |
Yes |
Yes |
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.