Example #1
0
 /// <summary>
 /// This command temporarily sets the Tic’s maximum allowed motor deceleration in units of steps per second per 100 seconds.
 /// </summary>
 /// <param name="MaxDecel"></param>
 public void SetMaxDecel(uint MaxDecel)
 {
     WriteRegister((byte)TicCommand.SetDecelMax, BitConverter.GetBytes(MaxDecel), _timeout);
     if (SlaveTic != null)
     {
         Thread.Sleep(1);
         SlaveTic.SetMaxDecel(MaxDecel);
     }
 }
Example #2
0
 /// <summary>
 /// resets tic
 /// </summary>
 public void ResetTic()
 {
     commandQuick(TicCommand.Reset);
     if (SlaveTic != null)
     {
         Thread.Sleep(1);
         SlaveTic.ResetTic();
     }
 }
Example #3
0
 /// <summary>
 /// This command temporarily sets the Tic’s starting speed in units of steps per 10,000 seconds. This is the maximum speed at which instant acceleration and deceleration are allowed;
 /// </summary>
 /// <param name="StartingSpeed">steps per 10,000 seconds</param>
 public void SetStartingSpeed(uint StartingSpeed)
 {
     WriteRegister((byte)TicCommand.SetStartingSpeed, BitConverter.GetBytes(StartingSpeed), _timeout);
     if (SlaveTic != null)
     {
         Thread.Sleep(1);
         SlaveTic.SetStartingSpeed(StartingSpeed);
     }
 }
Example #4
0
 /// <summary>
 /// This command stops the motor abruptly without respecting the deceleration limit. Besides stopping the motor, this command also sets the “position uncertain” flag (because the abrupt stop might cause steps to be missed), sets the input state to “halt”, and clears the “input after scaling” variable.
 /// </summary>
 public void HaltAndHold()
 {
     commandQuick(TicCommand.HaltAndHold);
     if (SlaveTic != null)
     {
         Thread.Sleep(1);
         SlaveTic.HaltAndHold();
     }
 }
Example #5
0
 /// <summary>
 /// This command temporarily sets the step mode (also known as microstepping mode) of the driver on the Tic, which defines how many microsteps correspond to one full step.
 /// </summary>
 /// <param name="mode"></param>
 public void SetStepMode(TicStepMode mode)
 {
     WriteRegister((byte)TicCommand.SetStepMode, new byte[1] {
         (byte)mode
     }, _timeout);
     if (SlaveTic != null)
     {
         Thread.Sleep(1);
         SlaveTic.SetStepMode(mode);
     }
     //commandW7(TicCommand.SetStepMode, (byte)mode);
 }