Home > Community > Forums > PCB SKILL > SKILL function question

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: *

 SKILL function question 

Last post Tue, Oct 30 2012 6:56 AM by chads108. 2 replies.
Started by chads108 29 Oct 2012 01:59 PM. Topic has 2 replies and 758 views
Page 1 of 1 (3 items)
Sort Posts:
  • Mon, Oct 29 2012 1:59 PM

    • chads108
    • Top 50 Contributor
    • Joined on Thu, Mar 29 2012
    • Plano, TX
    • Posts 185
    • Points 3,255
    SKILL function question Reply

    I am a beginner at best in SKILL, but I am trying to modify an existing routine.  Here is the part of routine I am working on.  Previously, I filled in a Radius in a form, but I would like to modify the routine so that Radius is 20% of Height, with a maximum Radius of 0.25 and a minimum of 0.01.  The text in bold is what I started, but like I said, I don't really know what I am doing.  I am sure this is an easy fix.  Can one of you experts show me the correxct way to handle this please.

    (defun _ns_spad_outform_run ()
        let((Length Height Radius ls1 ls2 ls3 ls4 ls5 ls6 ls7 ls8 ls9 pad_path)

            Length   = axlFormGetField( _ns_spad_outform "boxx")
            Height   = axlFormGetField( _ns_spad_outform "boxy")
    ;        Radius  = axlFormGetField( _ns_spad_outform "radius")
        (  if ( (Height > 1.25) then Radius = .25
          else
        Radius = Height*.2)
         )

     

    Thanks.

    Chad

    • Post Points: 20
  • Mon, Oct 29 2012 2:31 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 738
    • Points 16,055
    Re: SKILL function question Reply
    Radius = max(min(Height * 0.2, 0.25), 0.01)
    Dave Elder, Tait Communications
    • Post Points: 20
  • Tue, Oct 30 2012 6:56 AM

    • chads108
    • Top 50 Contributor
    • Joined on Thu, Mar 29 2012
    • Plano, TX
    • Posts 185
    • Points 3,255
    Re: SKILL function question Reply

    Thank you Dave.  That worked perfectly.  I figured I was over thinking it.

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by chads108 at 29 Oct 2012 01:59 PM. Topic has 2 replies.