5 Replies Latest reply on Oct 27, 2017 12:31 PM by beltz

    Detect Pin Thermal Overrides

    peter_festesen

      There are a few other threads regarding handling (reset) of Pin Thermal Overrides - as an example look at https://communities.mentor.com/message/69457#comment-69457

       

      I decided to try and see if I could write such a script, based on a snippet in the above discussion,

       

      Call pcbAppObj.Gui.ProcessCommand(33672,True)

      33672 - it's ID command for "Remove thermal Override"

       

      I found that that call will return True/False depending on the result. Since I was mainly after detecting and reporting all existing Pin Thermal Overrides in a design, I came up with this function :

       

      Function CheckPinThermal

      CheckPinThermal=False

      If App.Gui.ProcessCommand(33672,True) Then

           Call App.Gui.ProcessCommand("Undo",True)

           CheckPinThermal=True

      End if 'ProcessCommand

      End Function 'CheckPinThermal

       

      and it turned out to work in the designs that I have tested on.

      At the end it resulted in the attached script, which creates a report, listing important info for any Pin Thermal Overrides found. 

       

      I have tried to add many comments so it should be understandable what is going on. Basically,

      ' Script iterates through all Plane Shapes, finds all Padstacks/Pins inside Plane Shape,

      ' and checks if a Pin Thermal Override is present. If Yes, it checks if the Plane Class has

      ' the "Use padstack thermal definition" is set. If yes, the Pin Thermal overrides the part padstack thermal.

      ' if not, the Pin Thermal overrides the Plane Class Setting. 

      ' Both override situations are reported

       

      As always, here is the disclaimer :

       

      'Acceptable Usage Policy

      '

      '  This software is NOT officially supported by Mentor Graphics.

      '

      '  ####################################################################

      '  ####################################################################

      '  ## The following  software  is  "freeware" which  Mentor Graphics                            ##

      '  ## Corporation  provides as a courtesy  to our users.  "freeware"                             ##

      '  ## is provided  "as is" and  Mentor  Graphics makes no warranties                          ##

      '  ## with  respect  to "freeware",  either  expressed  or  implied,                                 ##

      '  ## including any implied warranties of merchantability or fitness                              ##

      '  ## for a particular purpose.                                                                                        ##

      '  ####################################################################

      '  ####################################################################

       

      Have fun, and let me and others know if it worked for you.

        • 1. Re: Detect Pin Thermal Overrides
          beltz

          Thanks for sharing your code! I was looking to write something to list thermal relief overrides for pins in planes

           

          1) How did/do you find out the Command ID for a particular command?

          Call pcbAppObj.Gui.ProcessCommand(33672,True)

          33672 - it's ID command for "Remove thermal Override"

           

          2) I added a check that the plane and pin netname are the same, before processing the pin.  We have some irregular plane shapes so the extreme x & extreme y  for the plane extents, would grab other pins that weren't in that plane.

           

          For Each pin In pins ' iterate through pins (should only be one, or? )

                        If (pln.net.name = pin.net.name) Then  ' I added this check before proceeding with processing the pin

           

          3) Using the attempt to execute the Remove Thermal Override will tell you if the pin has a thermal override in general, but not specifically if it contains a thermal override for the particular layer that you're currently processing.  I was getting some false positives for pins that were not overridden on that particular layer.  I noticed that in these cases, it would always have a value of 0.00 for Clearance; which I believe is an invalid value.  Anyway, I added a check for this invalid value, to indicate that this pin didn't have a thermal override on this layer and thus to ignore.

           

          If (pln.net.name = pin.net.name) Then

                          If CheckPinThermal Then 'calls function CheckPinThermal, returns True if True

                            ' to keep from reporting pin override info for a layer which doesn't have an override

                                        ' check that Clearance is not 0.00, or just greater than 0

                                        ' otherwise don't output anything for the current padstack because it is not overridden on this layer

                                            If (FormatNumber(pin.TielegClearance(pln.Layer), 2) > 0) Then   

           

           

          Walt Beltz

          Lexmark International Inc

          beltz@lexxmark.com

          • 2. Re: Detect Pin Thermal Overrides
            bbpcbdesign

            Hi Walt,

            about point 1, take a look to "C:\MentorGraphics\EEVX.2.2\SDD_HOME\standard\config\pcb\commandnames.txt".

            If I remeber well, there is somewhere a script to generate this command list for VX but I'm unable to find it.

             

            Bortolo Bolis

            • 3. Re: Detect Pin Thermal Overrides
              peter_festesen

              #1 :

              Bortolo, you are correct. I believe you mean the ListCommandIds.vbs script.

              I do not remember where this script originally came from. I thought it was from the AATK, but I do not see it in there.

              Anywhere, it is attached here.

              To answer your original question, I saw the Command Id in the discussion that I included in this thread at the very top. (https://communities.mentor.com/message/69457#comment-69457 )

               

              #2 I realy appreciate your comments and your additions - this is EXACTLY what these Communities are about. Thanks a bunch!!!

               

              /Peter

              • 4. Re: Detect Pin Thermal Overrides
                peter_festesen

                Hi beltz - could I ask that you post the extended script with your additions ? It could come in handy for other ;-)

                 

                Cheers
                Peter

                • 5. Re: Detect Pin Thermal Overrides
                  beltz

                  I've uploaded my program file ListThermalTieOverrides.vbs

                   

                  ListThermalTieOverrides.vbs

                   

                  Walt Beltz

                  beltz@lexmark.com

                  1 of 1 people found this helpful