2

I am have defined a subcircuit header as:

.SUBCKT RELAY_SPDT_BHV coila coilb no nc com T_make=20mSec T_break=10mSec I_pull=35ma I_drop=25ma R_coil=100 L_coil=5mH R_open=100MEG R_close=.05            

and I am calling it as:

X1 6 1 4 7 8 RELAY_SPDT_BHV 6 1 4 7 8

however, I got error:

Error: unknown subckt: x1 6 1 4 7 8 relay_spdt_bhv 6 1 4 7 8

but I already successfully created another subcircuit for a pot as:

.SUBCKT pot 1 T 2 VALUE=1K SET=0.5

and called it as:

X2 15 16 17 POT VALUE=1000 SET=0.005

and it worked perfectly, so why it doesn't work for RELAY_SPDT_BHV above?

TonyM
  • 22,898
  • 4
  • 39
  • 64
simo
  • 273
  • 1
  • 13
  • Like @jonk advised yesterday: get LTspice. You can get familiar how the netlist should be composed using their GUI. Make a subcircuit in LTspice and 'View netlist'. Compare it to your netlist. – Huisman Jul 27 '19 at 19:05
  • Regarding the error, Read The Fabulous Manual about subcircuits and carefully compare your pot subckt with your relay subckt. You'll find there = a difference... – Huisman Jul 27 '19 at 19:39
  • Yea, thanks I tried to, and it worked for me in pot as above, I will try LTSpice for Mac and see, thanks – simo Jul 27 '19 at 19:49

1 Answers1

2

I found it, I had to call it as:

X1 6 1 4 7 8 RELAY_SPDT_BHV

without passing ports after RELAY_SPDT_BHV

simo
  • 273
  • 1
  • 13