¿ªÔÆÌåÓý

Date

Re: Create symbols.

 

¿ªÔÆÌåÓý

On 25/02/2025 11:28, j.bernabe1 via groups.io wrote:
Can I remove it from the rectangle and load the symbol for a comparator from a library?
No, the symbol editor lacks many of the features of the schematic editor. You cannot drag items from one symbol into another, like you can with schematics.

--
Regard,
Tony


Re: Create symbols.

 

¿ªÔÆÌåÓý

On 25/02/2025 11:17, j.bernabe1 via groups.io wrote:
Thanks for answering
That's what I'd like to do..
Find a symbol that looks more like a comparator.
My question is, where do I look for it??' within Ltspice??
And if I find one, how can I associate the appropriate PINS to my comparator?
If your comparator has 5 pins, you can start with the LTspice opamp2 symbol.

The most important thing is for the symbol pin order to match to the order in the .subckt line. The pin names do not have to match. If they match, then you only have to change the opamp2 symbol's value to match the .subckt name, and you're good to go.

But, honestly, if you can draw schematics, you can also draw symbols. It's not hard, and once you have had a little practice, you will never use auto-generated symbols again, and we will all be glad.

Did you look in:

Help > Schematic Capture > Creating New Symbols ?

--
Regards,
Tony


Re: Create symbols.

 

Can I remove it from the rectangle and load the symbol for a comparator from a library?


Re: .MEAS Failure

 

¿ªÔÆÌåÓý

On 25/02/2025 10:53, eewiz via groups.io wrote:
I have 136GB free space on the drive where the .RAW file grows.
I did have Mark Data Points turned on which makes the plot window render many times slower.
?
Also, I can crash the plot window, taking LTspice 24.0.12 along with it, whenever I wish.
See
Close a window that overlays the plot window, as the plot window is rendering, and poof, there goes LTspice.
The plot window crashing is nothing new to me.
?
I agree also that increasing numdgts was not the cause of the crash.
Ah, OK. I seem to remember this issue might also be dependent on the graphics card/driver. There are also message threads from many years ago, before V24, that certain (Intel) CPUs were more susceptible to crashes. Helmut documented which types were most problematic, but I can't find that right now.

--
Regards,
Tony


Re: Create symbols.

 

?
Thanks for answering
That's what I'd like to do..
Find a symbol that looks more like a comparator.
My question is, where do I look for it??' within Ltspice??
And if I find one, how can I associate the appropriate PINS to my comparator?


Re: Create symbols.

 

¿ªÔÆÌåÓý

On 25/02/2025 10:29, j.bernabe1 via groups.io wrote:
Good morning, I have a question about symbols.
Could a symbol be automatically generated from a (.lib) or (.sub) file??..
In this case it would be a comparator.
?
If so, how could I generate it?
Yes, symbols can be automatically generated from any text file containing a valid .subckt. It doesn't matter what the name of the file is. It can be a .lib or .sub file, but it doesn't have to be.

The procedure is simple.
  1. Open the file in LTspice. this most easily done by dragging the file from Explorer into LTspice.
  2. Right-click with the mouse on the .subckt line.
  3. From the drop-down menu, choose Create Symbol.
  4. Save.
Whether this is a good idea, or not, is another matter. You will get a rectangular box with the correct pin names, but not necessarily in appropriate places. Nobody will know for sure what kind of component it is. You could delete the box and draw a proper comparator outline, for example, and re-arrange the pin positions. But many people don't bother, and it is often difficult to figure out what a schematic does that uses them.

So, here are some alternatives:
  1. Look for an LTspice standard symbol that is appropriate for the type of component.
  2. If it also has the correct pin configuration, use it with modification.
  3. If it doesn't you can make a copy of the standard symbol, and edit it to have the correct pin configuration.
  4. Draw a new symbol from scratch.
--
Regards,
Tony


Re: .MEAS Failure

 

