Invalid outside of .subckt in Pspice

Status
Not open for further replies.

Alexwonglik

Newbie level 5
Joined
Feb 15, 2015
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
59
I have tried various way to solve an error in Pspice --> ERROR(ORPSIM-16101): Invalid outside of .SUBCKT

Here is the circuit file. Can anyone suggest some hints?

Code:
.SUBCKT opamp 1 2 3
*node 1: output terminal
*node 2: non-inverting input terminal
*node 3: inverting input terminal
Eopamp 1 0 2 3 1e7
Iopen1 2 0 0A
Iopen2 3 0 0A
.ENDS opamp
*circuit description
Vi 1 0 DC 1V
R1 1 2 1k
R2 2 3 10k
Xopamp 3 0 2 opamp
.TF V(3) Vi
.end
 

You need to comment the first line. Add * in the first line.
Spice considers the first line of a circuit as comment.
Then start your circuit from 2nd line.
This would resolve the error.
 
Hi, thanks for the tips. It works now.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…