Labels cause netclass error

I ran into an issue working with lables and net classes. I created a netclass VSS and a lable VSS both of them are connected to my lable “ADC0-” and “ADC1-”. When switching to the pcb view you can see that the connection works as intended however my net is now called “ADC0-” instead of the name i gave the net (VSS). Also this ignores all net rules I made for the VSS net. The name change seems to be through alphabetical preference as when renaming “ADC0-” to “_ADC0-” the net now is named “ADC1-”. Adding another underscore infront of ADC1 now has the expected result of the net having the name VSS.
I don’t have any other net tags attached so this seems to be a bug.
If this isn’t a bug and I made a mistake please let me know. I really want to get rid of that underscore without ruining my net rules.

1 Like

I have some difficulty interpreting your post.

Apparently you have different net classes, but you also write you connected the wires together:

Using more then one net label on the same wire merges those nets into one net, and this is as designed in KiCad, but KiCad does give a warning about this during ERC:

Maybe I should have uploaded images, sorry for that.

yes exactly, I recieve the same warning but it states that VSS will be used.

This is normal and expected behavior.

Edit: (Ramblings replaced by craftyjon’s better answer):

If there are multiple labels of one type attached to a net, the names are sorted alphabetically and the first is used.

Considering this:

Often custom rules act on net classes, but I guess they can also act on a specific named net. But it does not help you when KiCad ignores your net name.

But also, as long as the nets are merged by connecting the nets together, then there is only just one net, and there is simply no way for KiCad to know which part of the whole net you want those rules applied to. The solution for this is to use net ties. A net tie is a defined location on the PCB, in which different nets are merged together without loosing their own net names or classes. Examples of their use is for star ground points and for shunt resistors, which often have high current PCB tracks, and thin feedback sense lines for a kelvin connection.

1 Like

No, officially it is alphabetical

If there are multiple labels of one type attached to a net, the names are sorted alphabetically and the first is used.

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