Ejemplo n.º 1
0
        private void InitializeDataVerticalMark()
        {
            m_dataVerticalMark.Clear();

            for (int i = 0; i <= DataPoints - 1; i++)
            {
                DataSerie objDataSerie = new DataSerie();
                objDataSerie.Value = 1000;
                objDataSerie.Time  = i;
                m_dataVerticalMark.Add(objDataSerie);
            }
        }
Ejemplo n.º 2
0
        public void InitializeDataProfileAirFlow(double[] pointsProfileAirFlow)
        {
            m_dataProfileAirFlow.Clear();

            for (int i = 0; i <= DataPoints - 1; i++)
            {
                DataSerie objDataSerie = new DataSerie();
                objDataSerie.Value = pointsProfileAirFlow[i] / 10;
                objDataSerie.Time  = i;
                m_dataProfileAirFlow.Add(objDataSerie);
            }
        }
Ejemplo n.º 3
0
        private void InitializeDataAirFlow()
        {
            m_dataAirFlow.Clear();

            for (int i = 0; i <= DataPoints - 1; i++)
            {
                DataSerie objDataSerie = new DataSerie();
                objDataSerie.Value = 0;
                objDataSerie.Time  = i;
                m_dataAirFlow.Add(objDataSerie);
            }
        }
Ejemplo n.º 4
0
        public void InitializeDataProfileExtTCTemp(double[] pointsProfileExtTCTemp)
        {
            m_dataProfileExtTCTemp.Clear();

            for (int i = 0; i <= DataPoints - 1; i++)
            {
                DataSerie objDataSerie = new DataSerie();
                objDataSerie.Value = CTemperature.ToCelsius(System.Convert.ToInt32(pointsProfileExtTCTemp[i]));
                objDataSerie.Time  = i;
                m_dataProfileExtTCTemp.Add(objDataSerie);
            }
        }
Ejemplo n.º 5
0
        private void Tick_PrintSeries(object sender, EventArgs e)
        {
            m_jbcConnect.UpdateContinuousModeNextDataChunkAsync(m_stationID, m_queueID, 50);

            //Mientras hayan datos para leer
            while (m_jbcConnect.GetContinuousModeDataCount(m_stationID, m_queueID) > 0)
            {
                stContinuousModeData_HA continuousModeData = m_jbcConnect.GetContinuousModeNextData_HA(m_stationID, m_queueID);

                if (continuousModeData.data != null)
                {
                    //Se está pintando el profile
                    if (continuousModeData.data[0].status == ToolStatus_HA.HEATER)
                    {
                        //Es la primera muestra. Borrar series
                        if (m_toolStatus != ToolStatus_HA.HEATER)
                        {
                            m_toolStatus = ToolStatus_HA.HEATER;
                            InitializeDataHotAirTemp();
                            InitializeDataExtTCTemp();
                            InitializeDataAirFlow();
                            InitializeDataVerticalMark();
                        }

                        if (m_tickCount < DataPoints)
                        {
                            //Pintamos en la gráfica - Hot air temp
                            DataSerie dataSerieHotAirTemp = new DataSerie();
                            dataSerieHotAirTemp.Value = System.Convert.ToDouble(continuousModeData.data[0].temperature.ToCelsius());
                            dataSerieHotAirTemp.Time  = m_tickCount;
                            DataHotAirTemp.RemoveAt(0);
                            DataHotAirTemp.Add(dataSerieHotAirTemp);

                            //Pintamos en la gráfica - External TC temp
                            DataSerie dataSerieExtTCTemp = new DataSerie();
                            dataSerieExtTCTemp.Value = System.Convert.ToDouble(continuousModeData.data[0].externalTC1_Temp.ToCelsius());
                            dataSerieExtTCTemp.Time  = m_tickCount;
                            DataExtTCTemp.RemoveAt(0);
                            DataExtTCTemp.Add(dataSerieExtTCTemp);

                            //Pintamos en la gráfica - Air flow
                            DataSerie dataSerieAirFlow = new DataSerie();
                            dataSerieAirFlow.Value = System.Convert.ToDouble(continuousModeData.data[0].flow / 10); //viene en x_mil y se representa en x_cien
                            dataSerieAirFlow.Time  = m_tickCount;
                            DataAirFlow.RemoveAt(0);
                            DataAirFlow.Add(dataSerieAirFlow);

                            //Pintamos en la gráfica - Vertical mark
                            DataSerie dataSerieVerticalMark = new DataSerie();
                            dataSerieVerticalMark.Value = -1;
                            dataSerieVerticalMark.Time  = m_tickCount;
                            DataVerticalMark.RemoveAt(0);
                            DataVerticalMark.Add(dataSerieVerticalMark);

                            //Refrescamos cada medio segundo
                            if (m_tickCount % 5 == 0)
                            {
                                //Pintamos los labels
                                m_labelHotAirTemp.Text = continuousModeData.data[0].temperature.ToRoundCelsius() + "ºC";
                                m_labelExtTCTemp.Text  = continuousModeData.data[0].externalTC1_Temp.ToRoundCelsius() + "ºC";
                                m_labelAirFlow.Text    = (continuousModeData.data[0].flow / 10) + "%";

                                //Calculates time remaining
                                int timeInSeconds = System.Convert.ToInt32((DataPoints - m_tickCount) / 10);
                                int seconds       = timeInSeconds % 60;
                                var timeInMinutes = timeInSeconds / 60;
                                int minutes       = timeInMinutes % 60;

                                string sTime = minutes + "m ";
                                if (seconds < 10)
                                {
                                    sTime += "0";
                                }
                                sTime += seconds + "s";

                                m_labelStatus.Text = sTime;
                            }

                            m_tickCount++;
                        }
                    }
                    else if (continuousModeData.data[0].status == ToolStatus_HA.COOLING)
                    {
                        //Se acaba de parar de pintar el profile - Flag de bajada
                        if (m_toolStatus != ToolStatus_HA.COOLING)
                        {
                            m_toolStatus       = ToolStatus_HA.COOLING;
                            m_labelStatus.Text = "Cooling";
                            m_tickCount        = 0;
                        }
                    }
                    else if (continuousModeData.data[0].status == ToolStatus_HA.NONE)
                    {
                        if (m_toolStatus != ToolStatus_HA.NONE)
                        {
                            m_toolStatus       = ToolStatus_HA.NONE;
                            m_labelStatus.Text = "Stop";
                            m_tickCount        = 0;
                        }
                    }
                }
            }
        }