I'm doing some code generation activities in which a control model is developed which contains top level Inports and Outports. This model would then get referenced and used in a plant model. When the code is generated, the Inports and Outports must have integer datatypes. In a typical control model, the input would be an integer scaled by some factor which is then converted into a float and scaled back down.
I'm looking to create a custom implementation or mask of the Inport and Outport blocks with a dialog that allows the user to select an integer datatype and specify a scale factor. The Inport would take the integer datatype when the model is referenced, but then in the control model would output a float that has been scaled by the specified factor.
I can do this with a subsystem where I feed the output of the Inport block in, and use a gain and a datatype conversion block to achieve the desired effect, but I'd like to wrap this all up into one block. Would this be possible, perhaps with a mask on an Inport block?