¿ªÔÆÌåÓý

Date

Re: AKO: Fails When Placed in Sub-Schematic

 

Quite a lengthy discussion of a non-issue.
.model ako: ... is documented in the help, right there under ".model".
?
Best Regards,
Mathias
?
On Sun, Feb 9, 2025 at 03:30 PM, Tony Casey wrote:

On 09/02/2025 15:05, Dennisc via groups.io wrote:
Is a bug in an undocumented feature really a bug?
Yes, and an undocumented feature is a bug in the documentation.
In the case of LTspice, undocumented features were not guaranteed to remain available. Many programs contain them - one of the best examples being Microsoft Excel.

AKO is a Donald Rumsfeld example of a "known unknown". There are also some "unknown unknowns", or at least, there used to be. Features that were used internally at LTC, but not intended to be used or even known externally. Analogspiceman found a number of those, and along with Helmut Sennewald, erased all traces, at least within this group and in the LTwiki, at the request of LTC. There is now possibly no one left to ask about those. But I may be wrong.

--
Regards,
Tony


Re: How to Set Up Permanent UniversalOpamp Doppelganger

 
Edited

On Sun, Feb 9, 2025 at 07:15 PM, eewiz wrote:
I have looked at manufacturer's .subckt code for decades going as far back as the scad3 days.
I don't remember ever seeing a .lib statement in the body of a .subckt definition.
It's unlikely (but not impossible) that a manufacturer's SPICE model includes .INC or .LIB commands, for the simple reason that they want their SPICE models to be all in one place.? You would use an .INC or .LIB command when there is more "stuff" that is in another file.? They try to simplify by having everything in one file where they can't end up separated.
?
An exception I've seen is when process models are in a file separate from the rest of the subcircuit -- especially when there are different process models for the process corners (Fast, Nominal, Slow), but the main part of the subcircuit model is fixed and does not depend on process corner.? I see that a lot with some BSIM and FinFET models.
?
For example, a typical subckt (abbreviated):
.SUBCKT MYSUB? 1 2 3 4 5
? ...
? QX ?? 1 3? 5 QIN
? .MODEL QIN PNP(IS=800.0E-18 BF=2.000E3)
? ...
.ENDS
QIN is home-rolled in a .model statement right there inside the subckt.
?
I have never seen anyone do this using a factory-rolled part.
.SUBCKT MYSUB? 1 2 3 4 5
? ...
? QX ?? 1 3? 5 MMBT3906
? ...
.ENDS
I venture to say that you probably have seen them in factory-rolled part models.? I see that kind of thing a lot.
?
Bear in mind that "QX" is no different than "Q1" or "Q004".? So you likely might have seen something like this:
? Q1? ? 1 3? 5 QIN
? .MODEL QIN PNP(IS=800.0E-18 BF=2.000E3)
...
? Q2? ? 1 3? 5 MMBT3906
which is no different than using "QX" or "QY" or "Qfoobar".
?
The Q-thing is the element name in the SPICE netlist.? Any netlist line starting with Q is a bipolar transistor.? If a SPICE model has bipolar transistors in it, and if those bipolar transistors were intrinsic SPICE models (not other subckts),?then you surely did see them.? They are no different than resistors, capacitors, and so on.? I think you saw them but did not realize it.
?
Andy
?


Re: AKO: Fails When Placed in Sub-Schematic

 

Andy, you are correct.
My 17.1.15 had no access to the MMBT551.
It was simply just not found.
?
Now I can report that all versions of LTspice from IV to 21.0.12 have the "no NPN" issue when applying AKO: within a sub-circuit.
?
All for now

?
?
Sent:?Sunday, February 09, 2025 at 6:51 PM
From:?"Andy I via groups.io" <AI.egrps+io@...>
To:[email protected]
Subject:?Re: [LTspice] AKO: Fails When Placed in Sub-Schematic
On Sun, Feb 9, 2025 at 06:41 PM, eewiz wrote:
Even with the NPN included, v17.1.15 says:
?
Can't find definition of model X10:MMBT5551
Can't find definition of model X10:MMBT5551
If it gives THAT for an error, then the AKO is not the problem.? The problem in this case is that there is no MMBT5551 in the library at all.? Therefore, attempting to define a derivative model (LoBT5551) based on the nonexistent MMBT5551 fails.
?
If it weren't for that, you should have gotten identical results with version 17.1.15.
?
There appears to be no way to do AKO: in a sub-circuit on v17.1.15.
No, that's probably not the right conclusion.? AKO likely works in subcircuits on v17.1.15, the same as it does in the other versions.
?
I think either you had a typo, or your model library for v17.1.15 was missing the MMBT5551.? ?Not conclusively, but I think it was not what you thought.
?
Andy
?


