Error using spiceSubckt/loadSubckt Subcircuit delimiters is not in expected format. - Facing difficulties generating Simscapce model using SPICE model.

1 view (last 30 days)
I would like to model QUADRAC using SPICE Model in Simscape.
I tried to convert the required netlist but the error seems consistent.
The model netlist is:
.SUBCKT Q6010LT 1 2 3
* TERMINALS: MT2 G MT1
Xchip1 2 4 DIAC
Xchip2 1 4 3 TRIAC
.SUBCKT DIAC 4 2
* TERMINALS: MT1 MT2
V1 17 3 DC 28 ac 0
V2 16 15 DC 28 ac 0
Srev 3 1 7 1 DIACtrigg
Sfor 15 2 4 2 DIACtrigg
Dfor 1 4 DN4148
Drev 2 7 DN4148
D1 7 17 Zone
D2 4 16 Zone
.MODEL Zone D (BV=100 CJO=4PF IS=7E-09 M=.45 N=.1 RS=.8 VJ=.6V)
.MODEL DN4148 D (BV=100 CJO=4PF IS=7E-09 M=.45 N=2 RS=.8 TT=6E-09 VJ=.6V)
.MODEL DIACtrigg SW (VT=33.1 VH=5 RON=7.5 ROFF=500MEG)
.ENDS
.SUBCKT TRIAC 1 4 3
* TERMINALS: MT2 G MT1
Qnpn1 5 4 3 NoutF OFF
Qpnp1 4 5 7 PoutF OFF
Qnpn2 11 6 7 NoutR OFF
Qpnp2 6 11 3 PoutR OFF
Dfor 4 5 DZ OFF
Drev 6 11 DZ OFF
Rfor 4 6 12MEG
Ron 1 7 41.8M
Rhold 7 6 50
RGP 8 3 50
RG 2 8 5.8
RS 8 4 100
DN 9 2 DIN OFF
RN 9 3 6.12
GNN 6 7 9 3 1.100
GNP 4 5 9 3 0.521
DP 2 10 DIP OFF
RP 10 3 3.56
GP 7 6 10 3 0.1
.MODEL DIN D (IS=382F)
.MODEL DIP D (IS=382F N=1.19)
.MODEL DZ D (IS=382F N=1.5 IBV=50U BV=600)
.MODEL PoutF PNP (IS=382F BF=1 CJE=761P TF=0.3U)
.MODEL NoutF NPN (IS=382F BF=3 CJE=761P CJC=152P TF=0.3U)
.MODEL PoutR PNP (IS=382F BF=5 CJE=761P TF=0.3U)
.MODEL NoutR NPN (IS=382F BF=0.5 CJE=761P CJC=152P TF=0.3U)
.ENDS
.ENDS

Answers (1)

Joel Van Sickel
Joel Van Sickel on 16 Feb 2023
the import doesn't support using * to go to a new line. If you combine that text into a single line, the import should go further.

Categories

Find more on MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!