Replicate layout: Action plugin Question for Similar but not the same layout sections

I’m working on a design that has sections that are identical, except that they have different annotations, and connect to different external nets.

I was able to use the plugin to replicate the sections, but the issue is that the nets are ruined, and the plugin doesn’t work if they’re not identical, and attached to the same sheet.

Example:

A circuit includes a chip with 3 pins. Each pin has a global label that connects to: IC1-1, IC1-2, IC1-3 respectively.

The next section is the same, but now the IC labels need to be IC2-1, IC2-2, IC2-3.

The plugin only works if both sections are part of the same sheet. Section1, Sheet1.sch, and Section2, Sheet1.sch (instead of Section2, Sheet2.sch). The problem is that this forces all the global labels (or hierarchical etc…) to stay the same for both sections. This won’t work in reality.

The closest I’ve gotten to what I want is to use the plugin with the wrong labels, then to manually edit the page name to Section2, Sheet2.sch, edit the labels in the schematic, and then manually edit the REFs on the PCB. This would be fine if it worked, and maybe there’s a way to do it properly (please tell me), but manually editing the REFs doesn’t work if I update the PCB from the netlist. Then everything gets duplicated, sans layout.

Any ideas of how to make this work? I’ve redone the initial layout 3 times (hours of work), and I can’t resolve this. If I wasn’t picky about the layouts being identical / symmetrical, this wouldn’t be such an issue. But I am. Please help. :slight_smile:

Thanks,
Josh

Either this is fairly standard, or I’m missing some point.

[Delete]

I think the clue is in:

Global labels have the same net over the whole sheet. That’s why the’re called Global :slight_smile:
You use Hierarchical labels on a sub sheet, then import those labels in the presentation of the hierarchical sheet in the “main page”, and then you can connect those to other stuff, and attach labels there.

A search in the FAQ for Hierarchical gives:


which has some info about the different kinds of labels and how to use them.

Thanks for the response. However, if you read my post, it makes no difference whether I use hierarchical or global labels. The issue isn’t the labels, it’s the way the plugins works with sheets in KiCad.

If I create a hierarchical label in sheet 1, it will change the label in sheet 2 also. But both sheets need those labels to go to different nets.

The only way to avoid that (that I’ve found so far) is to create the sections on different sheets, but then the plugin doesn’t work anymore.

Thanks,
Josh

I don’t think it does.
It would help if you draw a minimal example and maybe attach a project here to better understand what you mean. But I’m guessing there is a way to work around your issue with hierarchical labels.

Here’s an example project, with both global and hierarchical labels.

Sheet1 is to connect to FOO?, and Sheet2 is to connect to BOO?. Edit either page labels, and it switches the other. Separate the association on Sheets.sch (to separate .sch files) and the plugin won’t work.

Test Project

Thanks,
Josh

Oh, no! Yet another project called “Test”.
It’s getting lost betweent those 20 others with the same name :slight_smile:

Anyway. I think I see your problem. You have to import the hierarchical pins to the sheet on the main page.
I’m having dinner now, I’ll be back in half an hour or so with an update.

1 Like

Wow, that’s odd workflow. I clicked import the hierarchical labels on each sheet, and now they’re on the sheets in the root page. So I add new labels there and/or run connections to where they’re supposed to go?

Thanks,
Josh

Yep, that is basically how Hierarchical labels (pins?) work.

You can also import the hierarchical pins on one sheet, and then make a copy of the whole sheet and paste it a few times, so you don’t have to import all pins separately on all sheets.

Also:
And in the root sheet, you only use the imported pins from the hierarchical sheet. Using hierarchical labels in another sheet, even if they have the same name does not work. The hierarchical labels are only for importing in the “sheet” presentation.

Was this the missing link, or are there more things unclear?

5 Likes

That was it. Thank you very much for your help!

2 Likes

Just think of hierarchical pins/labels as the parameters of a function in any programming language of your choice and it will suddenly make a lot more sense. And think of global labels as if they are global variables in the same context.

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