All,
both using Mach3 and Mach4. In Mach4 there is a demo where one can use the mouse trakcball to jog an axis. I was looking forward to write a plugin which does the same for Mach3, just to get more familiarized with writing plug-ins. Based on the example of the Joystick which is provided by the SDK (using Mach3 Plugin Wizard), I'm trying to perform a jog by using the following code:
// Setting the parameters for the jog
Engine->Axis[ XJoyAxis].JoggDir = 0;
Engine->Axis[ XJoyAxis].MaxVelocity = (int) (MaxX );
Engine->Axis[ XJoyAxis].Acceleration = AccSecX;
Engine->Axis[ XJoyAxis].MasterVelocity = VelMaxX;
//Starting the jog
Engine->Axis[ XJoyAxis].Dec = false;
Engine->Axis[ XJoyAxis].Jogging = true;
I also tried to narrow down the mistake by supplying hard-coded valuies for velocity and accelaration, but no avail:
// Setting the parameters for the jog
Engine->Axis[ XJoyAxis].JoggDir = 0;
Engine->Axis[ XJoyAxis].MaxVelocity = 10000;
Engine->Axis[ XJoyAxis].Acceleration = 1000;
Engine->Axis[ XJoyAxis].MasterVelocity = 100000;
//Starting the jog
Engine->Axis[ XJoyAxis].Dec = false;
Engine->Axis[ XJoyAxis].Jogging = true
What am I missing in this setup. Should there be an option i Engine which should be set (the term Jogging is used on multiple objects in the Mach includes)...
Hope somebody can put me on the right track here.