diff --git a/Notice d'utilisation des signaux_complexes_GL_V2.00.pdf b/Notice d'utilisation des signaux_complexes_GL_V2.1.pdf similarity index 71% rename from Notice d'utilisation des signaux_complexes_GL_V2.00.pdf rename to Notice d'utilisation des signaux_complexes_GL_V2.1.pdf index 212289e..f2deb04 100644 Binary files a/Notice d'utilisation des signaux_complexes_GL_V2.00.pdf and b/Notice d'utilisation des signaux_complexes_GL_V2.1.pdf differ diff --git a/UnitConfig.dcu b/UnitConfig.dcu index d275185..7e8f0b9 100644 Binary files a/UnitConfig.dcu and b/UnitConfig.dcu differ diff --git a/UnitConfig.dfm b/UnitConfig.dfm index 6dd195b..af0cd53 100644 --- a/UnitConfig.dfm +++ b/UnitConfig.dfm @@ -1,6 +1,6 @@ object FormConfig: TFormConfig - Left = 305 - Top = 330 + Left = 235 + Top = 312 Hint = 'Modifie les fichiers de configuration selon les s'#233'lections chois' + 'ies' @@ -1744,6 +1744,13 @@ object FormConfig: TFormConfig Proportional = True Visible = False end + object Label29: TLabel + Left = 144 + Top = 68 + Width = 6 + Height = 13 + Caption = #224 + end object ButtonAppliquerEtFermer: TButton Left = 384 Top = 440 @@ -1769,7 +1776,7 @@ object FormConfig: TFormConfig Top = 8 Width = 585 Height = 417 - ActivePage = TabSheetAig + ActivePage = TabSheetAct Font.Charset = DEFAULT_CHARSET Font.Color = clBackground Font.Height = -11 @@ -2433,14 +2440,14 @@ object FormConfig: TFormConfig object LabelTJD1: TLabel Left = 112 Top = 208 - Width = 28 + Width = 52 Height = 13 Caption = 'LabelTJD1' end object LabelTJD2: TLabel Left = 168 Top = 208 - Width = 28 + Width = 52 Height = 13 Caption = 'LabelTJD1' end @@ -2739,7 +2746,7 @@ object FormConfig: TFormConfig Top = 48 Width = 129 Height = 21 - ItemHeight = 13 + ItemHeight = 0 TabOrder = 1 OnChange = ComboBoxDecChange end @@ -2879,26 +2886,37 @@ object FormConfig: TFormConfig TabOrder = 0 object RadioButtonLoc: TRadioButton Left = 24 - Top = 24 + Top = 16 Width = 193 Height = 17 Caption = 'Fonction F pour locomotive' + Enabled = False TabOrder = 0 end object RadioButtonPN: TRadioButton Left = 24 - Top = 40 + Top = 48 Width = 193 Height = 17 Caption = 'Gestion de passage '#224' niveau' + Enabled = False TabOrder = 1 end + object RadioButtonAccess: TRadioButton + Left = 24 + Top = 32 + Width = 161 + Height = 17 + Caption = 'Fonction F pour accessoire' + Enabled = False + TabOrder = 2 + end end object GroupBoxAct: TGroupBox - Left = 16 - Top = 208 + Left = 8 + Top = 200 Width = 225 - Height = 129 + Height = 145 Caption = 'Actionneur fonction de locomotive ' TabOrder = 1 object LabelActionneur: TLabel @@ -2936,6 +2954,13 @@ object FormConfig: TFormConfig Height = 13 Caption = 'Tempo (ms)' end + object Label30: TLabel + Left = 168 + Top = 24 + Width = 6 + Height = 13 + Caption = #224 + end object EditAct: TEdit Left = 112 Top = 20 @@ -2952,15 +2977,15 @@ object FormConfig: TFormConfig TabOrder = 1 Text = 'EditTrain' end - object EditEtat: TEdit + object EditEtatFoncSortie: TEdit Left = 160 Top = 68 Width = 25 Height = 21 TabOrder = 2 - Text = 'EditEtat' + Text = 'EditEtatFoncSortie' end - object EditFonction: TEdit + object EditFonctionAccess: TEdit Left = 112 Top = 68 Width = 25 @@ -2976,10 +3001,26 @@ object FormConfig: TFormConfig TabOrder = 4 Text = 'EditTempo' end + object EditEtatActionneur: TEdit + Left = 184 + Top = 20 + Width = 25 + Height = 21 + TabOrder = 5 + Text = 'EditEtat' + end + object CheckRAZ: TCheckBox + Left = 48 + Top = 120 + Width = 145 + Height = 17 + Caption = 'Remise '#224' 0 apr'#232's pilotage' + TabOrder = 6 + end end object GroupBoxPN: TGroupBox - Left = 16 - Top = 104 + Left = 72 + Top = 8 Width = 225 Height = 193 Caption = 'Actionneurs gestion passage '#224' niveau' diff --git a/UnitConfig.pas b/UnitConfig.pas index 99b95e1..404cfd0 100644 --- a/UnitConfig.pas +++ b/UnitConfig.pas @@ -125,9 +125,9 @@ type EditAct: TEdit; EditTrain: TEdit; LabelTrain: TLabel; - EditEtat: TEdit; + EditEtatFoncSortie: TEdit; Labela: TLabel; - EditFonction: TEdit; + EditFonctionAccess: TEdit; LabelFonction: TLabel; EditTempo: TEdit; LabelTempo: TLabel; @@ -176,6 +176,11 @@ type Label28: TLabel; LabelTJD2: TLabel; CheckInverse: TCheckBox; + RadioButtonAccess: TRadioButton; + Label29: TLabel; + Label30: TLabel; + EditEtatActionneur: TEdit; + CheckRAZ: TCheckBox; procedure ButtonAppliquerEtFermerClick(Sender: TObject); procedure Button2Click(Sender: TObject); procedure FormActivate(Sender: TObject); @@ -1323,14 +1328,11 @@ begin LabelDetAss.visible:=false; LabelElSuiv.visible:=false; end; - end; - - - + end; end; Procedure aff_champs_act; -var i,v, ligne,etatact,erreur, adresse,fonction,tempo : integer; +var i,v, ligne,etatact,erreur, adresse,sortie,fonction,tempo,access : integer; s,s2,ss : string; trouve : bool; begin @@ -1351,10 +1353,12 @@ begin begin GroupBoxact.Visible:=false; GroupBoxPN.Top:=104; + GroupBoxPN.Left:=16; GroupBoxPN.Visible:=true; Visible:=true; RadioButtonPN.Checked:=true; RadioButtonLoc.Checked:=false; + RadioButtonAccess.Checked:=false; end; // trouver l'index dans le tableau i:=pos('PN(',s); @@ -1409,15 +1413,16 @@ begin end; end else - // actionneur fonction F locomotive + + // actionneur fonction F locomotive ou Accessoire begin with formconfig do begin GroupBoxAct.Top:=104; + GroupBoxAct.Left:=16; + GroupBoxact.Visible:=true; - GroupBoxPN.Visible:=false; - formconfig.RadioButtonPN.Checked:=false; - formconfig.RadioButtonLoc.Checked:=true; + GroupBoxPN.Visible:=false; end; // trouver l'index dans le tableau val(s,adresse,erreur); @@ -1428,20 +1433,60 @@ begin until trouve or (i>MaxTablo_act); if not(trouve) then exit; - s:=Tablo_actionneur[i].train; - etatAct:=Tablo_actionneur[i].etat ; - Adresse:=Tablo_actionneur[i].actionneur; fonction:=Tablo_actionneur[i].fonction; - s2:=Tablo_actionneur[i].train; - tempo:=tablo_actionneur[i].Tempo; - with formconfig do + Access:=Tablo_actionneur[i].accessoire; + if fonction<>0 then begin - EditAct.text:=IntToSTR(Adresse); - EditTrain.Text:=s; - editFonction.Text:=intToSTR(fonction); - editEtat.Text:=intToSTR(etatAct); - editTempo.Text:=intToSTR(tempo); - end; + etatAct:=Tablo_actionneur[i].etat ; + //etatFonc:=Tablo_actionneur[i]. + Adresse:=Tablo_actionneur[i].actionneur; + s2:=Tablo_actionneur[i].train; + tempo:=tablo_actionneur[i].Tempo; + with formconfig do + begin + CheckRaz.Visible:=false; + GroupBoxAct.Caption:='Actionneur de fonction F de locomotive'; + LabelTempo.Visible:=true; EditTempo.visible:=true; editEtatFoncSortie.visible:=false;LabelA.Visible:=false; + editEtatActionneur.Text:=IntToSTR(etatAct); + LabelFonction.caption:='Fonction'; + RadioButtonPN.Checked:=false; + RadioButtonLoc.Checked:=true; + RadioButtonAccess.Checked:=false; + EditAct.text:=IntToSTR(Adresse); + EditTrain.Text:=s2; + editFonctionAccess.Text:=intToSTR(fonction); + //editEtat.Text:=intToSTR(etatAct); + editTempo.Text:=intToSTR(tempo); + end; + end; + + if Access<>0 then + begin + etatAct:=Tablo_actionneur[i].etat ; + Adresse:=Tablo_actionneur[i].actionneur; + sortie:=Tablo_actionneur[i].sortie; + s2:=Tablo_actionneur[i].train; + tempo:=tablo_actionneur[i].Tempo; + with formconfig do + begin + GroupBoxAct.Caption:='Actionneur d''accessoire'; + CheckRaz.Visible:=true; + CheckRaz.Checked:=Tablo_actionneur[i].Raz; + LabelTempo.Visible:=false; EditTempo.visible:=false;editEtatFoncSortie.visible:=true;LabelA.Visible:=true; + LabelFonction.caption:='Accessoire'; + RadioButtonPN.Checked:=false; + RadioButtonLoc.Checked:=false; + RadioButtonAccess.Checked:=true; + EditAct.text:=IntToSTR(Adresse); + EditTrain.Text:=s2; + EditEtatActionneur.Text:=IntToSTR(etatAct); + editFonctionAccess.Text:=intToSTR(Access); + editEtatFoncSortie.Text:=intToSTR(sortie); + editTempo.Text:=intToSTR(tempo); + end; + end; + + end; ss:='Actionneur '+InttoSTr(Adresse); diff --git a/UnitDebug.dcu b/UnitDebug.dcu index 706690d..c099bb6 100644 Binary files a/UnitDebug.dcu and b/UnitDebug.dcu differ diff --git a/UnitPrinc.dcu b/UnitPrinc.dcu index 7883765..c6e9778 100644 Binary files a/UnitPrinc.dcu and b/UnitPrinc.dcu differ diff --git a/UnitPrinc.dfm b/UnitPrinc.dfm index 3469eec..eb39be6 100644 --- a/UnitPrinc.dfm +++ b/UnitPrinc.dfm @@ -18,7 +18,7 @@ object FormPrinc: TFormPrinc OnClose = FormClose OnCreate = FormCreate DesignSize = ( - 1179 + 1196 606) PixelsPerInch = 96 TextHeight = 13 @@ -667,7 +667,7 @@ object FormPrinc: TFormPrinc Visible = False end object Image2feux: TImage - Left = 776 + Left = 984 Top = 128 Width = 33 Height = 57 @@ -741,8 +741,8 @@ object FormPrinc: TFormPrinc Visible = False end object Image2Dir: TImage - Left = 696 - Top = 184 + Left = 936 + Top = 144 Width = 41 Height = 25 Picture.Data = { @@ -1221,7 +1221,7 @@ object FormPrinc: TFormPrinc end object ScrollBox1: TScrollBox Left = 631 - Top = 176 + Top = 168 Width = 537 Height = 377 HorzScrollBar.Smooth = True @@ -1317,8 +1317,8 @@ object FormPrinc: TFormPrinc end object StatusBar1: TStatusBar Left = 0 - Top = 577 - Width = 1179 + Top = 576 + Width = 1196 Height = 30 Panels = <> SimplePanel = True @@ -1459,19 +1459,12 @@ object FormPrinc: TFormPrinc object StaticText: TStaticText Left = 16 Top = 560 - Width = 1145 + Width = 14 Height = 17 Anchors = [akLeft, akRight, akBottom] Caption = 'xx' TabOrder = 7 end - object StaticText1: TStaticText - Left = 8 - Top = 560 - Width = 4 - Height = 4 - TabOrder = 8 - end object Timer1: TTimer Interval = 100 OnTimer = Timer1Timer diff --git a/UnitPrinc.pas b/UnitPrinc.pas index 89a0f52..0bb23c2 100644 --- a/UnitPrinc.pas +++ b/UnitPrinc.pas @@ -91,7 +91,6 @@ type ButtonLanceCDM: TButton; Affichefentredebug1: TMenuItem; StaticText: TStaticText; - StaticText1: TStaticText; procedure FormCreate(Sender: TObject); procedure MSCommUSBLenzComm(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); @@ -251,7 +250,9 @@ var ancien_tablo_signalCplx,EtatsignalCplx : array[0..MaxAcc] of word; MemZone : array[0..1024,0..1024] of boolean ; // mémoires de zones Tablo_actionneur : array[1..100] of record - actionneur,etat,fonction,tempo : integer; + actionneur,etat,fonction,tempo, + accessoire,sortie : integer; + Raz : boolean; train : string; end; KeyInputs: array of TInput; @@ -1418,7 +1419,7 @@ begin end; -// active ou désactive une sortie. Une adresse comporte deux sorties identifiées par "octet" +// active ou désactive une sortie par xpressnet. Une adresse comporte deux sorties identifiées par "octet" // Adresse : adresse de l'accessoire // octet : numéro (1-2) de la sortie à cette adresse // etat : false (désactivé) true (activé) @@ -3892,7 +3893,7 @@ begin Val(enregistrement,adr,erreur); if erreur=0 then begin - Affiche('section vitesse définie aig='+intToSTR(aig)+'/'+intToSTR(adr),clyellow); + //Affiche('section vitesse définie aig='+intToSTR(aig)+'/'+intToSTR(adr),clyellow); aiguillage[aig].vitesse:=adr; enregistrement:=''; virgule:=pos(',',s);if virgule=0 then virgule:=length(s)+1; @@ -4210,13 +4211,85 @@ begin configNulle:=(maxAiguillage=0) and (NbreBranches=0) and (Nbrefeux=0); if configNulle then Affiche('Fonctionnement en config nulle',ClYellow); + // raz des actionneurs + for i:=1 to maxTablo_act do + begin + Tablo_actionneur[i].train:=''; + Tablo_actionneur[i].etat:=0; + Tablo_actionneur[i].actionneur:=0; + Tablo_actionneur[i].accessoire:=0; + Tablo_actionneur[i].sortie:=0; + end; + // définition des actionneurs maxTablo_act:=1; NbrePN:=0;Nligne:=1; repeat s:=lit_ligne; + // vérifier si F ou A au 4eme champ + sa:=s; + i:=pos(',',sa); + if i>0 then delete(sa,1,i) else s:='0'; + i:=pos(',',sa); + if i>0 then delete(sa,1,i) else s:='0'; + i:=pos(',',sa); + if i>0 then delete(sa,1,i) else s:='0'; + mod_act[Nligne]:=s;inc(Nligne); - if pos('F',s)<>0 then + + if length(sa)>1 then if (sa[1]='A') then + // -----------------accessoire + begin + // 815,1,CC406526,A600,1 + i:=pos(',',s); + if i<>0 then + begin + val(copy(s,1,i-1),j,erreur); + Tablo_actionneur[maxTablo_act].actionneur:=j; + Delete(s,1,i); + i:=pos(',',s); + if i<>0 then + begin + i:=pos(',',s); + val(copy(s,1,i-1),j,erreur); + Tablo_actionneur[maxTablo_act].etat:=j; + Delete(s,1,i); + + i:=pos(',',s); + Tablo_actionneur[maxTablo_act].train:=copy(s,1,i-1); + Delete(s,1,i); + + i:=pos('A',s); + if i<>0 then + begin + Delete(s,1,1); + val(s,j,erreur); + Tablo_actionneur[maxTablo_act].Accessoire:=j; + + i:=pos(',',s); + if i<>0 then + begin + Delete(S,1,i); + val(s,j,erreur); + Tablo_actionneur[maxTablo_act].sortie:=j; + end; + + i:=pos(',',s); + if i<>0 then + begin + Delete(S,1,i); + Tablo_actionneur[maxTablo_act].RAZ:=s[1]='Z'; + inc(maxTablo_act); + end; + + end; + s:='';i:=0; + end; + end; + + end; + + if length(sa)>1 then if (sa[1]='F') then // -----------------fonction begin // 815,1,CC406526,F2,450 @@ -4258,6 +4331,7 @@ begin end; end; end; + // Passage à niveau // (815,820),(830,810)...,PN(121+,121-) // (815,809),PN(121+,121-) @@ -6376,27 +6450,45 @@ end; // traitement des évènements actionneurs procedure Event_act(adr,etat : integer;train : string); -var i,v,va,j,etatAct,Af,Ao : integer; +var i,v,va,j,etatAct,Af,Ao,Access,sortie : integer; s : string; presTrain_PN : boolean; + Ts : TAccessoire; begin // vérifier si l'actionneur en évènement a été déclaré pour réagir if AffActionneur then Affiche('Actionneur '+intToSTR(Adr)+'='+intToSTR(etat),clyellow); - - // dans le tableau des actionneurs pour fonction train + for i:=1 to maxTablo_act do begin s:=Tablo_actionneur[i].train; etatAct:=Tablo_actionneur[i].etat ; - if (Tablo_actionneur[i].actionneur=adr) and ((s=train) or (s='X')) and (etatAct=etat) then + // actionneur pour fonction train + if (Tablo_actionneur[i].actionneur=adr) and (Tablo_actionneur[i].fonction<>0) and ((s=train) or (s='X')) and (etatAct=etat) then begin Affiche('Actionneur '+intToSTR(adr)+' Train='+train+' F'+IntToSTR(Tablo_actionneur[i].fonction)+':'+intToSTR(etat),clyellow); + // exécutione la fonction F vers CDM envoie_fonction_CDM(Tablo_actionneur[i].fonction,etat,train); TempoAct:=tablo_actionneur[i].Tempo div 100; RangActCours:=i; end; + // actionneur pour accessoire + if (Tablo_actionneur[i].actionneur=adr) and (Tablo_actionneur[i].accessoire<>0) and ((s=train) or (s='X')) and (etatAct=etat) then + begin + access:=Tablo_actionneur[i].accessoire; + sortie:=Tablo_actionneur[i].sortie; + + Affiche('Actionneur '+intToSTR(adr)+' Train='+train+' Accessoire '+IntToSTR(access)+':'+intToSTR(sortie),clyellow); + // exécution la fonction accessoire vers CDM + if Tablo_actionneur[i].RAZ then Ts:=aig else Ts:=Feu; + pilote_acc(access,sortie,Ts); // sans RAZ + RangActCours:=i; + end; + + end; + + // dans le tableau des PN for i:=1 to NbrePN do begin @@ -6461,7 +6553,7 @@ begin if AffAigDet then begin //s:='Evt Det '+intToSTR(adresse)+'='+intToSTR(etat01); - s:=IntToSTR(i)+' Tick='+IntToSTR(tick)+' Det='+IntToSTR(adresse)+'='+intToSTR(etat01); + s:='Tick='+IntToSTR(tick)+' Det='+IntToSTR(adresse)+'='+intToSTR(etat01); Affiche(s,clyellow); if not(TraceListe) then AfficheDebug(s,clyellow); @@ -6474,15 +6566,18 @@ begin detecteur_chgt:=Adresse; // stocke les changements d'état des détecteurs dans le tableau chronologique - if (N_Event_tick=Max_Event_det_tick) then begin - inc(N_Event_tick); - event_det_tick[N_event_tick].tick:=tick; - event_det_tick[N_event_tick].detecteur:=Adresse; - event_det_tick[N_event_tick].etat:=etat01; - if (n_Event_tick mod 10) =0 then affiche_memoire; - // Affiche('stockage de '+intToSTR(N_event_tick)+' '+IntToSTR(Adresse)+' à '+intToSTR(etat01),clyellow); + N_Event_tick:=0; + Affiche('Raz Evts détecteurs',clLime); end; + inc(N_Event_tick); + event_det_tick[N_event_tick].tick:=tick; + event_det_tick[N_event_tick].detecteur:=Adresse; + event_det_tick[N_event_tick].etat:=etat01; + if (n_Event_tick mod 10) =0 then affiche_memoire; + // Affiche('stockage de '+intToSTR(N_event_tick)+' '+IntToSTR(Adresse)+' à '+intToSTR(etat01),clyellow); + // détection front montant if not(ancien_detecteur[Adresse]) and detecteur[Adresse] then @@ -6573,24 +6668,28 @@ begin aiguillage[adresse].position:=pos; + // ------------- stockage évènement aiguillage dans tampon event_det_tick ------------------------- - if (N_Event_tick=Max_Event_det_tick) then begin - if AffAigDet then - begin - s:='Evt Aig '+intToSTR(adresse)+'='+intToSTR(pos); - if pos=const_droit then s:=s+' droit' else s:=s+' dévié'; - if objet<>0 then s:=s+' objet='+IntToSTR(objet); - Affiche(s,clyellow); - AfficheDebug(s,clyellow); - end; - if (n_Event_tick mod 10) =0 then affiche_memoire; - inc(N_Event_tick); - event_det_tick[N_event_tick].tick:=tick; - event_det_tick[N_event_tick].aiguillage:=adresse; - event_det_tick[N_event_tick].etat:=pos; - event_det_tick[N_event_tick].objet:=objet; + N_Event_tick:=0; + Affiche('Raz Evts détecteurs',clLime); end; + s:='Evt Aig '+intToSTR(adresse)+'='+intToSTR(pos); + if pos=const_droit then s:=s+' droit' else s:=s+' dévié'; + if AffAigDet then + begin + if objet<>0 then s:=s+' objet='+IntToSTR(objet); + Affiche(s,clyellow); + AfficheDebug(s,clyellow); + end; + FormDebug.MemoEvtDet.lines.add(s) ; + if (n_Event_tick mod 10) =0 then affiche_memoire; + inc(N_Event_tick); + event_det_tick[N_event_tick].tick:=tick; + event_det_tick[N_event_tick].aiguillage:=adresse; + event_det_tick[N_event_tick].etat:=pos; + event_det_tick[N_event_tick].objet:=objet; // Mettre à jour le TCO if AvecTCO then @@ -7292,7 +7391,7 @@ begin Srvc_PosTrain:=false; Srvc_sig:=false; - AF:='Client TCP-IP CDM Rail ou USB - système LENZ - Version '+Version+' en cours 3'; + AF:='Client TCP-IP CDM Rail ou USB - système LENZ - Version '+Version; Caption:=AF; Application.onHint:=doHint; @@ -7312,7 +7411,7 @@ begin TempoAct:=0; DebugOuv:=True; - AvecInit:=false; //&&&& + AvecInit:=true; //&&&& Diffusion:=AvecInit; Application.processMessages; @@ -7409,7 +7508,7 @@ begin N_Event_tick:=0 ; // dernier index NombreImages:=0; - // TCO + // TCO if avectco then begin //créée la fenêtre TCO non modale @@ -7422,41 +7521,20 @@ begin LabelEtat.Caption:=' '; Affiche_memoire; //--------------------------------- - { + { aiguillage[20].position:=const_droit; aiguillage[21].position:=const_droit; - aiguillage[25].position:=const_devie; - aiguillage[26].position:=const_droit; - aiguillage[27].position:=const_droit; - aiguillage[28].position:=const_devie; - aiguillage[31].position:=const_devie; - - aiguillage[77].position:=const_droit; - aiguillage[78].position:=const_droit; - aiguillage[79].position:=const_droit; - aiguillage[83].position:=const_devie; - aiguillage[85].position:=const_droit; - aiguillage[87].position:=const_devie; - - aiguillage[89].position:=const_devie; - aiguillage[90].position:=const_droit; - - aiguillage[91].position:=const_droit; - aiguillage[92].position:=const_devie; - - aiguillage[105].position:=const_droit; - aiguillage[106].position:=const_devie; - aiguillage[111].position:=const_devie; + NivDebug:=3; FormDebug.show; //i:=Detecteur_suivant_El(591,1,602,1); //i:=Detecteur_suivant_El(597,1,601,1); // posent pb: - i:=Detecteur_suivant_El(598,1,599,1); - //i:=Detecteur_suivant_El(520,1,518,1); - AfficheDebug(IntToSTR(i),clyellow); - } + // i:=Detecteur_suivant_El(598,1,599,1); + i:=Detecteur_suivant_El(520,1,20,2); + // AfficheDebug(IntToSTR(i),clyellow); + } end; @@ -7654,17 +7732,17 @@ begin // evt détecteur ? if Tablo_simule[i_simule].detecteur<>0 then begin - if AffTickSimu then Affiche('Simulation '+intToSTR(I_simule)+' Tick='+IntToSTR(tick)+' det='+intToSTR(Tablo_simule[i_simule].detecteur)+'='+IntToSTR(Tablo_simule[i_simule].etat),Cyan); + s:='Simulation '+intToSTR(I_simule)+' Tick='+IntToSTR(tick)+' det='+intToSTR(Tablo_simule[i_simule].detecteur)+'='+IntToSTR(Tablo_simule[i_simule].etat); Event_Detecteur(Tablo_simule[i_simule].detecteur, Tablo_simule[i_simule].etat=1); // créer évt détecteur - // statusBar1.Hint:=' det='+intToSTR(Tablo_simule[i_simule].detecteur)+'='+IntToSTR(Tablo_simule[i_simule].etat); + StaticText.caption:=s; end; // evt aiguillage ? if Tablo_simule[i_simule].aiguillage<>0 then begin - if AffTickSimu then Affiche('Simulation '+intToSTR(I_simule)+' Tick='+IntToSTR(tick)+' aig='+intToSTR(Tablo_simule[i_simule].aiguillage)+'='+IntToSTR(Tablo_simule[i_simule].etat),Cyan); + s:='Simulation '+intToSTR(I_simule)+' Tick='+IntToSTR(tick)+' aig='+intToSTR(Tablo_simule[i_simule].aiguillage)+'='+IntToSTR(Tablo_simule[i_simule].etat); Event_Aig(Tablo_simule[i_simule].Aiguillage,Tablo_simule[i_simule].etat,0); // créer évt aiguillage - // statusBar1.Hint:=' aig='+intToSTR(Tablo_simule[i_simule].aiguillage)+'='+IntToSTR(Tablo_simule[i_simule].etat); + StaticText.caption:=s; end; end; @@ -7675,6 +7753,7 @@ begin I_Simule:=0; MsgSim:=false; Affiche('Fin de simulation',Cyan); + StaticText.caption:=''; end; end; end; @@ -8460,7 +8539,7 @@ end; procedure TFormPrinc.Codificationdesactionneurs1Click(Sender: TObject); -var i,adr,etatAct,v,aO,aF : integer; +var i,adract,etatAct,fonction,v,acc,aO,aF,accessoire,sortie : integer; s,s2 : string; begin if (maxTablo_act=0) and (NbrePN=0) then @@ -8473,28 +8552,36 @@ begin begin s:=Tablo_actionneur[i].train; etatAct:=Tablo_actionneur[i].etat ; - Adr:=Tablo_actionneur[i].actionneur; + AdrAct:=Tablo_actionneur[i].actionneur; s2:=Tablo_actionneur[i].train; + acc:=Tablo_actionneur[i].accessoire; + sortie:=Tablo_actionneur[i].sortie; + fonction:=Tablo_actionneur[i].fonction; if (s2<>'') then begin - Affiche('FonctionF Actionneur='+intToSTR(adr)+' Train='+s2+' F'+IntToSTR(Tablo_actionneur[i].fonction)+':'+intToSTR(etatAct)+ - ' Temporisation='+intToSTR(tablo_actionneur[i].Tempo),clyellow); + if fonction<>0 then + s:='FonctionF Actionneur='+intToSTR(adrAct)+':'+intToSTR(etatAct)+' Train='+s2+' F'+IntToSTR(fonction)+ + ' Temporisation='+intToSTR(tablo_actionneur[i].Tempo); + if acc<>0 then + s:='Accessoire Actionneur='+intToSTR(adrAct)+':'+intToSTR(etatAct)+' Train='+s2+' A'+IntToSTR(acc)+ + ' sortie='+intToSTR(sortie); + Affiche(s,clYellow); end; end; // dans le tableau des PN for i:=1 to NbrePN do begin - s:='PN'+intToSTR(i)+' Adresse fermeture PN='+IntToSTR(Tablo_PN[i].AdresseFerme); + s:='PN'+intToSTR(i)+' Adresse fermeture PN='+IntToSTR(Tablo_PN[i].AdresseFerme); s:=s+' Adresse ouverture PN='+IntToSTR(Tablo_PN[i].AdresseOuvre); Affiche(s,clyellow); - s:=' Commande fermeture='+intToSTR(Tablo_PN[i].commandeFerme); + s:=' Commande fermeture='+intToSTR(Tablo_PN[i].commandeFerme); s:=s+' Commande ouverture='+intToSTR(Tablo_PN[i].commandeOuvre); s:=s+' Nbre de voies='+intToSTR(Tablo_PN[i].nbVoies); Affiche(s,clyellow); for v:=1 to Tablo_PN[i].nbvoies do begin - s:=' Voie '+IntToSTR(v)+': Actionneur de fermeture='+intToSTR(Tablo_PN[i].voie[v].ActFerme); + s:=' Voie '+IntToSTR(v)+': Actionneur de fermeture='+intToSTR(Tablo_PN[i].voie[v].ActFerme); s:=s+' Actionneur d''ouverture='+intToSTR(Tablo_PN[i].voie[v].ActOuvre); Affiche(s,clyellow); end; diff --git a/UnitSimule.dcu b/UnitSimule.dcu index 4ff3823..94a823b 100644 Binary files a/UnitSimule.dcu and b/UnitSimule.dcu differ diff --git a/UnitSimule.pas b/UnitSimule.pas index 7beeaba..dd65b56 100644 --- a/UnitSimule.pas +++ b/UnitSimule.pas @@ -53,7 +53,7 @@ begin index_simule:=1; repeat readln(fte,s); - Affiche(s,clLime); + //Affiche(s,clLime); i:=pos('Tick=',s); if i<>0 then begin diff --git a/UnitTCO.dcu b/UnitTCO.dcu index fc1097a..22c02c2 100644 Binary files a/UnitTCO.dcu and b/UnitTCO.dcu differ diff --git a/verif_version.dcu b/verif_version.dcu index dfac4b2..e08c21d 100644 Binary files a/verif_version.dcu and b/verif_version.dcu differ diff --git a/verif_version.pas b/verif_version.pas index 45eeb07..aea28fe 100644 --- a/verif_version.pas +++ b/verif_version.pas @@ -23,7 +23,7 @@ var Lance_verif : integer; verifVersion,notificationVersion : boolean; -Const Version='2.0'; // sert à la comparaison de la version publiée +Const Version='2.1'; // sert à la comparaison de la version publiée implementation diff --git a/versions.txt b/versions.txt index 35c3083..3531dc3 100644 --- a/versions.txt +++ b/versions.txt @@ -33,7 +33,10 @@ version 1.76 : Modification des aiguillages mod Correction d'un bug sur les feux dont l'élément suivant est un détecteur version 2.0 : Changement de description des TJD Amélioration de l'algorithme des routes + Variables nommées dans config-GL.cfg +version 2.1 : Possibilité de piloter des accessoires par des actionneurs CDM +