开云体育

Date

Discrete data points in plot view

 

Christoph,

For time-domain and frequency-domain plots, I think LTspice only connects the dots with lines or curves.? I think there is no other option.

I have seen .STEPped simulations where LTspice's plot window showed vertical lines, but this was actually annoying because it did not plot what I actually wanted to see.? So I have forgotten now how that happened.? I did not see it as something useful, at the time.??Anyway, I do not believe there is any option to make it do that, at least not when plotting waveforms vs. time.

I agree with John that you probably need to turn to another plotting program (e.g., Excel).

Also, FYI, even if your PWL data has discrete time points, it is likely that LTspice simulated between those time points.? Even if you could make LTspice (or Excel) plot only the simulated time points as dots or vertical lines, there would likely be values at times between the points of your PWL data.? This is just how SPICE has to work.? There are times when it needs to simulate between the raw data.? That cannot be changed.

So, if you used Excel, you could also filter out those time values that don't correspond to your PWL file's raw data.

Andy


Re: Periodic signal from PWL file

 

Here is my best guess.

I think "analog spiceman" authored that information about the REPEAT ... ENDREPEAT syntax.? Maybe he meant to write it like this:

... PWL REPEAT FOR <n> ( <t1> <v1> ... <tn> <vn> | file=<file spec> ) ENDREPEAT
... PWL REPEAT FOREVER ( <t1> <v1> ... <tn> <vn> | file=<file spec> ) ENDREPEAT

In other words, you have a choice between either the time,value list, OR a filename.? I think that's why he used a "|" character there, to show that you have a choice between options -- and somehow the first one got edited out, as well as the "file=" in the second choice.? But the "|" character itself is NOT part of the syntax.

I don't know; but it works for me.

Andy


Re: PWL sources (was but not related to: "Discrete data points in plot view")

 

The PWL function can be repeated,?
I'd advise that you read all the tutorials from Simon Bramble.?
If you're making custom PWL files, you'd be mad not to use a spreadsheet, and this can cover more functionality than the LTSpice PWL options.?
The principle of t_bit and t_slew applies just the same to spreadsheets - if you plot your raw signal as an x-y graph, you get triangle waves.? If you want square waves, you need to have a slew time, and 2 points per bit.?


PWL sources (was but not related to: "Discrete data points in plot view")

 

Hi Christoph,?
Firstly, you can easily repeat cycles of your 32 points, even just using Notepad, if you adopt the +xxx option for the timestamp (relative timing).?
Secondly, PWL means it is linearly interpolated between the defined points.? If you want "crisp" edges, then you need excel, or libreoffice calc, or whatever.?
Essentially you need 2 PWL values per point, to get nice square data.?
The time deltas are normally just 2 values - bit period, and slew time.?
so, to make a datastream, like "101" :?

time? ? ? ? ? ? ? ? ? ? ? value
0? ? ? ? ? ? ? ? ? ? ? ? ? ?0
+tslew? ? ? ? ? ? ? ? ? ?bit[0] say 5V
+tbit? ? ? ? ? ? ? ? ? ? ? same
+tbit+tslew? ? ? ? ? ? bit[1] say 0V?
+2x tbit? ? ? ? ? ? ? ? ? same
+2x tbit +tslew? ? ? bit[2] say 5V
+ 3x tbit? ? ? ? ? ? ? ? ?same
+ 3x tbit? +tslew? ? ?next bit
...
etcetera.?
really easy to do in a spreadsheet, then select the 2 columns, paste to notepad, save as PWL.?

There's much cleverer ways to do it all, but this gets you started with minimum effort.?


Re: Periodic signal from PWL file

 

Christoph,

I do not remember ever seeing the "|" (pipe) character used in this way before with LTspice.? I don't know whether that was a typo, or if it actually worked at one point in LTspice's past.? That was the only occurrence of "|" that I saw in the .? Maybe it's a typo.

I did not yet successfully get it to work with the "|" character.

But it's easy to write "file=filename.dat" (and no "|" character), and that works.

Andy


Re: Periodic signal from PWL file

 

开云体育

There seems to be a subtle difference:

A list of data points or a file reference can be repeated a fixed amount of times <n>, or forever

