"Save Copy As" for power port symbols?

I wanted to just “Reply” to Rene’s FAQ but that does not seem to be permitted

Generally when I make a symbol I like to start with an existing one and “Save Copy As”; then edit. It has been a while since I tried this for a power port, but I can remember only that it was difficult and maybe I was unable. So now what I do (and what I have just now done) is:

  1. Save and zip a copy of my own power ports .lib file for backup.
  2. Use a text editor on this file to duplicate and edit copies of existing power ports.

This is not difficult but it feels like cheating; not the right way. Is there a better way to do it from within the symbol editor for example?

I am not stuck and not in a hurry. If this is worth an edit to the FAQ item, I can wait to see it there.

Your post raises more questions than understanding and confuses me.
You’re an experienced KiCad / forum user, why even try to Repay to a FAQ with something you’re not sure about?

I have not looked deep in this, I also do not see a “Save Copy As” in the Symbol editor. I do see a (very similar “Save As” and "Export Symbol"


(Screenshot from KiCad Version: 5.1.5+dfsg1-2~bpo10+1, release build)

The Export Symbol puts the +10V Power symbol into it’s own library, which is in my case 326 bytes.
Contents is:

> EESchema-LIBRARY Version 2.4
> #encoding utf-8
> #
> # +10V
> #
> DEF +10V #PWR 0 0 Y Y 1 F P
> F0 "#PWR" 0 -150 50 H I C CNN
> F1 "+10V" 0 140 50 H V C CNN
> F2 "" 0 0 50 H I C CNN
> F3 "" 0 0 50 H I C CNN
> DRAW
> P 2 0 1 0 -30 50 0 100 N
> P 2 0 1 0 0 0 0 100 N
> P 2 0 1 0 0 100 30 50 N
> X +10V 1 0 0 0 U 50 50 1 1 W N
> ENDDRAW
> ENDDEF
> #
> #End Library

The #PWR is probably what defines it as a power symbol, and as far as I know it should do nothing more then attach the +10V label to a net.

File formats can be accessed from:
https://www.kicad.org/help/file-formats/

If working with power ports works in any way differently in library managment then “regular” symbols I would consider it a bug.
I do not have much experience with libary management, which makes possible bugs harder to spot for me. Can you reproduce your “problem” in the current KiCad Version?

No it is not. There is not really a single thing that makes a symbol into a useful power symbol. As my FAQ article explains you need a few things for something to be a power symbol:

  • you need a hidden power input pin (makes the label)
  • you need the reference to start with # (ensures it does not expect a footprint and does not appear in the BOM). The rest of the reference does not matter at all.
  • optional: give the symbol the same name (=value) as the pin name to help show the user what netname to expect.
  • optional: set “symbol is a power symbol” flag. This enforces the #, locks the value field (both since KiCad v5) and also makes the symbol appear in the “add power symbol” dialog

@BobZ the save as workflow works for any symbol including power symbols. Just remember to keep the symbol and pin name the same to have a good indication about which netname you will get by adding your personal power symbol.

image

Gotta do something else right now but there it is…

Application: LibEdit
Version: (5.99.0-884-g39c2c4e13), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.66.0 OpenSSL/1.1.1d (Schannel) zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.1.1) nghttp2/1.39.2
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    Build date: Feb 18 2020 21:59:53
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.71.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.66.0
    Compiler: GCC 9.2.0 with C++ ABI 1013

Build settings:
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Nightly builds might look and behave different from stable. All tutorials found here are made for the stable release. They will not handle nightly until very shortly before the release as the behaviour might change quite a few times till then.

I have been using “Save Copy As” for some time…I could be wrong but I do not think it is that new.

Anyway…you see I have started with +5V power port and tried to save a copy as +5V_4. But there is that one text field which I cannot change from “+5V”. No problem to fix that by text editing the .lib file.

That is the pin name which is really the most important thing to change.

Thanks, Rene

I think that is what I encountered when I first tried to do this months ago. I think even then I gave up on doing it within KiCad and used my text editor. If it were completely safe for me to revert to a stable release build (such as 5.1.5) to try it and confirm, I would do so. But I gather that is not recommended. Do you think this (the symbol “save copy as” workflow) qualifies as a bug?

The fact that I cannot figure out how to do that within the symbol editor; am I missing it or is the symbol editor missing it?

