Example #1
0
 /// <summary>
 /// This function sends stop to device on all ports on all bricks
 /// </summary>
 /// <param name="portFlag">A flag indicating the ports to target. Eg PortNames.A|PortNames.C</param>
 /// <param name="brake">Specify break level, [0: Float, 1: Break]</param>
 public async Task Stop(OutputPortFlag portFlag = OutputPortFlag.All, Brake brake = Brake.Float)
 {
     for (int i = 0; i < 4; i++)
     {
         await OutputMethods.Stop(Brick.Socket, (ChainLayer)i, portFlag, brake);
     }
 }
Example #2
0
        internal BrakeViewModel(Brake brake)
        {
            CultureInfo culture = CultureInfo.InvariantCulture;

            BrakeType = brake
                        .ToReactivePropertyAsSynchronized(x => x.BrakeType)
                        .AddTo(disposable);

            LocoBrakeType = brake
                            .ToReactivePropertyAsSynchronized(x => x.LocoBrakeType)
                            .AddTo(disposable);

            BrakeControlSystem = brake
                                 .ToReactivePropertyAsSynchronized(x => x.BrakeControlSystem)
                                 .AddTo(disposable);

            BrakeControlSpeed = brake
                                .ToReactivePropertyAsSynchronized(
                x => x.BrakeControlSpeed,
                x => x.ToString(culture),
                x => double.Parse(x, NumberStyles.Float, culture),
                ignoreValidationErrorValue: true
                )
                                .SetValidateNotifyError(x =>
            {
                double result;
                string message;

                Utilities.TryParse(x, NumberRange.NonNegative, out result, out message);

                return(message);
            })
                                .AddTo(disposable);
        }
Example #3
0
 public void onStart(float brake_force)
 {
     brake = new Brake(this, brake_force, car.accessories.hasABS);
     currentengineTorquePercen             = engineTorquePercent;
     diffrenceForwardFrictionEextremumSlip = wheelCollider.forwardFriction.asymptoteSlip
                                             - wheelCollider.forwardFriction.extremumSlip;
     // wheelCollider.ConfigureVehicleSubsteps(100, 30, 100);
 }
