May 24, 2018 #1 S Scott39 Newbie level 1 Joined May 24, 2018 Messages 1 Helped 0 Reputation 0 Reaction score 0 Trophy points 1 Activity points 12 Code: .SUBCKT memristor 1 2 6 Eres 1 9 POLY(2) (8, 0) (10, 0) 0 0 0 0 1 Vsense 9 4 DC 0V Fcopy 0 8 Vsense 1 Rstep 8 0 1K Rser 2 4 10 Gmem 6 0 VALUE = {I(Vsense)*max(v(6, 0)*(1-v(6, 0)), 0)} Cmem 6 0 50nF Ecpy 10 0 VALUE={min{max(v(6,0), 0), 1)} Rsp 6 0 1000Meg .ENDS *s This is the code i'm using. saved it under "C:\Cadence\SPB_17.2-silent\tools\capture\library\pspice\Memristor.OLB" Click to expand... and attached it to the property of the created memristor. my error message is the same as my tittle. Has anyone tried this or came up with a code for the new memristor part on PSPice yet? Last edited by a moderator: May 24, 2018
Code: .SUBCKT memristor 1 2 6 Eres 1 9 POLY(2) (8, 0) (10, 0) 0 0 0 0 1 Vsense 9 4 DC 0V Fcopy 0 8 Vsense 1 Rstep 8 0 1K Rser 2 4 10 Gmem 6 0 VALUE = {I(Vsense)*max(v(6, 0)*(1-v(6, 0)), 0)} Cmem 6 0 50nF Ecpy 10 0 VALUE={min{max(v(6,0), 0), 1)} Rsp 6 0 1000Meg .ENDS *s This is the code i'm using. saved it under "C:\Cadence\SPB_17.2-silent\tools\capture\library\pspice\Memristor.OLB" Click to expand... and attached it to the property of the created memristor. my error message is the same as my tittle. Has anyone tried this or came up with a code for the new memristor part on PSPice yet?
May 24, 2018 #2 C CataM Advanced Member level 4 Joined Dec 23, 2015 Messages 1,275 Helped 314 Reputation 628 Reaction score 312 Trophy points 83 Location Madrid, Spain Activity points 8,409 The "Ecpy ..." line has a "{" instead of a "(". See corrected line below. Code: Ecpy 10 0 VALUE={min[COLOR="#FF0000"]([/COLOR]max(v(6,0), 0), 1)}
The "Ecpy ..." line has a "{" instead of a "(". See corrected line below. Code: Ecpy 10 0 VALUE={min[COLOR="#FF0000"]([/COLOR]max(v(6,0), 0), 1)}