Re: [Emc-developers] Programatically sending a sequence of motion commands

2009-04-09 Thread Eric H. Johnson
Chris, Thanks. I think I can just sit there and wait. The code snippet I provided already runs in its own thread, so blocking that thread on waits is not a problem. The real issue is that I do not want to pop (i.e. latch) the first element off the queue (a list technically which sorts based on pri

Re: [Emc-developers] Programatically sending a sequence of motion commands

2009-04-08 Thread Chris Radek
On Wed, Apr 08, 2009 at 10:17:39PM -0400, Eric H. Johnson wrote: > Hi all, > > My first question is whether effectively doing MDI calls is the best way to > do primarily the motion commands. And the second is, do I have to setup > something like a state machine to wait for each of the commands to

[Emc-developers] Programatically sending a sequence of motion commands

2009-04-08 Thread Eric H. Johnson
Hi all, I am getting close to getting a program scheduler (i.e. something that schedules a sequence of g-code programs) but could use a little help as far as how I go about sending a sequence of motion commands programmatically. A snippet of my first attempt is included at the bottom. I did not re

Re: [Emc-developers] Programatically sending a sequence of motion commands

2009-04-08 Thread Eric H. Johnson
Oops, I should have mentioned that the code snippet comes from the file src/emc/usr_intf/emcsched.cc. Regards, Eric >Code Snippet<-- if (sendProgramOpen(fileStr) != 0) { queueStatus = qsError; printf("Could not open program\