You can access the port width, data type, and dimensions of individual blocks in a Simulink model by using the GET_PARAM function and the following properties:
"CompiledPortDataType"
"CompiledPortWidth"
"CompiledPortDimensions"
The simulation has to be running or compiled in order for the above properties to return the correct value. You can "compile" the model and then use the GET_PARAM command as follows:-
modelname([],[],[],'compile')
q=get_param(gcb,'PortHandles');
get_param(q.Inport,'CompiledPortDataType')
get_param(q.Inport,'CompiledPortWidth')
modelname([],[],[],'term')
where modelname is the name of your Simulink model.
Best Answer