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.
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
Where the function is loaded via a load command in your ilinit file.
Dave Elder, Tait Communications
In reply to eDave:
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.
In reply to Mstrghettorigg:
Just for reference, is there a way to make it work for both mils and Inch boards?
defun( my_OpenAllegroTrigger () axlCNSSetSpacing(nil "ETCH/BOTTOM" 'thrupin_smdpin axlMKSConvert(50 "mils") ))
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:
axlTriggerSet ('open 'TH_SMT)
The .il file has the information you gave me. Do you know what could be the issue now?
Remove the space before the (
ie. axlTriggerSet('open 'TH_SMT)
(load "TH_SMT.il") should be in you ilinit file.
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.
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
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.
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- 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.
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"))
It worked perfectly!
Thank you very much for your assistance!
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
; NONE. NONE. NONE.
(defun test ()
myform=axlFormCreate( (gensym) form_file nil 'Form_Action t)
(defun CreateForm ()
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 "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 "## 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 "FIELD Button2\n")
fprintf(myform "FLOC 24 13\n")
fprintf(myform "MENUBUTTON \"NO\" 11 3\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")
(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 )
;Enter Action Here
if((nequal myform->doneState 0)