Beispiel #1
0
 private void _shuttle_JogMove(object sender, JogEventArgs e)
 {
     //Convert JogEventArgs data into text...
     textBox1.Text = Convert.ToString(e.Device);
     textBox2.Text = Convert.ToString(e.DeviceNumber);
     textBox3.Text = Convert.ToString("JOG MOVED - Direction: " + e.Direction);
 }
Beispiel #2
0
        private void virtualJoystickZ_JoyStickEvent(object sender, JogEventArgs e)
        {
            int    indexZ = Math.Abs(e.JogPosY);
            int    dirZ   = Math.Sign(e.JogPosY);
            int    speed  = (int)joystickZSpeed[indexZ];
            String strZ   = gcode.frmtNum(joystickZStep[indexZ] * dirZ);

            if (speed > 0)
            {
                String s = String.Format("G91 Z{0} F{1}", strZ, speed).Replace(',', '.');
                sendCommand(s, true);
            }
        }