Hello Guest it is March 28, 2024, 12:36:23 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Tolp2

Pages: 1
1
Mach SDK plugin questions and answers. / Jogging from Plugin
« on: February 13, 2017, 03:40:41 AM »
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.

2
Mach4 General Discussion / Home offset
« on: November 01, 2016, 05:38:43 PM »
Using a Pokeys57CNC I'm trying to figure out the homing sequence. For the Z-axis the home switch is located 40 mm from Z--, therefore I put in home offset 40 mm. When the home switch is tripped:
  • the Z-coordinate is set to 40 mm (actual value is 39.something), due to deceleration the axis does not stop exactly at the limit switch)
  • then it continues with homing the Y and Z axis.

I would expect that the Z-axis would be moved to Z = 0 before homing the Y- and Z-axis. Homing with the Z-axis this low might lead to damage to any tool if the machine gets dereferenced with a workpiece inside. In this behavior standard, or did I miss an option?

Furthermore: my X-axis and Y-axis do not have homing sensors yet. Therefore I selected for these axis 'home in place'. The homing cycle is never finished (no messagebox pops up) and Mach4 is unresponsive (can not jog). Why does the homing sequence not end, or why does the PLC-script not resume. Is this a mistake in the setup of the homing sequence or parameters in either MAch4 or the Pokeys plugin, or is this due to the standard Homing script with the 'coroutine.yield()' statement?


Hope you can provide some guidance. Many thanks in advance.

Pages: 1