Solve Spice Simulation Error: " .END Card Missing

  • Thread starter Thread starter ranger
  • Start date Start date
  • Tags Tags
    Simulation
Click For Summary

Discussion Overview

The discussion revolves around troubleshooting an error message in a SPICE simulation regarding a missing ".END" card in a netlist. Participants share their experiences with different netlists, suggest possible solutions, and explore the behavior of the SPICE software in relation to the error. The scope includes technical explanations and exploratory reasoning related to circuit simulation.

Discussion Character

  • Technical explanation
  • Exploratory
  • Debate/contested

Main Points Raised

  • One participant shares a netlist and reports an error indicating a missing ".END" card despite its presence in the file.
  • Another participant suggests that the software might be case-sensitive and recommends using ".END" instead of ".end".
  • Some participants note that a different, simpler netlist runs without issues, raising questions about the specific netlist causing the error.
  • There are suggestions to check for hidden characters in the file that might be causing the issue.
  • One participant successfully runs the netlist in a different SPICE simulator, indicating that the problem may be specific to the version of SPICE being used.
  • Another participant proposes adding an ".op" card to the netlist to instruct the program to perform an analysis, which resolves the issue for them.
  • A suggestion is made that a newline character after the ".end" might be necessary, which later resolves the issue for another participant.
  • Despite some participants resolving the error, others still report receiving the error message while the simulation proceeds without issues.

Areas of Agreement / Disagreement

Participants express various hypotheses regarding the cause of the error, with no consensus on a single solution. Some solutions work for certain participants while others continue to experience the issue, indicating multiple competing views and unresolved aspects of the problem.

Contextual Notes

Limitations include the lack of documentation or help files for the specific SPICE version being used, which may hinder troubleshooting efforts. The discussion also highlights the variability in behavior across different SPICE implementations.

ranger
Gold Member
Messages
1,687
Reaction score
2
I'm currently learning spice. I need help with a very simple circuit.
http://www.ibiblio.org/obp/electricCircuits/Ref/01004.png

Here is the netlist:

Example netlist
v1 1 0 dc 15
r1 1 0 2.2k
r2 1 2 3.3k
r3 2 0 150
.end

When I run it in spice(2g6) I get:

Code:
******* 12/04/10 ********  SPICE 2G.6    15/3/83 ******** 21:24:57 ****
**** EXAMPLE NETLIST                                                                 
****     INPUT LISTING                    TEMPERATURE =   27.000 DEG C
***********************************************************************V1 1 0 DC 15    
R1 1 0 2.2K     
R2 1 2 3.3K     
R3 2 0 150      

*ERROR*:  .END card missingInput deck (file) contains no data.

The tutorial I am using says to do exactly that, but yet I get this error. As you can see I have .end in my netlist. Whats wrong?

--thank you.
 
Last edited by a moderator:
Engineering news on Phys.org
Is it possible your version of spice is case-sensitive? Have you tried using .END instead of .end?

- Warren
 
I still get the same error with .END

Its weird though, doing a simple RC example netlist:

Basic RC circuit
r 1 2 1.0
*l 1 2 1.0
c 2 0 1.0
vin 1 0 pulse (0 1) ac 1
.tran 0.1 7.0
*.ac dec 10 .01 10
.plot tran v(2) i(vin)
*.plot ac vdb(2) xlog
.end

The simulation goes about just fine.
 
Example netlist
v1 1 0 dc 15
r1 1 0 2.2k
r2 1 2 3.3k
r3 2 0 150
.end
Looks like it should work. I'll run it tomorrow at work (I'm at home now) to see what happens. In the mean time, are there any hidden characters maybe in the file? Some goofy ctrl-oops character that crept in?


PS -- Very cool links in your footer. I'll have to spend some time browsing those pages more...
 
Looks like it should work. I'll run it tomorrow at work (I'm at home now) to see what happens. In the mean time, are there any hidden characters maybe in the file? Some goofy ctrl-oops character that crept in?
Unfortunately they arent any. At first I simply copied the netlist, but after I typed them out and saved them in a new file, I still get the same error.
 
You text file runs fine in my MicroCAP8 SPICE simulator. I copied your text from your post and pasted it into an input file, and ran a transient analysis. MC8 ended up with this file after the transient analysis:

Example netlist
v1 1 0 dc 15
r1 1 0 2.2k
r2 1 2 3.3k
r3 2 0 150
.TRAN 2e-008 1u 0
.TEMP 27
.PLOT TRAN v(1) v(2) 0,37.5
.end
 
Using your netlist with .TRAN, etc. I still get the same error. Mayb there us something wrong with the program?

I got the program from http://www.ibiblio.org/obp/electricCircuits/ (towards the bottom of the page).