Example #4
0
        public ActionResult DeleteConfirmed(int id)
        {
            Brake brake = db.Brakes.Find(id);

            db.Brakes.Remove(brake);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #5
0
        /// <summary>
        ///     車を動かせる状態にする。
        /// </summary>
        public void Start()
        {
            // ブレーキを解除する。
            Brake.Off();

            // エンジンをかける。
            Engine.On();
        }
Example #6
0
        public double final_speed(double acceleration, double initial_speed, double distance)
        {
            Brake  koltuk             = new Brake();
            double final_acceleration = koltuk.final_acceleration(acceleration);

            double speed = (Math.Pow(initial_speed, 2)) + (2 * final_acceleration * distance);

            return(-speed);
        }
Example #7
0
 private static void WriteBrakeNode(XElement parent, Brake brake)
 {
     parent.Add(new XElement("Brake",
                             new XElement("BrakeType", brake.BrakeType),
                             new XElement("LocoBrakeType", brake.LocoBrakeType),
                             new XElement("BrakeControlSystem", brake.BrakeControlSystem),
                             new XElement("BrakeControlSpeed", brake.BrakeControlSpeed)
                             ));
 }
Example #8
0
 public ActionResult Edit([Bind(Include = "BrakesID,VehicleID,FrontBool,RearBool,ODOServiced,NextODO,Notes,Photo,DateTime")] Brake brake)
 {
     if (ModelState.IsValid)
     {
         db.Entry(brake).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.VehicleID = new SelectList(db.Vehicles, "VehicleID", "VehicleID", brake.VehicleID);
     return(View(brake));
 }
Example #9
0
 public void Assign(Brake brake)
 {
     if (this.Brakes.Any(x => x.Location == brake.Location) == false)
     {
         this._brakes.Add(brake);
         this._brakes = this._brakes.OrderBy(x => x.Location).ToList();
     }
     else
     {
         throw new CarAlreadyHasBrakeException(this);
     }
 }
        public void Testbrake()
        {
            Brake br = new Brake();

            br.NormalBrakeMoment               = 100;
            br.BrakeBalance                    = new MathHelper.Ratio(0.5f, 0.5f);
            InputData.UsedInputData            = new InputData(0, 0, 0, 0);
            InputData.UsedInputData.BrakePedal = 0.5f;
            br.Calculate();
            br.StoreResult();
            Assert.AreEqual(50, BrakeOutput.LastCalculation.BrakeMomentFront);
            Assert.AreEqual(50, BrakeOutput.LastCalculation.BrakeMomentRear);
        }
        /// <summary>
        /// This function enables synchonizing two motors.
        /// Synchonization should be used when motors should run as synchrone as possible,
        /// Method awaits for time to elapse and method to complete.
        /// </summary>
        /// <param name="time">Time in milliseconds, 0 = Infinite</param>
        /// <param name="speed">Speed level, [-100 – 100]</param>
        /// <param name="turnRatio">Turn ratio, [-200 - 200]
        /// 0 : Motors will run with same power
        /// 100 : One motor will run with specified power while the other will be close to zero
        /// 200: One motor will run with specified power forward while the other will run in the opposite direction at the same power level.
        /// </param>
        /// <param name="brake">Specify break level, [0: Float, 1: Break]</param>
        /// <param name="cancellationToken"></param>
        public async Task TimeSyncComplete(int time, int speed, int turnRatio = 0, Brake brake = Brake.Float, CancellationToken cancellationToken = default)
        {
            await TimeSync(time, speed, turnRatio, brake);

            if (time > 0) // can not wait for indefinite to complete
            {
                try
                {
                    await Task.Delay(time, cancellationToken);
                }
                catch (TaskCanceledException) { }
            }
        }
Example #12
0
        // GET: Brakes/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Brake brake = db.Brakes.Find(id);

            if (brake == null)
            {
                return(HttpNotFound());
            }
            return(View(brake));
        }
Example #13
0
        // GET: Brakes/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Brake brake = db.Brakes.Find(id);

            if (brake == null)
            {
                return(HttpNotFound());
            }
            ViewBag.VehicleID = new SelectList(db.Vehicles, "VehicleID", "VehicleID", brake.VehicleID);
            return(View(brake));
        }
 internal Train()
 {
     Acceleration = new Acceleration();
     Performance  = new Performance();
     Delay        = new Delay();
     Move         = new Move();
     Brake        = new Brake();
     Pressure     = new Pressure();
     Handle       = new Handle();
     Cab          = new Cab();
     Car          = new Car();
     Device       = new Device();
     MotorP1      = new Motor();
     MotorP2      = new Motor();
     MotorB1      = new Motor();
     MotorB2      = new Motor();
 }
Example #15
0
 internal Train()
 {
     this.Acceleration = new Acceleration();
     this.Performance  = new Performance();
     this.Delay        = new Delay();
     this.Move         = new Move();
     this.Brake        = new Brake();
     this.Pressure     = new Pressure();
     this.Handle       = new Handle();
     this.Cab          = new Cab();
     this.Car          = new Car();
     this.Device       = new Device();
     this.MotorP1      = new Motor();
     this.MotorP2      = new Motor();
     this.MotorB1      = new Motor();
     this.MotorB2      = new Motor();
 }
        /// <summary>
        /// controls the calculation process
        /// </summary>
        private CalculationController()
        {
            _calculationEwh      = new EventWaitHandle(false, EventResetMode.AutoReset);
            _continueThreadEwh   = new EventWaitHandle(true, EventResetMode.AutoReset);
            _threadEndedEwh      = new EventWaitHandle(false, EventResetMode.AutoReset);
            _threadInterrupedEwh = new EventWaitHandle(false, EventResetMode.AutoReset);

            Aerodynamic    = new Aerodynamic();
            Brake          = new Brake();
            Engine         = new Engine();
            GearBox        = new GearBox();
            OverallCar     = new OverallCar();
            SecondaryDrive = new SecondaryDrive();
            Steering       = new Steering();
            Suspension     = new Suspension();
            Wheels         = new Wheels();

            _workerThread = new Thread(WorkerFunction);
        }
