Multi-unit symbols where some units are interchangeable and some are not.

Bug #1746810 reported by Janis Skujenieks
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
New
Unknown

Bug Description

Sometimes annotate schematic changes unit of symbol in schematic. For instance you insert unit A and after annotate it is switched to some other unit. Clearing annotation also changes units. I found this while working on schematic, but I created simple test case that works for me. Just open schematic and press annotate, then clear. Both times should switch units.

Project is attached.

Application: kicad
Version: (2018-02-01 revision b42084524)-master, debug build
Libraries:
    wxWidgets 3.0.3
    libcurl/7.57.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) libssh2/1.8.0 nghttp2/1.29.0
Platform: Linux 4.14.14-1-ARCH x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.66.0
    Curl: 7.57.0
    Compiler: GCC 7.2.1 with C++ ABI 1011

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_SPICE=ON

Revision history for this message
Janis Skujenieks (janis-skujenieks) wrote :
Revision history for this message
Jeff Young (jeyjey) wrote :

I opened this in a recent build so it re-mapped the symbols, but the bug still reproduces.

Changed in kicad:
status: New → Confirmed
Revision history for this message
Jeff Young (jeyjey) wrote :

It reorders them because the Opamp_Quad_Generic-Device has the all-units-are-not-interchangeable flag un-set. (Yes, that's a double negative. I don't know why we do that.)

At any rate it's an interesting case because the first 4 units *are* interchangeable, but the power unit (E) is not.

I'm not sure whether the answer is that the part should be set to all-units-are-not-interchangeable, or if we need some sort of "third way" to handle parts that have some units interchangeable and some not.

Revision history for this message
Janis Skujenieks (janis-skujenieks) wrote :

Oh I see now. I would argue that none of them are interchangeable once you set them in schematic. Often I choose units based on pinout so output of one opamp is near other in quad package. Also as you state power units will make this a problem.

But now thinking about it I don't see purpose of this. Do you know any example how its meant to function?

Revision history for this message
jean-pierre charras (jp-charras) wrote :

Be sure we need some sort of "third way" to handle parts that have some units interchangeable and some not.

Annotate dialog has an option to not remap unit selection (when they are interchangeable).

But the case related to:
"4 units *are* interchangeable, but the power unit (E) is not"
is different (I mean: not only a remap problem) and is not handled by eeschema ERC.

Not only the power unit (E) is specific, but any of 4 other units is linked to this unit.
Therefore if any of 4 other units is found in schematic, power unit (E) is mandatory.
Otherwise the unit will be not powered.
Regardeless to the fact units are interchangeable or not.

This is much more complicated.

This is the reason I do not use a separate power unit in multi-units parts.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 1746810] Re: Annotate schematic changes multi unit symbol

The new symbol file format will allow for this with any combination by
using an inheritance scheme. The symbol library file format will be the
"easy" part. It will take considerably longer to modify the symbol
editor support this.

On 02/02/2018 01:36 PM, Jeff Young wrote:
> It reorders them because the Opamp_Quad_Generic-Device has the all-
> units-are-not-interchangeable flag un-set. (Yes, that's a double
> negative. I don't know why we do that.)
>
> At any rate it's an interesting case because the first 4 units *are*
> interchangeable, but the power unit (E) is not.
>
> I'm not sure whether the answer is that the part should be set to all-
> units-are-not-interchangeable, or if we need some sort of "third way" to
> handle parts that have some units interchangeable and some not.
>

Revision history for this message
Janis Skujenieks (janis-skujenieks) wrote : Re: Annotate schematic changes multi unit symbol

The problem is that I don't want to reset existing annotation. This is how I got this. I had older project that I did modifications to and after annotation I saw weird changes. But if it where only similar units not power unit I wouldn't notice. Perhaps its not terribly bad because schematic would work anyway or I would see this during layout.

What I don't understand is, why change something that user has set? If I set unit, why must it be changed at any time by software?

Revision history for this message
Jeff Young (jeyjey) wrote :

The software updates them because you (or whoever created the symbol) said the units were interchangeable.

Perhaps this might be more clear if we reversed the flag so that the default wasn't interchangeable.

Revision history for this message
Jeff Young (jeyjey) wrote :

I'm turning this bug report into a feature request for a middle ground between all-interchangeable and none-interchangeable.

summary: - Annotate schematic changes multi unit symbol
+ Multi-unit symbols where some units are interchangeable and some are
+ not.
Changed in kicad:
importance: Undecided → Wishlist
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

KiCad bug tracker has moved to Gitlab. This report is now available here: https://gitlab.com/kicad/code/kicad/-/issues/2097

Changed in kicad:
status: Confirmed → Expired
Changed in kicad:
importance: Wishlist → Unknown
status: Expired → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.