You need to use EasyEDA editor to create some projects before publishing
Probe command misreads arithmetic in list of values.
1035 3
example 9 years ago
BUG Concise problem statement: A probe command like this: `probe V(OUT) I(V1)` plots `v(out)` and `i(i(v1))` correctly as two traces. but `probe V(OUT) -I(V1)` plots `v(out)-i(v1)` incorrectly as a single trace. Is it possible to correct this error? It will make writing `probe` list simpler! Steps to reproduce bug: 1 Delete the probe spice directive: `probe V(OUT) I(Vifilt)` from the schematic. 2 Paste both of the following spice directives into the schematic: `let IL1=-I(V1)` `probe -I(V1) V(OUT) -I(V1) (-I(V1)) IL1` and `probe V(OUT) -I(V1)` 3 Make `let IL1=-I(V1)` `probe -I(V1) V(OUT) -I(V1) (-I(V1)) IL1` active and do Ctrl+R. Observe that correct traces are plotted. 4 Make: `probe V(OUT) -I(V1)` the only active spice directive and do Ctrl+R. Observe that a single, incorrect trace is plotted. Url: https://easyeda.com/file_view_Open-loop-flyback-converter_BEeOM8tPb.htm
Comments
dillon 9 years ago
Hi, First!!! Why U need to plot V(OUT) -I(V1) , they are in diffrent unti, maybe useless, am I right?
Reply
example 9 years ago
In the simple example schematic, I wanted to plot the current in L1 but I did not want to add a current probe just to do this. So I plot the current in the power supply, V1. But if you plot `I(V1)`, the current is the wrong polarity (upside down), so I want to plot `-I(V1)`. I *also* want to plot `V(OUT)` so I have two traces: one for `V(OUT)` and one for `-I(V1)`. The problem is that if I write the probe statement like this: `probe V(out) -I(V1)` It does *not* plot two traces: one for `V(OUT)` and one for `-i(V1)`. What it plots is one trace of: `V(OUT)-I(V1)` which is not what I want. To answer your question: "Why U need to plot V(OUT) -I(V1) , they are in diffrent unti, maybe useless, am I right?" Other way round: I do *not* want to plot `V(OUT) -I(V1)` What I want to plot is two traces: one for `V(OUT)` and one for `-i(V1)`. But Waveform (or is it ngspice?) will not let me! I can work around the problem is different ways: `let -I(V1)=IL1` `probe V(OUT) I(IL1)` or `probe V(OUT) (-I(V1))` or `probe -I(V1) V(OUT)` all give me the two traces I want but it is hard for the newbie to learn all these things. Why should people have to know that: `probe -I(V1) V(OUT)` is OK but `probe V(OUT) -I(V1)` is not? (It also adds a lot of words to trying to explain how to use `probe` ... ) :)
Reply
example 9 years ago
Ahhhhh. OK. Maybe I misunderstand how the syntax of the probe command works. I think you can ignore this as a bug report: I need to describe this carefully in a tutorial somewhere .... If you are interested, below, I have gone through step-by-step what I think happens. Suppose I have a circuit with V(a), V(b), V(c). If I want to probe V(a) and V(b) then I can do: `probe V(a) V(b)` That will show me two traces; `V(a)` and `V(b)`. That's correct. If I want to probe the difference between V(c) and V(b) I could do: `probe V(c) -V(b)` or `probe (V(c) -V(b))` or `probe V(c,b)` All 3 options would show me V(c,b) (i.e. V(c)-V(b)). What If I want to show V(a) and V(c,b)? If I write: `probe V(a) -V(b) V(c)` then I will get the wrong traces showing V(a,b) and V(c) but, if I write it like this: `probe V(a) V(c) -V(b)` or: `probe V(a) (V(c) -V(b))` or: `probe V(a) V(c,b)` then I will get the correct traces showing V(a) and V(c,b). Now what if I want to show 3 traces: V(a), -V(b) and V(c)? If I write: `probe V(a) -V(b) V(c)` then I will get the wrong traces showing V(a,b) and V(c) but if I write: `probe V(a) (-V(b)) V(c)` then I will get the correct traces showing V(a), -V(b) and V(c). So what this means is that to be sure that a minus sign is always treated correctly in a probe command, it must always be inside a pair of brackets. Even if it is just being used to negate a trace and not as part of an expression to create a difference. So, in my original post, the correct way to show two traces, one for V(OUT) and one for -I(V1) is to write the probe command like this: `probe V(OUT) (-I(V1))` The arithmetic of the trace display comes out correct: it shows two traces representing V(OUT) and -I(V1). The only problem then is that the -I(V1) trace is actually labelled as: `I((-I(V1)))` instead of simply `-I(V1)`. but that is already the subject of my Feature Request: <https://easyeda.com/bbs_view_1415.htm>
Reply
Login or Register to add a comment
goToTop
你现在访问的是EasyEDA海外版,使用建立访问速度更快的国内版 https://lceda.cn(需要重新注册)
如果需要转移工程请在个人中心 - 工程 - 工程高级设置 - 下载工程,下载后在https://lceda.cn/editor 打开保存即可。
有问题联系QQ 3001956291 不再提醒
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus-@1x -mockplus-

Cookie Notice

Our website uses essential cookies to help us ensure that it is working as expected, and uses optional analytics cookies to offer you a better browsing experience. To find out more, read our Cookie Notice