Re: How to Set Up Permanent UniversalOpamp Doppelganger

 

?
?
Sent:?Sunday, February 09, 2025 at 6:32 PM
From:?"Andy I via groups.io" <AI.egrps+io@...>
To:[email protected]
Subject:?Re: [LTspice] How to Set Up Permanent UniversalOpamp Doppelganger
On Sun, Feb 9, 2025 at 04:37 PM, eewiz wrote:
?
I have looked at manufacturer's .subckt code for decades going as far back as the scad3 days.
I don't remember ever seeing a .lib statement in the body of a .subckt definition.
?
On Sunday, Feb 9, 2025 at 6:32 PM, Andy wrote:
I think it is often best if it is not inside the body of a .SUBCKT, but I suppose it could go there too.? There are some things that CAN'T go inside .SUBCKTs, but I think this is not one of them.
?
Yes, until now, I thought that .lib and .inc where two of those "things that CAN'T go inside .SUBCKTs".
?
I've never seen an instance where lets say, the 2N2222, as defined in standard.bjt, is called into use as QX.
?
On Sunday, Feb 9, 2025 at 6:32 PM, Andy wrote:
I am not sure what you're saying here.
?
For example, a typical subckt (abbreviated):
.SUBCKT MYSUB? 1 2 3 4 5
? ...
? QX ?? 1 3? 5 QIN
? .MODEL QIN PNP(IS=800.0E-18 BF=2.000E3)
? ...
.ENDS
QIN is home-rolled in a .model statement right there inside the subckt.
?
I have never seen anyone do this using a factory-rolled part.
.SUBCKT MYSUB? 1 2 3 4 5
? ...
? QX ?? 1 3? 5 MMBT3906
? ...
.ENDS
?
Even more possibilities, now that I know that factory-rolled also works.
?
All for now
?


Re: AKO: Fails When Placed in Sub-Schematic

 

On Sun, Feb 9, 2025 at 06:41 PM, eewiz wrote:
Even with the NPN included, v17.1.15 says:
?
Can't find definition of model X10:MMBT5551
Can't find definition of model X10:MMBT5551
If it gives THAT for an error, then the AKO is not the problem.? The problem in this case is that there is no MMBT5551 in the library at all.? Therefore, attempting to define a derivative model (LoBT5551) based on the nonexistent MMBT5551 fails.
?
If it weren't for that, you should have gotten identical results with version 17.1.15.
?
There appears to be no way to do AKO: in a sub-circuit on v17.1.15.
No, that's probably not the right conclusion.? AKO likely works in subcircuits on v17.1.15, the same as it does in the other versions.
?
I think either you had a typo, or your model library for v17.1.15 was missing the MMBT5551.? ?Not conclusively, but I think it was not what you thought.
?
Andy
?


Re: AKO: Fails When Placed in Sub-Schematic

 

Hello All;
?
The answer to Andy's question is:
All the way back to the beginning.
?
IV v4.23l??????? -> Same bug.
XVII v17.0.37 -> Same bug.
v17.1.15??????? -> Same bug and worse (see below).
v24.0.12??????? -> Same bug.
?
On v17.1.15 the same "no NPN" bug appears and v17.1.15 also fails when the NPN is included.
Even with the NPN included, v17.1.15 says:
?
Can't find definition of model X10:MMBT5551
Can't find definition of model X10:MMBT5551
Error on line 205 : q:x10:2 x10:qc x10:dzkl x10:qe2 0?:0? x10:lobt5551
???? Unable to find definition of model "x10:mmbt5551"
Error on line 210 : q:x10:1 x10:qc x10:dzkl x10:qe1 0?:0? x10:lobt5551
???? Unable to find definition of model "x10:mmbt5551"
?
There appears to be no way to do AKO: in a sub-circuit on v17.1.15.
?
All for now
?

Sent:?Sunday, February 09, 2025 at 5:44 PM
From:?"Andy I via groups.io" <AI.egrps+io@...>
To:[email protected]
Subject:?Re: [LTspice] AKO: Fails When Placed in Sub-Schematic
On Sun, Feb 9, 2025 at 05:22 PM, eewiz wrote:
In a .subckt, writing ".model LoBT5551 ako:MMBT5551 (Bf=80)" without the NPN produces;
"Can't find definition of model LOBT5551".
That error message suggests that LTspice was unable to correctly find (or read) the ".model LoBT5551" statement at all, in that case inside the subcircuit without the "NPN" included.? It apparently rejected it.
?
It would be interesting to investigate how far back (through LTspice versions) that bug was there.
?
Andy
?
?


