Home > Community > Forums > PCB SKILL > non-blocking axlRunBatchDBProgram call

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

 non-blocking axlRunBatchDBProgram call 

Last post Mon, Oct 15 2012 5:07 AM by fxffxf. 4 replies.
Started by Ejlersen 11 Oct 2012 09:42 AM. Topic has 4 replies and 1098 views
Page 1 of 1 (5 items)
Sort Posts:
  • Thu, Oct 11 2012 9:42 AM

    • Ejlersen
    • Top 10 Contributor
    • Joined on Mon, Jul 28 2008
    • Aalborg, Copenhagen
    • Posts 556
    • Points 9,795
    non-blocking axlRunBatchDBProgram call Reply

    Hi

    I've created a skill program with a gui that needs to run an external program using axlRunBatchDBProgram.

    However when I do this it blocks Allegro and the skill gui.

    Is there a way around this?

    Best regards

    Ole

    Best regards Ole
    • Post Points: 35
  • Thu, Oct 11 2012 6:03 PM

    • Pawandeep
    • Top 75 Contributor
    • Joined on Sat, Oct 15 2011
    • Singapore, 00-SG
    • Posts 106
    • Points 1,690
    RE: non-blocking axlRunBatchDBProgram call Reply
    Hi Ole,

    Please refer to ipcBeginProcess and other ipc functions for invoking programs without blocking the Allegro editor window.

    Regards,

    Pawan
    • Post Points: 20
  • Thu, Oct 11 2012 10:23 PM

    • Ejlersen
    • Top 10 Contributor
    • Joined on Mon, Jul 28 2008
    • Aalborg, Copenhagen
    • Posts 556
    • Points 9,795
    Re: RE: non-blocking axlRunBatchDBProgram call Reply

    Hi Pawan

    Thank you for your answer. As far as I can see from my initial tests closing Allegro will also close the process.

    Is there a way to start a program independently.

    I've so far tried bot the ipcbeginproces, axlRunBatchDBProgram and system without any luck.

    Best regards

    Ole

    Best regards Ole
    • Post Points: 20
  • Thu, Oct 11 2012 10:36 PM

    • Pawandeep
    • Top 75 Contributor
    • Joined on Sat, Oct 15 2011
    • Singapore, 00-SG
    • Posts 106
    • Points 1,690
    RE: RE: non-blocking axlRunBatchDBProgram call Reply
    Hi Ole,

    I can think of something like running a Batch file(*.bat) outside Allegro containing shell commands.

    There is a batch command “allegro” available for us, where there is option to invoke it under no graphics mode and running specified script file.

    Thanks,

    Pawan
    • Post Points: 5
  • Mon, Oct 15 2012 5:07 AM

    • fxffxf
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • ., AK
    • Posts 290
    • Points 4,620
    Re: RE: non-blocking axlRunBatchDBProgram call Reply

    I believe there are 2 ways you can try:

    •  use the Skill system call to run a bat file that runs your program via a .bat nowait call. You should google "cmd nowait" to see how this works
    • use the axlShell function to execute the Allegro "run" command. Example
    axlShell("run -b  <your command>")

    where the -b option tells the run command to execute your job and return without waiting for it to finish

    if your command is a bat file you will also need to use the "-s" option

     

    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by Ejlersen at 11 Oct 2012 09:42 AM. Topic has 4 replies.