Smooth Signal Generator End of trail navigation bar

Table of Contents

Target Type

Gets the QUARC target type on which the model is running.

Library

QUARC Targets/Sources/Signals

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

Target Type

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

Enumerated Constant

MATLAB Command Line

Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:

doc('Enumerated Constant');
and
Compare To 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');
blocks may be used. Specify an output data type of 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

Enumerated Constant

MATLAB Command Line

Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:

doc('Enumerated Constant');
and
Compare To 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');
blocks.

Parameters and Dialog Box

Target Type

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

QUARC Win32 Target

Yes

Yes

QUARC Win64 Target

Yes

Yes

QUARC Linux Nvidia Target

Yes

Yes

QUARC Linux QBot Platform Target

Yes

Yes

QUARC Linux QCar 2 Target

Yes

Yes

QUARC Linux QDrone 2 Target

Yes

Yes

QUARC Linux Raspberry Pi 3 Target

Yes

Yes

QUARC Linux Raspberry Pi 4 Target

Yes

Yes

QUARC Linux RT ARMv7 Target

Yes

Yes

QUARC Linux x64 Target

Yes

Yes

QUARC Linux DuoVero Target

Yes

Yes

QUARC Linux DuoVero 2016 Target

Yes

Yes

QUARC Linux Verdex Target

Yes

Yes

QUARC QNX x86 Target

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

* Compatible means that the block can be compiled for the target.

 

navigation bar