Table of Contents
String Display
Displays the value of a string signal.
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/Strings')Description
The String Display block displays the current value of its input on the block itself, much like a
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
doc('Display')uint8
code units (UTF-8 code units) or a Simulink "string".
It is typically produced by another QUARC block, such as the String Constant
or Model Argument blocks, or one of the communications blocks.
Input Ports
text
The text input to the block must be a null-terminated vector of UTF-8 characters (uint8
data type)
or a Simulink "string". When UTF-8 characters are used, it may be a variable-sized signal.
new
The new input is an optional input that is used to indicate whether the string at the text input represents new data. Without this input enabled, the block will only update the display if the string has changed.
Output Ports
This block has no output ports.
Data Type Support
The String Display block accepts uint8
signals at its text input, which is the datatype used by QUARC for string quantities.
It does, however, support variable-sized signals. See Variable-Size Signals
for more information on variable-size signals. It also accepts the Simulink "string" data type.
Parameters and Dialog Box
Horizontal alignment (tunable online)
The text may be aligned either to the left edge of the block, the center of the block or the right edge of the block. Use this parameter to select the desired alignment.
Display mode (tunable online)
The display mode determines how the string is displayed. The following table discusses the three modes available:
Display Mode |
Description |
---|---|
Single line |
Displays a single line of text. Newlines and carriage returns in the input string are converted to spaces. |
Multiple line |
Displays multiple lines of text. Newlines and carriage returns in the input string result in multiple lines of text. |
Console |
Displays a history of the input like a console. Multiple lines of text are displayed if the input strings contain newlines or carriage returns. |
Sample time
The sample time of the block. A sample time of 0 indicates that the block will be treated as a continuous time block. A positive sample time indicates that the block is a discrete time block with the given sample time.
A sample time of -1 indicates that the block inherits its sample time from the input. The block inherits the sample time by default.
To set the sample time to the fundamental sampling time of the model, use the qc_get_step_size function, which is a QUARC function that returns the fundamental sampling time of the model. The fundamental sampling time of the model is the sampling time entered in the Fixed step size field of the Solver pane of the Configuration parameters.
It is recommended that a sample time of 0.1 seconds or slower be used since the String Display block may not be able to keep up with faster sample rates. |
Use new input
Check this option to provide a new input that may be used to indicate when the string at the text input is new. The display will be updated whenever this input is non-zero. If this option is not checked, then the display will only be updated when the string has changed value.
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.