0
\$\begingroup\$

I am using LTspice to simulate the AC analysis of a circuit. When I open the netlist of the circuit in LTspice and run the simulation, I get the following error:

LTspice error

An example of the netlist that I'm using is:

enter image description here

I have placed an independent current source between nodes 5 and 1 in the first line of the netlist: I1 5 1 AC 1. I want to know why am I getting this error and how to correct it?

\$\endgroup\$

2 Answers 2

3
\$\begingroup\$

I think the first line in a netlist must be a comment.

\$\endgroup\$
2
\$\begingroup\$

If your "netlist" is meant to be a subcircuit, then the first line needs to be

.subckt <subcircuit_name> [pins] <optional_parameters>

Don't forget about the .ends ending line (note, .ends, not .end -- this means the end of the whole netlist; anything afterwards will be ignored).

If it's meant to be a generic circuit, the first line should be a comment, which means *, ;, or # at the beginning.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.