How do I identify the exact string to use to programmatically configure a Simscape component's parameters when instantiating it?

1 view (last 30 days)
I'm trying to import SPICE subcircuits into Simscape using subcircuit2ssc(). After looking at the unsupportedCommands output (see function's documentation page), I have some incompatible lines in my netlist. I've found a Simscape block to model the behavior that it complained about, so now I need to instantiate it in a component declaration inside the .ssc file that subcircuit2ssc() produced. The problem is that I don't know the exact string to use to refer to that parameter in the instantiation function call. I can open the the block's properties window or that block's help browser's page and see the full text description of the parameters, but I doubt that's what I need. For example, a resistor will have a "Resistance" parameter, but programmatically assigning it a value in the instantiation function would be done via the "R" value (i.e. "R = { (1*1000), 'Ohm'}).
Since I will most likely need to identify this information in other cases, I'm asking for the method, not just the exact string for this specific component.
The specific block I'm trying to instantiate, in this case, is a transmission line in Simscape > Electrical > Passive > Lines. Since this block has different "Model Types" with different parameters available for each model type, my question has two parts:
  1. For blocks with multiple "Model Type" options, how can I list the types and the short version of their names?
  2. If it's not already part of the answer to #1, how can I list the short parameter names associated with each Model Type? Using the resistor example, I need to know that resistance is a parameter and that assigning a value to "R" is the way to configure it.
I found the .sscp files in my Matlab installation, but they're protected so I can't just read it that way. I've tried calling the instantiation function to ask for information (i.e. "ee.passive.lines.transmission_line( help ), etc.) but that doesn't work. Just instantiating it via the command window (unsuppressed output) doesn't list the parameters either.

Accepted Answer

David John
David John on 23 May 2022
If you let your mouse hover over a parameter in the block mask, the programmatic name should appear.

More Answers (1)

PS
PS on 23 May 2022
Great, thanks David.
Hovering over the parameter's value field does show the programmatic name. Since opening the block parameters window straight from the Library Browser doesn't let you select the Model Type, it looks like you need to place the component and open the properties from there. It's not the sort of command window interface I was hoping for, but I'll take it.

Categories

Find more on Composite Components in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!