コード例 #1
0
        /// <summary>
        /// Record the parameters from a Set Valve Printhead command.
        /// </summary>
        /// <param name="printheadName"></param>
        public void RecordSetValvePrinthead(string printheadName)
        {
            _activePrintheadType = PrintheadType.Valve;

            _activePrintheadModel = new RealTimeStatusValvePrintheadModel(printheadName);

            //Notify other classes.
            OnRecordSetValvePrintheadExecuted(printheadName);
        }
コード例 #2
0
        /// <summary>
        /// Set initial values for all data.
        /// </summary>
        private void InitializeRealTimeStatusDataModel()
        {
            _xRealTimeStatusAxisModel = new RealTimeStatusAxisModel("Unset", 0, 0, 0);
            _yRealTimeStatusAxisModel = new RealTimeStatusAxisModel("Unset", 0, 0, 0);
            _zRealTimeStatusAxisModel = new RealTimeStatusAxisModel("Unset", 0, 0, 0);

            _activePrintheadType  = PrintheadType.Unset;
            _activePrintheadModel = new RealTimeStatusUnsetPrintheadModel("Unset");
        }
コード例 #3
0
        /// <summary>
        /// Record the parameters from a Set Motorized Printhead command.
        /// </summary>
        /// <param name="printheadName"></param>
        /// <param name="maxSpeed"></param>
        /// <param name="acceleration"></param>
        public void RecordSetMotorizedPrinthead(string printheadName, double maxSpeed, double acceleration)
        {
            _activePrintheadType = PrintheadType.Motorized;

            MotorizedPrintheadTypeModel motorizedPrintheadTypeModel = (MotorizedPrintheadTypeModel)_printerModel.FindPrinthead(printheadName).PrintheadTypeModel;
            double mmPerStep = motorizedPrintheadTypeModel.MmPerStep;

            //Max speed is read as steps / s and acceleration is read as steps / s2.
            //These parameters are converted to this program's convention of mm / s and mm / s2.
            double convertedMaxSpeed     = maxSpeed * mmPerStep;
            double convertedAcceleration = acceleration * mmPerStep;

            _activePrintheadModel = new RealTimeStatusMotorizedPrintheadModel(printheadName, convertedMaxSpeed, convertedAcceleration);

            //Notify other classes.
            OnRecordSetMotorizedPrintheadExecuted(printheadName);
        }