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 3902 views
Page 1 of 2 (24 items) 1 2 Next >
Sort Posts:
  • Tue, Oct 16 2012 3:47 PM

    Changing spacing constraints when opening Allegro Reply

    Hi All,

     I was wondering if anyone can guide me in the right direction.

    I'm trying to make it so I can set the bottom SMD pin to TH distance when allegro starts up.  This will need to be done to all files being opened.

    I'm not familiar with writing skills, but I was wondering if anyone has ran into similar Skill file or at least guide me in the right direction.

    I looked through some forum and it looks like I can use axlCmdRegister and axlTriggerSet commands to run the skill automatically once I have the skill file create.

    I think this command is where I need to get started from, but I don't think it's that simple. 

    axlCNSSetSpacing("" TOP 'Thru Pin_SMD Pin .050 INCH) 

    Any help will be appreciated.

    Thanks! 

    • Post Points: 20
  • Tue, Oct 16 2012 6:48 PM

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

    I can't think why you would want to do it this way but, for what it's worth:

    The function could be: 

    defun( my_OpenAllegroTrigger () axlCNSSetSpacing(nil "ETCH/BOTTOM" 'thrupin_smdpin 0.050)); Are your units really inches?

    You are correct, this can be called via an axlTriggerSet command: Add a command such as

    axlTriggerSet('open 'my_OpenAllegroTrigger)

    Where the function is loaded via a load command in your ilinit file.

    Dave Elder, Tait Communications
    • Post Points: 20
  • Wed, Oct 17 2012 7:20 AM

    Re: Changing spacing constraints when opening Allegro Reply

    Hi Dave,

     It looks like it worked exactly the way I wanted to. 

    I believe we want to do this as request from assembly for TH pin to SMD pin on the bottom side during the assembly process.

    I think we are trying to make it so we can set this constraints when people open the file so people will not forget, but I just realized if there is a case if someone need to make this smaller (which I expect will happen pretty often) that it will load it back up to the 50 mils everytime we open the board which seems like it would be a nuisance. 

    I guess I need to rethink this through.  

    Thank you for your help.  Hopefully I can use this as a base to the new and better solution. 

    • Post Points: 5
  • Wed, Oct 17 2012 8:08 AM

    Re: Changing spacing constraints when opening Allegro Reply

    Hi Dave,

    Just for reference, is there a way to make it work for both mils and Inch boards?

    • Post Points: 20
  • Wed, Oct 17 2012 11:56 AM

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

    defun( my_OpenAllegroTrigger () axlCNSSetSpacing(nil "ETCH/BOTTOM" 'thrupin_smdpin axlMKSConvert(50 "mils") ))

    Dave Elder, Tait Communications
    • Post Points: 20
  • Wed, Oct 17 2012 3:34 PM

    Re: Changing spacing constraints when opening Allegro Reply

    I thought it was working, but now I am getting error below.

     E- *Error* eval: not a function - 'open 

    I have this in env file:

    (load "TH_SMT.il")

    axlTriggerSet ('open 'TH_SMT)

     The .il file has the information  you gave me.  Do you know what could be the issue now? 

    • Post Points: 20
  • Wed, Oct 17 2012 3:47 PM

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

    Remove the space before the (

    ie.  axlTriggerSet('open 'TH_SMT)

    (load "TH_SMT.il") should be in you ilinit file.

    Dave Elder, Tait Communications
    • Post Points: 20
  • Fri, Oct 19 2012 1:18 PM

    Re: Changing spacing constraints when opening Allegro Reply

    Hi Dave,

    Sorry for not getting back earlier.  I've been little busy with work.

    So I tried it as you have suggested.  (load "TH_SMT.il") in ilinit file

    Tried the axlTriggerSet('open 'TH_SMT) in env, ilinit, skill file one at a time and I still cannot get it to run.

    The TH_SMT.il is loaded since if I type TH_SMT in the command line the skill will run, but it does not automatically run and change the constraints.

    Please advise if you can think of anything else that I may be doing wrong. 

    • Post Points: 20
  • Mon, Oct 22 2012 1:10 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 736
    • Points 15,930
    Re: Changing spacing constraints when opening Allegro Reply
     axlTriggerSet should call the Skill function name - not the name of the Skill file (unless they are the same of course)
    Dave Elder, Tait Communications
    • Post Points: 20
  • Wed, Oct 24 2012 3:00 PM

    Re: Changing spacing constraints when opening Allegro Reply

    Hi Dave,

    I can't seem to figure this out.  I must be missing some steps here.  My skill file name is TH_SMT.il and inside contains 

    (defun TH_SMT () axlCNSSetSpacing(nil "ETCH/BOTTOM" 'thrupin_smdpin axlMKSConvert(50 "mils") ))

    This file seems to work just fine if I type in TH_SMT in the command line with allegro.ilinit calling out

    (load "TH_SMT.il")

    I just can't seem to get it to run this automatically when I open the board.

    I entered axlTriggerSet('open 'TH_SMT) in the allegro.ilinit file, but it does not work.

    I also tried in in env file but it did not work either.

    Any help would be appreciated.

     Thank You! 

     

    • Post Points: 20
  • Wed, Oct 24 2012 3:17 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 736
    • Points 15,930
    Re: Changing spacing constraints when opening Allegro Reply
    All that looks good. Are you sure that your allegro.ilinit file is being called? There is a heirarchy for the calls so maybe it's finding another copy? Put some messaging into your TH_SMT function for testing.
    Dave Elder, Tait Communications
    • Post Points: 20
  • Wed, Oct 24 2012 3:34 PM

    Re: Changing spacing constraints when opening Allegro Reply

    I tried putting the text in the skill file and it came up with an error.  I tried it on allegro.ilinit file and it also gave me an error.

    I have few skill files being loaded via that allegro.ilinit file so I am assuming it is working correct. 

    I typed "1" in front of axltriggerset... and I get the message below.

    E- 1axlTriggerSet('open 'TH_SMT) 

    E-                ^

    E- SYNTAX ERROR found at line 25 column 16 of file allegro.ilinit

    E- *Error* lineread/read: syntax error encountered in input 

    Opening existing drawing... 

    Does "Opening existing drawing..." mean that axlTriggerSet is running before the board actually opens and that's why it's not working? 

    Thank you again. 

    • Post Points: 20
  • Wed, Oct 24 2012 3:48 PM

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

    GOT IT!

    You need to include an arument in your function for the trigger to work. Try:

     defun( TH_SMT (t_open) axlCNSSetSpacing(nil "ETCH/BOTTOM" 'thrupin_smdpin axlMKSConvert(50 "mils"))

    Dave Elder, Tait Communications
    • Post Points: 20
  • Wed, Oct 24 2012 3:58 PM

    Re: Changing spacing constraints when opening Allegro Reply

    Hello Dave,

    It worked perfectly! 

    Thank you very much for your assistance! 

    • Post Points: 5
  • Thu, Nov 1 2012 8:51 AM

    Re: Changing spacing constraints when opening Allegro Reply

    Hello Dave,

    I was wondering if you could help me with this.  I found a older thread on how to make a form by Venkata and I was not able to get the buttons to work.  I would like the OK button (Button 1) to run the code we worked on for setting the constraints of bottom SMT to TH to be 50 mils and NO button (button 2) to just close the form.  Please see below for the skill file content.

     /*Created by xml2bnf  perl utility

    Coded by Venkata Ramanan/Sant Clara, CA

    Version History*/

     

     ; WARRANTY:

     ; NONE. NONE. NONE.

    (defun test ()

    CreateForm()

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

    axlFormDisplay(myform)

    axlUIWPrint(myform date)

     

    )

     

     

    (defun CreateForm ()

    drain()

    form_file = "test_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"

     

    ;Button Field 

    ;Enter Action Here

    )

    ("Button2"

     

    ;Button Field 

    ;Enter Action Here

    )

    )

    )

     

    if((nequal myform->doneState 0)

    axlFormClose(myform))

    )

     

    It says button field 
    ;Enter action here so I'm assuming this is where I put the code in.
     
    I tried
    defun( TH_SMT (t_open) axlCNSSetSpacing(nil "ETCH/BOTTOM" 'thrupin_smdpin axlMKSConvert(50 "mils"))) and axlCNSSetSpacing(nil "ETCH/BOTTOM" 'thrupin_smdpin axlMKSConvert(50 "mils"))), but neither worked.  

    Please let me know if you are able to help.
     
     
    • Post Points: 20
Page 1 of 2 (24 items) 1 2 Next >
Sort Posts:
Started by Mstrghettorigg at 16 Oct 2012 03:47 PM. Topic has 23 replies.