Wednesday, July 2, 2014

Rules: Infrequent and Common

We all "program" rules into Altium all the time, but there are some that are only used occasionally.  Usually the calls for the rules are forgotten...at least I do this...and then reference back to an old design to remember how it is done.  So here is a list of a few rules that may not be used all the time, but are handy to keep nearby.  Also included are a few helper rules or time savers. 

Flood over vias
Most experienced users probably know this one well, but I still see a lot of reference boards in which the vias have thermals.  Since there is no need for a via to have a thermal tie, it is possible to set these to Direct Connect.  To do this, simply make 2 rules for both the Power Plane Connect Style and the Polygon Connect Style Rules.  Leave the default "All" rule to a Relief Connect and set the higher priority rule to IsVia and set it to Direct Connect like so...




















Net ties
Deliberate ground shorts happen all the time now and way more often then we would like.  Do not forget that the short error can be eliminated by adding the offending nets to the Short-Circuit Rules in the Electrical section.  For even better control, only allow the short-circuit to happen within a Room or Component.

(Not InAnyNet) vs InNet('No Net')
In the case of dealing with NoNet tracks and vias, the rules start to get a little picky.  For example, there is a BGA on the board and there is fanout on every pin regardless of whether or not a pin is tied to a net.  It would seem logical to use the Query Builder to assign InNet('No Net') and allow shorts, overlaps, etc.  However, this doesn't work and the errors will still show up.  Instead use the call (Not InAnyNet) and the rule will go right through.

Room for rules-by-area

Rooms can be great as a quick rule-by-area check.  Place a room and blank the room query.  The room query itself will not be referenced.  Then a Clearance and/or Width rule can be set with the room as the target like so WithinRoom('RoomRules').  Any trace that is fully contained by the room will pass different rules than the rest of the board.

Both inclusive and exclusive rules
In the example above, we used the command WithinRoom and that works well for nice easy shapes where it is possible to wrap a rectangular room around all of the PCB object.  However, most of the time, it is not that easy to contain everything.  For those examples, use the TouchesRoom command and that will allow objects to be only partially in the room and still get checked.  See the picture below to get an idea of the difference.














Room as a height keep out
Place a room and change the Query to something similar to this (OnLayer('L1-Top') AND Height >= '1').  This query along with a Room Setting of Keep Object Outside will error on any component 1mm and taller.

A caution goes with this though.  The unit settings need to be correct or all of a sudden this 1mm height becomes 1mil and virtually any component on the board will show as an error.


Soldermask over vias

For me, great detest is felt over those Force complete tenting check boxes that are on vias.  What happens when you miss one?  For this, a nice rule can be used.  Go into the Soldermask Expansion rules and add a new rule.  Set the query to IsVia AND (HoleSize < 0.25) adjusting the hole size as necessary for your board.  Set the Expansion to the via size, but in the NEGATIVE direction (i.e. -0.5mm).  This will automatically cover over all vias of a given size and smaller.  This rule could also be used to cover over the pad, but not the hole if the size is set correctly.

Like the Room height, a caution goes with this.  If the rule is set in metric and the board is output in English, the rule will fail and all vias will be exposed.


I hope these can come in handy and please ask for/add more!

No comments:

Post a Comment