Author Topic: Altium Query to find free pads?  (Read 2582 times)

0 Members and 1 Guest are viewing this topic.

Offline RedLionTopic starter

  • Regular Contributor
  • *
  • Posts: 65
  • Country: lu
  • Professional power dissipator
Altium Query to find free pads?
« on: July 26, 2020, 04:43:27 pm »
Hello everyone,

I would like to have a custom design rule, such that my PCB mounting holes are direct connected to my planes/polygons, while every other pad is relief connected. A few things on my designing habits:
- I always place my mounting holes as free pads in the PCB directly, for added flexibility
- I always use the Designator 0 for mounting holes and I use it only for mounting holes
- If there is copper around the pad, I generally connect it to ground

So the query I would like to perform is something along the lines of "Designator is 0" or "Pad is free". Apologies if that doesn't make much sense, but I am self-taught in Altium and I don't very much use the Altium query language.
Normally I make do with the query helper and query builder, but I didn't find anything that worked on my own. Is this even possible?

Thanks,
Ivo
We burn money we don't have
From shareholders we don't like
To develop products we can't sell
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22386
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Altium Query to find free pads?
« Reply #1 on: July 26, 2020, 06:05:01 pm »
1. Use mounting hole components.  Single pin symbol, hole footprint.  Connect to net.  This way it's obvious and explicit on the schematic: your holes are not insulated and floating, they have this connection.
2. Free pads can be assigned nets in Properties, or in netlist editor (D, N, N). (You've probably done this already.)
3. Free pads can be queried by the name 'Free-' + <pad name>.  Your holes would seem to be 'Free-0'.
4. Under Polygon Connect rules (D, R), add a rule, with elevated priority, to connect direct (no relief), with first object query: "IsPad AND (Name = 'Free-0')".  You can further query the second object (polygon) if you would like special cases.  Polygons can be named for instance, and queried with IsNamedPolygon(name).
5. You may be able to construct more complex queries with right-click object, Find Similar Objects...  Tick "create expression" to show how it's done it.
6. This should be helpful: https://techdocs.altium.com/node/300788

As you gain experience with it, I think you will find queries are very useful indeed.

The biggest limitation is no support for relational logic: you can only query single objects.  For example, you cannot query a component that has pin(s) in a given net.  That particular operation can be reconstructed by querying the pads ("IsPad AND NOT IsFree AND InNet('MyNet')"), then going to Properties and following the hyperlink to Component/Owner.

The biggest frustration, is every, single, fucking, property, has three different names.  There is the text label in Properties (e.g., pad "X Size (All Layers)"), which is also the label used in the List Panel; there is the query name ("PadXSize_AllLayers"), and there is the name that can be used in assignment expressions on that object (??).  I haven't found a list of the latter labels.  (A property can always be self-referenced with "!".  Example: to move a selection of objects 50 mils to the right, enter: "! + 50mils" in X1.)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline RedLionTopic starter

  • Regular Contributor
  • *
  • Posts: 65
  • Country: lu
  • Professional power dissipator
Re: Altium Query to find free pads?
« Reply #2 on: July 26, 2020, 07:23:46 pm »
4. Under Polygon Connect rules (D, R), add a rule, with elevated priority, to connect direct (no relief), with first object query: "IsPad AND (Name = 'Free-0')".  You can further query the second object (polygon) if you would like special cases.  Polygons can be named for instance, and queried with IsNamedPolygon(name).
Thanks, that did the trick. Searching the Altium Techdocs is not very easy most times.

1. Use mounting hole components.  Single pin symbol, hole footprint.  Connect to net. This way it's obvious and explicit on the schematic: your holes are not insulated and floating, they have this connection.
I have seen this done on PCBs done by other people, but I don't think that would work for me unfortunately.
In general, the mounting holes are part of my templates, as I am often constrained by specific housings, and I will connect the mounting studs as needed.
I also like having the freedom to place the holes and connect/disconnect all in the PCB.
If I ever have to design PCBs in a company environment, I'm sure I will pick up the "right way", but so far I'm just dicking around for my entertainment.
We burn money we don't have
From shareholders we don't like
To develop products we can't sell
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf