What does the "Update schematic from PCB" command do? 5.99

What does the “Update schematic from PCB” command do?

I didn’t find anything about it either in the forum or in the Kicad documentation.

If this command does what I expect I would like to vary the pin position from pcb for example of an MCU or fpga to make the layout cleaner without having to change from schematic, which requires having both windows open and generates confusion on the order just some labels to move.

Thanks

I also discovered this function today, but have not experimented much with it.

Apparently it can do some back annotation tasks such as:

  • Sync values of components back into Eeschema.
  • Sync net names back to Eeschema.

Quickly thereafter I found a minor bug with it, which I reported and got picked up almost immediately:

So if you are curious what it can do. Start playing with it and maybe you can also help a bit by testing new features.

You can see in the dialog what it can do: change refdes, value, net names. Definitely not pin swapping which is its own request (search for pin or gate swapping in the issue database).

I tried to do some experiments:
1st change in value and it works.
2nd change net name and it works.
3rd I inverted the net on 2 pads of a connector and in the eschema comes
the same label is shown on both pins. See photos

  This is the functionality I need.

There are too many labels for the single wire I’m still fixing the scheme.
But I don’t think this will affect the result.

See also Can I work Backwards in the Nightlies?. If you want full ability to freely change nets it won’t probably happen because it would require duplicating pcbnew functionality in eeschema and vice versa. But if you need limited ability to swap some predefined pins/pads it would be pin swapping, see https://gitlab.com/kicad/code/kicad/-/issues/1950.

The problem that arises is that it allows you to do this in pcbnew and if you use the “update schematic from pcb” command it introduces an error in the eschema that may not even be seen.
The operation is done half right and half wrong.
In my opinion this operation of changing the reference designators should not be allowed if the functionality is not complete.

It’s difficult to me to follow what you did. If you have found a bug please report it to the issue database https://gitlab.com/kicad/code/kicad/-/issues. Add an example project with description of exact steps to reproduce the problem. Half-working functionality which creates hard to detect errors is of course a bug.

Refdes changes do not happen without user interaction. Even while using update from schematic. If the process finds you do not have a fully annotated schematic then it will open the annotation dialog. At this point you can stop. The same is also the case if you go via the export netlist dialog! It also opens the annotation dialog if it needs to.

If it really behaved differently than i explained above then this would be a bug.


And be aware that there is no back annotation. So if you change a refdes on the board then it will not change in eeschema by going through this. It will change back the one on the board to what it was in eeschema.

If you however have for example R1 and R2 placed but discover that the position of R1 would better fit for the connections of R2 then you can change the refdes in pcbnew. However on update you will need to tell kicad that it shall use the refdes for reconnecting the schematic to the layout. See Update PCB from Schematic's match methods (current nightly might have different names for the options but the underlying behavior is the same)

Yes this is a behavior I know and it is correct.
But it has nothing to do with the present case.

The schematic in my example is fully annotated.

If I have not misunderstood your answer it is the case example I posted above.
The problem that once you run the “update schematic from pcb” command the schema file is no longer consistent with the PCB file.

I expect a command that has that purpose won’t introduce this kind of inconsistency.
Then I know perfectly well the danger of such a command in other software where this possibility is implemented I have never dared to use it.
Kicad on this side makes it easier for me to use, I don’t know it’s just a feeling.

If you do a test on your project and try to swap for example two nets on two pins of a connector, it should report the same error as mine.

Now I try to report the problem so I know if I’m wrong…

Rene, maybe you didn’t notice that this was really about the new backannotation fuctionality Update Schematic from PCB, not about Update PCB from schematic?

If you expect KiCad to work “correct”, then you should not run the nightly V5.99 But there are different kinds of expectations. I expect this to be fixed before KiCad V6 is released.

As far as I can see, the bug has to do something with interactions between multiple labels on a net.

Have you already made a bug report for this?
KiCad developers are a valuable resource of the KiCad project, and the better the bug report is, the less time it takes them to fix it, and thus they can fix more bugs.

The best bug reports have a step by step guide to reproduce the bug, and the best for this bug may be a combination of local and global labels, or a simplified project with a few schematic symbols and footprints. I assume the red texts in your screenshot are local labels, which suggest that pin 43 has 2 local labels: “L62P_0” and “S19” and a global label: “IOS-DIP23”. Is this correct?

Do you feel like making such a bug report, or shall I (try to) take over to reproduce the bug and make the report?

[Edit:]
Found the bug report:

I am aware that it is a beta version.

I was trying out the new features by building a full project with the nightly build.

I normally use the latest version 5.

I have seen the command “update schematic from pcb” and since I have not found documentation I have both asked and experimented.

I did not understand in the first place if the thing detected by me was a problem or an incorrect interpretation of the command.

Yes, there are too many local and global labels I haven’t cleaned up yet.
I needed to know the pins used in other shields for the main board and I didn’t want to insert them inside the component.
But I think I will have to do it as it introduces confusion on the schematic and then I have the empty base shield design therefore in this they will have to be removed.

But it seems that this fact of multiple labels does no harm.

But I’ll try to experiment in the project with non-multiple labels.

Yes, as you reported, I reported the bug.

Thanks

I have cleared all too many labels both global and local.

The problem returns the same as before.

I also found that if you change net by three pads without crossing, the “update schematic from PCB” command returns the configuration to that of eschema as if you were running “update pcb from schematic”

I have just made a small example project in an attempt to reproduce, but I got different behavior.
To see what I did have a look at the bug report on gitlab.
I have also attached the simple example project there.

What function did you use to swap the pins in PCBnew?
I did it by hovering over a pad and the press ‘e’ for Edit.

I performed the operation with the right mouse button properties and changed the net on the pad.

I tried your example.
It does nothing at all the pads in the eschema are not updated.
It has different behaviors based on the action it takes.
I am testing it on windows pc on linux I don’t have the nightly version.

Yes you are right i missed that

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