Home > Community > Forums > PCB SKILL > Read drill tolerance and DEFAULT_INTERNAL pad(s) from padstack

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Read drill tolerance and DEFAULT_INTERNAL pad(s) from padstack 

Last post Thu, Sep 13 2012 1:05 PM by fxffxf. 7 replies.
Started by stburton 11 Sep 2012 09:37 AM. Topic has 7 replies and 1819 views
Page 1 of 1 (8 items)
Sort Posts:
  • Tue, Sep 11 2012 9:37 AM

    • stburton
    • Not Ranked
    • Joined on Fri, Mar 23 2012
    • Posts 4
    • Points 110
    Read drill tolerance and DEFAULT_INTERNAL pad(s) from padstack Reply

    I'm trying to get both the associated hole tolerance from a padstack definition and the defined "DEFAULT INTERNAL" pad(s) using the Allegro SKILL api.

    I am able to extract all other portions of the padstack definition except for these two pieces of information. I have tried iterating over the "pads" property of the padstack but the "DEFAULT INTERNAL" pads are mysteriously absent. Similarly, axlDBGetPad is not able to retrieve the pads (as far as I can tell). There are definitely default internal pads defined for the padstacks.

    For the drill tolerance I can't seem to find anything about how to retrieve the tolerance values in the documentation. All other drill properties (drillOffset, drillDiameter, etc.) are associated with the padstack definition object and are perfectly readable, but the hole tolerance is mysteriously missing.

    I've scoured the Allegro SKILL documentation but can't seem to find any information on these issues. 

    Any help or advice would be appreciated. Thank you. 

    I'm using Allegro 16.3

    • Post Points: 35
  • Tue, Sep 11 2012 2:23 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 715
    • Points 15,510
    Re: Read drill tolerance and DEFAULT_INTERNAL pad(s) from padstack Reply

    Unfortunately you will have to use an extract routine to get the tolerance values. Look for DRILL_HOLE_POSTOL and DRILL_HOLE_NEGTOL in ncdrill_view.txt. You mmight like to raise an enhancement request to get these added as attributes.

    By loading a padstack you should be able to determine the default internal pad:

    padstack = axlLoadPadstack(padName)

    internalPad = car(setof(pad, padstack ->pads, pad ->type == "REGULAR" && car(parseString(pad ->layer, "/")) == "ETCH" && !member(cadr(parseString(pad ->layer, "/")), '("TOP", "BOTTOM")))) 

    Dave Elder, Tait Communications
    • Post Points: 20
  • Tue, Sep 11 2012 3:31 PM

    • stburton
    • Not Ranked
    • Joined on Fri, Mar 23 2012
    • Posts 4
    • Points 110
    Re: Read drill tolerance and DEFAULT_INTERNAL pad(s) from padstack Reply

    Thanks for your reply Dave. 

    Ah, I feared the drill tolerances might not be accessible as simple properties.

    The method you outlined for the default internal pads does not seem to work in my case. Specifically, I'm attempting to read the default internal pads in the context of a package symbol loaded in the symbol editor. When accessing the padstack pads (padstack->pads) through the SKILL console it only retrieves pads for following layers:

     

    • ETCH/TOP
    • ETCH/BOTTOM
    • PIN/SOLDERMASK_TOP
    • PIN/SOLDERMASK_BOTTOM
    • PIN/PASTEMASK_TOP
    • PIN/PASTEMASK_BOTTOM
    • PIN/FILMMASKTOP
    • PIN/FILMMASKBOTTOM

     

     
    However, if I view the padstack in the padstack editor there are DEFAULT INTERNAL pads defined, I just can't seem to get at them from the SKILL API. It does not seem to matter if I'm accessing the padstack definition directly from the design object or from one retrieved by a call to axlLoadPadstack. Again, I'm running in the context of the symbol editor and I don't have any additional internal layers defined. So, in this case there are no actual instances of pads for internal layers but I would still like to be able to determine what the default internal pads are. I'm really hoping I don't have to do something hacky like create an internal garbage layer just to read the data.
     
    Thanks.
     

     

    • Post Points: 35
  • Tue, Sep 11 2012 3:58 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 715
    • Points 15,510
    Re: Read drill tolerance and DEFAULT_INTERNAL pad(s) from padstack Reply

    I feel your pain!

    Again, I think you have to use extracta.  Look for PAD_STACK_INNER_LAYER

    Dave Elder, Tait Communications
    • Post Points: 5
  • Tue, Sep 11 2012 4:16 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 715
    • Points 15,510
    Re: Read drill tolerance and DEFAULT_INTERNAL pad(s) from padstack Reply
    Actually you need to use the pad_rep_view.txt view file and look for the LAYER named internal_pad_def
    Dave Elder, Tait Communications
    • Post Points: 5
  • Thu, Sep 13 2012 8:35 AM

    • fxffxf
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • ., AK
    • Posts 291
    • Points 4,640
    Re: Read drill tolerance and DEFAULT_INTERNAL pad(s) from padstack Reply

    Assuming you are using 16.5 although these might work in earlier releases... 

    - You can get the internal definition (DEFAULT INTERNAL) by doing using the 'internal symbol as the 2nd arg to GetPad

              pad = axlDBGetPad(pin 'internal "REGULAR")

    - For toleranace you need to access the padstack. For example if you have a pin dbid assigned to variable "pin". Then you would:

         def = pin->definition     ; get padstack

         ; tolerance is represented as a list of (+tol -tol) in design units (float)  

          printf("tol %L\n" def->holeTolerance)

    • Post Points: 20
  • Thu, Sep 13 2012 12:05 PM

    • stburton
    • Not Ranked
    • Joined on Fri, Mar 23 2012
    • Posts 4
    • Points 110
    Re: Read drill tolerance and DEFAULT_INTERNAL pad(s) from padstack Reply

    Thanks.

    I'm on 16.3 but both methods you suggested seem to work in 16.3.

    How did you know to use the 'internal symbol to retrieve the internal pads for axlDBGetPad? I couldn't seem to find it documented anywhere.

      I don't know how I missed the "holeTolerance" property on the padstack definition, could have sworn it was missing the other day. 

     Thanks again to everyone who replied. 

    • Post Points: 20
  • Thu, Sep 13 2012 1:05 PM

    • fxffxf
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • ., AK
    • Posts 291
    • Points 4,640
    Re: Read drill tolerance and DEFAULT_INTERNAL pad(s) from padstack Reply

    could be a couple of reasons:

    - the functionality was added in a hotfix

    - it was missed in the offical doc

    Seeing that the 16.5 offical doc (cdnshelp) has it then it might have been added to 16.3 via a hotfix. The unoffical doc can sometimes have info not in the real doc. This is @ <cdsroot>/share/pcb/examples/skill/DOC/FUNCS

    Being on UNIX, I find it is easier to use the unoffical doc since I can search by using 'grep'. The unoffical doc doesn't contain drawings but the axl Reference manual doesn't have many of them.

    • Post Points: 5
Page 1 of 1 (8 items)
Sort Posts:
Started by stburton at 11 Sep 2012 09:37 AM. Topic has 7 replies.