Hi Tony,
?
I have 136GB free space on the drive where the .RAW file grows.
I did have Mark Data Points turned on which makes the plot window render many times slower.
?
Also, I can crash the plot window, taking LTspice 24.0.12 along with it, whenever I wish.
See
Close a window that overlays the plot window, as the plot window is rendering, and poof, there goes LTspice.
The plot window crashing is nothing new to me.
?
I agree also that increasing numdgts was not the cause of the crash.
?
All for now
Sent:?Tuesday, February 25, 2025 at 3:54 AM
From:?"Tony Casey via groups.io" <tony@...>
To:[email protected]
Subject:?Re: [LTspice] .MEAS Failure
On 25/02/2025 06:59, eewiz via groups.io wrote:
.options numdgt=15. caused the plot window to crash at the end of simulation as it was rendering.
That plot window crash took LTspice 24.0.12 down with it.
I will restart and try again.
?
On the next try the .meas result was:
.meas TooLow1 FIND V(XSW11:X1:Qc,XSW11:X1:Qe) WHEN V(XSW11:X1:Qc,XSW11:X1:Qe)=2 FALL=1
toolow1: v(xsw11:x1:qc,xsw11:x1:qe)=2 at 0.00804695
AND
.meas TooLow2 FIND V(XSW12:X1:Qc,XSW12:X1:Qe) WHEN V(XSW12:X1:Qc,XSW12:X1:Qe)=2 FALL=1
Measurement "toolow2" FAIL'ed
?
TooLow2 saw no point that fell below 2V on the XSW12 signal, so it reported "Measurement "toolow2" FAIL'ed".
Both syntax error and, failure to find the measurement specified, produce the same "Measurement "toolow2" FAIL'ed" error message.
Isn't that a fine kettle of fish.
?
Subtracting 8ms from the start and stop values on the abscissa saw the plot window simply stop rendering in mid-redraw.
I am not going to burn any more time divining how LTspice works.
I will now move on to more productive efforts.
?
In my case ".options numdgt=15" broke 24.0.12.
The .raw file for the run is 11.5GB.
This suggests that LTspice might have crashed because you ran out of disk space. I have never seen crashes upon invoking double precision, but I have when running out of disk space.

--
Regards,
Tony


Re: .MEAS Failure

 

¿ªÔÆÌåÓý

On 25/02/2025 10:28, Tony Casey wrote:
After adding .option measdgt=15:

LTspice 24.0.12 for Windows
Circuit: * C:\users\tony\Desktop\LTspice\_Temp\Eewiz\MEAS_example.asc
Start Time: Tue Feb 25 10:10:33 2025
solver = Normal
Maximum thread count: 32
tnom = 27
temp = 27
method = modified trap
Direct Newton iteration for .op point succeeded.

t1: v(test)=0 AT 0.500500582598

Total elapsed time: 0.044 seconds.
Note, that the correct time value for this is actually 0.5005005005005... The problem was deliberately set so the answer was an irrational number.

--
Regards,
Tony


Re: intuition behind a solution to crashing time domain simulation #Time-step-too-small

 

¿ªÔÆÌåÓý

I suppose the OP posted more than one version of the .ASC. I don't think it's worth pursuing any further, but the fact that it runs OK with the simple opamp suggests that there is a problem with the AD757 model.

On 2025-02-25 01:07, Andy I via groups.io wrote:
On Mon, Feb 24, 2025 at 12:38 PM, John Woodgate wrote:

I don't know what's going on here. U1 isn't open-loop. Are we looking at the same .ASC, PID_section_united_AC_separate?

We are.
?
U1 is the integrator with C1 in its feedback path.? For DC, C1 is an open circuit so it is open-loop at DC.
?

?U3 is open-loop at DC. U1 and U2 have unity gain, U4 has 100 times gain at DC.

Wow.? You got quite different component markers than I did, from the same schematic!? Since those numbers are embedded within the schemeatic file itself, I don't know how that would have happened.

In such a circuit, I would not expect a TSTS? error

One never expects Timestep Too Small errors.? They only happen when the simulator runs into great difficulty in the right way.
?
Did I also mention that I never saw a Timestep Too Small error when I tried that simulation?? It was something "john23" had in his Error Log listing.? ?In my simulation it just ran very very slowly but did not abort.
?
Andy
?
--
OOO - Own Opinions only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion

Virus-free.


Create symbols.

 

Good morning, I have a question about symbols.
Could a symbol be automatically generated from a (.lib) or (.sub) file??..
In this case it would be a comparator.
?
If so, how could I generate it?


Re: .MEAS Failure

 

¿ªÔÆÌåÓý

