Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge: U,Y,W axes don't work in probe commands (G38.x) #488

Open
prof7bit opened this issue Jan 28, 2021 · 1 comment
Open

Edge: U,Y,W axes don't work in probe commands (G38.x) #488

prof7bit opened this issue Jan 28, 2021 · 1 comment

Comments

@prof7bit
Copy link

g38.3 u0 f100
{"er":{"fb":101.03,"st":134,"msg":"Axis word missing - Axis is missing"}

I'm trying to emulate the broken u/w/w-axis homing with a probe command. But this does not seem to be implemented. Might this be somehow related to the broken homing?

@prof7bit
Copy link
Author

prof7bit commented Jan 28, 2021

I found the reason:

The attached patch will fix both: the probing and the homing problems for U,V,W,

Please merge.

diff --git a/g2core/cycle_probing.cpp b/g2core/cycle_probing.cpp
index 3f3db80f..f8ab9423 100644
--- a/g2core/cycle_probing.cpp
+++ b/g2core/cycle_probing.cpp
@@ -138,6 +138,7 @@ uint8_t cm_straight_probe(float target[], bool flags[], bool trip_sense, bool al
 
     // error if no axes specified
     if (!(flags[AXIS_X] | flags[AXIS_Y] | flags[AXIS_Z] |
+          flags[AXIS_U] | flags[AXIS_V] | flags[AXIS_W] |
           flags[AXIS_A] | flags[AXIS_B] | flags[AXIS_C])) {
         return(cm_alarm(STAT_AXIS_IS_MISSING, "Axis is missing"));
     }
diff --git a/g2core/util.cpp b/g2core/util.cpp
index 61f4c4b0..952bb0fe 100644
--- a/g2core/util.cpp
+++ b/g2core/util.cpp
@@ -76,6 +76,9 @@ float get_axis_vector_length(const float a[], const float b[])
     return (sqrt(square(a[AXIS_X] - b[AXIS_X]) +
                  square(a[AXIS_Y] - b[AXIS_Y]) +
                  square(a[AXIS_Z] - b[AXIS_Z]) +
+                 square(a[AXIS_U] - b[AXIS_U]) +
+                 square(a[AXIS_V] - b[AXIS_V]) +
+                 square(a[AXIS_W] - b[AXIS_W]) +
                  square(a[AXIS_A] - b[AXIS_A]) +
                  square(a[AXIS_B] - b[AXIS_B]) +
                  square(a[AXIS_C] - b[AXIS_C])));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant