Beispiel #1
0
        private void BreakMotor(Byte Port)
        {
            wclWeDoMotor Motor = GetMotor(Port);

            if (Motor != null)
            {
                Int32 Res = Motor.Brake();
                if (Res != wclErrors.WCL_E_SUCCESS)
                {
                    MessageBox.Show("Brake failed; 0x" + Res.ToString("X8"));
                }
            }
        }
Beispiel #2
0
 private void btBrake2_Click(object sender, EventArgs e)
 {
     if (FMotor2 == null)
     {
         MessageBox.Show("Device is not attached");
     }
     else
     {
         Int32 Res = FMotor2.Brake();
         if (Res != wclErrors.WCL_E_SUCCESS)
         {
             MessageBox.Show("Brake failed; 0x" + Res.ToString("X8"));
         }
     }
 }