Mar 15, 2015 #1 A 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
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
Mar 15, 2015 #2 M mvaseem Full Member level 2 Joined Dec 22, 2009 Messages 144 Helped 64 Reputation 128 Reaction score 63 Trophy points 1,308 Location India Activity points 2,081 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.
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.
Mar 15, 2015 #3 A Alexwonglik Newbie level 5 Joined Feb 15, 2015 Messages 8 Helped 0 Reputation 0 Reaction score 0 Trophy points 1 Activity points 59 Hi, thanks for the tips. It works now.