开云体育

Transformer models WAS: New Simulator Written by Mike Engelhardt #Transformer


 

I kept my promise. I did a little work with the files - I added plt files to build hysteresis loops.



 

I apologize for the embarrassment. The point is that the specified folder is stored on two computers. I just forgot where I was uploading from and uploaded it from the wrong place. I will upload the correct folder on Monday.


 

Bordodynov uploaded another Simple.zip earlier today.

I hate to say this --

But now it is missing these:
  • Ammeter.asy
  • Sporka.lib.
  • TL431ED.sub
  • Xtransil_ST.asy
  • bordodynov.* or standard.* and the .inc or .lib commands to include them
and maybe more.

Andy


 

Another FYI --

In Bordodynov's previous Simple.zip (but not in his most recent one), he changed the filenames, e.g., from "standard.mos" to "bordodynov.m".? It is the same file and has the same contents.? But by naming it "bordodynov.m", it eliminates the "conflict" with LTspice's own "standard.mos".? Therefore he did not need to prepend the ".\" before the filename to make LTspice load the one in the current directory before finding the one in the lib\cmp directory.

Andy


 

开云体育

AFAIK, Windoze [sic] accepts the forward slash '/' as a directory separator; I don't believe Unix-derived systems accept the backslash '\' as a directory separator.

Over 40 years of *nix and various RTOS admin and development, with a few years of CP/M and MSoft pain.
Donald.

On 2023-08-19 07:54, Tony Casey wrote:

On 19/08/2023 12:52, Jerry Lee Marcel wrote:
Le 19/08/2023 à 12:04, Tony Casey a écrit?:
I just created a simple example to prove that this nomenclature does work. But the file must be in the right place.

Use ".lib .\standard.dio" if the file is in the same folder as the schematic. The reason ".\" is necessary is because LTspice looks first in:

"c:\users\joebloggs\AppData\Local\LTspice\lib\cmp\"

..before the current folder and will find the default "standard.dio" before the substitute one. The ".\" overrides this.

Use ".lib ..\standard.dio" if the file is in the folder *above* the schematic

Use ".lib ..\..\standard.dio" if the file is in the folder *2 levels above* the schematic

Is it particular to LTspice or a more generalized thing?
This is general thing. It also applies to Unix/Linux and MacOS, except directories (folders) are separated by "/" instead of "\", as in Windows. The developers of DOS/Windows? decided to do all kinds of things differently, despite there for no good reason and having precedents that worked.

--
Regards,
Tony


 
Edited

Tony wrote, "I investigated this and found that ".lib" and ".inc" seem to behave differently. ".inc" looks in the schematic (current) folder first, but ".lib" looks in the standard library folder first.?"

This behavior is documented in LTspice's Help.? It doesn't jump out at you by telling you that they differ, but if you look for the search order, you will see that they indeed differ.? It was intentional.

In this example with Bordodynov's earlier uploaded Simple.zip, it was necessary to use ".lib .\standard.bjt" (etc.) to make sure that Bordodynov's "standard.bjt" (in the current directory) gets loaded before discovering another "standard.bjt" earlier in LTspice's search order.? This allows you to keep Bordodynov's standard.??? files in the current directory and NOT moving them to lib\cmp and overwriting the standard library files!? That was the point of doing this.

Oh, by the way, before you anyone finds fault with "???", that is also a standard Windows thing.? It's a "wildcard", like '*' is.? Each '?' represents one character.? Therefore, ".???" means that you have a 3-character filename extension, whereas ".*" means any arbitrary filename extension.? All of LTspice's standard library files in its lib\cmp folder have 3-character extensions -- except for "standard.bead".

Andy


 

Jerry wrote, "I have done it, and I still get the message Could not open include file "standard.bjt.inc""

Why did you try to load (a) a different filename, and (b) a filename that doesn't exist?

The filename was ".\standard.bjt" (without the quotes).? Not "standard.bjt.inc".? The only way the ".inc" got there was if you put it there.? LTspice never adds filename extensions to filename you specify.

Perhaps you pasted three commands but somehow deleted their line-breaks, so that the second line was concatenated to the end of the first?

re: "( I think the space-dot-backlash is suspicious)"

