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


 

Attempting to modify an archive Pot component, to add a wired Pin instead of a hidden net name for control input.

In order to use more than one pot in a circuit, the SUBCKT definition and instance parameters need to be modified for each pot placed.

I’d like to add a pin, and change the SUBCKT definition to use that pin rather than a hidden net name.

 

I’ve added a pin (4), removed the pin label “Vpct” and used V(4) to set the value of B1, but that’s not working.

When Run, LTspice complains that the pin count of the instance doesn’t match the definition.

 

The uploaded zip has a working model, with the separate embedded SUBBCKT definitions.

How can I make the mod, to add a control pin and have one includable .cir ??

 

Thanks,

Dave


 

Sorry – I forgot to click “Notify users” in the upload:  Vpct_pots.zip

 

 

From: LTspice@groups.io <LTspice@groups.io> On Behalf Of Bell, Dave via groups.io
Sent: Sunday, December 22, 2024 12:41 PM
To: LTspice@groups.io
Subject: EXTERNAL: [LTspice] Confused, adding a pin to an existing Symbol and .cir

 

Attempting to modify an archive Pot component, to add a wired Pin instead of a hidden net name for control input.

In order to use more than one pot in a circuit, the SUBCKT definition and instance parameters need to be modified for each pot placed.

I’d like to add a pin, and change the SUBCKT definition to use that pin rather than a hidden net name.

 

I’ve added a pin (4), removed the pin label “Vpct” and used V(4) to set the value of B1, but that’s not working.

When Run, LTspice complains that the pin count of the instance doesn’t match the definition.

 

The uploaded zip has a working model, with the separate embedded SUBBCKT definitions.

How can I make the mod, to add a control pin and have one includable .cir ??

 

Thanks,

Dave


 

Never mind, I finally figured it out:

I needed to change only the Spice Model line, to make it unique to the instance.

Then, the hidden control voltage must be that same unique name.

 

Dave

                                                                                                                                                     

From: LTspice@groups.io <LTspice@groups.io> On Behalf Of Bell, Dave via groups.io
Sent: Sunday, December 22, 2024 2:33 PM
To: LTspice@groups.io
Subject: EXTERNAL: Re: [LTspice] Ferromagnetic core modeling.

 

In square mm. 1 mm=1e-3 m, 1 sq mm = 1e-6 sq m

 

 

From: LTspice@groups.io <LTspice@groups.io> On Behalf Of Richard Andrews via groups.io
Sent: Sunday, December 22, 2024 2:17 PM
To: LTspice@groups.io
Subject: EXTERNAL: Re: [LTspice] Ferromagnetic core modeling.

 

I am reading here. "A is the bead magnetic cross section in square meters, use dimensions C*(A-B)/2, area is in mm2 hence the u".

 

 

So, is the area in meters, micrometers, or millimeters? hence the u?

 

 

 

Seasons Greetings.


 

Never mind, I finally figured it out:

I needed to change only the Spice Model line, to make it unique to the instance.

Then, the hidden control voltage must be that same unique name.

 

Dave

                                                                                                                                                     

 

From: LTspice@groups.io <LTspice@groups.io> On Behalf Of Bell, Dave via groups.io
Sent: Sunday, December 22, 2024 12:42 PM
To: LTspice@groups.io
Subject: EXTERNAL: Re: [LTspice] Confused, adding a pin to an existing Symbol and .cir

 

Sorry – I forgot to click “Notify users” in the upload:  Vpct_pots.zip

 

 

From: LTspice@groups.io <LTspice@groups.io> On Behalf Of Bell, Dave via groups.io
Sent: Sunday, December 22, 2024 12:41 PM
To: LTspice@groups.io
Subject: EXTERNAL: [LTspice] Confused, adding a pin to an existing Symbol and .cir

 

Attempting to modify an archive Pot component, to add a wired Pin instead of a hidden net name for control input.

In order to use more than one pot in a circuit, the SUBCKT definition and instance parameters need to be modified for each pot placed.

I’d like to add a pin, and change the SUBCKT definition to use that pin rather than a hidden net name.

 

I’ve added a pin (4), removed the pin label “Vpct” and used V(4) to set the value of B1, but that’s not working.

When Run, LTspice complains that the pin count of the instance doesn’t match the definition.

 

The uploaded zip has a working model, with the separate embedded SUBBCKT definitions.

How can I make the mod, to add a control pin and have one includable .cir ??

 

Thanks,

Dave


 

On 23/12/2024 00:06, Bell, Dave via groups.io wrote:
Never mind, I finally figured it out:

I needed to change only the Spice Model line, to make it unique to the instance.

Then, the hidden control voltage must be that same unique name.

Dave

From: LTspice@groups.io <LTspice@groups.io> On Behalf Of Bell, Dave via groups.io
Sent: Sunday, December 22, 2024 12:42 PM
To: LTspice@groups.io
Subject: EXTERNAL: Re: [LTspice] Confused, adding a pin to an existing Symbol and .cir


