예제 #1
0
 private void EnableBtn_Click(object sender, System.EventArgs e)
 {
     if (!axis.IsHomed)
     {
         try
         {
             axis.HomeStart();
             EnableBtn.Text = "Toggle Servo";
         }
         catch (System.Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
     else
     {
         try
         {
             axis.Enable(!axis.IsEnabled);
         }
         catch (System.Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
 }
예제 #2
0
 private void btnHome_Click(object sender, EventArgs e)
 {
     if (axis != null)
     {
         try
         {
             axis.HomeStart();
             checkHomedStatus = true;
             homeStart        = DateTime.Now;
             DisplayStatus("Home started");
         }
         catch (Exception ex)
         {
             DisplayError("Home error: " + ex.Message);
         }
     }
 }