SIMulation Workbench® provides a variety of options called preferences for customizing the user workflow and SimWB RTDB creation and code generation options.
Preference | Usage |
---|---|
Remember RTDB Creator and Code Generator tab settings |
Specifies how to remember the last settings used for these tabs in the MLToolkit GUI. Specify as one of the following:
|
Preference | Usage |
---|---|
Custom RTDB variable prefix |
Enter a custom prefix for RTDB variable names. This option is useful if there are blocks in the Simulink® model with names the same as C language keywords (const, int, double). Adding a custom prefix helps prevent build errors. If the Hierarchical RTDB variable names is also selected the custom prefix is added to each element in the hierarchical structure. This option does not apply to the toRTDB/fromRTDB blocks available in the simwbSfunlib block library. |
Hierarchical RTDB variable names |
Creates the names as a hierachical structure based on the Simulink.BlockPath. The hierarchical names are generated in the modelname.subsystemname.blockname format. If the Custom RTDB variable prefix is also selected then the names are generated in the modelname.prefixsubsystemname.prefixblockname format. |
Display duplicate RTDB variables |
Select if you want the automatic RTDB creation tool to display information on blocks which will potentially map to the same RTDB variable. |
Error if duplicate RTDB variables |
Select if you want the automatic RTDB creation tool and the code generation tool
to error if it finds blocks which will potentially map to the same RTDB variable. If this
option is not selected, the blocks which map to the same RTDB variable will be ignored and will not be
present in the generated RTDB or the generated code. |
Error if no blocks map to RTDB variables |
Select if you want the automatic RTDB creation tool to error if no blocks in the model map to RTDB variables. If this option is not selected, an empty signal.db file is uploaded to the real-time host and warning is displayed on the screen. |
Append RTDB variables as AIO or DIO |
Select if you want to change the point type of RTDB variable to AIO or DIO while appending the RTDB. If the RTDB variable already exists with type AI or DI and the new point type is AO or DO then if this option is selected, the RTDB will be appended with the point type AIO or DIO. This option is used when sharing data between two Simulink® models. The output of one model will be connected to the input of the other model via a shared AIO or DIO RTDB variable. For this option to work, the output of one model and the input of the other model should have the same name, data type, and the number of elements. |
Generate list of blocks that map to RTDB variables |
Select to obtain a report of all the blocks in your model that map to RTDB variables.
When you generate SimWB-compliant code for your model, the software replaces each block included in the
report with a toRTDB/fromRTDB block. By default, this option is unchecked. |
Do not convert dots in RTDB variables to underscores |
Select if you want the dots in the block names to become a hierarchical RTDB. For
example, if an input port with name Car.Speed is set to map to RTDB, this option will create an RTDB
variable
'Car.Speed'. Previously, we used to convert that to 'Car_Speed'. |
Preference | Usage |
---|---|
RTWCAPISignals |
Exports the Simulink signals in the generated code. In the case of Referenced models, ensure that this setting is manually set for all the referenced models. |
Generate list of blocks that map to RTDB variables |
Select to obtain a report of all the blocks in your model that map to RTDB variables.
When you generate SimWB-compliant code for your model, the software replaces each block included in the
report with a toRTDB/fromRTDB block. You must place the |
Allow sharing of variables across models |
Select to allow block parameters of type |