PWL REPEAT FOR <n> (|<file spec>) ENDREPEAT??????? * 'file spec' has | character
PWL REPEAT FOREVER (|<file spec>) ENDREPEAT

E.g. to repeat a sequence of values for five times

PWL REPEAT FOR 5 ( 0 1 1 1 2 2 3 1 ) ENDREPEAT
PWL REPEAT FOR 5 ( file=<name of file> ) ENDREPEAT????? * '
file=<name of file> does not have | character


======================================================================================
Best wishes John Woodgate OOO-Own Opinions Only

Rayleigh, Essex UK

I hear, and I forget. I see, and I remember. I do, and I understand. Xunzi (340 - 245 BC)


On 2023-07-08 16:56, Christoph wrote:

Fine so far, but using the | (vertical bar) gives an error.

PWL REPEAT FOREVER (file=Z:\Users\kuku\Documents\LTspiceXVII\pulses.txt) ENDREPEAT works, while
PWL REPEAT FOREVER (| file=Z:\Users\kuku\Documents\LTspiceXVII\pulses.txt) ENDREPEAT

doesn’t So what is the purpose of the ?|‘?

Christoph

Am 08.07.2023 um 17:52 schrieb John Woodgate <jmw@...>:

If you look at the other examples on that page, you will see that the | character is only used with a file, not with a sequence of numbers.

======================================================================================
Best wishes John Woodgate OOO-Own Opinions Only

Rayleigh, Essex UK

I hear, and I forget. I see, and I remember. I do, and I understand. Xunzi (340 - 245 BC)


On 2023-07-08 16:40, Christoph wrote:
Thanks. This worked. Though the ?|‘ symbol (pipe) is confusing. If it designates that the data is supposed to be piped from the file, it doesn’t work. OTOH, should it mean an ?or“, then the empty left side of the ?|‘ shouldn’t be empty but contain a
list of <time><value> pairs.

Christoph



Am 08.07.2023 um 15:11 schrieb John Woodgate <jmw@...>:

There is an undocumented REPEAT feature in the Wiki at: /g/LTspice/wiki/13810

A list of data points or a file reference can be repeated a fixed amount of times <n>, or forever

PWL REPEAT FOR <n> (|<file spec>) ENDREPEAT
PWL REPEAT FOREVER (|<file spec>) ENDREPEAT

======================================================================================
Best wishes John Woodgate OOO-Own Opinions Only

Rayleigh, Essex UK

I hear, and I forget. I see, and I remember. I do, and I understand. Xunzi (340 - 245 BC)


On 2023-07-08 13:51, Christoph wrote:
I have created  a pulse source from a PWL file.
It‘s 32 samples of a signal. 

Is it possible to make this pulse train periodic?

Or do I have to provide the pulse samples for every period by the PWL file?

—
Christoph 



Re: Periodic signal from PWL file

 

开云体育

Fine so far, but using the | (vertical bar) gives an error.

PWL REPEAT FOREVER (file=Z:\Users\kuku\Documents\LTspiceXVII\pulses.txt) ENDREPEAT works, while
PWL REPEAT FOREVER (| file=Z:\Users\kuku\Documents\LTspiceXVII\pulses.txt) ENDREPEAT

doesn’t So what is the purpose of the ?|‘?

Christoph

Am 08.07.2023 um 17:52 schrieb John Woodgate <jmw@...>:

If you look at the other examples on that page, you will see that the | character is only used with a file, not with a sequence of numbers.

======================================================================================
Best wishes John Woodgate OOO-Own Opinions Only

Rayleigh, Essex UK

I hear, and I forget. I see, and I remember. I do, and I understand. Xunzi (340 - 245 BC)


On 2023-07-08 16:40, Christoph wrote:
Thanks. This worked. Though the ?|‘ symbol (pipe) is confusing. If it designates that the data is supposed to be piped from the file, it doesn’t work. OTOH, should it mean an ?or“, then the empty left side of the ?|‘ shouldn’t be empty but contain a
list of <time><value> pairs.

Christoph



Am 08.07.2023 um 15:11 schrieb John Woodgate <jmw@...>:

There is an undocumented REPEAT feature in the Wiki at: /g/LTspice/wiki/13810

A list of data points or a file reference can be repeated a fixed amount of times <n>, or forever

PWL REPEAT FOR <n> (|<file spec>) ENDREPEAT
PWL REPEAT FOREVER (|<file spec>) ENDREPEAT

======================================================================================
Best wishes John Woodgate OOO-Own Opinions Only

Rayleigh, Essex UK

I hear, and I forget. I see, and I remember. I do, and I understand. Xunzi (340 - 245 BC)


On 2023-07-08 13:51, Christoph wrote:
I have created  a pulse source from a PWL file.
It‘s 32 samples of a signal. 

Is it possible to make this pulse train periodic?

Or do I have to provide the pulse samples for every period by the PWL file?

—
Christoph 


_._,_._,_


Re: Discrete data points in plot view

 

开云体育

I think you have to export the data to Excel or similar to plot in those ways.

======================================================================================
Best wishes John Woodgate OOO-Own Opinions Only

Rayleigh, Essex UK

I hear, and I forget. I see, and I remember. I do, and I understand. Xunzi (340 - 245 BC)


On 2023-07-08 16:52, Christoph wrote:

My array of PWL data (time value pairs) appears points (that optionally can be made visible) and being connected by line pieces.

Since these are discrete sample points I’d rather see them as points only or as a pulse train of vertical lines of height corresponding to the amplitude. Is this possible?

—
Christoph





Re: Warning: Multiple definitions of model ...

 

Hello Andy,

Thanks for the detailed words.

I know that the faulty libraries only cause warnings but no errors. But sometimes I do simulations, and the results are checked by other people. And that's where warnings don't look good.

In my standard.bjt file I deleted the five obviously faulty models and the warnings disappeared.
This will probably only remain until the next LTspice update. Hence my question as to whether the incorrect entries can be avoided in the future.

Even if I use components from ADI, there are almost always additional transistors in the circuit. I'm surprised that ADI ignores errors and warnings. I wasn't used to that from LTC.

I'm also registered in the QSPICE group, but haven't had time to deal with QSPICE in more detail so far. (Never change a …)

Bernhard


Re: Periodic signal from PWL file

 

开云体育

If you look at the other examples on that page, you will see that the | character is only used with a file, not with a sequence of numbers.

======================================================================================
Best wishes John Woodgate OOO-Own Opinions Only

Rayleigh, Essex UK

I hear, and I forget. I see, and I remember. I do, and I understand. Xunzi (340 - 245 BC)


On 2023-07-08 16:40, Christoph wrote:

Thanks. This worked. Though the ?|‘ symbol (pipe) is confusing. If it designates that the data is supposed to be piped from the file, it doesn’t work. OTOH, should it mean an ?or“, then the empty left side of the ?|‘ shouldn’t be empty but contain a
list of <time><value> pairs.

Christoph



Am 08.07.2023 um 15:11 schrieb John Woodgate <jmw@...>:

There is an undocumented REPEAT feature in the Wiki at: /g/LTspice/wiki/13810

A list of data points or a file reference can be repeated a fixed amount of times <n>, or forever

PWL REPEAT FOR <n> (|<file spec>) ENDREPEAT
PWL REPEAT FOREVER (|<file spec>) ENDREPEAT

======================================================================================
Best wishes John Woodgate OOO-Own Opinions Only

Rayleigh, Essex UK

I hear, and I forget. I see, and I remember. I do, and I understand. Xunzi (340 - 245 BC)


On 2023-07-08 13:51, Christoph wrote:
I have created  a pulse source from a PWL file.
It‘s 32 samples of a signal. 

Is it possible to make this pulse train periodic?

Or do I have to provide the pulse samples for every period by the PWL file?

—
Christoph 



Discrete data points in plot view

 

My array of PWL data (time value pairs) appears points (that optionally can be made visible) and being connected by line pieces.

Since these are discrete sample points I’d rather see them as points only or as a pulse train of vertical lines of height corresponding to the amplitude. Is this possible?


Christoph


Re: Periodic signal from PWL file

 

开云体育

Thanks. This worked. Though the ?|‘ symbol (pipe) is confusing. If it designates that the data is supposed to be piped from the file, it doesn’t work. OTOH, should it mean an ?or“, then the empty left side of the ?|‘ shouldn’t be empty but contain a
list of <time><value> pairs.

Christoph



Am 08.07.2023 um 15:11 schrieb John Woodgate <jmw@...>:

There is an undocumented REPEAT feature in the Wiki at: /g/LTspice/wiki/13810

A list of data points or a file reference can be repeated a fixed amount of times <n>, or forever

PWL REPEAT FOR <n> (|<file spec>) ENDREPEAT
PWL REPEAT FOREVER (|<file spec>) ENDREPEAT

======================================================================================
Best wishes John Woodgate OOO-Own Opinions Only

Rayleigh, Essex UK

I hear, and I forget. I see, and I remember. I do, and I understand. Xunzi (340 - 245 BC)


On 2023-07-08 13:51, Christoph wrote:
I have created  a pulse source from a PWL file.
It‘s 32 samples of a signal. 

Is it possible to make this pulse train periodic?

Or do I have to provide the pulse samples for every period by the PWL file?

—
Christoph 



Re: Warning: Multiple definitions of model ...

 

Mike Fraser wrote, "I can only hope that someone at Analog Devices will spend time and clean up this mess."

All of us wished that Analog Devices would do that.

But they are too inept to do that.

Andy


Re: Warning: Multiple definitions of model ...

 

Bernhard,

Those Warning messages about "Multiple definitions" of those four BJTs can be ignored.??The good news is that they are only Warnings.? And in your case, they do not affect your simulation, not one bit.??They have been there for years.? Your schematic did not cause them.

[Rant mode on.]

They got there because someone at Analog Devices put them there.

They are still there because Analog Devices is too inept to fix it.

Everyone who downloads LTspice gets a bad "standard.bjt" file.??(You get a bad "standard.jft" file too, but that'a for a different reason, and the mistakes in that one are very real and very bad, but that one is not entirely Analog Devices's fault and we won't get into that now.? It's been discussed already, separately.)? The "standard.bjt" file has duplicate entries for the 2scr375p, bc847b, bc847c, and bc857b.? LTspice gives you a warning whenever it sees duplicate definitions of any .MODEL statements, whether or not the model parameters actually differ.

Because your schematic has even one BJT on it, LTspice loads "standard.bjt" into your simulation, and bang, you get those warnings.

Like I said, you can safely ignore them.

I thought that if you update your models in LTspice, it might "fix" those duplicate definitions, and the warnings might go away.? Or maybe not.? The thousands of people who download LTspice daily are all being handed a bad copy of "standard.bjt" with these four mistakes in it -- and Analog Devices is too stupid to fix it.? Yes, they have been told about it.? But they do nothing about it.

Mike Engelhardt used to manage LTspice.? If he were still doing it, this problem would have been fixed years ago, and probably would not have happened in the first place.? But alas, he is no longer managing LTspice at Analog Devices.? Instead, we have other people including German Ergueta who are not up to Mike's standards, and appear to have no concept of library consistency.? Mr. Ergueta gave me a really lame sob-story about how long it takes to verify models, and garbage like that.? He totally misses the point.? To fix these four Warnings, all it would take is about 30 seconds with a text editor to remove the duplicates.? Done.? But Analog Devices is too lame to do a simple fix like that.

The good news is that you can ignore these Warning messages.? Unless you use one of those four transistor models, it won't affect you, not one bit.? Even if you did use one of those four transistors, you can relax because you are getting a real model, even if LTspice has a second model for the same transistor.? So it is not really a problem.? And anyway a Warning is just a Warning, it's not an Error.

The bad news is that Analog Devices seems to have no interest whatsoever in fixing their model libraries.? Until people like Mr. Ergueta and the other employees of Analog Devices who have a say in how LTspice works -- until they WAKE UP and fix simple problems like this instead of continuing to propagate it, it's going to be there forever.

Don't hold your breath.? Mr. Ergueta doesn't care that you have bad models, that could have and should have been fixed ages ago.

By the way, maybe you should take a look at QSPICE.? I recommend it as a replacement for the mistakes that Analog Devices seems to be unable or unwilling to fix.

[Rant mode off.]

FYI, you could eliminate those Warnings yourself by editing your "standard.bjt" and renaming the duplicate model names.? It's a plain text file and can be edited with a good text editor, including LTspice itself.

