Ejemplo n.º 1
0
        /// <summary>
        /// 把传感器的信息转换到频谱的位置信息
        /// </summary>
        private void ParseTdPosToPosition(TdPos pos)
        {
            var posStr = pos.ToString();

            if (posStr.Contains("_Pump"))
            {
                Pos.CompPos = Position.Component.Pump;
            }
            else if (posStr.Contains("_Motor"))
            {
                Pos.CompPos = Position.Component.Motor;
            }

            if (posStr.Contains("_X"))
            {
                Pos.DirectionPos = Position.Direction.X;
            }
            else if (posStr.Contains("_Y"))
            {
                Pos.DirectionPos = Position.Direction.Y;
            }
            else if (posStr.Contains("_Z"))
            {
                Pos.DirectionPos = Position.Direction.Z;
            }

            if (posStr.Contains("_Drived"))
            {
                Pos.DriverPos = Position.Driver.In;
            }
            else if (posStr.Contains("_NonDrived"))
            {
                Pos.DriverPos = Position.Driver.Out;
            }
        }
Ejemplo n.º 2
0
        public Spectrum(double speed, IEnumerable <double> data, TdPos tdPos)
        {
            Speed           = speed;
            Data            = data.ToArray();
            AxisX.LineCount = Data.Length;

            ParseTdPosToPosition(tdPos);
            SetFeatures();
            SetPeakDots();
            SetMainVibra();
        }