Example #17
0
 /// <summary>
 /// This function enables specifying a full power cycle in time.
 /// RampUp specifies the power ramp up periode in milliseconds,
 /// ContinuesRun specifies the constant power period in milliseconds,
 /// RampDown specifies the power down period in milliseconds.
 /// </summary>
 /// <param name="power">Specify output power [-100 – 100]</param>
 /// <param name="timeRampUp">Time in milliseconds for ramp up</param>
 /// <param name="timeContinuesRun">Time in milliseconds for continues run</param>
 /// <param name="timeRampDown">Time in milliseconds for ramp down</param>
 /// <param name="brake">Specify break level, [0: Float, 1: Break]</param>
 public new  async Task TimePower(int power, int timeContinuesRun, int timeRampUp = 0, int timeRampDown = 0, Brake brake = Brake.Float)
 {
     await base.TimePower(power, timeContinuesRun, timeRampUp, timeRampDown, brake);
 }
Example #18
0
    public void followPath(Steering steering, Seek seekBehaviour, Arrival arrivalBehaviour, Brake brakeBehaviour)
    {
        Vector2 next           = nextPoint();
        float   nextRadius     = (points.Count == 1) ? destRadius : steering.getSize();
        bool    arrivedAtPoint = (next - steering.getPosition()).sqrMagnitude < nextRadius * nextRadius;

        arrived = arrivedAtPoint && points.Count == 1;
        if (arrivedAtPoint && points.Count > 1)
        {
            points.RemoveAt(0);
            // accelerate toward the next node
            followPath(steering, seekBehaviour, arrivalBehaviour, brakeBehaviour);
        }
        else
        {
            if (Pathing.raycastGameCoordinates(steering.getPosition(), steering.getSize(), next, LayerMask.GetMask("Walls")))
            {
                // A wall is in the way. Check if the raycast would be fine from the center of the current tile.
                Vector2 currentTileCenter = Pathing.map.mapToGame(Pathing.map.gameToMap(steering.getPosition()));
                if (Pathing.raycastGameCoordinates(currentTileCenter, steering.getSize(), next, LayerMask.GetMask("Walls")))
                {
                    // The unit must have detoured and there are now walls in the way, calculate a new path.
                    points = Pathing.findPath(steering.getPosition(), goal, destRadius, steering.getSize()).points;
                }
                else
                {
                    // The unit is stuck because they are a little bit off-center.
                    points.Insert(0, currentTileCenter);
                }
            }
            // Stop after arriving.
            steering.updateWeight(brakeBehaviour, arrived ? 1f : 0f);
            // Arrival for the last point, seek for every other point
            arrivalBehaviour.setTarget(next);
            seekBehaviour.setTarget(next);
            steering.updateWeight(arrivalBehaviour, points.Count == 1 ? 1f : 0f);
            steering.updateWeight(seekBehaviour, points.Count > 1 ? 1f : 0f);
        }
    }
Example #19
0
			internal Train () {
				this.Acceleration = new Acceleration();
				this.Performance = new Performance();
				this.Delay = new Delay();
				this.Move = new Move();
				this.Brake = new Brake();
				this.Pressure = new Pressure();
				this.Handle = new Handle();
				this.Cab = new Cab();
				this.Car = new Car();
				this.Device = new Device();
				this.MotorP1 = new Motor();
				this.MotorP2 = new Motor();
				this.MotorB1 = new Motor();
				this.MotorB2 = new Motor();
			}
