Machsupport Forum

Mach Discussion => Mach SDK plugin questions and answers. => Topic started by: cncstep on June 08, 2011, 10:17:23 AM

Title: How to write home function() in the motion plugin ?
Post by: cncstep on June 08, 2011, 10:17:23 AM
how to write home function() in the motion plugin ?

Code: [Select]
extern "C" __declspec(dllexport) void Home( short axis ) ////////////////////  Called when Reset is pressed.
{
//Called when jog shoudl stop on a particular axis
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
}

Thanks !
Title: Re: How to write home function() in the motion plugin ?
Post by: cncstep on June 13, 2011, 07:13:55 AM
Hello to All !!!

Studied library for mach3 and came across a function HomeOn(int axis, int dir) , tried to use it but when you compile error is pointing to the wrong argument to an int dir. How correctly you can specify the direction of movement in this function?

i write this:

//axis   0-Xaxis,  1-Yaxis, 2-Zaxis, 3-Aaxis
//HomeOn(int axis, int dir)

TrajectoryControl->HomeOn(axis, ??????);
TrajectoryControl->GoHome;
Title: Re: How to write home function() in the motion plugin ?
Post by: cncstep on June 15, 2011, 02:42:38 PM
the problem decided to myself :) do Not understand one moment , when the hit on the trailer and rode back up to its opening is reset to zero machine coordinate the axis .. how to do it until I understand.