Start of trail End of trail navigation bar

Table of Contents

Tunable Parameters

The blocks supplied in QUARC are carefully designed to allow block parameters to be changed as much as possible without recompiling the model. The ability to change block parameters without regenerating code can substantially increase the speed of development.

There are essentially three types of parameters:

Parameters Tunable Online

Some parameters, such as the gain of a Gain block, may be tuned even while the model is running. The model does not have to be recompiled in this case. Such parameters are referred to as "parameters tunable online" because they may be changed on-the-fly, while the model is running.

The only restriction on modifying tunable parameters is that the size of the value cannot be altered without rebuilding the code. For example, changing the length of a vector from two elements to three elements will require the code to be rebuilt.

QUARC's ability to tune many parameters online, even for remote targets, is very convenient for tuning controllers, since a controller gain may be adjusted and the response is immediately evident.

Parameters Tunable Offline

For some parameters, such as the initial analog outputs of a HIL Initialize block, it does not make sense to tune the parameter while the model is running because the parameter is only used at model start. In this case, QUARC disables the parameter while the model is running to avoid confusion. Hence, the parameter may only be tuned "offline", when the model is not running. Such parameters are referred to as "parameters tunable offline" because they may only be changed when the model is not running. However, the model does not have to be recompiled for parameters that are "tunable offline".

The only restriction on modifying tunable parameters is that the size of the value cannot be altered without rebuilding the code. For example, changing the length of a vector from two elements to three elements will require the code to be rebuilt. Similarly, adding or removing characters from a URI parameter that is tunable offline will necessitate rebuilding of the code.

Many QUARC users assume that parameters that are not tunable online require that the model be recompiled. However, rebuilding the model is often not required. Attempt to change parameters without regenerating code - if the parameter is tunable offline (or online) you will save yourself time!

Non-tunable Parameters

Not all parameters may be tuned online or offline. This situation typically arises when the generated code is actually different depending on the value of the parameter. Options that change the sample time, number of input or output ports, or the data types or dimensions of the input or output ports often fall into this category.

If a parameter is not tunable then the model must be rebuilt in order to run the code after changing the value of the parameter. Since regenerating the code takes time, Quanser has attempted to minimize the number of non-tunable parameters in order to keep the "rapid" in "rapid-prototyping", without sacrificing quality in the generated code!

 

navigation bar