-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatibility with previous export lists #1
Comments
Could you please export the circuit and attach the generated file to this issue? |
Thanks. I have confirmed that the scope works in Falstad's original, bot not in my fork. I'll debug it asap. |
Thanks in advance. Very appreciative of your fast response. |
Sorry for the delay. I have found one cause for the bug, but still could not find the root cause for it. It seems to be related to the way the wires are implemented in my version (wires with resistance), versus Falstad's original (ideal wires). The most interesting part of it is that, if one replaces every wire with a 1 pΩ resistor (that's a pico-ohm, it should have no effect whatsoever!) in your circuit, the scopes display only a flat line in both my version and Falstad's original. Check it out: http://textuploader.com/1rec I will provide a workaround for it in my version, adding an option for switching between ideal and realistic behavior for wires. Anyway, I think you should also alert Paul Falstad of this strange behavior. |
In the 'options' menu entry, there is now an 'ideal wires' checkbox, which is unchecked by default (i. e. the wires behave a bit more like real conductors, unlike in the original). If you check it, and optionally push the 'reset' button, you circuit behaves just as in the original simulator. I am also reporting this issue upstream to Paul Falstad, so that he may check why the simulation fails if the wires are replaced by low-value resistors. Thanks for reporting this issue. |
Just for completion, and in case the link expires, here is the file that started it all,
|
Okay thanks for the updates. I've been looking into this a bit more as well and have noticed something interesting that might be the cause of the problem. It may not be a bug at all. In Falstad's version, it seems that when you try to display an "ideal" wire on the oscilloscope, it automatically assumes you are referencing the wire to ground since there is obviously no voltage drop across the wire. That's why it works properly. In your edited version of the circuit with 1p resistors, it still works properly in Falstad's version. The reason why you don't see anything on the scope is because with resistors, Falstad's displays the voltage across the resistor, but there is no drop across the resistor since it's the input to the op-amp. I haven't gotten a chance to look at your version again yet, but I imagine that because your version simulates more realistic wires with some resistance rather than ideal is the source of the problem, in other words it isn't a bug at all. If your version treats wires as very small resistors, it won't show anything on the scope in that circuit since there is no voltage drop across the wire. |
For instance, take a look at this circuit. In Falstad's version the scope displays at 5V because it must be assuming you want to reference the wire to ground (0V). I imagine that in your version, the scope will still show this as 0V for this simple circuit because it is treating the wire as a small resistor, thus showing the voltage drop ACROSS the wire, which is correctly 0. $ 1 5.0E-6 10.20027730826997 50 5.0 43 I am not sure how you would want to go about solving this if this is the source of the issue. I think most of the time if people, myself included, want to display the voltage of a wire we automatically want it in reference to 0V, like Falstad's version because I can't see much reason for wanting to know the negligible voltage drop across a wire. That might potentially be a pain in the ass for you to code though, since you'd have to change it so the wires still behave as small resistors but don't show voltage across them like regular resistors in the oscilloscope. I suppose the workaround for myself and others would be to place very large resistors to ground wherever we want to know the voltage, but that could get annoying have lots of extra resistors. Even better though might be to have the option to choose voltage across wire or with reference to ground for each wire in a right-click properties box, but again could be a pain to code. |
Just built this yesterday and tried to import a saved filed from Falstad's original. The circuit shows up, even functions correctly, but the scope displays don't work properly. I can click any point in the circuit that clearly has a changing voltage and the scope displays no voltage change at all, just a flat 0 line.
Something changed with the format for file importing in this version??
In the picture below, my mouse is hovered over the scope, highlighting the wire to left in blue that is is currently displaying. It's clearly green in the picture, and the text display on the scope even says 15V, but no waveform appears.
The text was updated successfully, but these errors were encountered: