Hi,
I see that you have created a library containing your masked block.
For the 1st query: As of now the extra inputs are disabled by Simulink during Simulation or after a model update. To reduce the number of input ports on the main variant subsystem block we will have to remove the inactive 'inports' from within the variant subsystem.
However this will lead to an error even if the active variant has lesser number of inports. Kindly refer to the conditions for Inports given in the link below for more details.
For the 2nd query: If you delete the variant control variable from the MATLAB workspace the model will not work. 'mode' is the variant control variable in your model and hence it should be defined. Kindly refer to the following link for more details.
Another for passing the same parameter 'mode' directly in the mask instead of using two different parameters, one in the mask and another parameter for selecting the variant systems.
For your 3rd query: In order to use the block, drag it into a new Simulink model. If you try to use it directly from the library it is equivalent to making changes in the library which is why you need to unlock the library.
Best Answer