Machsupport Forum

Mach Discussion => Mach SDK plugin questions and answers. => Topic started by: Tomas on December 04, 2014, 05:03:02 PM

Title: emulating arrow key Jogging from plugin
Post by: Tomas on December 04, 2014, 05:03:02 PM
Hi,

  I'm trying to emulate the arrow key Jogging from plugin.  When I get a mouse down I want to start, and stop when released.

in my mouse down I'm doing:
Quote
      Engine->Axis[ m_Axis ].MaxVelocity = (Some Velocity)
      Engine->Axis[ m_Axis ].Acceleration = MainPlanner->Accs[  m_Axis ];
      Engine->Axis[ m_Axis ].MasterVelocity = MainPlanner->Vels[  m_Axis ];
      Engine->Axis[ m_Axis ].Dec = false;
      Engine->Axis[ m_Axis ].Jogging = true;
      Engine->Axis[ m_Axis ].JoggDir = m_Dir;
      Code("DOJOG");

and in mouse up
Quote
     Code("ENDJOG");

  But I'm getting no movement. Any suggestions to what I'm missing?

Thanks,
Tomas.