Re: Confused, adding a pin to an existing Symbol and .cir


 

As Andy suggested, I do want the pot to be dynamic.

I tried several of the many designs, and that was the most common problem; I could use a .PARAM, but not a control variable, V(), I(), or time.

 

I did eventually realize that a separate subckt, pot2, was useless. And the label vpct was not “just” a comment.

It’s in the SpiceModel line, and does get passed to the .cir, as the value of Vpct.

Adding a second pot requires changing Vpct to Vpct2 for example, and providing a net, Vpct2.

(And RTot in SpiceLine, if required…)

 

Dave

 

From: LTspice@groups.io <LTspice@groups.io> On Behalf Of Andy I via groups.io
Sent: Monday, December 23, 2024 5:18 AM
To: LTspice@groups.io
Subject: EXTERNAL: Re: [LTspice] Confused, adding a pin to an existing Symbol and .cir

 

On Mon, Dec 23, 2024 at 03:57 AM, Tony Casey wrote:

Still seems a lot of trouble to go to for each pot. I'm curious what's wrong with Helmut's old (but excellent) pot library? That uses a wiper position, which can either be a numeric (default 0.5), or you can replace it with a parameter, which is unique to each pot.

Maybe Dave needed to control the pot using a voltage, so that it can change dynamically.

 

I think there must be a dozen or more (perhaps dozens of) potentiometer symbols and models already.  Surely some of them might already use a control voltage that is not a hidden node.  If that was the aim, even if one did not exist already, it should have been easy to make one.

 

I think Dave's attempts got several things wrong.  I think he tried to use a Comment (Vpct, Vpct2) as if it were a parameter (Comments are always ignored), and he defined two subcircuits with different names (pot, pot2), when in fact they used the same symbol so both instances actually have the same name (pot), making the second subcircuit definition meaningless as there was nothing to call it.  I think it would have been simpler to just add a 4th pin to the pot symbol for connection to the controlling voltage node.  Why make it harder than it needs to be?

 

Andy

 

Приєднайтеся до {LTspice@groups.io, щоб автоматично отримувати всі повідомлення групи.