Example #20
0
        /// <summary>
        /// This function sends stop to all individual output ports
        /// </summary>
        /// <param name="socket">socket for executing command to brick</param>
        /// <param name="layer">Specify chain layer number [0 - 3]</param>
        /// <param name="ports">Output bit field [0x00 – 0x0F]</param>
        /// <param name="brake">Specify break level [0: Float, 1: Break]</param>
        /// <remarks>
        /// Instruction opOutput_Stop (LAYER, NOS, BRAKE)
        /// Opcode 0xA3
        /// Arguments (Data8) LAYER – Specify chain layer number [0 - 3]
        /// (Data8) NOS – Output bit field [0x00 – 0x0F]
        /// (Data8) BRAKE – Specify break level [0: Float, 1: Break]
        /// Dispatch status Unchanged
        /// Description This function enables restting the tacho count for the individual output ports
        /// </remarks>
        public static async Task Stop(ISocket socket, ChainLayer layer, OutputPortFlag ports, Brake brake = Brake.Float, bool requireReply = true)
        {
            Command cmd = null;

            using (CommandBuilder cb = new CommandBuilder(requireReply ? CommandType.DIRECT_COMMAND_REPLY : CommandType.DIRECT_COMMAND_NO_REPLY))
            {
                cb.OpCode(OP.opOUTPUT_STOP);
                cb.SHORT((int)layer);
                cb.SHORT((int)ports);
                cb.PAR8((byte)brake);
                cmd = cb.ToCommand();
            }
            await socket.Execute(cmd);
        }
Example #21
0
        /// <summary>
        /// This function enables synchonizing two motors.
        /// Synchonization should be used when motors should run as synchrone as possible,
        /// </summary>
        /// <param name="socket">socket for executing command to brick</param>
        /// <param name="layer">Specify chain layer number [0 - 3]</param>
        /// <param name="ports">Output bit field [0x00 – 0x0F]</param>
        /// <param name="speed">Speed level, [-100 – 100]</param>
        /// <param name="turnRatio">Turn ratio, [-200 - 200]
        /// 0 : Motor will run with same power
        /// 100 : One motor will run with specified power while the other will be close to zero
        /// 200: One motor will run with specified power forward while the other will run in the opposite direction at the same power level.
        /// </param>
        /// <param name="time">Time in milliseconds, 0 = Infinite</param>
        /// <param name="brake">Specify break level, [0: Float, 1: Break]</param>
        /// <remarks>
        /// Instruction opOutput_Time_Sync (LAYER, NOS, SPEED, TURN, STEP, BRAKE)
        /// Opcode 0xB1
        /// Arguments (Data8) LAYER – Specify chain layer number [0 - 3]
        /// (Data8) NOS – Output bit field [0x00 – 0x0F]
        /// (Data8) SPEED – Power level, [-100 – 100]
        /// (Data16) TURN – Turn ratio, [-200 - 200], see documentation below
        /// (Data32) TIME – Time in milliseconds, 0 = Infinite
        /// (Data8) BRAKE - Specify break level [0: Float, 1: Break]
        /// Dispatch status Unchanged
        /// Description This function enables synchonizing two motors. Synchonization should be used when motors should run as synchrone as possible,
        /// </remarks>
        public static async Task TimeSync(ISocket socket, ChainLayer layer, OutputPortFlag ports, int speed, int turnRatio, int time, Brake brake = Brake.Float, bool requireReply = true)
        {
            if (time < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(time), ">=0");
            }
            if (speed < -100 || speed > 100)
            {
                throw new ArgumentOutOfRangeException(nameof(speed), "[-100,100]");
            }
            if (turnRatio < -200 || turnRatio > 200)
            {
                throw new ArgumentOutOfRangeException(nameof(turnRatio), "[-200,200]");
            }

            Command cmd = null;

            using (CommandBuilder cb = new CommandBuilder(requireReply ? CommandType.DIRECT_COMMAND_REPLY : CommandType.DIRECT_COMMAND_NO_REPLY))
            {
                cb.OpCode(OP.opOUTPUT_TIME_SYNC);
                cb.SHORT((int)layer);
                cb.SHORT((int)ports);
                cb.PAR8(speed);
                cb.PAR16(turnRatio);
                cb.PAR32(time);
                cb.PAR8((byte)brake);
                cmd = cb.ToCommand();
            }
            await socket.Execute(cmd);
        }
