So, I've failed miserably at finding answers to this through google. I have an LTspice file that worked with a library inclusion. I later realized the need for a library for just one part was annoying and started including component info as spice directives, and thought I had everything working. When I copied the file to another computer, it wouldn't run sims, saying it couldn't find the library file. It shouldn't need the library file, but I can't figure out how to un-include it.
If I view the netlist, I can see a .lib reference, but I can't edit it. If I export the netlist and remove the library reference, I can simulate successfully, so I know the file would work without the library, if I could just make it exist. But, when I export the netlist, I can't figure out how to make a visible schematic out of it again. Surely there's a way to manually edit the netlist and still have it associated with a schematic, right?
Alternately, if I could just remove the .lib reference without going into the netlist directly, I'd be fine with that too. Any advice? Here's the netlist:
All I need to do is remove the line ".lib Z:\LTspice\OPTO TRIAC.txt" a few lines from the end without separating it from the schematic. Surely this is a trivial task and I'm just missing something obvious, right?
If I view the netlist, I can see a .lib reference, but I can't edit it. If I export the netlist and remove the library reference, I can simulate successfully, so I know the file would work without the library, if I could just make it exist. But, when I export the netlist, I can't figure out how to make a visible schematic out of it again. Surely there's a way to manually edit the netlist and still have it associated with a schematic, right?
Alternately, if I could just remove the .lib reference without going into the netlist directly, I'd be fine with that too. Any advice? Here's the netlist:
Code:
* C:\Users\Synesso\Documents\LTspice-local\Triac-SSR_EBS_09c-Synesso.asc
V1 U1_MT1 N010 SINE(0 240 60)
V2 N002 0 PULSE(0 5 0.0055 0 0 0.05 0.2 1)
R1 N005 N007 100
R2 N004 N002 330
R6 0 N010 500m
R7 N003 N002 330
R3 N008 N009 500
R4 U1_MT1 0 500m
R5 U1_gate N001 500
R8 U1_MT2 N006 100
XU3 N007 N009 N010 Q6025P5
XU1 U1_MT2 U1_gate U1_MT1 Q6025P5
C2 N006 N007 0.1µ
L1 U1_MT2 N005 75m Rser=0
XU2 N003 0 N001 U1_MT2 MOC3022
XU4 N004 0 N007 N008 MOC3022
.SUBCKT S6040R 1 2 3
* TERMINALS: A G K
Qpnp 6 4 1 Pfor OFF
Qnpn 4 6 5 Nfor OFF
Rfor 6 4 500MEG
Rrev 1 4 500MEG
Rshort 6 5 15
Rlat 2 6 2.64
Ron 3 5 6.1m
Dfor 6 4 Zbrk
Drev 1 4 Zbrk
Dgate 6 5 Zgate
.MODEL Zbrk D (IS=10F IBV=1U BV=600)
.MODEL Zgate D (IS=10F IBV=100U BV=10 VJ=0.3)
.MODEL Pfor PNP(IS=10P BF=3.5 CJE=200p CJC=200p TF=0.3U)
.MODEL Nfor NPN(IS=10P ISE=1E-9 BF=100.0 RC=13.6M CJE=1000p CJC=200p TF=0.3U)
.ENDS
.tran 0 .1 0 0.1
.SUBCKT MOC3022 1 2 3 4
* OPTO TRIAC
* Helmut Sennewald 8/10/2004
* MOC3022 I_trig=5mA
* D+ D- MT2 MT1
.PARAM Itrig=5m
.PARAM RH1=20k
.PARAM RH2=20k
.PARAM RH3=16.7k
Q2 vb1 vb1p vd1 0 PNP1
Q1 vb1p vb1 4 0 NPN1
R3 vb1 4 {RH2}
D1 1 2 DL
R1 ctrl1 4 1
C1 ctrl1 4 10µ
R2 ctrl1 vb1 {RH1}
R4 vd1 vb1p {RH3}
B1 ctrl1 4 I=-500*I(D1)*3m/Itrig
R6 vd2 vb2 {RH2}
D3 vd2 3 D1
Q3 vb2 vb2p 4 0 PNP1
Q4 vb2p vb2 vd2 0 NPN1
E1 vd2 N001 ctrl1 4 -1
R5 N001 vb2 {RH1}
R7 vb2p 4 {RH3}
D2 3 vd1 D1
R34 3 4 100MEG
.MODEL PNP1 PNP(Is=1e-15 BF=10 Cjc=10p Cje=20p Tf=0.1u Ise=1e-12)
.MODEL NPN1 NPN(Is=1e-15 BF=10 Cjc=10p Cje=20p Tf=0.1u Ise=1e-12)
.MODEL D1 D(Is=0.1u Rs=2 Cj0=50p)
.MODEL DL D(Is=1e-20 Rs=5)
.ENDS
.SUBCKT Q6025P5 1 2 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 10m
Rhold 7 6 50
RGP 8 3 13
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.1
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=380p TF=0.3U)
.MODEL NoutF NPN (IS=382F BF=3 CJE=380p CJC=76p TF=0.3U)
.MODEL PoutR PNP (IS=382F BF=5 CJE=380p TF=0.3U)
.MODEL NoutR NPN (IS=382F BF=0.5 CJE=380p CJC=76p TF=0.3U)
.ENDS
.SUBCKT Q6040KH6 1 2 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 10m
Rhold 7 6 50
RGP 8 3 12
RG 2 8 5.8
RS 8 4 100
DN 9 2 DIN OFF
RN 9 3 4
GNN 6 7 9 3 0.1
GNP 4 5 9 3 0.1
DP 2 10 DIP OFF
RP 10 3 3.56
.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=0.5 CJE=380p TF=0.3U)
.MODEL NoutF NPN (IS=382F BF=3 CJE=380p CJC=76p TF=0.3U)
.MODEL PoutR PNP (IS=382F BF=3 CJE=380p TF=0.3U)
.MODEL NoutR NPN (IS=382F BF=0.5 CJE=380p CJC=76p TF=0.3U)
.ENDS
.lib Z:\LTspice\OPTO TRIAC.txt
.backanno
.end