Re: How to Set Up Permanent UniversalOpamp Doppelganger

 
Edited

On Sun, Feb 9, 2025 at 04:37 PM, eewiz wrote:
I question if I would have ever arrived at a ".lib" statement.
You should always think about how to get a SPICE model into LTspice.? There are only a few ways to get the model into LTspice, and it needs to use one of them.? If you don't bring a model into LTspice, it can't use it.? This is how SPICE always worked.
?
For the UniversalOpamp* symbols in LTspice's library, those symbols themselves also loaded their SPICE models into LTspice.? You can see that by opening those symbols in LTspice's symbol editor and clicking Ctrl-A to see its attributes.? The ModelFile attribute loads the right library file and its SPICE model.
?
In contrast, the generic "opamp2" symbol loads no library file, no SPICE model (its ModelFile attribute is blank), so you need to do that yourself.
?
A good SPICE user needs to be on the lookout for how each SPICE model gets into their simulation.? It need not be a conscious action every time, but they should have an awareness of how every model gets in there.
?
I have looked at manufacturer's .subckt code for decades going as far back as the scad3 days.
I don't remember ever seeing a .lib statement in the body of a .subckt definition.
I think it is often best if it is not inside the body of a .SUBCKT, but I suppose it could go there too.? There are some things that CAN'T go inside .SUBCKTs, but I think this is not one of them.
?
I've never seen an instance where lets say, the 2N2222, as defined in standard.bjt, is called into use as QX.
I am not sure what you're saying here.? But every time you use a transistor model defined in standard.bjt, it is "called into use" as a Q-something.? Only the first letter matters.? The normal NPN symbol creates a netlist line starting with QN.? The Q matters, but the N is superfluous and not necessary.
?
Andy
?
?


Re: disable 2-cursor mode

 

On Sun, Feb 9, 2025 at 03:44 PM, fenugrec wrote:
I've been annoyed by this, ever since the feature was introduced. In the plot view, I always myself clicking on the wrong thing or wrong place and end up with two cursors, invariably with the wrong one active. 2-cursor mode is mostly useless to me, and just a constant tripping hazard.
That is an unfortunate habit you should train yourself out of doing.? The crosshair cursors happen only when you click on the signal name at the top of the plot.? So, make yourself stop doing that.? And if you forget and it happens, just click the corner of the pop-up window to close it.
?
I don't think it's even possible to sync both vertically to get readings on two traces ?
I think it is, but getting the right sequence of clicks is a slight challenge.? I think this is one way:? Put the two traces in separate plot panes.? Click on the signal name in one pane, then do it again, so that both crosshair-cursors are on the same trace.? Position them where you want them.? Now click the signal name in the other pane, which should transfer one set of cursor lines (and their values in the pop-up window) from the first pane to the second pane, without moving it horizontally.? Voila!? Both are sync'ed in the time domain but on different traces.
?
There might be easier ways that don't use two panes.
?
Sure, it lets you do nice time-delta measurements, but not worth the trouble IMO.
I guess that's a matter of opinion because many people find it quite useful.? Therefore, worth all the "trouble" (which is hardly any).? I do it a lot when I am diagnosing circuits.? It is no trouble.

Is there a way to disable it entirely ?
I doubt it.? Just a matter of opinion here, but I do not think it should be necessary to disable it.? I doubt LTspice's developers would have thought it useful to disable it.? It hardly gets in the way - except by you.? You seem to be in the habit of clicking the wrong thing, over and over.? Break that habit.
?
Andy
?


Re: Transferring "non-official" libraries

 

On Sun, Feb 9, 2025 at 12:19 PM, Carlos E. Mart¨ªnez wrote:
Apparently now you can't do it manually as it was possible with first versions, which made running LTS projects difficult or impossible.
I don't understand what that means.
?
Also, with high confidence I think I can say that anything can be done manually.
?
I'm not sure what is the problem you asked about.? But many people seem to make the situation with user models MUCH more difficult than it should be.? It is not nearly as challenging as some of you think it is.? Perhaps you are over-thinking it to such a degree that you "can't see the forest for the trees" (you are so focused on the tiny details, that you lose sight of the big picture).
?
It is never impossible to run LTspice because of not knowing or setting up where your user models are.
?
Andy
?


Re: AKO: Fails When Placed in Sub-Schematic

 

