Table of Contents
Target Type
Gets the QUARC target type on which the model is running.
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/Sources/Signals')Description
The Target Type block outputs the type of QUARC target on which the model is running. It outputs both a variable-size string containing the name of the target, as well as a target type code of enumerated type t_target_type that simplifies comparisons. To display strings in QUARC, use the String Display block.
To use the target type code in a comparison, blocks such as the
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
doc('Enumerated Constant');MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
doc('Compare To Constant');Enum: t_target_type
for the Enumerated Constant and a constant value such as t_target_type.QUARC_WIN64
.
When the block is run in normal simulation, the target type code will be t_target_type.NORMAL.
Input Ports
This block has no input ports.
Output Ports
type
The target type as a variable-size uint8 (UTF-8) vector, which is the data type used by QUARC for strings. The string is guaranteed to be null-terminated.
code
A unique code representing the target type. The data type of this output is t_target_type, which is a Simulink enumeration. Hence, it may be used with the
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
doc('Enumerated Constant');MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
doc('Compare To Constant');Parameters and Dialog Box
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. The sample time must be inherited when the block is placed in a conditionally executed subsystem, like a Triggered Subsystem, Enabled Subsystem, Function Call Subsystem or in a referenced model.
To use the fundamental sampling time of the model, set the sample time to qc_get_step_size, which is a QUARC function that returns the fundamental sampling time of the model.
The default sample time is set to Inf
because the output of the block is constant.
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.