LMG1205 subcircuit2ssc not working

1 view (last 30 days)
Ashraf Siddiquee
Ashraf Siddiquee on 12 Jul 2023
Edited: akshatsood on 28 Aug 2023
Hello, I am trying to convert the spice model of LMG1205 into a simscape block. It's giving this error.
Error in spiceSubckt/getElements
Error in spiceSubckt/loadSubckt
Error in spiceSubckt
Error in subcircuit2ssc
Error in subcircuit2ssc (line 31)
subcircuit2ssc(netlist,target);
The library file is attached.
Can anyone please help?
Thanks.

Answers (1)

akshatsood
akshatsood on 25 Aug 2023
Edited: akshatsood on 28 Aug 2023
Hi Ashraf,
I understand that you are facing issue in converting your SPICE netlist into Simscape block. I tried reproducing the issue you are facing on my end and came across this error message.
Index exceeds the number of array elements. Index must not exceed 0.
Error in spiceSubckt/getElements
Error in spiceSubckt/loadSubckt
Error in spiceSubckt
Error in subcircuit2ssc
Error in subcircuit2ssc (line 31)
subcircuit2ssc(netlist, target);
The first line of the error says that
Index exceeds the number of array elements. Index must not exceed 0.
I found a similar MATLAB Answer in where the solution is suggestive of the fact that you are passing a parameter while calling a subcircuit which is not in the definition of the subcircuit. Further, if the above workaround does not work you should check for any missing labels for subcircuits in the main circuit.
Have a look at the below references for better understanding
I hope this helps.

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!