Electronic – How does kiCAD / eeschema merge multiple wire labels into the netlist

kicad

I was hoping multiple labels on wires would allow using different physical and logical names for the same signal (e.g. "net42" to match a different schematic on "the other side" of a connector, and "PWM" for the logical signal).

KiCAD allows this (http://docs.kicad-pcb.org/4.0.7/en/eeschema.html#connections-wires-and-labels):

Note 4:

If two different labels are placed on the same wire, they are
connected together and become equivalent: all the other elements
connected to one or the other labels are then connected to all of
them.

Unfortunately, when I try to extract the signal names for each pin of a specific component, it seems only the label that has been used first is used in the netlist.

I was hoping to get information about the additional wire name(s) from the netlist (i.e. a list ["net42", "PWM"] or a combined string like "net42, PWM"), but it seems I have to limit myself to one label in order to have that info show up in the netlist?

Best Answer

That is correct. The netlist exporter for all netlist types selects a single, best (i.e. first) netname from the labels. If no label exists, it will call it "NET-XXXX" where XXXX is an incremental number.

If you wanted to have multiple names, I would suggest you use a global label of "net42_PWM" or a similar concatenation. The naming priority goes: global, local at higher hierarchy (close to the root sheet) and finally alphabetical.

If you have two local labels "net42" and "PWM", just attach a global label to either net with the concatenated name.