Further point/question: I have no reason to think that “Save Copy As” is greatly different from “Save As”. I take those as slightly different descriptions for the same action. The difference could be which symbol is open for editing once the command is done. But even that…I don’t think so. Just now I confirmed that when I save a copy of +5V as +5V_test, it leaves me editing +5V_test.

This sounds inconvenient. I have my own library with my own power ports.

Exporting a symbol to it’s own library is probably meant as an intermediate step.
For example, export a bunch of symbols to a directory, and then use a script or whatever to combine them in a personal library.

Maybe it’s a left over from old ages. But its just guesswork and speculation


I think I understand your real problem now, and Rene already gave the answer.
Your screenshot is from the properties of the symbol, while you want to change the properties of the Pin. So hover over the pin’s attachement point and hit [E]

Then edit the pin properties to your liking:
image

Symbol name is now +567V and I changed the pin name to +5V123

Saved the symbol in one of my own libraries, then used it in a schematic and updated my PCB. KiCad nicely adds a net with name +5V123

image

In Eeschema I see the pin text in grey. Which I found weird. It is because apparently “Hidden symbols” were shown. It goes hidden again after:
Eeschema / Preferences / Preferences / Eeschema / Display Options / Annotations / [ ] Show hidden pins image

Hi, PaulVDH

Thanks a lot. By jove I think you’ve got it! This seems to work. Now I need to understand on another level: If I understand correctly, this seems to function as a global label and not a physical connector. So what is the function of a pin for a power port? A power port does not seem like an IC, connector or physical device with a physical pin? A ground connection most often corresponds only to a connection to a ground plane.

And BTW watch out for 567V. Sounds dangerous. :slight_smile:

As far as I know then the only thing that the “power port” does is indeed to create an implicit global label on the wires attached to that pin with the same name as the value field of the pin name. (And ERC checking, have not thought deeply about that).

So if the pin has the name 5V123 then a wire attached to that pin also gets the net name 5V123

If you want connectors, then you have to add them as separate symbols to the schematic.

I had to re-read your post twice to understand it…
I may have started as a sort of a hack. In Eeschema wires attach to pins, and that was already implemented.

Note that the footprint value on the power symbols is empty. I have never tried to add a footprint to a power symbol, and without a footprint they will not get exported to Pcbnew.

Aah OK. I have been using global labels frequently. I generally tack them onto some mid-point of a wire but it seems that global labels can also terminate a wire. There is a sort of difference but I do not know if the way KiCad works. If you tie two device pins together with a wire and assign it a global label, that connection may be complete. But if you tie two device Vcc pins together and assign a global label, it probably is not complete. I am trying to figure out if using a power port versus a global label makes a difference in DRC; I think maybe it does.

https://forum.kicad.info/search?q=power%20port%20label

This is all a bit mysterious but probably not a problem. Among other questions, I have not found the tick mark. Unless the symbol has a hidden nervous tic.

Tick mark?
Ah, I had to search for that in Rene’s post.
It’s also called a checkbox, and mabye a dozen or so other names.
I do not know why “they” do that. Humans appear quite fuzzy to me.

It’s in front of your nose in the bottom left corner:
[v] Define as power symbol

Just for fun: I have an extra tab page with “Aliases”.

I wonder if adding/changing the function of the “symbol is a power symbol” flag would help since this issue pops up occasionally. What if when the power symbol flag is set KiCad automatically uses the value for the pin number (and throws an error if one tries to set that flag on a symbol with multiple pins)? If the flag is set then the pin number will be equal to the symbol value at the point when the netlist is calculated. Still feels like a bit of a kluge behind the curtain, but should hopefully both reduce the number of questions about how to create new and novel power nets as well as reduce the size of the power library.

Or are there indications that the v6 schematic formats will support a different way of doing power ports?

Gosh there are some aspects which I don’t understand. But I think it is OK…

I guess that language (for example tick marks) is part of the issue. (I was looking for " ` "). So if I can get what I need out of the software that is good enough. I am glad that now I no longer need to go into my text editor to make new power symbols which are similar to existing ones. Because:

  1. I think I can make and use power symbols effectively
  2. Apparently this is legacy which no longer seems well justified
  3. I think that many of our contributors are in Europe or other places where English is not the first language, and if I had to conduct a discussion in German or Polish I would be completely stuck.

so I will not dig too hard.

I just about had Aliases figured out, and it seems that those are being discontinued in nightlies and Kicad 6.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.