On Sun, Feb 9, 2025 at 05:22 PM, eewiz wrote:
In a .subckt, writing ".model LoBT5551 ako:MMBT5551 (Bf=80)" without the NPN produces;
"Can't find definition of model LOBT5551".
That error message suggests that LTspice was unable to correctly find (or read) the ".model LoBT5551" statement at all, in that case inside the subcircuit without the "NPN" included.? It apparently rejected it.
?
It would be interesting to investigate how far back (through LTspice versions) that bug was there.
?
Andy
?
?


Re: AKO: Fails When Placed in Sub-Schematic

 

Hello All:
?
Answering eT's question:
?
On the top level, writing ".model LoBT5551 ako:MMBT5551 NPN (Bf=80)" with the NPN,
as well as, writing ".model LoBT5551 ako:MMBT5551 (Bf=80)" without the NPN, produces in both cases;
".model lobt5551 npn (... bf=110 ...) (bf=80)" in the expanded netlist.
?
In a .subckt, writing ".model LoBT5551 ako:MMBT5551 NPN (Bf=80)" with the NPN produces;
".model x10:lobt5551 npn (... bf=110 ...) (bf=80)" in the expanded netlist.
?
In a .subckt, writing ".model LoBT5551 ako:MMBT5551 (Bf=80)" without the NPN produces;
"Can't find definition of model LOBT5551".
?
All for now
?
Sent:?Sunday, February 09, 2025 at 12:29 AM
From:?"eetech00 via groups.io" <eetech00@...>
To:[email protected]
Subject:?Re: [LTspice] AKO: Fails When Placed in Sub-Schematic
On Sat, Feb 8, 2025 at 05:43 PM, David Schultz wrote:
On 2/8/25 7:37 PM, Andy I via groups.io wrote:
It is most curious that adding "NPN" to the statement seems to fix it,
and that "NPN" is not needed outside of subcircuits.? I'd say it is a
bit buggy.
I would be worried about what parameters you actually get when adding
NPN. Do you modify the Bf parameter of a a generic NPN model or of the
one in the alias?
?
A model statement like this:

.model LoBT5551 ako:MMBT5551 NPN (Bf=80)
?
expects a ".model MMBT5551 NPN (Bf=blah blah blah....)" to already be defined.
?
It will replace the original BF value with the aliased value when LoBT5551 is used in the schematic. This can be verified by running a simulation with the expanded net list set, then viewing the error logfile. If BF is already defined, it will be listed twice in the models parameter list, with the new one at the very end of the models' original parameter list, overriding the first BF parameter setting.
?
eT
?
?


Re: How to Set Up Permanent UniversalOpamp Doppelganger

 

Hello All:
?
Thank you Tony, a ".lib UniversalOpamp.lib" statement worked like a charm.
I question if I would have ever arrived at a ".lib" statement.
I have looked at manufacturer's .subckt code for decades going as far back as the scad3 days.
I don't remember ever seeing a .lib statement in the body of a .subckt definition.
I had my mind firmly wrapped around the idea that .subckt definitions are defined with primitives.
?
For instance, in .subckt definitions, one sees many .model statements defining lets say DX and QX but, they are always complete .model statements like:
.MODEL DX D(IS=800.0E-18)
.MODEL QX NPN(IS=800.0E-18 BF=132).
Seeing only those, roll-your-own type of .model statements in .subckt definitions, lead me to believe that is how it must be done.
?
I've never seen an instance where lets say, the 2N2222, as defined in standard.bjt, is called into use as QX.
So I never considered that .lib or .inc worked inside a .subckt definition.
?
Thank you for opening my eyes to see new possibilities.
?
All for now

?
Sent:?Sunday, February 09, 2025 at 4:26 AM
From:?"Tony Casey via groups.io" <tony@...>
To:[email protected]
Subject:?Re: [LTspice] How to Set Up Permanent UniversalOpamp Doppelganger
On 09/02/2025 04:25, eewiz via groups.io wrote:
I tried this:
NE5532 Source: UniversalOpAmp Level3A
.SUBCKT NE5532L3A?? 1 2 3 4 5
X 1 2 3 4 5 level3a Avol=50k GBW=7.2Meg Slew=9Meg ilimit=38m rail=1.5 Vos=0 phimargin=60 en=5n enk=40 in=0.7p ink=150 Rin=50k
*
.ENDS
?
24.0.12 says "Undefined subcircuit: level3a".
I located the UniversalOpAmp3a.lib file and copied its contents, ".SUBCKT level3a" to ".ENDS", into the above where the star in now located.
That works; it has no problem finding level3a when the level3a subcircuit is available locally.
?
I hoped that since a "P" placed UniversalOpAmp3a.asy can find the level3a sub-cicuit that the above would work.
But, alas, it does not.
?
LTspice's UniversalOpAmp3a.lib file is located at "C:\Win32\LTC\LTspice\lib\sub".
I tried "X 1 2 3 4 5 C:\Win32\LTC\LTspice\lib\sub\UniversalOpAmp3a.lib\level3a Avol=50k etc..." and it said it can't find that either.
?
I would like to avoid using a copy of ADI's level3a sub-circuit because ADI may improve it in the future leaving my copy without those improvements.
?
Please help me with the correct syntax to use ADI's level3a sub-circuit from where it normally resides.
If you want to decouple your NE5532L3A from ADI's distributed copy of UniversalOpamp3A, simply make a copy of the current UniversalOpamp3A.lib with the parameter customisations, and rename it NE5532L3A.lib. Put that with your collection of personal models, which I assume is listed in Control Panel > Search Paths > Library Search Paths [*]

