Home > Community > Forums > PCB SKILL > Changing spacing constraints when opening Allegro

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

 Changing spacing constraints when opening Allegro 

Last post Fri, Nov 9 2012 3:22 PM by Mstrghettorigg. 23 replies.
Started by Mstrghettorigg 16 Oct 2012 03:47 PM. Topic has 23 replies and 3554 views
Page 2 of 2 (24 items) < Previous 1 2
Sort Posts:
  • Thu, Nov 1 2012 8:24 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 687
    • Points 14,555
    Re: Changing spacing constraints when opening Allegro Reply
    (defun Form_Action (myform)
     let((t1 item index field cnt)
     (printf "field/value %L = %L (int %L\n)" myform->curField myform->curValue, myform->curValueInt )
    (printf "doneState %L\n" myform->doneState )
    case(myform->curField
    ("Button1"
    println("OK pressed")
    if(axlCNSSetSpacing(nil "ETCH/BOTTOM" 'thrupin_smdpin axlMKSConvert(50 "mils")) then println("Successful") else println("Failure"))
    )
    ("Button2"
    ;Button Field 
    ;Enter Action Here
    )
    )
    unless(zerop(myform ->doneState), axlFormClose(myform))
    ))
    Dave Elder, Tait Communications
    • Post Points: 20
  • Fri, Nov 2 2012 6:56 AM

    Re: Changing spacing constraints when opening Allegro Reply

    Thank you Dave.

     I'm little busy for the next couple of days, but I will give it a shot once I get sometime.

     Appreciate your help! 

    • Post Points: 5
  • Mon, Nov 5 2012 9:28 AM

    Re: Changing spacing constraints when opening Allegro Reply

    Hi Dave,

    The code worked great!

    I appreciate your help! 

     

    • Post Points: 5
  • Wed, Nov 7 2012 10:42 AM

    Re: Changing spacing constraints when opening Allegro Reply

    Hi Dave,

    After adding couple more constraints from the code you provided me I am considering making it so that the form will not pop up if the 3 criteria I specify exist on the board already.

    Also, I would like to have the form close when I select one of the options after it successfully runs. 

    I was wondering if you could guide me into the right direction again.  Please see below for the changes I made.

    Thank you,

     

    (defun my_form (t_open)

    time = getCurrentTime()

    time = parseString(time)

    day = nth(1 time)

    month = car(time)

    month = upperCase(month)

    year = nth(3 time)

    date = strcat(" Date: " day " " month " " year)

    CreateForm()

    myform=axlFormCreate( (gensym) form_file nil 'Form_Action t)

    axlFormDisplay(myform)

    axlUIWPrint(myform date)

     

    )

     

     

    (defun CreateForm ()

    drain()

    form_file = "output-orig_form.form"

    myform = outfile(form_file "w")

    fprintf(myform "#Created by xml2bnf  perl utility\n")

    fprintf(myform "#Coded by Venkata Ramanan/Santa Clara, CA\n\n")

    fprintf(myform "FILE_TYPE=FORM_DEFN VERSION=2\n")

    fprintf(myform "FORM AUTOGREYTEXT\n")

    fprintf(myform "FIXED\n")

    fprintf(myform "PORT 45 23\n")

    fprintf(myform "HEADER \"Form Field Type Demo\"\n\n")

    fprintf(myform "POPUP <ENUM>\"ITEM1\"\"0\",\"ITEM2\"\"1\",\"ITEM3\"\"2\",\"LAST ONE\"\"3\".\n\n")

    fprintf(myform "TILE\n\n")

    fprintf(myform "## Button Field in FORM ## \n")

    fprintf(myform "FIELD Button1\n")

    fprintf(myform "FLOC 8 13\n")

    fprintf(myform "MENUBUTTON \"OK\" 11 3\n")

    fprintf(myform "FGROUP \"TH to SMT Bottom Constraints\"\n")

    fprintf(myform "ENDFIELD \n\n")

    fprintf(myform "## Button Field in FORM ## \n")

    fprintf(myform "FIELD Button2\n")

    fprintf(myform "FLOC 24 13\n")

    fprintf(myform "MENUBUTTON \"NO\" 11 3\n")

    fprintf(myform "FGROUP \"TH to SMT Bottom Constraints\"\n")

    fprintf(myform "ENDFIELD \n\n")

    fprintf(myform "## Text Field in Form## \n")

    fprintf(myform "TEXT \"Change TH to SMT Bottom Constraints to 0.050?\"\n")

    fprintf(myform "FLOC 5 5\n")

    fprintf(myform "TGROUP \"TH to SMT Bottom Constraints\"\n")

    fprintf(myform "ENDTEXT\n\n")

    fprintf(myform "ENDTILE\n\n")

    fprintf(myform "ENDFORM\n\n")

     

    close(myform)

    )

     

    (defun Form_Action (myform)

     let((t1 item index field cnt)

     (printf "field/value %L = %L (int %L\n)" myform->curField myform->curValue, myform->curValueInt )

    (printf "doneState %L\n" myform->doneState )

    case(myform->curField

    ("Button1"

    println("OK pressed")

    if(axlCNSSetSpacing(nil "ETCH/BOTTOM" 'thrupin_smdpin axlMKSConvert(50 "mils")) then println("Successful") else println("Failure"))

    if(axlCNSSetSameNet(nil "ETCH/BOTTOM" 'thrupin_smdpin axlMKSConvert(50 "mils")) then println("Successful") else println("Failure"))

    if(axlCNSSameNetModeSet('thrupin_smdpin 'on) then println("Successful") else println("Failure"))

    )

    ("Button2"

    println("NO pressed")

    ;(axlFormClose(myform))

    )

    )

    unless(zerop(myform ->doneState), axlFormClose(myform))

    )) 

    • Post Points: 35
  • Wed, Nov 7 2012 11:39 AM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 687
    • Points 14,555
    Re: Changing spacing constraints when opening Allegro Reply

    Hi,

    You seem to be getting in too deep before you understand how Skill and forms work. May try a few, simple examples first.

    Anyway, just use  axlFormClose to close the form after any button push.

    Just test your values before you open the form. ie. if( a && b && c then println("ok") else CreateForm() .......)

    Good luck,

    Dave 

    Dave Elder, Tait Communications
    • Post Points: 20
  • Wed, Nov 7 2012 11:53 AM

    Re: Changing spacing constraints when opening Allegro Reply

    Hi Dave,

     

    Thank you again for the input.  I do feel like I'm getting too far ahead of myself, but every time something works it seems like it needs something else. :)

    I looked through the doc folder in the install, but I can't seem to find anything about making skill from scratch.  All I really saw was the PDF with different commands.  Do you have a suggestion on what reading material I should work off of?

     

    • Post Points: 20
  • Wed, Nov 7 2012 12:00 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 687
    • Points 14,555
    Re: Changing spacing constraints when opening Allegro Reply
    The Skill Language User Guide is a good start (...doc\sklanguser\sklanguser.pdf)
    Dave Elder, Tait Communications
    • Post Points: 5
  • Fri, Nov 9 2012 5:59 AM

    • fxffxf
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • ., AK
    • Posts 283
    • Points 4,525
    Re: Changing spacing constraints when opening Allegro Reply

    You should read the APLICATIION NOTES section of axlTriggerSet. With your example, you are ignoring the recommendation to block your form. To enable a blocking form change the following create form line to:

       myform=axlFormCreate( (gensym) form_file nil 'Form_Action nil)

    and add after axlFormDisplay(myform) a call to:

        axlUIWBlock(myform)

    You may also want to reconsider your use model. A more flexible model would either start a new design from a template board or have a techfile loaded on a new design start. If you worry about accidental changes to the rules, you can either lock the constraints via the techfile or make doing a techfile compare (board to a master techfile file) part of your design release process.

    • Post Points: 20
  • Fri, Nov 9 2012 3:22 PM

    Re: Changing spacing constraints when opening Allegro Reply

    Hi fxffxf,

    Thank you for your input.  I will take a look at the document and try out the suggestions.

    Our intention is to use it on new design and also on an old designs that will need to impliment these spacing constraints on new revisions.  The spacing was suggested fairly recently so all of our previous design will need to be changed if it's possible to change it.

    It's still something I am just looking into and any input will be appreciated. 

    • Post Points: 5
Page 2 of 2 (24 items) < Previous 1 2
Sort Posts:
Started by Mstrghettorigg at 16 Oct 2012 03:47 PM. Topic has 23 replies.