Invalid Boolean Data Type in MathWorks® Simulink Model for VeriStand

Updated Nov 13, 2023

Reported In

Software

  • VeriStand
  • Simulink
  • VeriStand Model Generation Support for LabVIEW

Issue Details

My MathWorks® Simulink model uses several constants with a data type of boolean defined in a .sldd dictionary. During the build of the model, several booleans inside the Stateflow Blocks are causing invalid datatype warnings like the one below:

Warning: The 'xxx' parameter in xxxx.sldd has an invalid data type: boolean. VeriStand only supports 2-dimensional (maximum) numeric or Boolean data types and scalar bus types.
Model build warnings.png
The model builds successfully, but if I try to use it, those boolean parameters fail to update in VeriStand returning the same warning.

Solution

As of VeriStand Model Generation Support 23.8 and earlier, this is a known issue reported to NI. The CAR number is 2565623.
The behavior arises in the Stateflow Block of the Simulink model, where certain parameters should be classified as logical in the data type field of the model descriptor. However, parameters that are not functioning correctly are marked as boolean. This inconsistency results in a failure in the conversion logic for the boolean type in the parameter's code path.

There are two ways to bypass this behavior:
  • Modify the data type to logical in the model descriptor file.
  • Replace the boolean parameters with unsigned 8-bit integer.