Machsupport Forum

Mach Discussion => Mach SDK plugin questions and answers. => Topic started by: rubot on January 16, 2018, 04:10:46 PM

Title: Problem with G92 and/or G52 in plugin or script
Post by: rubot on January 16, 2018, 04:10:46 PM
Hello everyone.

If i load G-code :
G92 A0
G00 A0.5
G04 P5

All right.
Every step i'v got increase of machine's coordnets by 0.5 (mean 0.5, 1, 1.5, 2 etc).

If i try to make it in the Update() section of the Plugin.cpp :

if (GetLED(821)){
      Code("G92 A0.0000");
      Code("G0 A0.5");

I'v got an unexpected rotations CW, CCW, to 0.5, or to -0.5, or to 1.5, and so on.
What I don't know ?

In fact my goal, as you are understand , is - when I got Input1 signal rotate A axis for to 1/4 of circle.
Please help to understand what's going on, when i try to use G-code from plugin.
Or maybe anybody advise me how to get rotations by getting input signal.