Andy


Re: Warning: Multiple definitions of model ...

 

For BC847C Rohm offers the SPICE parameter set of BC547B. Therefore the current gain of the BC847C model is too low.

In the LTspice standard.bjt there are BC847B and BC847BT116, both from Rohm and with identical parameters (bloated file, T116 is only a delivery package).

Or look at the selection parameters for 2SCR542F3.
While its SPICE parameters are identical to 2SCR542P.

I agree with Tony, the standard libraries are indeed a mess.

I mostly use my own models. But the warnings caused by LTspice's own files that appear anyway, bother me.

Bernhard


Re: Periodic signal from PWL file

 

开云体育

There is an undocumented REPEAT feature in the Wiki at: /g/LTspice/wiki/13810

A list of data points or a file reference can be repeated a fixed amount of times <n>, or forever

PWL REPEAT FOR <n> (|<file spec>) ENDREPEAT
PWL REPEAT FOREVER (|<file spec>) ENDREPEAT

======================================================================================
Best wishes John Woodgate OOO-Own Opinions Only

Rayleigh, Essex UK

I hear, and I forget. I see, and I remember. I do, and I understand. Xunzi (340 - 245 BC)


On 2023-07-08 13:51, Christoph wrote:

I have created  a pulse source from a PWL file.
It‘s 32 samples of a signal. 

Is it possible to make this pulse train periodic?

Or do I have to provide the pulse samples for every period by the PWL file?

—
Christoph 








Re: Periodic signal from PWL file

 

开云体育

On 08/07/2023 14:51, Christoph wrote:
I have created  a pulse source from a PWL file.
It‘s 32 samples of a signal. 

Is it possible to make this pulse train periodic?

Or do I have to provide the pulse samples for every period by the PWL file?
Yes you can. Here is an example:

PWL repeat forever (0 0 0.5 1 1.5 -1 2 0) endrepeat

You can use the same syntax with a PWL file, too.

--
Regards,
Tony


Periodic signal from PWL file

 

I have created a pulse source from a PWL file.
It‘s 32 samples of a signal.

Is it possible to make this pulse train periodic?

Or do I have to provide the pulse samples for every period by the PWL file?


Christoph


Re: Warning: Multiple definitions of model ...

 

开云体育

On 08/07/2023 14:18, Mike Fraser wrote:
I have the latest update to LTspice 17.1.9.
In my opinion, the transistor listing has reached a point where it canot be trusted.
? ? ? ? ? Anyone using the built in BJT listing needs to double or triple check any selected model.
I opened a schematic and placed 2 NPN devices.
I then tried to select the BC847C as my choice.
LTspice lists 2 models for this device.
The NXP mfg. listing shows a rating of 45V and 100 mA.
The ROHM mfg. listing shows a rating of 32V and 200 mA.
When you try to select the ROHM model for your BJT, LTspice automatically selects the NXP model.

Also, the spice model for the ROHM part is nothing more than completely worthless garbage.
The real model can be found here :

Additionally, the ROHM data sheet specifies 45V and 100 mA ratings.
I can only hope that someone at Analog Devices will spend time and clean up this mess.
You can hope, but don't hold your breath. The standard libraries have been a mess for quite a while. I offered my help, but it wasn't accepted.

--
Regards,
Tony


Re: Warning: Multiple definitions of model ...

 

I have the latest update to LTspice 17.1.9.
In my opinion, the transistor listing has reached a point where it canot be trusted.
? ? ? ? ? Anyone using the built in BJT listing needs to double or triple check any selected model.
I opened a schematic and placed 2 NPN devices.
I then tried to select the BC847C as my choice.
LTspice lists 2 models for this device.
The NXP mfg. listing shows a rating of 45V and 100 mA.
The ROHM mfg. listing shows a rating of 32V and 200 mA.
When you try to select the ROHM model for your BJT, LTspice automatically selects the NXP model.

Also, the spice model for the ROHM part is nothing more than completely worthless garbage.
The real model can be found here :

Additionally, the ROHM data sheet specifies 45V and 100 mA ratings.
I can only hope that someone at Analog Devices will spend time and clean up this mess.
Mike