Example #22
0
        /// <summary>
        /// This function enables specifying a full motor power cycle in tacho counts.
        /// The system will automatically adjust the power level to the motor to keep the specified output speed.
        /// RampDown specifies the power ramp up periode in tacho count,
        /// ContinuesRun specifies the constant power period in tacho counts,
        /// RampUp specifies the power down period in tacho counts.
        /// </summary>
        /// <param name="socket">socket for executing command to brick</param>
        /// <param name="layer">Specify chain layer number [0 - 3]</param>
        /// <param name="ports">Output bit field [0x00 – 0x0F]</param>
        /// <param name="speed">Specify output speed [-100 – 100]</param>
        /// <param name="tachoPulsesRampUp">Tacho pulses during ramp up</param>
        /// <param name="tachoPulsesContinuesRun">Tacho pulses during continues run</param>
        /// <param name="tachoPulsesRampDown">Tacho pulses during ramp down</param>
        /// <param name="brake">Specify break level, [0: Float, 1: Break]</param>
        /// <remarks>
        /// Instruction opOutput_Step_Speed (LAYER, NOS, SPEED, STEP1, STEP2, STEP3, BRAKE)
        /// Opcode 0xAE
        /// Arguments (Data8) LAYER – Specify chain layer number, [0 - 3]
        /// (Data8) NOS – Output bit field, [0x00 – 0x0F]
        /// (Data8) SPEED – Power level, [-100 - 100]
        /// (Data32) STEP1 – Tacho pulses during ramp up
        /// (Data32) STEP2 – Tacho pulses during continues run
        /// (Data32) STEP3 – Tacho pulses during ramp down
        /// (Data8) BRAKE - Specify break level, [0: Float, 1: Break]
        /// Dispatch status Unchanged
        /// Description This function enables specifying a full motor power cycle in tacho counts. The system will automatically adjust the power level to the motor to keep the specified output speed. Step1 specifies the power ramp up periode in tacho count, Step2 specifies the constant power period in tacho counts, Step 3 specifies the power down period in tacho counts.
        /// </remarks>
        public static async Task StepSpeed(ISocket socket, ChainLayer layer, OutputPortFlag ports, int speed, int tachoPulsesRampUp, int tachoPulsesContinuesRun, int tachoPulsesRampDown, Brake brake = Brake.Float, bool requireReply = true)
        {
            if (speed < -100 || speed > 100)
            {
                throw new ArgumentOutOfRangeException(nameof(speed), "[-100,100]");
            }
            if (tachoPulsesContinuesRun < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(tachoPulsesContinuesRun), ">=0");
            }
            if (tachoPulsesRampUp < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(tachoPulsesRampUp), ">=0");
            }
            if (tachoPulsesRampDown < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(tachoPulsesRampDown), ">=0");
            }

            Command cmd = null;

            using (CommandBuilder cb = new CommandBuilder(requireReply ? CommandType.DIRECT_COMMAND_REPLY : CommandType.DIRECT_COMMAND_NO_REPLY))
            {
                cb.OpCode(OP.opOUTPUT_STEP_SPEED);
                cb.PAR8((int)layer);
                cb.PAR8((int)ports);
                cb.PAR8(speed);
                cb.PAR32((uint)tachoPulsesRampUp);
                cb.PAR32((uint)tachoPulsesContinuesRun);
                cb.PAR32((uint)tachoPulsesRampDown);
                cb.PAR8((byte)brake);
                cmd = cb.ToCommand();
            }
            await socket.Execute(cmd);
        }
