Hi,
From the information shared by you, I could infer that you’re encountering an issue with variable-size signals in your Simulink project involving "CFAR blocks" and a "Multiport Switch". The error message indicates that Simulink is having trouble propagating the variable-size signal from the "CFAR block" to the "Multiport Switch" block.
A variable-size signal in Simulink can change its size during model execution. The number of dimensions remains constant, but the number of elements in each dimension can vary. Many Simulink blocks are compatible with variable-size signals like "Switch" or "Multi-switch" blocks, "Selector blocks with indexing options", "S-function" blocks etc.
To handle variable-size signals in Simulink, please ensure that every block that deals with such signals is capable of handling them and is properly configured.
Follow the below mentioned steps to address the issue:
- Block Configuration: Ensure that the "Multiport Switch" block is configured correctly to variable-size signals. Setting the "Output minimum" and "Output maximum" for configuration will help to avoid compatibility errors. After selecting the parameter "Allow different data input sizes", click on "Apply" button for the block to accept the variable-size signals.
- Signal Attributes: Double-check the signal attributes (data type, sample time, dimensions) of the output of the "CFAR blocks" to ensure they are consistent and expected for variable-size signals. All input signals should be of the same type and complexity.
- Subsystem Configuration: If you are using "If Action" Subsystems, make sure that the subsystems are configured to output variable-size signals correctly. Please use an "Enabled" Subsystem with the "States when enabling" parameter set to "held" to maintain the signal dimensions when the subsystem is not active.
- Simulation Settings: Review the simulation settings to ensure that they are compatible with variable-size signals. For example, check the solver configuration and the sample times being used.
- Update Diagram: Sometimes, forcing an update of the Simulink diagram can resolve issues with signal dimensions. Use the "Ctrl+D" shortcut to update the diagram and recompile the model.
- Manual Signal Dimension Specification: In some cases, manually specifying the dimensions of the signals can help. Setting the output dimensions of the "CFAR blocks" explicitly can help if the system allows for it.
- Bus Signals: If the "CFAR block" outputs are bus signals, ensure that the bus objects are configured correctly to support variable-size signals.
Please follow the below mentioned MATLAB R2023b documentation links to know more on "Multiport Switch" and "Enabled Subsystem" respectively:
I hope this helps!
Thanks,
Abhimenyu