Advice and ideas to "get"/"collect" the units at the ports of the Simscape blocks

19 Views Asked by At

I am trying to develop a MATLAB program where the the units at the ports of Simscape blocks can be picked up automatically based on the handle of the block. One block under question is Fuel Cell/ Electrical Simscape.Simscape Electrical

I have tried a few thing but nothing seems to work. One thing I tried was using:

get_param(handle, 'CompiledPortUnits') but this command only gives correct results for the Simulink block and does not give the the units at the ports but only returns the handles.

Another option is each block has the units stored as parameters (image 2) and I can access from but the problem their is that each paramater name then will be unique for other blocks.

Also I want to get information on the nature of the ports such as Physical Signals or Conservative Connection or Physical.Thermal.Thermal that kind of detail.

Properties of the fuel cell from get_param(handle, 'ObjectParameters')

get_param(handle, 'CompiledPortUnits') I tried this command but it only works for simulink blocks and not simscape blocks.

0

There are 0 best solutions below