Example #23
0
        /// <summary>
        /// This function enables specifying a full motor power cycle in time.
        /// RampUp specifies the power ramp up periode in milliseconds,
        /// ContinuesRun specifies the constant power period in milliseconds,
        /// RampDown specifies the power down period in milliseconds.
        /// </summary>
        /// <param name="socket">socket for executing command to brick</param>
        /// <param name="layer">Specify chain layer number [0 - 3]</param>
        /// <param name="ports">Output bit field [0x00 – 0x0F]</param>
        /// <param name="power">Specify output power [-100 – 100]</param>
        /// <param name="timeRampUp">Time in milliseconds for ramp up</param>
        /// <param name="timeContinuesRun">Time in milliseconds for continues run</param>
        /// <param name="timeRampDown">Time in milliseconds for ramp down</param>
        /// <param name="brake">Specify break level, [0: Float, 1: Break]</param>
        /// <remarks>
        /// Instruction opOutput_Time_Power (LAYER, NOS, POWER, STEP1, STEP2, STEP3, BRAKE)
        /// Opcode 0xAD
        /// Arguments (Data8) LAYER – Specify chain layer number [0 - 3]
        /// (Data8) NOS – Output bit field [0x00 – 0x0F]
        /// (Data8) POWER – Power level, [-100 – 100]
        /// (Data32) STEP1 – Time in milliseconds for ramp up
        /// (Data32) STEP2 – Time in milliseconds for continues run
        /// (Data32) STEP3 – Time in milliseconds for ramp down
        /// (Data8) BRAKE - Specify break level [0: Float, 1: Break]
        /// Dispatch status Unchanged
        /// Description This function enables specifying a full motor power cycle in time. Step1 specifies the power ramp up periode in milliseconds, Step2 specifies the constant power period in milliseconds, Step 3 specifies the power down period in milliseconds.
        /// </remarks>
        public static async Task TimePower(ISocket socket, ChainLayer layer, OutputPortFlag ports, int power, int timeRampUp, int timeContinuesRun, int timeRampDown, Brake brake = Brake.Float, bool requireReply = true)
        {
            if (power < -100 || power > 100)
            {
                throw new ArgumentOutOfRangeException(nameof(power), "[-100,100]");
            }
            if (timeContinuesRun < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(timeContinuesRun), ">=0");
            }
            if (timeRampUp < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(timeRampUp), ">=0");
            }
            if (timeRampDown < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(timeRampDown), ">=0");
            }

            Command cmd = null;

            using (CommandBuilder cb = new CommandBuilder(requireReply ? CommandType.DIRECT_COMMAND_REPLY : CommandType.DIRECT_COMMAND_NO_REPLY))
            {
                cb.OpCode(OP.opOUTPUT_TIME_POWER);
                cb.SHORT((int)layer);
                cb.SHORT((int)ports);
                cb.PAR8(power);
                cb.PAR32(timeRampUp);
                cb.PAR32(timeContinuesRun);
                cb.PAR32(timeRampDown);
                cb.PAR8((byte)brake);
                cmd = cb.ToCommand();
            }
            await socket.Execute(cmd);
        }
Example #24
0
 public Car(Engine engine, Handle handle, Brake brake)
 {
     Engine = engine;
     Handle = handle;
     Brake  = brake;
 }
Example #25
0
 /// <summary>
 ///     車を止める。
 /// </summary>
 public void Stop()
 {
     Brake.On();
     Engine.Off();
 }
Example #26
0
 public void Add(Brake brake)
 {
     m_brakes.Add(brake);
 }
Example #27
0
 /// <summary>
 /// This function enables specifying a full power cycle in time.
 /// The system will automatically adjust the power level to the device to keep the specified output speed.
 /// RampUp specifies the power ramp up periode in milliseconds,
 /// ContinuesRun specifies the constant speed period in milliseconds,
 /// RampDown specifies the power down period in milliseconds.
 /// </summary>
 /// <param name="speed">Specify output speed [-100 – 100]</param>
 /// <param name="timeRampUp">Time in milliseconds for ramp up</param>
 /// <param name="timeContinuesRun">Time in milliseconds for continues run</param>
 /// <param name="timeRampDown">Time in milliseconds for ramp down</param>
 /// <param name="brake">Specify break level, [0: Float, 1: Break]</param>
 protected async Task TimeSpeed(int speed, int timeContinuesRun, int timeRampUp = 0, int timeRampDown = 0, Brake brake = Brake.Float)
 {
     await OutputMethods.TimeSpeed(Socket, Layer, PortFlag, speed, timeRampUp, timeContinuesRun, timeRampDown, brake);
 }
Example #28
0
 /// <summary>
 /// This function sends stop to motor
 /// </summary>
 /// <param name="brake">Specify break level, [0: Float, 1: Break]</param>
 public new async Task Stop(Brake brake = Brake.Float)
 {
     await base.Stop(brake);
 }
Example #29
0
 /// <summary>
 /// This function enables specifying a full motor power cycle in time.
 /// The system will automatically adjust the power level to the motor to keep the specified output speed.
 /// RampUp specifies the power ramp up periode in milliseconds,
 /// ContinuesRun specifies the constant speed period in milliseconds,
 /// RampDown specifies the power down period in milliseconds.
 /// </summary>
 /// <param name="speed">Specify output speed [-100 – 100]</param>
 /// <param name="timeRampUp">Time in milliseconds for ramp up</param>
 /// <param name="timeContinuesRun">Time in milliseconds for continues run</param>
 /// <param name="timeRampDown">Time in milliseconds for ramp down</param>
 /// <param name="brake">Specify break level, [0: Float, 1: Break]</param>
 public new async Task TimeSpeed(int speed, int timeContinuesRun, int timeRampUp = 0, int timeRampDown = 0, Brake brake = Brake.Float)
 {
     Speed = speed;
     await base.TimeSpeed(speed, timeContinuesRun, timeRampUp, timeRampDown, brake);
 }
Example #30
0
 /// <summary>
 /// This function enables specifying a full power cycle in tacho counts.
 /// The system will automatically adjust the power level to the motor to keep the specified output speed.
 /// RampDown specifies the power ramp up periode in tacho count,
 /// ContinuesRun specifies the constant power period in tacho counts,
 /// RampUp specifies the power down period in tacho counts.
 /// </summary>
 /// <param name="speed">Specify output speed [-100 – 100]</param>
 /// <param name="tachoPulsesRampUp">Tacho pulses during ramp up</param>
 /// <param name="tachoPulsesContinuesRun">Tacho pulses during continues run</param>
 /// <param name="tachoPulsesRampDown">Tacho pulses during ramp down</param>
 /// <param name="brake">Specify break level, [0: Float, 1: Break]</param>
 public new async Task StepSpeed(int speed, int tachoPulsesContinuesRun, int tachoPulsesRampUp = 0, int tachoPulsesRampDown = 0, Brake brake = Brake.Float)
 {
     Speed = speed;
     await base.StepSpeed(speed, tachoPulsesContinuesRun, tachoPulsesRampUp, tachoPulsesRampDown, brake);
 }
Example #31
0
 /// <summary>
 /// This function enables specifying a full power cycle in tacho counts.
 /// RampUp specifies the power ramp up periode in tacho count,
 /// ContinuesRun specifies the constant power period in tacho counts,
 /// RampDown specifies the power down period in tacho counts.
 /// </summary>
 /// <param name="power">Specify output power [-100 – 100]</param>
 /// <param name="tachoPulsesContinuesRun">Tacho pulses during continues run</param>
 /// <param name="tachoPulsesRampUp">Tacho pulses during ramp up</param>
 /// <param name="tachoPulsesRampDown">Tacho pulses during ramp down</param>
 /// <param name="brake">Specify break level, [0: Float, 1: Break]</param>
 public new async Task StepPower(int power, int tachoPulsesContinuesRun, int tachoPulsesRampUp = 0, int tachoPulsesRampDown = 0, Brake brake = Brake.Float)
 {
     await base.StepPower(power, tachoPulsesContinuesRun, tachoPulsesRampUp, tachoPulsesRampDown, brake);
 }