To use it as any other 3rd party opamp:
1. Place an opamp2 symbol in your schematic
2. Change the name to NE5532L3A
3. Add .lib NE5532L3A.lib directive
Done. You won't have interactive access to the parameters, like you would with a generic UniversalOpamp. but know it won't ever change.
If you want to grab an NE5532L3A direct from the component chooser, a couple more steps:
4. Make a copy of opamp2.asy, call it NE5532L3A.asy
5. Change the Value to NE5532L3A
6. Change the ModelFile attribute to NE5532L3A.lib
Done.

If you prefer to go with any future version of ADI's UniversalOpamp3A, improved or not, just modify your NE5532L3A .subckt:

NE5532 Source: UniversalOpAmp Level3A
.SUBCKT NE5532L3A?? 1 2 3 4 5
X 1 2 3 4 5 level3a Avol=50k GBW=7.2Meg Slew=9Meg ilimit=38m rail=1.5 Vos=0 phimargin=60 en=5n enk=40 in=0.7p ink=150 Rin=50k
*
.lib UniversalOpamp3A.lib
.ENDS


Execute steps 1-3, above.

--
Regards,
Tony


Re: disable 2-cursor mode

 

¿ªÔÆÌåÓý

You clear cursors by closing the pane that reports their positions and values. You sync them vertically using the left and right arrow buttons, having dragged them close together with the left mouse button pressed. You select traces with the up and down arrow buttons. You can't disable cursors; just don't click on the plotted variable name at the top of the plot pane.

On 2025-02-09 20:44, fenugrec via groups.io wrote:
Hi all,
I've been annoyed by this, ever since the feature was introduced. In the plot view, I always myself clicking on the wrong thing or wrong place and end up with two cursors, invariably with the wrong one active. 2-cursor mode is mostly useless to me, and just a constant tripping hazard. I don't think it's even possible to sync both vertically to get readings on two traces ? Sure, it lets you do nice time-delta measurements, but not worth the trouble IMO. Is there a way to disable it entirely ? haven't seen anything in the Control panel; even a toolbar button that clears the assignments would be an improvement.
?
Thanks,
Chris
-- 
OOO - Own Opinions Only
Best Wishes
John Woodgate
Keep trying

Virus-free.


Re: Transferring "non-official" libraries

 

¿ªÔÆÌåÓý

The short answer is make your own library folders anywhere on your computer except within any LTspice native folder. See the latest version of the Help for how to make those folders selectable as the sources of model and subcircuit files.

On 2025-02-09 17:19, Carlos E. Mart¨ªnez via groups.io wrote:
Hi,
I need to transfer an opamps library I made through several years, for parts model available elsewhere,
?
First for the same LTS version that I reinstalled, and then finding a way if possible, to import those libraries to more other LTS versions, particularly the later one.
?
Apparently now you can't do it manually as it was possible with first versions, which made running LTS projects difficult or impossible. How you proceed on such cases, universally if possible, not individually.
?
Carlos
?
?
-- 
OOO - Own Opinions Only
Best Wishes
John Woodgate
Keep trying

Virus-free.


Re: AKO: Fails When Placed in Sub-Schematic

 

¿ªÔÆÌåÓý

A truly philosophical question. It depends on the definition of 'bug', which is a truly philosophical answer.

On 2025-02-09 13:13, David Schultz via groups.io wrote:
On 2/9/25 3:51 AM, John Woodgate wrote:
Indeed; the need for it in the subcircuit case seems to be a b-u-g.

Is a bug in an undocumented feature really a bug?


-- 
OOO - Own Opinions Only
Best Wishes
John Woodgate
Keep trying

Virus-free.


