I have uncovered a situation that I think may be indicative of a KiCAD problem. When using multiple power supplies and using a logic symbol from the library, KiCAD incorrectly connects the power nets together. I have attached an example below. In this case, there are two power supplies supplied from two different batteries. Each logic gate has its power pin connected to the battery supply. When I highlight the net, both nets are highlighted indicating the net are connected. Moreover, when I run an ERC, the ERC indicates these nets are connected and provides an error indicating the associated PWR_FLAGS are conflicting. The intention is to keep these two power nets separate. If I disconnect one of the logic gates from their respective power net, the two power nets are no longer connected.
When I looked into the symbol for the logic gate, the power pin is defined as a power input and the pin name is VCC. I understand KiCAD uses the pin name of the power pin as the name for the connected net. So, what appears to be happening is KiCAD is connecting the separate power net together because the pin name (VCC) is the same for these two instances of the logic gates.
Is there a workaround for this issue? I suppose I could create two separate symbols for the logic gate instances and rename the pins VCC1 and VCC2. This is not the preferred workaround. I actually have another two power supplies and other components in the schematic. So, this workaround would require new symbols for every instance of a component that had a power pin named VCC. I am hoping there might be another suggestion.