Machsupport Forum

Mach Discussion => Mach SDK plugin questions and answers. => Topic started by: flocisguy on September 06, 2011, 03:04:41 PM

Title: How to tell if the movement is occuring
Post by: flocisguy on September 06, 2011, 03:04:41 PM
I am working on a Plug-In (using plug-in wizard and Visual C++ 2008) and I am wondering what is the "best" or "proper" way  to find out if movement is occurring.  For example, I would like to use the Code() function to send Gcode such as "G01 X1 Y1 Z1", and then display a status indicator of "Moving" or "Stopped".  I found an example that compared Engine->TrajHead to Engine->TrajIndex and if they were different, the system was moving.  Is that the only way to determine if movement is occuring, or is there a property with a true/false value or some other way?
Title: Re: How to tell if the movement is occuring
Post by: jarekk on September 07, 2011, 04:07:16 PM
You can try to use this one: MainPlanner->ExternalStill

It is better ( compared to trajectroy variables) because in case of e.g. external motion plugin it should accomodate also jogging and homing ( which is not a part of trajectory planning)
Title: Re: How to tell if the movement is occuring
Post by: flocisguy on September 09, 2011, 04:55:54 PM
Thanks for the suggestion, however MainPlanner->ExternalStill stays true even when movement is occuring.
Title: Re: How to tell if the movement is occuring
Post by: jarekk on September 10, 2011, 09:40:25 AM
Well, maybe it works only in case of motion plugins, not with embedded LPT support :-(