V1 1 0 DC 15
R1 1 0 2.2K
R2 1 2 3.3K
R3 2 0 150
.TRAN 2E-008 1U 0
.TEMP 27
.PLOT TRAN V(1) V(2) 0,37.5

*ERROR*: .END card missing

Its like it refuses to read .END

What OS are you running SPICE on? Is MicroCAP8 SPICE free?
 
Last edited by a moderator:
I've run MicroCAP on NT and XP. This current MC8 installation is running on my XP PC. I don't know if there is a lower-cost student version of MicroCAP, but you could check Spectrum Software's website:

http://www.spectrum-soft.com/index.shtm

Have you looked in the Help menu of your program to see if it requires something special for the .end statement? Does it come with any sample files? Do you have any friends who are also using that program?
 
Have you looked in the Help menu of your program to see if it requires something special for the .end statement? Does it come with any sample files? Do you have any friends who are also using that program?

There is no help file, all I was told to download were three files (no help or samples). All of my friends are using multisim instead :)

I've found a sample netlist (elsewhere):
Code:
Basic RC circuit
r 1 2 1.0
*l 1 2 1.0
c 2 0 1.0
vin 1 0 pulse (0 1) ac 1
.tran 0.1 7.0
*.ac dec 10 .01 10
.plot tran v(2) i(vin)
*.plot ac vdb(2) xlog
.end

SPICE can simulate this circuit though.
 
  • #10
Try adding an .op card to your first netlist. You didn't really instruct the program to do an analysis, that might be the problem.
 
  • #11
pervect said:
Try adding an .op card to your first netlist. You didn't really instruct the program to do an analysis, that might be the problem.

Code:
Example netlist
V1 1 0 DC 15
R1 1 0 2.2K
R2 1 2 3.3K
R3 2 0 150 
.end
.op

Output:
Code:
******* 13/04/10 ********  SPICE 2G.6    15/3/83 ******** 15:55:19 ****
**** MULTIPLE DC SOURCES                                                             
****     INPUT LISTING                    TEMPERATURE =   27.000 DEG C
***********************************************************************


V1 1 0 DC 15    
R1 1 0 2.2K     
R2 1 2 3.3K     
R3 2 0 150      
.END    




******* 13/04/10 ********  SPICE 2G.6    15/3/83 ******** 15:55:19 ****
**** MULTIPLE DC SOURCES                                                             
****     SMALL SIGNAL BIAS SOLUTION       TEMPERATURE =   27.000 DEG C
***********************************************************************

 NODE   VOLTAGE     NODE   VOLTAGE

(  1)   15.0000    (  2)    0.6522


    VOLTAGE SOURCE CURRENTS

    NAME       CURRENT

    V1       -1.117E-02

    TOTAL POWER DISSIPATION:   1.67E-01 WATTS

         JOB CONCLUDED

         TOTAL JOB TIME            0.01

That did the job! It works. Its funny how the guy that wrote the tutorial didnt mention this. What is .op for pervect? Thanks.
 
  • #12
I suspect that you may actually need a newline character after the .end... i.e., the last line of the file should be blank. Worth a try, yes?

.op runs an operating-point (bias point) analysis.

- Warren
 
  • #13
chroot said:
I suspect that you may actually need a newline character after the .end... i.e., the last line of the file should be blank. Worth a try, yes?


- Warren

That newline did the trick.

Code:

******* 13/04/10 ********  SPICE 2G.6    15/3/83 ******** 18:27:58 ****
**** EXAMPLE NETLIST                                                                 
****     INPUT LISTING                    TEMPERATURE =   27.000 DEG C
***********************************************************************


V1 1 0 DC 25    
R1 1 0 2.2K     
R2 1 2 7.3K     
R3 2 0 150      
.END    




******* 13/04/10 ********  SPICE 2G.6    15/3/83 ******** 18:27:58 ****
**** EXAMPLE NETLIST                                                                 
****     SMALL SIGNAL BIAS SOLUTION       TEMPERATURE =   27.000 DEG C
***********************************************************************

 NODE   VOLTAGE     NODE   VOLTAGE

(  1)   25.0000    (  2)    0.5034


    VOLTAGE SOURCE CURRENTS

    NAME       CURRENT

    V1       -1.472E-02

    TOTAL POWER DISSIPATION:   3.68E-01 WATTS

         JOB CONCLUDED

         TOTAL JOB TIME            0.00




******* 13/04/10 ********  SPICE 2G.6    15/3/83 ******** 18:27:58 ****
****                                                                                 
****     INPUT LISTING                    TEMPERATURE =   27.000 DEG C
***********************************************************************



*ERROR*:  .END card missing

It still says that .end is missing. But the simulation goes through though.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 1 ·
Replies
1
Views
8K
Replies
6
Views
7K
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 9 ·
Replies
9
Views
17K
  • · Replies 7 ·
Replies
7
Views
4K