Dynomotion

Group: DynoMotion Message: 10083 From: swarbrick_jon Date: 9/1/2014
Subject: MyManualToolChange.c

I am really struggling to understand how I am supposed to make a move and ask for user input in a c program.


I have M6 calling a program, and if that is run stand alone - I can "Move(2,-2000)" and use a question box to get user interaction in KMotionCNC - however the Move does not happen if M6 is called from within a G-Code program, I have also passed G0 Z1000 with "MDI" but again that does not operate if G-Code is running.


I see that there are commands insert into the movement buffer like LinHex1 but I am not sure what I need to #include to get these - and if that is the right direction to be trying?


any advice happily received,


Jon


Group: DynoMotion Message: 10088 From: Tom Kerekes Date: 9/1/2014
Subject: Re: MyManualToolChange.c
Hi Jon,

An M6 calling a User C program which executes a Move(2,-2000) should cause the Z axis to move.  Are you configuring in KMotionCNC | Tool Setup for M6 to Exec/Wait/Sync ?  You must hold off the Interpreter before it continues on generating subsequent Z motions until after the Motion caused by the C program completes.  Also the C Program should wait for the Z motion to complete before terminating with a wait loop such as:

while (!CheckDone(2)) ;  // wait for Z motion to complet

HTH
Regards
TK   

Group: DynoMotion Message: 10103 From: swarbrick_jon Date: 9/2/2014
Subject: Re: MyManualToolChange.c
Thanks Tom that's perfect :)