Sorry – I forgot to click “Notify users” in the upload:  Vpct_pots.zip

From: LTspice@groups.io <LTspice@groups.io> On Behalf Of Bell, Dave via groups.io
Sent: Sunday, December 22, 2024 12:41 PM
To: LTspice@groups.io
Subject: EXTERNAL: [LTspice] Confused, adding a pin to an existing Symbol and .cir


Attempting to modify an archive Pot component, to add a wired Pin instead of a hidden net name for control input.

In order to use more than one pot in a circuit, the SUBCKT definition and instance parameters need to be modified for each pot placed.

I’d like to add a pin, and change the SUBCKT definition to use that pin rather than a hidden net name.

I’ve added a pin (4), removed the pin label “Vpct” and used V(4) to set the value of B1, but that’s not working.

When Run, LTspice complains that the pin count of the instance doesn’t match the definition.

The uploaded zip has a working model, with the separate embedded SUBBCKT definitions.

How can I make the mod, to add a control pin and have one includable .cir ??
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.

--
Regards,
Tony


 

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
 


 

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

 


 

No longer confused (I hope!), I uploaded a sample circuit I was working on.

The main circuit path was from an Analog Dialogue example, useful for a bench function generator gain controlled output.

Once I had a dynamically controlled Pot, I also wanted to work out how to control another one, separately.

 

Dave

 


 

You've forgotte,n to put the symbol and model in your zip file.

Le 23/12/2024 à 18:25, Bell, Dave via groups.io a écrit :

No longer confused (I hope!), I uploaded a sample circuit I was working on.

The main circuit path was from an Analog Dialogue example, useful for a bench function generator gain controlled output.

Once I had a dynamically controlled Pot, I also wanted to work out how to control another one, separately.

 

Dave

 


 

Oops!  New upload.

The model is embedded in the .asc

 

Dave

 

From: LTspice@groups.io <LTspice@groups.io> On Behalf Of Jerry Lee Marcel via groups.io
Sent: Monday, December 23, 2024 1:54 PM
To: LTspice@groups.io
Subject: EXTERNAL: Re: [LTspice] Confused, adding a pin to an existing Symbol and .cir

 

You've forgotte,n to put the symbol and model in your zip file.

Le 23/12/2024 à 18:25, Bell, Dave via groups.io a écrit :

No longer confused (I hope!), I uploaded a sample circuit I was working on.

The main circuit path was from an Analog Dialogue example, useful for a bench function generator gain controlled output.

Once I had a dynamically controlled Pot, I also wanted to work out how to control another one, separately.

 

Dave

 


 

On Mon, Dec 23, 2024 at 06:07 PM, Bell, Dave wrote:

Oops!  New upload.

I think you forgot to upload the new copy.  I am still not seeing it.
 
Andy
 
 


 

Sorry, the new upload was GainVariableVarpots.zip, not a replacement for Vpct_pots.zip

 

Dave

 

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

 

On Mon, Dec 23, 2024 at 06:07 PM, Bell, Dave wrote:

Oops!  New upload.

I think you forgot to upload the new copy.  I am still not seeing it.

 

Andy

 

 


 

On Mon, Dec 23, 2024 at 08:38 PM, Bell, Dave wrote:

Sorry, the new upload was GainVariableVarpots.zip, not a replacement for Vpct_pots.zip

I got that.
 
But GainVariableVarpots.zip is still missing the pot's symbol file, pot.asy.  I though you said "Oops!" and that there would be a new upload to fix that, but there was no new upload yet.  I'm guessing you forgot to upload the corrected .zip file, or maybe you uploaded it to the wrong group.
 
Andy
 


 

Strange!  Try downloading it again. I just did (again) and it has pot.asy

The files in the zip were updated today, at 09:02 to 09:05

 

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

 

On Mon, Dec 23, 2024 at 08:38 PM, Bell, Dave wrote:

Sorry, the new upload was GainVariableVarpots.zip, not a replacement for Vpct_pots.zip

I got that.

 

But GainVariableVarpots.zip is still missing the pot's symbol file, pot.asy.  I though you said "Oops!" and that there would be a new upload to fix that, but there was no new upload yet.  I'm guessing you forgot to upload the corrected .zip file, or maybe you uploaded it to the wrong group.

 

Andy

 


 

On Mon, Dec 23, 2024 at 08:49 PM, Bell, Dave wrote:

Strange!  Try downloading it again. I just did (again) and it has pot.asy

It won't make any difference.  The ZIP file still has no pot.asy inside it.  (And yes, I did download it again, a couple of hours ago.  No go on the symbol file.)
 
Pot.asy is not in the ZIP.  Just look at it and you'll see it is not there.  If your LTspice "finds" it, it is only because you have that symbol file already on your computer.  But it is not in the .ZIP file that you uploaded.
 