disable 2-cursor mode

 

Hi all,
I've been annoyed by this, ever since the feature was introduced. In the plot view, I always myself clicking on the wrong thing or wrong place and end up with two cursors, invariably with the wrong one active. 2-cursor mode is mostly useless to me, and just a constant tripping hazard. I don't think it's even possible to sync both vertically to get readings on two traces ? Sure, it lets you do nice time-delta measurements, but not worth the trouble IMO. Is there a way to disable it entirely ? haven't seen anything in the Control panel; even a toolbar button that clears the assignments would be an improvement.
?
Thanks,
Chris


Re: AKO: Fails When Placed in Sub-Schematic

 

AKO: has been described by MicroSim in the .model documentation of PSpice for at least 30 years. So it is well documented, just not in the LTspice help.

For me, AKO: is an often used .model extension since then.

Bernhard


Transferring "non-official" libraries

 

Hi,
I need to transfer an opamps library I made through several years, for parts model available elsewhere,
?
First for the same LTS version that I reinstalled, and then finding a way if possible, to import those libraries to more other LTS versions, particularly the later one.
?
Apparently now you can't do it manually as it was possible with first versions, which made running LTS projects difficult or impossible. How you proceed on such cases, universally if possible, not individually.
?
Carlos
?
?


Re: Any Good Reason to Create a Hierarchical Connector and Conductors to Route (Plumb) Ground Out of a Hierarchical Schematic

 

On Sat, Feb 8, 2025 at 02:06 PM, eewiz wrote:
I discovered first hand those confusing probe readings within a sub-circuit as detailed in my have a look here submission.
FYI, I tried your example on macOS LTspice and did not see any change in behaviour before or after running the simulation.
?
On macOS, probing the wire connected to RTN in the subcircuit always displays "This is node 0." After running the simulation, probing the RTN netlabel displays "Click to plot voltage: V(Itap)".
?
However, the circuit's netlist is correct, showing C1, C2, etc., in the subcircuit connected to node RTN from the .subckt line.
?

* /Users/dennis/Downloads/Hierarchical_Confusion/Hierarchical_Confusion.asc

XX1 V+15 V-15 V+2.5 V-2.5 NC_01 Itap bias_supplies

V1 V+15 0 15

V2 0 V-15 15

I1 0 I+ 10

R1 I+ Itap 0.1

R2 Itap 0 0.1

XX2 V+15 V-15 NC_02 NC_03 NC_04 N001 bias_supplies

R3 N001 0 100

?

* block symbol definitions

.subckt bias_supplies V+15 V-15 V+2.5 V-2.5 M+2.5 RTN

V1 N002 V-2.5 0 Rser=20m

V2 N001 V+2.5 0 Rser=20m

Rbias1 V+15 U1R 3K

Rbias2 RB- U3R 3K

R1 RB- N002 10

R2 U1R N001 10

R3 U3R N003 10

V3 N003 M+2.5 0 Rser=20m

C1 N001 RTN 470n V=50 Rser=10m

C2 RTN N002 470n V=50 Rser=10m

C3 N003 V-15 470n V=50 Rser=10m

XU1 U1R RTN U1R TL431

XU2 RTN RB- RTN TL431

XU3 U3R V-15 U3R TL431

.ends bias_supplies

?

.tran 100m

* 1. Run Sim\n2. Open X1\n3. Probing ground net says "This is Ground"\n4. Run sim again (Must leave X1 open)\n5. Probing ground net now shows the truth\n6. Close and then re-open X1\n7. Probing ground net again says "This is Ground"\n8. Must run sim again with X1 open to get it to\n ? tell you the truth again

* Sub-Circuit Probing Anomoly

.lib TL431.mod

.backanno

.end

?

After running the simulation, the extended netlist in the error log also shows the correct nodes, itap and N001, connected to the components in X1 and X2.

LTspice 17.2.4 for MacOS

Start Time: Sun Feb? 9 09:24:35 2025

?

?? --- Expanded Deck Component Count ---

B's 6

C's 6

D's 18

I's 7

R's 31

V's 14

tot: 82

?

?

? ? --- Expanded Netlist ---

* /Users/dennis/Downloads/Hierarchical_Confusion/Hierarchical_Confusion.asc

v:x1:1 x1:n002 v-2.5 0 rser=20m

v:x1:2 x1:n001 v+2.5 0 rser=20m

r:x1:bias1 v+15 x1:u1r 3k

r:x1:bias2 x1:rb- x1:u3r 3k

r:x1:1 x1:rb- x1:n002 10

r:x1:2 x1:u1r x1:n001 10

