public FeederMotorParameters() { this.Location = ""; this.State = default(MotorStates); this.Direction = default(MotorDirections); this.PositivePusher = default(bool); this.PositionInversion = default(bool); }
public void Set(MovementMotorParameters parameters) { this.Location = parameters.Location; this.State = parameters.State; this.Direction = parameters.Direction; this.AxialMode = parameters.AxialMode; this.CircumferentialMode = parameters.CircumferentialMode; this.CornerAxialMode = parameters.CornerAxialMode; this.LaunchAxialMode = parameters.LaunchAxialMode; }
public MovementMotorParameters() { this.Location = ""; this.State = default(MotorStates); this.Direction = default(MotorDirections); this.AxialMode = default(MovementForwardControls); ; this.CircumferentialMode = default(MovementForwardControls); ; this.CornerAxialMode = default(MovementForwardControls); ; this.LaunchAxialMode = default(MovementForwardControls); ; }
/// <summary> /// Sends data to a stepper motor daughtercard. /// </summary> /// <param name = "deviceAddr">The device address of the specific /// stepper motor daughtercard to send data to.</param> /// <param name = "motorNum">The motor number (1-4) of the motor to control.</param> /// <param name = "direction">A value from the <see cref = "MotorDirections" /> enumeration, indicating the direction (clockwise or counterclockwise) to move the motor (this ultimately depends on how the motor is wired to the card).</param> /// <param name = "numSteps">A byte, whose value (0-127) represents the number of discrete steps to command the stepper motor to move, in the indicated direction.</param> /// <param name = "stepType">A value from the <see cref = "MotorStepTypes" /> enumeration, indicating whether to move the motor in full-steps or in half-steps.</param> public void DoaSendStepperMotor(byte deviceAddr, byte motorNum, MotorDirections direction, byte numSteps, MotorStepTypes stepType) { if (motorNum < 1 || motorNum > 4) { throw new ArgumentOutOfRangeException(nameof(motorNum), "must be between 1 and 4"); } if (numSteps < 0 || numSteps > 127) { throw new ArgumentOutOfRangeException(nameof(numSteps), "must be between 0 and 127"); } if (stepType == MotorStepTypes.HalfStep) { motorNum += 4; } DoaSendRaw(deviceAddr, (byte)(motorNum - 1), ((byte)((byte)direction | numSteps))); }
public void Set(FeederMotorParameters parameters) { this.Location = parameters.Location; this.State = parameters.State; this.Direction = parameters.Direction; }