Here, I just downloaded it AGAIN.  The file is still unchanged.  It is still missing the symbol pot.asy.
 

The files in the zip were updated today, at 09:02 to 09:05

You uploaded it at 09:12 AM Pacific Standard Time, or 1712 (5:12 PM) UTC.  That was nearly five hours before Jerry Lee Marcel notified you that "You've forgotte,n to put the symbol and model in your zip file", and six hours before you said "Oops!  New upload."
 
But there was no new upload.
 
Please upload the corrected ZIP file, if you have one.
 
Andy
 


 

Hi
 
A while back I uploaded "Multi_VCPot_Test_20240813.zip" that demonstrates how to use multiple vcpots.
 
And...yes..each pot has a hidden pin that expects a voltage source to control the rotation percentage.
If each pot is expected to rotate independently of each other, then each pot requires a dedicated rotation voltage source.
Or, they can be ganged together by using a common voltage source.
 
eT


 

Ahh, thanks – I couldn’t remember who uploaded it.

I had in my local folder for a while…

 

From: LTspice@groups.io <LTspice@groups.io> On Behalf Of eetech00 via groups.io
Sent: Monday, December 23, 2024 6:05 PM
To: LTspice@groups.io
Subject: EXTERNAL: Re: [LTspice] Confused, adding a pin to an existing Symbol and .cir

 

Hi

 

A while back I uploaded "Multi_VCPot_Test_20240813.zip" that demonstrates how to use multiple vcpots.

 

And...yes..each pot has a hidden pin that expects a voltage source to control the rotation percentage.

If each pot is expected to rotate independently of each other, then each pot requires a dedicated rotation voltage source.

Or, they can be ganged together by using a common voltage source.

 

eT


 

OK, something possibly glitched at Groups.IO

I did a new download (twice) and found no pot.asy – as you said.

But an earlier download of the same file does have the .asy!

 

I jus now updated the upload, downloaded it, and *this* one does have the .asy

 

Dave

 

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

 

On Mon, Dec 23, 2024 at 08:49 PM, Bell, Dave wrote:

Strange!  Try downloading it again. I just did (again) and it has pot.asy

It won't make any difference.  The ZIP file still has no pot.asy inside it.  (And yes, I did download it again, a couple of hours ago.  No go on the symbol file.)

 

Pot.asy is not in the ZIP.  Just look at it and you'll see it is not there.  If your LTspice "finds" it, it is only because you have that symbol file already on your computer.  But it is not in the .ZIP file that you uploaded.

 

Here, I just downloaded it AGAIN.  The file is still unchanged.  It is still missing the symbol pot.asy.

 

The files in the zip were updated today, at 09:02 to 09:05

You uploaded it at 09:12 AM Pacific Standard Time, or 1712 (5:12 PM) UTC.  That was nearly five hours before Jerry Lee Marcel notified you that "You've forgotte,n to put the symbol and model in your zip file", and six hours before you said "Oops!  New upload."

 

But there was no new upload.

 

Please upload the corrected ZIP file, if you have one.

 

Andy

 


 

But I see that the one I had was quite different from the one you uploaded in August.

Seems to work, and has the same calling structure (A B W Vpct vs. 1 2 3 Vpct), so def related.

 

 

From: LTspice@groups.io <LTspice@groups.io> On Behalf Of Bell, Dave via groups.io
Sent: Monday, December 23, 2024 6:07 PM
To: LTspice@groups.io
Subject: EXTERNAL: Re: [LTspice] Confused, adding a pin to an existing Symbol and .cir

 

Ahh, thanks – I couldn’t remember who uploaded it.

I had in my local folder for a while…

 

From: LTspice@groups.io <LTspice@groups.io> On Behalf Of eetech00 via groups.io
Sent: Monday, December 23, 2024 6:05 PM
To: LTspice@groups.io
Subject: EXTERNAL: Re: [LTspice] Confused, adding a pin to an existing Symbol and .cir

 

Hi

 

A while back I uploaded "Multi_VCPot_Test_20240813.zip" that demonstrates how to use multiple vcpots.

 

And...yes..each pot has a hidden pin that expects a voltage source to control the rotation percentage.

If each pot is expected to rotate independently of each other, then each pot requires a dedicated rotation voltage source.

Or, they can be ganged together by using a common voltage source.

 

eT


 

On Mon, Dec 23, 2024 at 09:14 PM, Bell, Dave wrote:

But an earlier download of the same file does have the .asy!

There is no record that you ever uploaded a corrected file, until now.
 
I'm guessing that you uploaded it to a different group and later downloaded it from that other group.  Or maybe you imagined doing both?  But the modified file never made it to the group until now (0111 UTC).  It would have to be a really major "glitch" for the file to show up but have no record of it in the group's activity log, and then to spontaneously disappear some time later.
 
But thanks!
 
Andy