That is standard Windows (borrowed from Unix) nomenclature for "the current directory.? Believe me, it works.? Maybe not in MacOS, I can't test it there, maybe not in Linux, though I suspect it should work in either of those too.? But it definitely works in Windows.? Helmut Sennewald used to use it occasionally.

John wrote, "You can't have \ in a Windows filename."

Not in a filename, correct.? But it is part of a filespec.? It works, believe me.? If you don't believe me, try it.

Jerry wrote, "Of course. Just the same, the dot (or comma) before the name doesn't seem right to me. But even after eradicating them, it doesn't work."

The reason it doesn't work AFTER eradicating them, is because you eradicated them.? Eradicating them allows LTspice to use its own search order, which looks in lib\sym before looking in the current directory, and it finds another "standard.bjt" in lib\cmp which you do not want.? The current directory is '.', and Windows uses '\' to separate directories, so the CORRECT format is to put ".\" immediately before the filename, thus giving us ".\standard.bjt".

But as I keep saying, if you still don't believe me, Try it.? Arguing that it's wrong will get you nowhere, when in fact it does work.? TRY IT.

John wrote, "I wonder if a strange character has crept in. Only Bordodunov can tell."

No, a strange character didn't creep in, and Bordodynov didn't put it there.? I did.? It was very much intentional.? And it is right to have it there.

Andy


 

开云体育

On 19/08/2023 14:38, Dave Wade wrote:
On Sat, Aug 19, 2023 at 12:55 PM, Tony Casey wrote:

This is general thing. It also applies to Unix/Linux and MacOS, except 
directories (folders) are separated by "/" instead of "\", as in 
Windows. The developers of DOS/Windows? decided to do all kinds of 
things differently, despite there for no good reason and having 
precedents that worked.
I beg to differ, there are very good reasons for using "\". History shows that DOS v 1.0 did not have directories, but did use "/" for command line options. There are also good precedents to this as many DEC operating systems e.g. RSX-11 and VMS both use "/" as the command option delimiter and DOS 1.0 copied this along with their use of ":" to separate a device name from a file name. 

However when directories were added to DOS rather than use the somewhat complex convention DEC used for directories, where the directory names are enclosed in square brackets and separated by "."s  they used the "\" as the directory separator so DOS Fully Qualified File Names are a sort of uncomfortable mish-mash of RSX/VMS and UNIX. Of course the use of "\" is purely arbitrary. No "\" characters are ever stored on disk. Oddly whilst commands only accept "\" as the separator, the underlying API accepts both, as one can see if you do :-

DIR "C:/PROGRAM FILES"

from a command line prompt....
I stand corrected. I have forgotten about the stuff I did at the dawn of my career in 1970s. We had various small DEC machines then before VAX/VMS came along. I came to DOS at about V3. It already had directories by then.

Thanks for the history lesson.

--
Regards,
Tony


 

On Sat, Aug 19, 2023 at 12:55 PM, Tony Casey wrote:

This is general thing. It also applies to Unix/Linux and MacOS, except
directories (folders) are separated by "/" instead of "\", as in
Windows. The developers of DOS/Windows? decided to do all kinds of
things differently, despite there for no good reason and having
precedents that worked.
I beg to differ, there are very good reasons for using "\". History shows that DOS v 1.0 did not have directories, but did use "/" for command line options. There are also good precedents to this as many DEC operating systems e.g. RSX-11 and VMS both use "/" as the command option delimiter and DOS 1.0 copied this along with their use of ":" to separate a device name from a file name.

However when directories were added to DOS rather than use the somewhat complex convention DEC used for directories, where the directory names are enclosed in square brackets and separated by "."s they used the "\" as the directory separator so DOS Fully Qualified File Names are a sort of uncomfortable mish-mash of RSX/VMS and UNIX. Of course the use of "\" is purely arbitrary. No "\" characters are ever stored on disk. Oddly whilst commands only accept "\" as the separator, the underlying API accepts both, as one can see if you do :-

DIR "C:/PROGRAM FILES"

from a command line prompt....

Dave
G4UGM



--
Regards,
Tony


 

开云体育

'DOS ain't done till Lotus won't run' (or will run). Apparently mythical, but they would say that, wouldn't they?

On 2023-08-19 12:54, Tony Casey wrote:

On 19/08/2023 12:52, Jerry Lee Marcel wrote:
Le 19/08/2023 à 12:04, Tony Casey a écrit?:
I just created a simple example to prove that this nomenclature does work. But the file must be in the right place.

Use ".lib .\standard.dio" if the file is in the same folder as the schematic. The reason ".\" is necessary is because LTspice looks first in:

"c:\users\joebloggs\AppData\Local\LTspice\lib\cmp\"

..before the current folder and will find the default "standard.dio" before the substitute one. The ".\" overrides this.

Use ".lib ..\standard.dio" if the file is in the folder *above* the schematic

Use ".lib ..\..\standard.dio" if the file is in the folder *2 levels above* the schematic

Is it particular to LTspice or a more generalized thing?
This is general thing. It also applies to Unix/Linux and MacOS, except directories (folders) are separated by "/" instead of "\", as in Windows. The developers of DOS/Windows? decided to do all kinds of things differently, despite there for no good reason and having precedents that worked.

--
Regards,
Tony


 

开云体育

On 19/08/2023 12:52, Jerry Lee Marcel wrote:

If " .lib .\standard.dio" results in "Could not open file .lib .\standard.dio", it is because the file isn't where it should be.
The files are in the same directory as the .asc, as they were in Bordodynov's zip file.

I typed the command ".inc standard.bjt" in the .asc and it works. No need for .\

I guess my problem came from a corrupted character when I copied Andy's directives.
Interesting.

I investigated this and found that ".lib" and ".inc" seem to behave differently. ".inc" looks in the schematic (current) folder first, but ".lib" looks in the standard library folder first. I rarely use ".inc" unless I actually want *include* something in my schematic that is not a model file. With some libraries consisting of hundreds of models and 1000s of lines, the whole file is effectively appended to the schematic before analysis, rather than just the models that the schematic references. Perhaps, these days, it actually makes little difference to speed, but to me it just doesn't feel right.

--
Regards,
Tony


 

开云体育

On 19/08/2023 12:52, Jerry Lee Marcel wrote:
Le 19/08/2023 à 12:04, Tony Casey a écrit?:
I just created a simple example to prove that this nomenclature does work. But the file must be in the right place.

Use ".lib .\standard.dio" if the file is in the same folder as the schematic. The reason ".\" is necessary is because LTspice looks first in:

"c:\users\joebloggs\AppData\Local\LTspice\lib\cmp\"

..before the current folder and will find the default "standard.dio" before the substitute one. The ".\" overrides this.

Use ".lib ..\standard.dio" if the file is in the folder *above* the schematic

Use ".lib ..\..\standard.dio" if the file is in the folder *2 levels above* the schematic

Is it particular to LTspice or a more generalized thing?
This is general thing. It also applies to Unix/Linux and MacOS, except directories (folders) are separated by "/" instead of "\", as in Windows. The developers of DOS/Windows? decided to do all kinds of things differently, despite there for no good reason and having precedents that worked.

--
Regards,
Tony


 

Le 19/08/2023 à 12:04, Tony Casey a écrit?:
I just created a simple example to prove that this nomenclature does work. But the file must be in the right place.

Use ".lib .\standard.dio" if the file is in the same folder as the schematic. The reason ".\" is necessary is because LTspice looks first in:

"c:\users\joebloggs\AppData\Local\LTspice\lib\cmp\"

..before the current folder and will find the default "standard.dio" before the substitute one. The ".\" overrides this.

Use ".lib ..\standard.dio" if the file is in the folder *above* the schematic

Use ".lib ..\..\standard.dio" if the file is in the folder *2 levels above* the schematic
Is it particular to LTspice or a more generalized thing?



If " .lib .\standard.dio" results in "Could not open file .lib .\standard.dio", it is because the file isn't where it should be.
The files are in the same directory as the .asc, as they were in Bordodynov's zip file.

I typed the command ".inc standard.bjt" in the .asc and it works. No need for .\

I guess my problem came from a corrupted character when I copied Andy's directives.


 

开云体育

I just created a simple example to prove that this nomenclature does work. But the file must be in the right place.

Use ".lib .\standard.dio" if the file is in the same folder as the schematic. The reason ".\" is necessary is because LTspice looks first in:

"c:\users\joebloggs\AppData\Local\LTspice\lib\cmp\"

..before the current folder and will find the default "standard.dio" before the substitute one. The ".\" overrides this.

Use ".lib ..\standard.dio" if the file is in the folder *above* the schematic

