Machsupport Forum
Mach Discussion => Mach SDK plugin questions and answers. => Topic started 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?
-
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)
-
Thanks for the suggestion, however MainPlanner->ExternalStill stays true even when movement is occuring.
-
Well, maybe it works only in case of motion plugins, not with embedded LPT support :-(