| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 
 |  
  AnsiString asTmp = "";
 
        Form1->bPremPression = true;
        Sleep(Form1->iTpsAttente);
        while(Form1->bFinThread)
        {
          try
          {
                while(AccesDataRead(4251,0) && Form1->bFinThread)
                {
                        Form1->TimerSecu->Enabled = true;
                        Form1->iPF1 = 1;
                        if(Form1->bPremPression == true)
                        {
                                asTmp = TimeToStr(Now()) + "\r" + DateToStr(Now());
                                Form27->Series1->AddXY(Now(), AccesDataRead(4110), asTmp, clRed);
                                Form27->Series2->AddXY(Now(), AccesDataRead(4111), asTmp, clBlue);
                                Form27->Series3->AddXY(Now(), AccesDataRead(4112), asTmp, clYellow);
                                Form1->bPremPression = false;
                        }
                        else
                        {
                                Form27->Series1->AddXY(Now(), AccesDataRead(4110), TimeToStr(Now()), clRed);
                                Form27->Series2->AddXY(Now(), AccesDataRead(4111), TimeToStr(Now()), clBlue);
                                Form27->Series3->AddXY(Now(), AccesDataRead(4112), TimeToStr(Now()), clYellow);
                        }
                        Sleep(Form1->iEchantillonage);
                }
                Form27->LabelTrace->Visible = false;
                Form1->TimerSecu->Enabled = false;
                Form1->iTimerSecu = 0;
                Form1->bPremPression = true;
                Sleep(Form1->iTpsSleepThreadSecond);
                Form1->iPF1 = 0;
          }
          catch(...)
          {
                Form1->iListAla->Insert(0, "ERREUR PENDANT LE THREAD PF1");
                Form1->iListAla->SaveToFile(Form1->RepAppli+"ListAlarme.txt");
                ShowMessage("PF1");
          }
        }
} | 
Partager