On 25/02/2025 08:53, eewiz via groups.io wrote:
Yes, I agree.
Rather than assume such was true, I sought to prove that in my case there actually was no 2.0000000000 volts.
In general, it is usually impossible to prove the non-existence of something.
Therefore the effect, however it may be accomplished, is to print the time at which the next sample found is LESS-THAN 2 volts.
?
Wouldn't it be a phenomnal waste of processor time to interpolate between points, following the resultant curve, to find a point on that curve that is exactly 2.0000000000 volts when simply looking for the first value of data less-than 2 volts provides the same result.
Hardly a phenomenal waste of processor power. Linear interpolation between two points is a trivially simple operation. The .MEAS already finds the last data point before, and the first data point after the target is reached. Interpolation means you always get a more accurate answer even when not using very small values of maximum timestep, with very little overhead.
?
Regardless of how it is accomplished, the end result of using FALL=1 is to print the time at which the first data value less-than 2 is found.
This is obviously not true. The end result of using FALL=1 is to print out the interpolated value.

The reason why you found that apparently two points at the same time had two different voltages is due the printed precision of the time points. The time points are printed in single precision in the logfile. You can get double precision by adding .option measdgt=15. This is true whether or not you also use .option numdgt=15.

For example, to find the first falling value of 0, I added:

.MEAS T1 when V(test)=0 fall=1

..when analysing a 0.999Hz sine wave with .TRAN 1.1. By default the logfile was:

LTspice 24.0.12 for Windows
Circuit: * C:\users\tony\Desktop\LTspice\_Temp\Eewiz\MEAS_example.asc
Start Time: Tue Feb 25 10:09:09 2025
solver = Normal
Maximum thread count: 32
tnom = 27
temp = 27
method = modified trap
Direct Newton iteration for .op point succeeded.

t1: v(test)=0 AT 0.500501

Total elapsed time: 0.054 seconds.

After adding .option measdgt=15:

LTspice 24.0.12 for Windows
Circuit: * C:\users\tony\Desktop\LTspice\_Temp\Eewiz\MEAS_example.asc
Start Time: Tue Feb 25 10:10:33 2025
solver = Normal
Maximum thread count: 32
tnom = 27
temp = 27
method = modified trap
Direct Newton iteration for .op point succeeded.

t1: v(test)=0 AT 0.500500582598

Total elapsed time: 0.044 seconds.
Note: this option is sticky. It remains active for the session (until you close and restart LTspice), even if it is removed. Whether this is intended or not is not known. AFAIK, it is not documented.