Use ".lib ..\..\standard.dio" if the file is in the folder *2 levels above* the schematic

etc.

If " .lib .\standard.dio" results in "Could not open file .lib .\standard.dio", it is because the file isn't where it should be.

OR

.. for ".lib ,\standard.mos", it is because a comma has been used instead of a dot (look carefully).

--
Regards,
Tony


On 19/08/2023 11:20, Jerry Lee Marcel wrote:

Of course. Just the same, the dot (or comma) before the name doesn't seem right to me. But even after eradicating them, it doesn't work.

Le 19/08/2023 à 11:07, John Woodgate a écrit?:

You can't have \ in a Windows filename.

On 2023-08-19 09:53, Jerry Lee Marcel wrote:
On Thu, Aug 17, 2023 at 07:57 PM, Andy I wrote:
But you should do this:

? ? .lib .\standard.dio
? ? .lib .\standard.bjt
? ? .lib ,\standard.mos

I have done it, and I still get the message Could not open include file "standard.bjt.inc"

I have tried all sorts of amends to your directives ( I think the space-dot-backlash is suspicious), to no avail.



 

开云体育

It's not just a file name, but a path, just as c:\users\joebloggs\AppData\Local\LTspice\lib\cmp\standard.bjt is. It is sometimes called a fully-qualified file name (FQFN).



LTspice inserts a FQFN as the ModelFile attribute whenever you "autogenerate" a symbol. We all know how unhelpful that can be

--
Regards,
Tony


On 19/08/2023 11:07, John Woodgate wrote:

You can't have \ in a Windows filename.


 

开云体育

I agree that it isn't right. I wonder if a strange character has crept in. Only Bordodunov can tell.

On 2023-08-19 10:20, Jerry Lee Marcel wrote:

Of course. Just the same, the dot (or comma) before the name doesn't seem right to me. But even after eradicating them, it doesn't work.

Le 19/08/2023 à 11:07, John Woodgate a écrit?:

You can't have \ in a Windows filename.

On 2023-08-19 09:53, Jerry Lee Marcel wrote:
On Thu, Aug 17, 2023 at 07:57 PM, Andy I wrote:
But you should do this:

? ? .lib .\standard.dio
? ? .lib .\standard.bjt
? ? .lib ,\standard.mos

I have done it, and I still get the message Could not open include file "standard.bjt.inc"

I have tried all sorts of amends to your directives ( I think the space-dot-backlash is suspicious), to no avail.


 

开云体育

Of course. Just the same, the dot (or comma) before the name doesn't seem right to me. But even after eradicating them, it doesn't work.

Le 19/08/2023 à 11:07, John Woodgate a écrit?:

You can't have \ in a Windows filename.

On 2023-08-19 09:53, Jerry Lee Marcel wrote:
On Thu, Aug 17, 2023 at 07:57 PM, Andy I wrote:
But you should do this:

? ? .lib .\standard.dio
? ? .lib .\standard.bjt
? ? .lib ,\standard.mos

I have done it, and I still get the message Could not open include file "standard.bjt.inc"

I have tried all sorts of amends to your directives ( I think the space-dot-backlash is suspicious), to no avail.


 

开云体育

You can't have \ in a Windows filename.

On 2023-08-19 09:53, Jerry Lee Marcel wrote:

On Thu, Aug 17, 2023 at 07:57 PM, Andy I wrote:
But you should do this:

? ? .lib .\standard.dio
? ? .lib .\standard.bjt
? ? .lib ,\standard.mos

I have done it, and I still get the message Could not open include file "standard.bjt.inc"

I have tried all sorts of amends to your directives ( I think the space-dot-backlash is suspicious), to no avail.


 

On Thu, Aug 17, 2023 at 07:57 PM, Andy I wrote:
But you should do this:

? ? .lib .\standard.dio
? ? .lib .\standard.bjt
? ? .lib ,\standard.mos

I have done it, and I still get the message Could not open include file "standard.bjt.inc"

I have tried all sorts of amends to your directives ( I think the space-dot-backlash is suspicious), to no avail.


 

Thank you, Andy I. I have reloaded the file.
My TL431AB upgrade is more advanced than the author's TL431ED version. With the author's version the circuit sometimes failed to start. I also improved the behavior at temperature change - added temperature coefficients of resistors.