예제 #1
0
        private void InitStage()
        {
            m_pETETCStage   = new CETETCStage();
            m_ETETC         = new CETETC();
            m_ETProjectInfo = new CETProjectInfo();
            m_nLinkStatus   = 0;
            m_pETETCStage.m_tmStartSamplesTime = DateTime.Now;
            //strTemp = m_ETETC.m_nSampleRate.ToString(); //沒作用?

            if (File.Exists(IniName))
            {
                IConfigSource mini = new IniConfigSource(IniName);
                m_pETETCStage.m_nSampleRate   = mini.Configs["ETC"].GetInt("SampleRate", 1);
                m_pETETCStage.m_nTempUnit     = mini.Configs["ETC"].GetInt("TempUnit", 0);
                m_pETETCStage.m_nTimeUnit     = mini.Configs["ETC"].GetInt("TimeUnit", 0);
                m_pETETCStage.m_strManager[0] = mini.Configs["ETC"].GetString("Manager", "50");
                m_pETETCStage.m_strManager[1] = mini.Configs["ETC"].GetString("Manager1", "50");
                m_pETETCStage.m_strManager[2] = mini.Configs["ETC"].GetString("Manager2", "50");
            }
            else
            {
                m_pETETCStage.m_nSampleRate   = 1;
                m_pETETCStage.m_nTempUnit     = 0;
                m_pETETCStage.m_nTimeUnit     = 0;
                m_pETETCStage.m_strManager[0] = "50";
                m_pETETCStage.m_strManager[1] = "50";
                m_pETETCStage.m_strManager[2] = "50";
            }
            if (m_pETETCStage.m_strManager[0] == "")
            {
                m_pETETCStage.m_strManager[0] = "经理确认:";
            }

            if (m_pETETCStage.m_strManager[1] == "")
            {
                m_pETETCStage.m_strManager[1] = "主管审核:";
            }

            if (m_pETETCStage.m_strManager[2] == "")
            {
                m_pETETCStage.m_strManager[2] = "测试人员:";
            }
            m_ETETC.m_nSampleRate = m_pETETCStage.m_nSampleRate;

            // 主曲线初始化

            /*for (int ii = 0; ii < 12; ii++)
             * {
             *  CETChannel pETChannel = new CETChannel();
             *  pETChannel.m_strName = $"通道 {ii + 1}";
             *  m_pETETCStage.m_ETChannels.Add(pETChannel);
             * }*/
            //m_pChartSeriesLabel = NULL; //暂时MARK
            //m_pChartSeriesPoint = NULL; //暂时MARK
            m_IsTestCommand  = false;
            m_strProjectName = "";

            LoadProjectInfo();
        }
예제 #2
0
        public void CaclReflowTimeAtTemperature(CETReflowTimeAtTemperature pReflowTimeAtTemperature)
        {
            double      dSamplePeriod = (double)1.0 / CETCManagerApp.Instance.m_pETETCStage.m_nSampleRate;
            CETETCStage pETCStage     = CETCManagerApp.Instance.m_pETETCStage;

            // 到达温度时间
            pReflowTimeAtTemperature.m_tmTimeReached[0] = TimeSpan.FromSeconds(GetTimeBetweenTemp(0, pETCStage.m_ETTinCream.m_fStartTempl2) * dSamplePeriod);
            pReflowTimeAtTemperature.m_tmTimeReached[1] = TimeSpan.FromSeconds(GetTimeBetweenTemp(0, pETCStage.m_ETTinCream.m_fEndTempl2) * dSamplePeriod);
            // 温度以上时间
            pReflowTimeAtTemperature.m_tmTimeUp[0] = TimeSpan.FromSeconds(GetTimeBetweenTemp(pETCStage.m_ETTinCream.m_fStartTempl2, 300) * dSamplePeriod);
            pReflowTimeAtTemperature.m_tmTimeUp[1] = TimeSpan.FromSeconds(GetTimeBetweenTemp(pETCStage.m_ETTinCream.m_fEndTempl2, 300) * dSamplePeriod);
        }
예제 #3
0
        public void CaclReflowRisedrops(CETReflowRisedrops pRisedrops)
        {
            double      dSamplePeriod = (double)1.0 / CETCManagerApp.Instance.m_pETETCStage.m_nSampleRate;
            CETETCStage pETCStage     = CETCManagerApp.Instance.m_pETETCStage;

            // 到达温度时间
            pRisedrops.m_tmRiseTime[0] = TimeSpan.FromSeconds(GetTimeBetweenTemp(pETCStage.m_ETTinCream.m_fStartTempl1,
                                                                                 pETCStage.m_ETTinCream.m_fStartTempl2) * dSamplePeriod);
            pRisedrops.m_tmRiseTime[1] = TimeSpan.FromSeconds(GetTimeBetweenTemp(pETCStage.m_ETTinCream.m_fStartTempl2,
                                                                                 pETCStage.m_ETTinCream.m_fEndTempl2) * dSamplePeriod);
            pRisedrops.m_tmRiseTime[2] = TimeSpan.FromSeconds(GetTimeBetweenTemp(pETCStage.m_ETTinCream.m_fEndTempl2,
                                                                                 pETCStage.m_ETTinCream.m_fStartTempl3) * dSamplePeriod);
            // 温度以上时间

            pRisedrops.m_dRiseSlope[0] = GetSlopeByTemp(pETCStage.m_ETTinCream.m_fStartTempl1,
                                                        pETCStage.m_ETTinCream.m_fStartTempl2);
            pRisedrops.m_dRiseSlope[1] = GetSlopeByTemp(pETCStage.m_ETTinCream.m_fStartTempl2,
                                                        pETCStage.m_ETTinCream.m_fEndTempl2);
            pRisedrops.m_dRiseSlope[2] = GetSlopeByTemp(pETCStage.m_ETTinCream.m_fEndTempl2,
                                                        pETCStage.m_ETTinCream.m_fStartTempl3);
        }