r:x1:3 x1:u3r x1:n003 10

v:x1:3 x1:n003 nc_01 0 rser=20m

c:x1:1 x1:n001 itap 470n v=50 rser=10m

c:x1:2 itap x1:n002 470n v=50 rser=10m

c:x1:3 x1:n003 v-15 470n v=50 rser=10m

v:x1:u1:1 x1:u1:6 x1:u1:7 dc 1.4v

i:x1:u1:1 itap x1:u1:4 1e-3

r:x1:u1:1 x1:u1r itap 1.2e6

r:x1:u1:2 x1:u1:4 itap x1:u1:rmod 2.495e3?

r:x1:u1:3 x1:u1:5 x1:u1:7 .2

d:x1:u1:1 x1:u1r x1:u1:6 x1:u1:dmod1?

d:x1:u1:2 itap x1:u1r x1:u1:dmod1?

d:x1:u1:3 itap x1:u1:7 x1:u1:dmod2?

b:x1:u1:¡ìe1 x1:u1:5 itap v=710*v(x1:u1:4,itap)+-710*v(x1:u1r,itap)

v:x1:u2:1 x1:u2:6 x1:u2:7 dc 1.4v

i:x1:u2:1 x1:rb- x1:u2:4 1e-3

r:x1:u2:1 itap x1:rb- 1.2e6

r:x1:u2:2 x1:u2:4 x1:rb- x1:u2:rmod 2.495e3?

r:x1:u2:3 x1:u2:5 x1:u2:7 .2

d:x1:u2:1 itap x1:u2:6 x1:u2:dmod1?

d:x1:u2:2 x1:rb- itap x1:u2:dmod1?

d:x1:u2:3 x1:rb- x1:u2:7 x1:u2:dmod2?

b:x1:u2:¡ìe1 x1:u2:5 x1:rb- v=710*v(x1:u2:4,x1:rb-)+-710*v(itap,x1:rb-)

v:x1:u3:1 x1:u3:6 x1:u3:7 dc 1.4v

i:x1:u3:1 v-15 x1:u3:4 1e-3

r:x1:u3:1 x1:u3r v-15 1.2e6

r:x1:u3:2 x1:u3:4 v-15 x1:u3:rmod 2.495e3?

r:x1:u3:3 x1:u3:5 x1:u3:7 .2

d:x1:u3:1 x1:u3r x1:u3:6 x1:u3:dmod1?

d:x1:u3:2 v-15 x1:u3r x1:u3:dmod1?

d:x1:u3:3 v-15 x1:u3:7 x1:u3:dmod2?

b:x1:u3:¡ìe1 x1:u3:5 v-15 v=710*v(x1:u3:4,v-15)+-710*v(x1:u3r,v-15)

v1 v+15 0 15

v2 0 v-15 15

i1 0 i+ 10

r1 i+ itap 0.1

r2 itap 0 0.1

v:x2:1 x2:n002 nc_03 0 rser=20m

v:x2:2 x2:n001 nc_02 0 rser=20m

r:x2:bias1 v+15 x2:u1r 3k

r:x2:bias2 x2:rb- x2:u3r 3k

r:x2:1 x2:rb- x2:n002 10

r:x2:2 x2:u1r x2:n001 10

r:x2:3 x2:u3r x2:n003 10

v:x2:3 x2:n003 nc_04 0 rser=20m

c:x2:1 x2:n001 n001 470n v=50 rser=10m

c:x2:2 n001 x2:n002 470n v=50 rser=10m

c:x2:3 x2:n003 v-15 470n v=50 rser=10m

v:x2:u1:1 x2:u1:6 x2:u1:7 dc 1.4v

i:x2:u1:1 n001 x2:u1:4 1e-3

r:x2:u1:1 x2:u1r n001 1.2e6

r:x2:u1:2 x2:u1:4 n001 x2:u1:rmod 2.495e3?

r:x2:u1:3 x2:u1:5 x2:u1:7 .2

d:x2:u1:1 x2:u1r x2:u1:6 x2:u1:dmod1?

d:x2:u1:2 n001 x2:u1r x2:u1:dmod1?

d:x2:u1:3 n001 x2:u1:7 x2:u1:dmod2?

b:x2:u1:¡ìe1 x2:u1:5 n001 v=710*v(x2:u1:4,n001)+-710*v(x2:u1r,n001)

v:x2:u2:1 x2:u2:6 x2:u2:7 dc 1.4v

i:x2:u2:1 x2:rb- x2:u2:4 1e-3

r:x2:u2:1 n001 x2:rb- 1.2e6

r:x2:u2:2 x2:u2:4 x2:rb- x2:u2:rmod 2.495e3?

r:x2:u2:3 x2:u2:5 x2:u2:7 .2

d:x2:u2:1 n001 x2:u2:6 x2:u2:dmod1?

d:x2:u2:2 x2:rb- n001 x2:u2:dmod1?

d:x2:u2:3 x2:rb- x2:u2:7 x2:u2:dmod2?

b:x2:u2:¡ìe1 x2:u2:5 x2:rb- v=710*v(x2:u2:4,x2:rb-)+-710*v(n001,x2:rb-)

v:x2:u3:1 x2:u3:6 x2:u3:7 dc 1.4v

i:x2:u3:1 v-15 x2:u3:4 1e-3

r:x2:u3:1 x2:u3r v-15 1.2e6

r:x2:u3:2 x2:u3:4 v-15 x2:u3:rmod 2.495e3?

r:x2:u3:3 x2:u3:5 x2:u3:7 .2

d:x2:u3:1 x2:u3r x2:u3:6 x2:u3:dmod1?

d:x2:u3:2 v-15 x2:u3r x2:u3:dmod1?

d:x2:u3:3 v-15 x2:u3:7 x2:u3:dmod2?

b:x2:u3:¡ìe1 x2:u3:5 v-15 v=710*v(x2:u3:4,v-15)+-710*v(x2:u3r,v-15)

r3 n001 0 100

.model x2:u3:dmod2 d (rs=1e-6)

.model x2:u3:dmod1 d (rs=.3)

.model x2:u3:rmod res (tc1=1.4e-5 tc2=-1e-6)

.model x2:u2:dmod2 d (rs=1e-6)

.model x2:u2:dmod1 d (rs=.3)

.model x2:u2:rmod res (tc1=1.4e-5 tc2=-1e-6)

.model x2:u1:dmod2 d (rs=1e-6)

.model x2:u1:dmod1 d (rs=.3)

.model x2:u1:rmod res (tc1=1.4e-5 tc2=-1e-6)

.model x1:u3:dmod2 d (rs=1e-6)

.model x1:u3:dmod1 d (rs=.3)

.model x1:u3:rmod res (tc1=1.4e-5 tc2=-1e-6)

.model x1:u2:dmod2 d (rs=1e-6)

.model x1:u2:dmod1 d (rs=.3)

.model x1:u2:rmod res (tc1=1.4e-5 tc2=-1e-6)

.model x1:u1:dmod2 d (rs=1e-6)

.model x1:u1:dmod1 d (rs=.3)

.model x1:u1:rmod res (tc1=1.4e-5 tc2=-1e-6)

.tran 100m

.end

?

solver = Normal

Maximum thread count: 8

tnom = 27

temp = 27

method = modified trap

CompressWinPoints = 1024

WARNING: Less than two connections to node v-2.5.? This node is used by v:x1:1.

WARNING: Less than two connections to node v+2.5.? This node is used by v:x1:2.

WARNING: Less than two connections to node nc_01.? This node is used by v:x1:3.

WARNING: Less than two connections to node nc_03.? This node is used by v:x2:1.

WARNING: Less than two connections to node nc_02.? This node is used by v:x2:2.

WARNING: Less than two connections to node nc_04.? This node is used by v:x2:3.

Direct Newton iteration for .op point succeeded.

Total elapsed time: 0.075 seconds.

?

?

Finally, I noticed that after I displayed the netlist of the subcircuit schematic (on macOS, right-click and select View->SPICE Netlist), probing the wire connected to the RTN netlabel in the subcircuit now also displayed "Click to plot voltage: V(Itap)", the same as the RTN label. Then, restarting from re-opening the top level schematic, I could open the subcircuit schematic and probe the wire connected to RTN, and LTspice would display "This is node 0.". Next, I display the subcircuit netlist, then probe the same wire, and LTspice now displays "This is node RTN." No need to run the simulation. In fact, running the simulation does not change the text displayed when pointing at the wire connected to the RTN label in the subcircuit, regardless of whether the subcircuit was open or not when the simulation was run.


Re: AKO: Fails When Placed in Sub-Schematic

 

Is a bug in an undocumented feature really a bug?
One would say that SPICE has many years of tradition which is undocumented or at best loosely documented.? SPICE programs use features some of which were introduced by other SPICE programs decades earlier.
?
LTspice itself never had what one would call full documentation.? The "Help" manual that comes with LTspice is really more of a "quick user's guide" than a "reference manual".? It was never intended to fully document every feature, and it comes nowhere near to doing that.
?
Andy
?