On Tue, Apr 15, 2014 at 10:21:45AM +0100, andy pugh wrote:
> Does any HAL pin indicate if the current move is a G1, G2, G3 or G0 move?
> I am wondering if such a pin would be useful for things like laser
> cutters, which could cut with g1 and  move with g0, almost
> automagically.

The TP already tracks this; sending it to a hal pin is trivial (I
did this test to try it - these debug hookups are params, but same
idea):

diff --git a/src/emc/motion/control.c b/src/emc/motion/control.c
index f6e7ac7..140d73c 100644
--- a/src/emc/motion/control.c
+++ b/src/emc/motion/control.c
@@ -1796,7 +1796,7 @@ static void output_to_hal(void)
     emcmot_hal_data->debug_float_1 = emcmotStatus->spindleRevs;
     emcmot_hal_data->debug_float_2 = emcmotStatus->spindleSpeedIn;
     emcmot_hal_data->debug_float_3 = emcmotStatus->net_spindle_scale;
-    emcmot_hal_data->debug_s32_0 = emcmotStatus->overrideLimitMask;
+    emcmot_hal_data->debug_s32_0 = emcmotStatus->motionType;
     emcmot_hal_data->debug_s32_1 = emcmotStatus->tcqlen;

You'd just have to make a new pin in emcmot_hal_data, initialize it
in init_hal_io(), and then write it in output_to_hal().

Chris

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to