Skip to content

Better control over XY mode channel selection + XYZ/RGB trace brightness modulation #342

@JSlehofer128

Description

@JSlehofer128

When setting up XY scope in the current version, you first select the X channel (add it to the scope) and then you tick the "Plot X/Y" option, which selects the first added "Voltmeter/Scope Probe" as the Y channel. If the X channel is also a scope probe, then it selects the second.
Problem is, when you have more scope probes, you have barely any control over which gets selected as the Y channel, making multiple XY plots difficult or impossible to do with independent Y channels.

When the scope is setup as XY, it does sometimes correctly display which probe is X and which is Y. However, most of the time it glitches, showing either channel as X, depending on the cursor location as per the following screenshots:
Image Image

Would it be possible to change the way the X and Y channels are assigned?
Instead of the "Plot X/Y" option selecting the channels, maybe use the already implemented multi channel feature of the XT scope?
For example you could start with just the X channel in the scope, then check the "Plot X/Y" option, which would first plot only the already present X channel, and then use the "Add to Existing Scope" option on some node/component (not just the probe) to add another channel, which would implicitly be handled as the Y channel.
This way you could achieve much better control, over what is plotted in the XY mode, as well as allow multiple independent XY scopes to be present.

Next consideration would be the option to further keep adding channels to the XY scope, which could extend its behaviour like this:
3 channels -> first X, second Y, third Z for brightness modulation of the trace (with eg. 0 - 1 V sensitivity scaling to 0 - 100% brightness of the trace, this would be great for teaching about CRTs or even demonstrating black and white analog video)
4 channels -> first X1, second Y1, third X2, fourth Y2 for two XY plots in the same scope
5 channels -> first X, second Y, third R, fourth G, fifth B for RGB brightness modulation (again same principle as 3 channel XYZ mode, but with color, ideal for demonstrating color analog video)
6 channels (and further even numbers of channels) -> 3 (multiple) XY plots as with 4 channels
7 channels (and further odd numbers of channels) -> 3 (multiple) XY plots but the 7th (last) channel draws just the X portion (with zero for the Y)

In combination with the recent addition of fade/persistance control when 0 brightness trace draws over the fading non zero recent trace, it should set the brightness to zero. With the fade control at 50 (infinite persistance) you would get a stable continuosly drawn over image when used to demonstrate analog video.
Or make it an option, to either completely replace the persistent trace or mix brightness/color with it (but i think it might be a bit too complicated to implement).

If required I can provide the examples that I use to demonstrate analog video in circuitjs1 for testing.

Thank you for your time spent reading all of this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions