Esempio n. 1
0
        void SetUnits(FeedrateUnits feedrateUnits)
        {
            try
            {
                Units = feedrateUnits;
                switch (Units)
                {
                case FeedrateUnits.InverseMins:
                case FeedrateUnits.MinPerMove:
                case FeedrateUnits.SecPerMove:
                    Inverted = true;
                    break;

                case FeedrateUnits.MmPerSec:
                case FeedrateUnits.InPerSec:
                case FeedrateUnits.MmPerMin:
                case FeedrateUnits.InPerMin:
                default:
                    Inverted = false;
                    break;
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Esempio n. 2
0
        public Feedrate(FeedrateUnits units)
        {
            _units = units;
            switch (_units)
            {
            case FeedrateUnits.InvMinPerMove:
            case FeedrateUnits.SecPerMove:
                _inverted = true;
                break;

            case FeedrateUnits.MmPerSec:
            case FeedrateUnits.InPerSec:
            case FeedrateUnits.MmPerMin:
            case FeedrateUnits.InPerMin:
            default:
                _inverted = false;
                break;
            }
        }
Esempio n. 3
0
        private void LoadDefMachineSettings()
        {
            InverseFeed       = "G32";
            Rapid             = "G0";
            LinearMove        = "G01";
            FiveAxis          = "G01";
            CwArc             = "G02";
            CcwArc            = "G03";
            Delay             = "G04";
            Relative          = "G91";
            Absolute          = "G90";
            LineNumberPrefix  = "N";
            DelayAmountPrefix = "K";
            FeedratePrefix    = "F";
            EndofProg         = "M30";


            Sp                = " ";
            ComStart          = ";";
            ComEnd            = "";
            HeaderStart       = "(";
            HeaderEnd         = ",MX)";
            CommentMaxLength  = 20;
            DelayScaleFactor  = 100;
            DelayStringFormat = "N0";
            McodeFilename     = "";
            AxisNames         = new string[] { "X", "Y", "Z", "A", "B", "C" };
            ForbiddenChars    = new char[] { ' ', '/' };

            RotaryAxisPrecision = 3;
            LinearAxisPrecision = 4;
            FeedratePrecision   = 2;
            StartingLineNumber  = 100;
            LineNumberInc       = 2;
            RotaryAxisFormat    = "f" + RotaryAxisPrecision.ToString();
            FeedrateFormat      = "f" + FeedratePrecision.ToString();
            LinearAxisFormat    = "f" + LinearAxisPrecision.ToString();
            FeedrateUnits       = FeedrateUnits.InPerMin;
            InverseFeedUnits    = FeedrateUnits.InverseMins;
        }
Esempio n. 4
0
 public Feedrate()
 {
     Inverted = false;
     Value    = 0;
     Units    = FeedrateUnits.InPerMin;
 }
Esempio n. 5
0
 public Feedrate(Feedrate f)
 {
     _inverted = f.Inverted;
     _units    = f.Units;
     _value    = f.Value;
 }
Esempio n. 6
0
 public Feedrate(FeedrateUnits units)
 {
     SetUnits(units);
 }