Quantcast
Channel: Cadence PCB Skill Forum
Viewing all 2132 articles
Browse latest View live

Replay .SCR file in command window

$
0
0

Hi All,

I am trying to create .SCR file and replay it. Below are the program for the same.

(defun DREND ()
          Script_File=outfile("DRILL_LEGEND.scr" "w")
          fprintf(Script_File "setwindow pcb\n")
          fprintf(Script_File "trapsize 9237\n")
          fprintf(Script_File "generaledit\n")
          fprintf(Script_File "delete\n")
          fprintf(Script_File "setwindow form.find\n")
          fprintf(Script_File "FORM find all_on\n")
          fprintf(Script_File "setwindow pcb\n")
          fprintf(Script_File "drag_start grid 6573.11 -3787.21\n")
          fprintf(Script_File "drag_stop 13408.81 -8165.76\n")
          fprintf(Script_File "prepopup 14018.49 -5837.93\n")
          fprintf(Script_File "done\n")
          close(Script_File)
          axlShell("replay DRILL_LEGEND.scr")
); end DREND
axlCmdRegister( "DREND" `DREND)

Once I run the program below error pops up in command window. Can someone guide me where I am doing mistake?

W- Cannot exit current application
E- No command active

Thanks,

Sanjeev


how to group the net objTypes?

$
0
0

Hello,

I'm trying to individually group the via,pin,shape and path of the net . but its not working. it shows E- *Error* eval: unbound variable - shapes

axlSetFindFilter(?enabled "Nets" ?onButtons "Nets")

axlSelect()

net_db = axlGetSelSet()

net = car(net_db)

foreach(branch, net ->branches, foreach(child, branch ->children, when(child ->objType == "via",vias= cons(child, vias)), when(child ->objType == "pin", pins= cons(child, pins)), when(child ->objType == "shape", shapes= cons(child, shapes)),when(child ->objType == "path", paths= cons(child, paths)) ))


Regards,

Karthik.k

Skill Help

$
0
0

Hello…

 

Our Asian board suppliers require track expansion on soldermask exposed pads and vias to reduce the effects of galvanic corrosion. Our requirement definition is linewidths <= .19mm, must be increased to .2mm

 

To identify these within the allegro board, I repurposed the check_short_segs.il code to:

create a report

ignore vias (our vias are plugged, so expansion is not required)

report first cline segment on a pin (xy & width)

report only TOP & BOTTOM (expansion not required internally)


Although this report does help identify segments that are too small and their location, I’d like to add additional user option switches, but I’m not a code person and my Source-link and forum searches have not provide the insight to accomplish this.


I’d like to include switches for user variables:

  /r report .19    ( <= user linewidth )      Run a report with a user defined min linewidth, 0.19mm default

  /c change .20  (new linewidth )             Execute a change linewidth from the reported linewidths to a user definable width.

  /d distance .20(track 2 pad edge intersect + distance)   Change length of first segment to track & pad intersect plus user defined distance before changing /c linewidth.


Any help would be greatly appreciated.


Thanks, Ken

 

 


; ##################################################
; Repurposed check_short_segs.il file to identify cline width of first pad entry segment on pins only.

; 02May2017 Ken

; Usage:

; To use this file, load it from the APD/Allegro command line or allegro.ilinit file

; and then issue the command

;

;

;

 

axlCmdRegister("fst" 'First_Seg_Track_Expansion )

 

 

 

defun(First_Seg_Track_Expansion ()

; Open the log file and print the header info

; ###########################################

board_name = axlGetDrawingName()

   rep_time = getCurrentTime()

   First_Cline_Segment_Rep=outfile("./First_Cline_Segment.log" "w")

   fprintf(First_Cline_Segment_Rep "First Cline Segment Report\n\n")

   fprintf(First_Cline_Segment_Rep "Time:   %s\n", rep_time)

   fprintf(First_Cline_Segment_Rep "Design: %s\n", board_name)

   fprintf(First_Cline_Segment_Rep "--------------------------------------------------------------------------\n\n")

   fprintf(First_Cline_Segment_Rep "-Layer--------------Location--------Width---------------------------------\n\n")

 

; Set up the find filter and select all the nets

; ##############################################

; axlSetFindFilter(?enabled '(noall invisible pins vias) ?onButtons '(noall pins vias)) ;save for ref;

   axlSetFindFilter(?enabled '(noall invisible pins vias) ?onButtons '(noall pins))

   axlClearSelSet()

   axlAddSelectAll()

   l_pin_via=axlGetSelSet()

   axlClearSelSet()

   foreach(pv l_pin_via

     unless(pv->isMech

        pin_branch=pv->branch

        pin_loc=pv->xy    

    foreach(child pin_branch->children

      if(child->objType == "path" then

            foreach(seg child->segments

               seg_startEnd=seg->startEnd

               seg_start=car(seg_startEnd)

               seg_end=cadr(seg_startEnd)

                 if(pin_loc==seg_start||pin_loc==seg_end then         

                   seg_layer=seg->layer

          seg_width=seg->width

          if(seg_width <=.18 then

            if(seg_layer == "ETCH/TOP" || seg_layer == "ETCH/BOTTOM" then                                          

              fprintf(First_Cline_Segment_Rep "%s  \t%L\t%L\n" seg_layer pin_loc seg_width)

              );endif

           );endif                        

         );endif

                   );foreach seg

                 );endif child

            );foreach child

      );unless pv->isMech

   );foreach pv

 

; Close the log file, refresh the graphics, and open a viewlog

; ############################################################

   close(First_Cline_Segment_Rep)

   axlShell("redisplay")

   axlShell("viewlog ./First_Cline_Segment.log")     

)

 

            procedure(rbg_get_segLen( l_coords )     ;This section left in for possible future reference / use;

         let( (x1 x2 y1 y2 x_len y_len h)     

            x1=xCoord(car(l_coords))             

            x2=xCoord(cadr(l_coords))            

            y1=yCoord(car(l_coords))              

            y2=yCoord(cadr(l_coords))            

            x_len=x2-x1                          

            y_len=y2-y1                          

            h=sqrt(x_len**2+y_len**2)            

           )                                    

);endproc

 

procedure(rbg_get_pin_radius(pin_id chk_layer)

;let( (l_pads pad pad_box px1 px2)

            pin_rad=0

            l_pads=pin_id->definition->pads

            foreach(pad l_pads

                        if(pad->type=="REGULAR"&&pad->layer==chk_layer then

                        pad_box=pad->bBox

                        px1=xCoord(car(pad_box))

                        px2=xCoord(cadr(pad_box))

                        );endif

            );foreach

            pin_rad=abs((px2-px1)/2)

;)

);endproc

 

;end defun - First_Seg_Track_Expansion

 



How to create the external DRC in intersecting area?

$
0
0

Hello,

How  create the external DRC in intersecting of two shapes.

res_list = (axlPolyOperation Shape_polyList_1 Shape_polyList_2 'AND)

Regards,

Karthik.K

Calling printf inside axlShell

$
0
0

Hi,

Is it possible to call printf function inside the AXLShell?

Thanks,

Sanjeev

Get active class,subclass by skill?

$
0
0

Hi All!

  How can get active class & subclass in options form by skill ?

Tks.

Luan.

 

Calling an user defined function

$
0
0

Hi,

I am trying to create an user define function to return MM DD YYYY from getCurrentTime(). Below is the program for the same.

procedure( DATE()

DATE_LIST = parseString( getCurrentTime())
MM = nthelem( 1 DATE_LIST )
DD = nthelem( 2 DATE_LIST )
YYYY = nthelem( 4 DATE_LIST )
return_list = printf("%s/%s/%s" MM DD YYYY)

)

With the above function, I want to display the date when ever the DATE() function is called. However is being return once I call the DATE() Function. for the below code

File=outfile("readme.txt" "w")

fprintf(File "DATE       :   %s\n\n" DATE())

close(File)

Any Idea how the date in the above prescribed format can be returned?

Thanks,

Sanjeev

Prefix set for Gerber file name not appears in output file

$
0
0

Hi,

I am trying to generate the gerber with the prefix name set in the film control window. for this I am trying the below code.

; -----------------------------------------------------------------
; PREFIX SETTING
; -----------------------------------------------------------------
axlShell("setwindow form.film_control")
axlShell("FORM film_control general_parameters")
axlShell(strcat("FORM film_control filename_prefix " (axlCurrentDesign) "_"))
axlShell("FORM film_control ok")
; -----------------------------------------------------------------
; FILM SETTING
; -----------------------------------------------------------------
axlfcreate "ASSY1" '(0 0 0 6 0 1 0 0 0 0 0 0 0) '("REF DES/SILKSCREEN_TOP" "PIN/TOP" "PACKAGE GEOMETRY/SILKSCREEN_TOP" "DRAWING FORMAT/TITLE_BLOCK" "DRAWING FORMAT/DWG_ASY1" "BOARD GEOMETRY/OUTLINE" "BOARD GEOMETRY/SILKSCREEN_TOP" "BOARD GEOMETRY/ASSEMBLY_DETAIL"))
; -----------------------------------------------------------------
; GENERATE FAB LAYER ARTWORK
; -----------------------------------------------------------------
axlRunBatchDBProgram("artwork" strcat("artwork -f FAB " axlCurrentDesign(), ".brd"), ?noUnload t ?logfile "photoplot.log", ?warnProgram t)


axlShell command is setting up the correct prefix name in the film control window,however the generated output file doesnot shows the same prefix name which is set by the axlShell command in film control window.

Could someone guide me where I am missing the trick.

Thanks,
Sanjeev


Code for create the Ground Guard around the board outline

$
0
0

Dear All,

Does anybody have the skill code for create the ground guard (polygon) around the board outline with the options of polygon width change & change the Stiching via distance in ground guard.

Thanks

Kumarasamy

Kill a process

$
0
0

I am using ipcBeginProcess() to start a Perl script from inside an Allegro Skill script (Allegro Skill script is invoked automatically when design is opened - by the way of axlTriggerSet).  

Now when I open another design from inside Allegro using File > Open then (since I am using axlTriggerSet) it invokes the Perl script again i.e. 2nd time which is not desirable.  What can I do so that the perl script closes when new design is opened i.e. original design is closed?  I was thinking of using axlTriggerSet() for design close but since the Allegro skill script invokes perl (i.e. another process) I am not sure how to do this.  Any ideas?  

Thanks for help!

Allegro 16.6 Report

$
0
0

Is there a way to get a report that contains pins that have thermals and what layers they are connected to? I posted in PCB Design Forum and was advised to try here due to the limits of standard and custom reports.

Any suggestions? I have very little experience with Skill.

Is there a way to get a report that contains pins that have thermals and what layers they are connected to? - See more at: community.cadence.com/.../37346

How to use AXL function

$
0
0

Hi ,

  Please say how to use AXL function, how run the programs.

Thanks

Prakash.S

Without mechanical net-shot

$
0
0

We use dual power options in our board. Able to connect two power in one via like below image. Please advise any option. Without mechanical net-shot.

 


skills & script in allegro 16.6 viewer.

$
0
0

Hi,

 

                Abled to run skills & script in allegro 16.6 viewer.

 

Thanks

Prakash.S

artwork domain modification via skill?

$
0
0

Does anyone know if it is possible to modify the artwork domain settings using skill?

Below is the log of my interactive test:

Command > skill
Skill > film_name = "NCDRILL_L01_L08"
"NCDRILL_L01_L08"
Skill > (DataList = axlGetParam(strcat("artwork:" film_name)))
param:113E0018
Skill > DataList->domains
("ipc2581" "pdf" "artwork" "visibility")
Skill > (old = length(DataList->domains))
4
Skill > remd("pdf" DataList->domains)
("ipc2581" "artwork" "visibility")
Skill > (new = length(DataList->domains))
3
Skill > (status = axlSetParam(DataList))
nil
Skill >

the last 'nil' shows that the axlSetParam() call failed, any suggestions?


How to gett Pin Logical path

$
0
0

Hi All,

 is there any way i can get logical path of each pins? 

Thank you

How to find if Padstack is used or not?

$
0
0

How to find if the padstack in a design is used or not using Allegro Skill?

Thanks,

Kirti

Parse a line in XML format

$
0
0

When I try to parse a line in a file in XML format I get an error:

E- *Error* parseString: argument #1 should be either a string or a symbol (type template = "SS") - ("global_min_aper")

The code I am using is:

axlExportXmlDBRecords("./temp_params.txt" nil)
    minWidth_port = infile("./temp_params.txt")
        when( minWidth_port
            while( param_line = gets(param_line minWidth_port)
                    if(rexMatchp("smooth_min_gap" param_line) then
                    println(list("Global aper raw value = " param_line ))
                global_min_aper = nth( 1 parseString(global_min_aper "<>"))
                    println(list("Global aper parsed value = " param_line ))
                        );if
                    );while
            );when
    close( minWidth_port )

This is basically a copy of the code which works for me on a typical report text file .
Can anyone point out what I am missing here?
Thanks.

How to delete a padstack

$
0
0

Hello,

I want to delete a padstack in Allegro design which is not used.

Is there an Allergo skill function to delete specific padstack?

Thanks,

Kirti

How to use Skill to import updated IPC2581 XML file

$
0
0

I am trying to create a skill function to automate updating the stackup in Allegro PCB Designer using an IPC-2581. The program will grab an ipc2581.xml file that was previously updated earlier in the skill program and import it into Allegro PCB Designer. 

I have tried two approaches but both fail to meet my needs. 

The first attempt was to make a system call to execute the ipc2581_in command.

board = axlCurrentDesign() ; test.brd
sprintf(command "ipc2581_in ipc2581.xml -x -o %s" board)
system(command)

The issue with this process is the stackup for test.brd in Allegro does not reflect the changes from the import once the import complets. The ipc2581_in function parses the xml file and the brd file. It then deletes the brd file and creates a new one (this is because they are both named the same thing). After the process is complete the skill function exits and I am returned to the PCB Designer window. Opening up the stackup window displays the same data that was there before the import. If I close the design (without saving) and open the board back up, the stackup will then reflect the changes from the import. For this process to work I would need to alter the above block of code to somehow refresh the board but I am unaware of a function that does this. NOTE: When you utilize the Cadence built in IPC2581 import function this is what appears to occur because the Cadence command window states 

PC2581 In completed successfully, use Viewlog to review the log file.
Opening existing design...

My second attempt was to use the axlShell function to run the ipc2581 command but this also does not work. I can run

axlShell("ipc2581 in") ; note there is no underscore

which will open up the Cadence IPC2581 In Gui but that defeats the purpose of automating the process since the designer now needs to still manually complete the process. I also tried running something similar to attempt 1 but without luck

board = axlCurrentDesign() ; test.brd
sprintf(command "ipc2581_in ipc2581.xml -x -o %s" board) ;
axlShell(command)

I tried the code above using "ipc2581 in" which just opened the Cadence gui and ignored all the text after the word in and I also tried using "ipc2581_in" which resulted in Allegro complaining there is no such command. 

Any help would be greatly appreciated!!

Thanks

Jonathan

Viewing all 2132 articles
Browse latest View live