Orcad capture with SPDT relay

Discussion in 'Electronics Resources' started by ericmizw, Jul 26, 2012.

  1. ericmizw

    Thread Starter New Member

    Jul 26, 2012
    1
    0
    Hello everybody,

    I am trying to create a SPDT relay from an existing .lib model but I have this error message when I simulate my circuit:

    ERROR -- Incorrect number of interface nodes for X_LS1

    The corresponding .lib file I use is as below:

    *Generic relay pins: COM NC NO T1 T2
    *SPDT Relay Subcircuit Parameters
    *PULLIN = Pull in voltage
    *DROPOFF = Drop off voltage
    *CONTACT = Contact resistance
    *RESISTANCE = Coil resistance
    *INDUCTANCE = Coil Inductance
    *AC/DC relay

    *Models and Subcircuit:

    .SUBCKT 12VSPDT 1 2 3 4 5
    + PULLIN=9.6
    + DROPOFF=0.1
    + CONTACT=1m
    + RESISTANCE=1000
    + INDUCTANCE=10m

    L1 4 6 {(INDUCTANCE/2)}
    L2 5 7 {(INDUCTANCE/2)}
    R1 6 7 {RESISTANCE}
    BNO 8 0 V={PULLIN}-abs(v(6,7))
    SW1 2 1 8 0 SWNC ON
    BNC 9 0 V=abs(v(6,7))
    SW2 3 1 9 0 SWNO OFF

    .MODEL SWNC SW(VT={DROPOFF} RON={CONTACT} )
    .MODEL SWNO SW(VT={(PULLIN*0.98)} RON={CONTACT} )
    .ENDS

    I use ORCAD capture release 16.0. Does anyone able to tell me what's wrong with this model ?

    In advance thanks for your helpful answers.
     
Loading...