Table of Contents
HIL Set Property
Sets numeric or string properties of a hardware-in-the-loop card.
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/Data Acquisition/Generic/Configuration')Description
The HIL Set Property block sets integer, double, or string properties for a specified HIL card. This block can set more than one property at a time if the properties are integer or double properties. The properties are set at each sampling instant of the block, or only once when the model starts.
Input Ports
The number of input ports depends on the Source of property value(s) parameter. If the source is set to be internal
, then there are no
input ports for the block and the property values are specified via the Property value(s) parameter of the block.
If the source is set to external
, then there is one input port. For integer
or double
property types, the input port is a vector
that accepts any built-in Simulink data type and the length of the vector equals the number of properties specified in the Property code(s) parameter.
For the string
property type, only one property can be set by each block and if external
property source is selected the input must be of type
uint8 (see String Constant block).
Output Ports
This block has no output ports.
Parameters and Dialog Box
Board name
The name of the board whose properties will be set. Boards are configured using the HIL Initialize block. Place an HIL Initialize block in your diagram to add a board name to the list.
Type of Property
This combo box allows the user to select the type of property to be set. The three property types are integer
, double
, and string
.
See the documentation for your HIL card for details on the available properties, property types, property codes, and valid values.
Property code(s)
This field specifies the code of each property that will be set. For integer
and double
property types, multiple property codes can be specified.
For the string
property type, only one property code/value pair can be set by each HIL Set Property block.
Source of property value(s)
This field specifies the source of the property values that will be set. Setting this parameter to internal
will enable the Property value(s)
parameter so the property values can be specified as a block parameter. Setting this parameter to external
will disable the Property value(s)
parameter field and enable a block input which is used to set property values.
Property value(s)
This field specifies the property values that will be set when the Source of property value(s) parameter is set to internal
. Otherwise, this
parameter is disabled. For integer
and double
property types, this field must be a numeric vector of the same length as the Property code(s)
parameter. For the string
property type, this field is an unevaluated string that is interpreted literally.
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 sample time must be inherited when the block is placed in a conditionally executed subsystem like the Triggered Subsystem block.
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.
Set property at model start only
When this option is checked, the properties will be set only once when the model is started. Otherwise, the properties will be set at each sampling instant. This option is
only available when the Source of property value(s) parameter is set to internal
.
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 |
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.