Problem with writing pSpice/5Spice SUBCKT

Discussion in 'Electronics Resources' started by TubeIdiot, Sep 24, 2010.

  1. TubeIdiot

    Thread Starter New Member

    Sep 24, 2010

    This is driving me crazy... The following file-contents doesn't work (completely stripped but still showing the problem):

    .SUBCKT dummy A Gr1 K
    XV A Gr1 K TubeTriode PARAMS: ua=11
    .ENDS dummy

    .SUBCKT TubeTriode A Gr1 K PARAMS: ua=3
    G1 A K VALUE={ua}
    .ENDS TubeTriode

    The problem is: in 5Spice (also tested by someone else in LtSpice) I always see the value of the default ua=3 when using 'dummy'. The value I like to see (11) does not appear in the simulation result.

    The strange thing is, I have a complete pentode model with a lot of equations, using exactly the same syntax, and that does work. Maybe I did something stupid here, I hope someone can tell me what...

    I have spend hours on testing, trying, rewriting, trying all kinds of variations, looking on internet for SUBCKT examples, nothing...

    Best regards,

  2. TubeIdiot

    Thread Starter New Member

    Sep 24, 2010
    OK, very ashamed of such a stupid mistake... :D

    What happened (for those who want to know...): someone mailed me that the triode model generated by my software was not working. So I tried it myself, and there was an error indeed. So I started searching, and did not find what was wrong.

    Now it seems that the other guy and I made the same stupid mistake: when selecting the model for the simulation I selected the TubeTriode model which was in the triode-model file (and this model gives an overflow error because of the default values), instead of selecting the actual triode-model ('dummy' in this post..) with the correct parameters.

    Very stupid...

    If some mod wants to remove this thread, then it's fine with me. This does not really add value to this forum. Sorry!