--
Regards,
Tony`


Re: .MEAS Failure

 

¿ªÔÆÌåÓý

On 25/02/2025 02:50, Andy I via groups.io wrote:
On Mon, Feb 24, 2025 at 05:38 PM, Tony Casey wrote:
By default, the .raw file is written with single precision; this option enables double precision (and approximately doubles the .raw file size).
Although that is true for voltages and currents, time values are always saved to the .raw file with double precision.? Time is special in that way.
?
What probably happened here is that the Waveform Cursor pop-up window itself displays the numbers with less precision than they are saved in the .raw file.
This is also true with .MEAS. The time points are printed in single precision in the logfile, by default. You can get double precision by adding .option measdgt=15. This is true whether or not you also use .option numdgt=15.

For example, to find the first falling value of 0, I added:

.MEAS T1 when V(test)=0 fall=1

..when analysing a 0.999Hz sine wave with .TRAN 1.1. By default the logfile was:

LTspice 24.0.12 for Windows
Circuit: * C:\users\tony\Desktop\LTspice\_Temp\Eewiz\MEAS_example.asc
Start Time: Tue Feb 25 10:09:09 2025
solver = Normal
Maximum thread count: 32
tnom = 27
temp = 27
method = modified trap
Direct Newton iteration for .op point succeeded.

t1: v(test)=0 AT 0.500501

Total elapsed time: 0.054 seconds.

After adding .option measdgt=15:

LTspice 24.0.12 for Windows
Circuit: * C:\users\tony\Desktop\LTspice\_Temp\Eewiz\MEAS_example.asc
Start Time: Tue Feb 25 10:10:33 2025
solver = Normal
Maximum thread count: 32
tnom = 27
temp = 27
method = modified trap
Direct Newton iteration for .op point succeeded.

t1: v(test)=0 AT 0.500500582598

Total elapsed time: 0.044 seconds.
Note: this option is sticky. It remains active for the session (until you close and restart LTspice), even if it is removed. Whether this is intended or not is not known. AFAIK, it is not documented.

--
Regards,
Tony


Re: .MEAS Failure

 

¿ªÔÆÌåÓý

On 25/02/2025 06:59, eewiz via groups.io wrote:
.options numdgt=15. caused the plot window to crash at the end of simulation as it was rendering.
That plot window crash took LTspice 24.0.12 down with it.
I will restart and try again.
?
On the next try the .meas result was:
.meas TooLow1 FIND V(XSW11:X1:Qc,XSW11:X1:Qe) WHEN V(XSW11:X1:Qc,XSW11:X1:Qe)=2 FALL=1
toolow1: v(xsw11:x1:qc,xsw11:x1:qe)=2 at 0.00804695
AND
.meas TooLow2 FIND V(XSW12:X1:Qc,XSW12:X1:Qe) WHEN V(XSW12:X1:Qc,XSW12:X1:Qe)=2 FALL=1
Measurement "toolow2" FAIL'ed
?
TooLow2 saw no point that fell below 2V on the XSW12 signal, so it reported "Measurement "toolow2" FAIL'ed".
Both syntax error and, failure to find the measurement specified, produce the same "Measurement "toolow2" FAIL'ed" error message.
Isn't that a fine kettle of fish.
?
Subtracting 8ms from the start and stop values on the abscissa saw the plot window simply stop rendering in mid-redraw.
I am not going to burn any more time divining how LTspice works.
I will now move on to more productive efforts.
?
In my case ".options numdgt=15" broke 24.0.12.
The .raw file for the run is 11.5GB.
This suggests that LTspice might have crashed because you ran out of disk space. I have never seen crashes upon invoking double precision, but I have when running out of disk space.

--
Regards,
Tony


Re: LTspice 24.1 Simulation Errors

 

Hi Tony (and all),
?
I have just uploaded the update on the 74LVC1G.lib here:
?
Kind regards,
Herman


Ltspice alternative for AD797

 

Hello , is there an alternative I could use for AD797 , LTspice model will be best.
The model I got is very bad and its oscilating for no good reason.
Thansk.


Gain bandwidth: 100 MHz
-3 dB bandwidth: 8 MHz
Voltage input offset: 10 ?V, 25 ?V
Dual voltage supply: ¡À5 V to ¡À15 V


Re: .MEAS Failure

 

Yes, I agree.
Rather than assume such was true, I sought to prove that in my case there actually was no 2.0000000000 volts.
Therefore the effect, however it may be accomplished, is to print the time at which the next sample found is LESS-THAN 2 volts.
?
Wouldn't it be a phenomnal waste of processor time to interpolate between points, following the resultant curve, to find a point on that curve that is exactly 2.0000000000 volts when simply looking for the first value of data less-than 2 volts provides the same result.
?
Regardless of how it is accomplished, the end result of using FALL=1 is to print the time at which the first data value less-than 2 is found.
?
All for now
Sent:?Tuesday, February 25, 2025 at 1:20 AM
From:?"Andy I via groups.io" <AI.egrps+io@...>
To:[email protected]
Subject:?Re: [LTspice] .MEAS Failure
I think you miss the fact that there will be NO data point that simulated at 2.0000000000 volts.? Just won't happen.? Stop trying to find it.
?
Andy


Re: Monitor simulation percent completion from python

 

Interesting question. We're doing more or less the same and last week exactly the same question was raised.
?
Is it possible to run another process which checks the content of the raw file which is being build during the simulation? Not sure whether it can be read during simulation, but a copy can be made during simulation. This works on windows, so I assume the same holds for Linux.
?
Next step is decoding the raw file format. See this page for the structure:
?
At least you should be able then to find out what is the current time point in your simulation. This might already be sufficient for you.?
?
For the percentage completion you need to decode the actual begin and end times from the .tran statements (assuming you do transient analysis of circuits). Sometimes these are straightforward and sometimes I see very interesting and complex constructions with formulas and .params.
?
LTspice 24.1 has the feature to plot the resulting parameters (.options logparams), but unfortunately these are only added to the logfile at the very end of the simulation. Possibly this could be changed to printing the params to the log file right at the start. Then you know exactly the results of the complex constructs. Maybe Mathias is listening in on this topic as well :-) We could ask on the EngineerZone forum for this change. In that case you know exactly where you are in time and percentage.?
?


Re: .MEAS Failure

 

I do not mean to stop asking a .MEAS find it.? It will, by interpolation between points.? But there will be no data point at 2.0000000 V.


Re: .MEAS Failure

 

I think you miss the fact that there will be NO data point that simulated at 2.0000000000 volts.? Just won't happen.? Stop trying to find it.
?
Andy


Re: .MEAS Failure

 

Hello All:
?
.options numdgt=15. caused the plot window to crash at the end of simulation as it was rendering.
That plot window crash took LTspice 24.0.12 down with it.
I will restart and try again.
?
On the next try the .meas result was:
.meas TooLow1 FIND V(XSW11:X1:Qc,XSW11:X1:Qe) WHEN V(XSW11:X1:Qc,XSW11:X1:Qe)=2 FALL=1
toolow1: v(xsw11:x1:qc,xsw11:x1:qe)=2 at 0.00804695
AND
.meas TooLow2 FIND V(XSW12:X1:Qc,XSW12:X1:Qe) WHEN V(XSW12:X1:Qc,XSW12:X1:Qe)=2 FALL=1
Measurement "toolow2" FAIL'ed
?
TooLow2 saw no point that fell below 2V on the XSW12 signal, so it reported "Measurement "toolow2" FAIL'ed".
Both syntax error and, failure to find the measurement specified, produce the same "Measurement "toolow2" FAIL'ed" error message.
Isn't that a fine kettle of fish.
?
Subtracting 8ms from the start and stop values on the abscissa saw the plot window simply stop rendering in mid-redraw.
I am not going to burn any more time divining how LTspice works.
I will now move on to more productive efforts.
?
In my case ".options numdgt=15" broke 24.0.12.
The .raw file for the run is 11.5GB.
?
Before trying to shift the abscissa I did see that the values either side of 2.
With 15 digits, the values were much closer to 2 but still no 2.000000000000 value.
?
Interpolation notwithstanding, the end result of .MEAS NAME FIND V(X) WHEN V(X)=2 FALL=1;
is indestinguishable from the end result of .MEAS NAME FIND V(X) WHEN V(X)<2 which fails on syntax.
?
All I needed was a way to find if a BJT C-E voltage ever falls below 2V.
.MEAS NAME FIND V(X) WHEN V(X)=2 FALL=1 works for that purpose.
?
Many thanks to all whom opined.
?
All for now

Sent:?Monday, February 24, 2025 at 5:38 PM
From:?"Tony Casey via groups.io" <tony@...>
To:[email protected]
Subject:?Re: [LTspice] .MEAS Failure
On 24/02/2025 22:50, eewiz via groups.io wrote:
.meas TooLow1 FIND V(XSW11:X1:Qc,XSW11:X1:Qe) WHEN V(XSW11:X1:Qc,XSW11:X1:Qe)=2 FALL=1
works and produces;
toolow1: v(xsw11:x1:qc,xsw11:x1:qe)=2 at 0.00804696
?
Zooming in the plot window to the end of the universe, I see this point.
8.0469636ms 2.0000203V
The next point is:
8.0469636ms 1.9999355V
The time values must have greater precision than can be seen because a node can't have two different voltages at the same time.
I now see that since there is no value in the data that is exactly 2.0000000 it had to perform a poor mans less-than function.
No, that is not the case - wrong conclusion.
The code saw that 1.9999355 was less-than 2 where the previous sample 2.0000203 was more than two.
So that's a fall.
There was no test to see if data was ever == 2 as the .MEAS statement would imply.
I now see that the Fall and Rise modifiers mimic less-than or greater-than behavior for the .MEAS FIND WHEN statement.
Try again with:

.options numdgt=15.

By default, the .raw file is written with single precision; this option enables double precision (and approximately doubles the .raw file size).
?
There was no test to see if data was ever == 2 as the .MEAS statement would imply.
That's because the computation used interpolation - an estimation based on the closest two available data points, as previously stated. Obviously, there is no actual data point at exactly 2V. .MEAS can only make guesses on the data that actually exists in the .raw file, as it is a post-analysis calculation. There's no guarantee that any analysis can achieve a data point that shows V ¡Ô 2V, regardless of the maximum time step. This is why interpolation is used. That's just how the LTspice time step algorithm works.

--
Regards,
Tony
?