V1.31
This commit is contained in:
@@ -95,7 +95,7 @@ UnitOutputDir=
|
|||||||
PackageDLLOutputDir=
|
PackageDLLOutputDir=
|
||||||
PackageDCPOutputDir=
|
PackageDCPOutputDir=
|
||||||
SearchPath=
|
SearchPath=
|
||||||
Packages=
|
Packages=vcl;rtl;vclx;VclSmp;vclshlctrls
|
||||||
Conditionals=
|
Conditionals=
|
||||||
DebugSourceDirs=
|
DebugSourceDirs=
|
||||||
UsePackages=0
|
UsePackages=0
|
||||||
|
|||||||
BIN
UnitConfig.dcu
BIN
UnitConfig.dcu
Binary file not shown.
BIN
UnitDebug.dcu
BIN
UnitDebug.dcu
Binary file not shown.
@@ -1,6 +1,6 @@
|
|||||||
object FormDebug: TFormDebug
|
object FormDebug: TFormDebug
|
||||||
Left = 302
|
Left = 286
|
||||||
Top = 166
|
Top = 39
|
||||||
BorderStyle = bsSingle
|
BorderStyle = bsSingle
|
||||||
Caption = 'Fen'#234'tre de d'#233'bug'
|
Caption = 'Fen'#234'tre de d'#233'bug'
|
||||||
ClientHeight = 639
|
ClientHeight = 639
|
||||||
@@ -98,7 +98,7 @@ object FormDebug: TFormDebug
|
|||||||
end
|
end
|
||||||
object ButtonEcrLog: TButton
|
object ButtonEcrLog: TButton
|
||||||
Left = 448
|
Left = 448
|
||||||
Top = 560
|
Top = 504
|
||||||
Width = 97
|
Width = 97
|
||||||
Height = 29
|
Height = 29
|
||||||
Caption = 'Sauvegarder le log'
|
Caption = 'Sauvegarder le log'
|
||||||
@@ -131,8 +131,8 @@ object FormDebug: TFormDebug
|
|||||||
OnClick = CheckAffSigClick
|
OnClick = CheckAffSigClick
|
||||||
end
|
end
|
||||||
object ButtonRazTampon: TButton
|
object ButtonRazTampon: TButton
|
||||||
Left = 448
|
Left = 688
|
||||||
Top = 520
|
Top = 592
|
||||||
Width = 97
|
Width = 97
|
||||||
Height = 33
|
Height = 33
|
||||||
Caption = 'Raz Tampon Ev'#232'nements'
|
Caption = 'Raz Tampon Ev'#232'nements'
|
||||||
@@ -142,7 +142,7 @@ object FormDebug: TFormDebug
|
|||||||
end
|
end
|
||||||
object ButtonCherche: TButton
|
object ButtonCherche: TButton
|
||||||
Left = 448
|
Left = 448
|
||||||
Top = 480
|
Top = 464
|
||||||
Width = 97
|
Width = 97
|
||||||
Height = 33
|
Height = 33
|
||||||
Caption = 'Chercher erreurs'
|
Caption = 'Chercher erreurs'
|
||||||
@@ -151,10 +151,10 @@ object FormDebug: TFormDebug
|
|||||||
end
|
end
|
||||||
object ButtonAffEvtChrono: TButton
|
object ButtonAffEvtChrono: TButton
|
||||||
Left = 448
|
Left = 448
|
||||||
Top = 440
|
Top = 424
|
||||||
Width = 97
|
Width = 97
|
||||||
Height = 33
|
Height = 33
|
||||||
Caption = 'Affiche Evts chrono d'#233'tecteurs'
|
Caption = 'Affiche Evts d'#233'tecteurs et aig'
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
OnClick = ButtonAffEvtChronoClick
|
OnClick = ButtonAffEvtChronoClick
|
||||||
@@ -207,7 +207,7 @@ object FormDebug: TFormDebug
|
|||||||
end
|
end
|
||||||
object ButtonCop: TButton
|
object ButtonCop: TButton
|
||||||
Left = 448
|
Left = 448
|
||||||
Top = 384
|
Top = 368
|
||||||
Width = 97
|
Width = 97
|
||||||
Height = 49
|
Height = 49
|
||||||
Caption = 'Copie fen'#234'te principale dans debug'
|
Caption = 'Copie fen'#234'te principale dans debug'
|
||||||
@@ -221,11 +221,29 @@ object FormDebug: TFormDebug
|
|||||||
Width = 225
|
Width = 225
|
||||||
Height = 241
|
Height = 241
|
||||||
HideScrollBars = False
|
HideScrollBars = False
|
||||||
|
PopupMenu = PopupMenuRE
|
||||||
ScrollBars = ssVertical
|
ScrollBars = ssVertical
|
||||||
TabOrder = 12
|
TabOrder = 12
|
||||||
end
|
end
|
||||||
|
object ButtonRazLog: TButton
|
||||||
|
Left = 448
|
||||||
|
Top = 544
|
||||||
|
Width = 97
|
||||||
|
Height = 25
|
||||||
|
Caption = 'Raz Tampon Log'
|
||||||
|
TabOrder = 13
|
||||||
|
OnClick = ButtonRazLogClick
|
||||||
|
end
|
||||||
object SaveDialog: TSaveDialog
|
object SaveDialog: TSaveDialog
|
||||||
Left = 680
|
Left = 680
|
||||||
Top = 8
|
Top = 8
|
||||||
end
|
end
|
||||||
|
object PopupMenuRE: TPopupMenu
|
||||||
|
Left = 752
|
||||||
|
Top = 16
|
||||||
|
object copier1: TMenuItem
|
||||||
|
Caption = 'copier'
|
||||||
|
OnClick = copier1Click
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
Dialogs, StdCtrls , ComCtrls;
|
Dialogs, StdCtrls , ComCtrls, Menus;
|
||||||
|
|
||||||
type
|
type
|
||||||
TFormDebug = class(TForm)
|
TFormDebug = class(TForm)
|
||||||
@@ -25,6 +25,9 @@ type
|
|||||||
CheckTrame: TCheckBox;
|
CheckTrame: TCheckBox;
|
||||||
ButtonCop: TButton;
|
ButtonCop: TButton;
|
||||||
RichEdit: TRichEdit;
|
RichEdit: TRichEdit;
|
||||||
|
PopupMenuRE: TPopupMenu;
|
||||||
|
copier1: TMenuItem;
|
||||||
|
ButtonRazLog: TButton;
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure ButtonEcrLogClick(Sender: TObject);
|
procedure ButtonEcrLogClick(Sender: TObject);
|
||||||
@@ -37,6 +40,8 @@ type
|
|||||||
procedure CheckBoxTraceLIsteClick(Sender: TObject);
|
procedure CheckBoxTraceLIsteClick(Sender: TObject);
|
||||||
procedure CheckTrameClick(Sender: TObject);
|
procedure CheckTrameClick(Sender: TObject);
|
||||||
procedure ButtonCopClick(Sender: TObject);
|
procedure ButtonCopClick(Sender: TObject);
|
||||||
|
procedure copier1Click(Sender: TObject);
|
||||||
|
procedure ButtonRazLogClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Déclarations privées }
|
{ Déclarations privées }
|
||||||
public
|
public
|
||||||
@@ -54,11 +59,12 @@ var
|
|||||||
// tick 1/10s,détecteur
|
// tick 1/10s,détecteur
|
||||||
N_Event_tick : integer ; // dernier index
|
N_Event_tick : integer ; // dernier index
|
||||||
|
|
||||||
// tableau des évènements détecteurs
|
// tableau des évènements détecteurs et aiguillages
|
||||||
event_det_tick : array[0..Max_Event_det_tick] of
|
event_det_tick : array[0..Max_Event_det_tick] of
|
||||||
record
|
record
|
||||||
tick : longint;
|
tick : longint;
|
||||||
detecteur : array[1..1100] of integer; // état du détecteur [...]
|
detecteur : array[1..1100] of integer; // état du détecteur [...]
|
||||||
|
Aiguillage,position : integer ;
|
||||||
//train : integer ;
|
//train : integer ;
|
||||||
suivant : integer ; // d'ou vient le train
|
suivant : integer ; // d'ou vient le train
|
||||||
traite : boolean; // traité lors de a recherche d'une route
|
traite : boolean; // traité lors de a recherche d'une route
|
||||||
@@ -198,18 +204,26 @@ end;
|
|||||||
procedure TFormDebug.ButtonAffEvtChronoClick(Sender: TObject);
|
procedure TFormDebug.ButtonAffEvtChronoClick(Sender: TObject);
|
||||||
var i,j,etat : integer;
|
var i,j,etat : integer;
|
||||||
s : string;
|
s : string;
|
||||||
trouve : boolean;
|
|
||||||
begin
|
begin
|
||||||
for i:=1 to N_Event_tick do
|
for i:=1 to N_Event_tick do
|
||||||
begin
|
begin
|
||||||
s:=IntToSTR(i)+' Tick='+IntToSTR(event_det_tick[i].tick)+' Det=';
|
|
||||||
trouve:=false;
|
|
||||||
for j:=1 to 1100 do
|
for j:=1 to 1100 do
|
||||||
begin
|
begin
|
||||||
etat:=event_det_tick[i].detecteur[j];
|
etat:=event_det_tick[i].detecteur[j];
|
||||||
if etat<>-1 then begin s:=s+IntToSTR(j)+'='+intToSTR(etat);trouve:=true;end;
|
if etat<>-1 then
|
||||||
|
begin
|
||||||
|
s:=IntToSTR(i)+' Tick='+IntToSTR(event_det_tick[i].tick)+' Det='+IntToSTR(j)+'='+intToSTR(etat);
|
||||||
|
AfficheDebug(s,clyellow);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
etat:=event_det_tick[i].aiguillage;
|
||||||
|
if etat<>-1 then
|
||||||
|
begin
|
||||||
|
s:=IntToSTR(i)+' Tick='+IntToSTR(event_det_tick[i].tick)+' Aig='+IntToSTR(etat)+'='+intToSTR(event_det_tick[i].position);
|
||||||
|
AfficheDebug(s,clyellow);
|
||||||
end;
|
end;
|
||||||
if trouve then AfficheDebug(s,clyellow);
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -236,4 +250,16 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TFormDebug.copier1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
RichEdit.SelectAll;
|
||||||
|
RichEdit.CopyToClipboard;
|
||||||
|
RichEdit.SetFocus;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormDebug.ButtonRazLogClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
MemoDebug.Clear;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
BIN
UnitPrinc.dcu
BIN
UnitPrinc.dcu
Binary file not shown.
@@ -1,6 +1,6 @@
|
|||||||
object FormPrinc: TFormPrinc
|
object FormPrinc: TFormPrinc
|
||||||
Left = 47
|
Left = 64
|
||||||
Top = 193
|
Top = 170
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderStyle = bsSingle
|
BorderStyle = bsSingle
|
||||||
Caption = 'Client TCP-IP CDM Rail ou USB - syst'#232'me LENZ'
|
Caption = 'Client TCP-IP CDM Rail ou USB - syst'#232'me LENZ'
|
||||||
@@ -597,7 +597,7 @@ object FormPrinc: TFormPrinc
|
|||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
object Image3feux: TImage
|
object Image3feux: TImage
|
||||||
Left = 616
|
Left = 600
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 33
|
Width = 33
|
||||||
Height = 57
|
Height = 57
|
||||||
@@ -1200,14 +1200,14 @@ object FormPrinc: TFormPrinc
|
|||||||
end
|
end
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 656
|
Left = 656
|
||||||
Top = 116
|
Top = 148
|
||||||
Width = 89
|
Width = 89
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Nombre de trains : '
|
Caption = 'Nombre de trains : '
|
||||||
end
|
end
|
||||||
object LabelNbTrains: TLabel
|
object LabelNbTrains: TLabel
|
||||||
Left = 760
|
Left = 760
|
||||||
Top = 112
|
Top = 144
|
||||||
Width = 9
|
Width = 9
|
||||||
Height = 19
|
Height = 19
|
||||||
Caption = '0'
|
Caption = '0'
|
||||||
@@ -1255,9 +1255,9 @@ object FormPrinc: TFormPrinc
|
|||||||
end
|
end
|
||||||
object ScrollBox1: TScrollBox
|
object ScrollBox1: TScrollBox
|
||||||
Left = 648
|
Left = 648
|
||||||
Top = 136
|
Top = 168
|
||||||
Width = 537
|
Width = 537
|
||||||
Height = 437
|
Height = 405
|
||||||
Color = clWhite
|
Color = clWhite
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
@@ -1266,7 +1266,7 @@ object FormPrinc: TFormPrinc
|
|||||||
Left = 656
|
Left = 656
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 249
|
Width = 249
|
||||||
Height = 97
|
Height = 129
|
||||||
Caption = 'Commande d'#39'accessoires'
|
Caption = 'Commande d'#39'accessoires'
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
object Label2: TLabel
|
object Label2: TLabel
|
||||||
@@ -1295,7 +1295,7 @@ object FormPrinc: TFormPrinc
|
|||||||
Top = 32
|
Top = 32
|
||||||
Width = 57
|
Width = 57
|
||||||
Height = 21
|
Height = 21
|
||||||
Hint = 'Adresse accessoire'
|
Hint = 'Adresse accessoire ou de CV'
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
Text = '1'
|
Text = '1'
|
||||||
end
|
end
|
||||||
@@ -1331,6 +1331,17 @@ object FormPrinc: TFormPrinc
|
|||||||
WordWrap = True
|
WordWrap = True
|
||||||
OnClick = ButtonEcrCVClick
|
OnClick = ButtonEcrCVClick
|
||||||
end
|
end
|
||||||
|
object ButtonLitCV: TButton
|
||||||
|
Left = 8
|
||||||
|
Top = 96
|
||||||
|
Width = 225
|
||||||
|
Height = 25
|
||||||
|
Hint = 'Lecture CV en mode direct sur voie de programmation'
|
||||||
|
Caption = 'Lecture CV - 1 '#224' 255 par le bus XpressNet'
|
||||||
|
Enabled = False
|
||||||
|
TabOrder = 4
|
||||||
|
OnClick = ButtonLitCVClick
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object ButtonTest: TButton
|
object ButtonTest: TButton
|
||||||
Left = 912
|
Left = 912
|
||||||
@@ -1399,33 +1410,14 @@ object FormPrinc: TFormPrinc
|
|||||||
TabOrder = 11
|
TabOrder = 11
|
||||||
OnClick = ButtonRepriseClick
|
OnClick = ButtonRepriseClick
|
||||||
end
|
end
|
||||||
object EditGenli: TEdit
|
|
||||||
Left = 880
|
|
||||||
Top = 160
|
|
||||||
Width = 121
|
|
||||||
Height = 21
|
|
||||||
TabOrder = 12
|
|
||||||
Visible = False
|
|
||||||
end
|
|
||||||
object Button1: TButton
|
|
||||||
Left = 1064
|
|
||||||
Top = 216
|
|
||||||
Width = 113
|
|
||||||
Height = 25
|
|
||||||
Caption = 'Envoi vers Genli'
|
|
||||||
TabOrder = 13
|
|
||||||
Visible = False
|
|
||||||
OnClick = Button1Click
|
|
||||||
end
|
|
||||||
object Button2: TButton
|
object Button2: TButton
|
||||||
Left = 992
|
Left = 992
|
||||||
Top = 96
|
Top = 96
|
||||||
Width = 97
|
Width = 97
|
||||||
Height = 25
|
Height = 25
|
||||||
Caption = 'Demande '#233'tat CTS'
|
Caption = 'Demande '#233'tat CTS'
|
||||||
TabOrder = 14
|
TabOrder = 12
|
||||||
Visible = False
|
Visible = False
|
||||||
OnClick = Button2Click
|
|
||||||
end
|
end
|
||||||
object Timer1: TTimer
|
object Timer1: TTimer
|
||||||
Interval = 100
|
Interval = 100
|
||||||
@@ -1454,7 +1446,7 @@ object FormPrinc: TFormPrinc
|
|||||||
OnClick = AffEtatDetecteurs
|
OnClick = AffEtatDetecteurs
|
||||||
end
|
end
|
||||||
object ChronoDetect: TMenuItem
|
object ChronoDetect: TMenuItem
|
||||||
Caption = 'Chronologie des d'#233'tecteurs'
|
Caption = 'Chronologie des d'#233'tecteurs et aiguillages'
|
||||||
Hint = 'Affiche la chronologie des d'#233'tecteurs'
|
Hint = 'Affiche la chronologie des d'#233'tecteurs'
|
||||||
OnClick = ChronoDetectClick
|
OnClick = ChronoDetectClick
|
||||||
end
|
end
|
||||||
@@ -1547,13 +1539,6 @@ object FormPrinc: TFormPrinc
|
|||||||
' sur la voie de programmation'
|
' sur la voie de programmation'
|
||||||
OnClick = LireunfichierdeCV1Click
|
OnClick = LireunfichierdeCV1Click
|
||||||
end
|
end
|
||||||
object LireunaccessoireversunfichierdeCV1: TMenuItem
|
|
||||||
Caption = 'Lire un accessoire vers un fichier de CV'
|
|
||||||
Hint =
|
|
||||||
'Lire les CV d'#39'un accessoire branch'#233' sur la voie de programmation' +
|
|
||||||
' vers un fichier'
|
|
||||||
OnClick = LireunaccessoireversunfichierdeCV1Click
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object ClientSocketCDM: TClientSocket
|
object ClientSocketCDM: TClientSocket
|
||||||
|
|||||||
424
UnitPrinc.pas
424
UnitPrinc.pas
@@ -78,16 +78,14 @@ type
|
|||||||
OpenDialog: TOpenDialog;
|
OpenDialog: TOpenDialog;
|
||||||
N1: TMenuItem;
|
N1: TMenuItem;
|
||||||
LireunfichierdeCV1: TMenuItem;
|
LireunfichierdeCV1: TMenuItem;
|
||||||
LireunaccessoireversunfichierdeCV1: TMenuItem;
|
|
||||||
SaveDialog: TSaveDialog;
|
SaveDialog: TSaveDialog;
|
||||||
N5: TMenuItem;
|
N5: TMenuItem;
|
||||||
Quitter1: TMenuItem;
|
Quitter1: TMenuItem;
|
||||||
EditGenli: TEdit;
|
|
||||||
Button1: TButton;
|
|
||||||
Button2: TButton;
|
Button2: TButton;
|
||||||
Config: TMenuItem;
|
Config: TMenuItem;
|
||||||
Label1: TLabel;
|
Label1: TLabel;
|
||||||
LabelNbTrains: TLabel;
|
LabelNbTrains: TLabel;
|
||||||
|
ButtonLitCV: TButton;
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure MSCommUSBLenzComm(Sender: TObject);
|
procedure MSCommUSBLenzComm(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
@@ -134,11 +132,9 @@ type
|
|||||||
procedure ButtonEcrCVClick(Sender: TObject);
|
procedure ButtonEcrCVClick(Sender: TObject);
|
||||||
procedure ButtonRepriseClick(Sender: TObject);
|
procedure ButtonRepriseClick(Sender: TObject);
|
||||||
procedure LireunfichierdeCV1Click(Sender: TObject);
|
procedure LireunfichierdeCV1Click(Sender: TObject);
|
||||||
procedure LireunaccessoireversunfichierdeCV1Click(Sender: TObject);
|
|
||||||
procedure Quitter1Click(Sender: TObject);
|
procedure Quitter1Click(Sender: TObject);
|
||||||
procedure Button1Click(Sender: TObject);
|
|
||||||
procedure Button2Click(Sender: TObject);
|
|
||||||
procedure ConfigClick(Sender: TObject);
|
procedure ConfigClick(Sender: TObject);
|
||||||
|
procedure ButtonLitCVClick(Sender: TObject);
|
||||||
|
|
||||||
private
|
private
|
||||||
{ Déclarations privées }
|
{ Déclarations privées }
|
||||||
@@ -156,7 +152,10 @@ tempoFeu = 100;
|
|||||||
MaxAcc = 2048;
|
MaxAcc = 2048;
|
||||||
LargImg=50;HtImg=91;
|
LargImg=50;HtImg=91;
|
||||||
const_droit=2;const_devieD=1; // positions transmises par la centrale LENZ
|
const_droit=2;const_devieD=1; // positions transmises par la centrale LENZ
|
||||||
const_devieG=3;
|
const_devieG_CDM=3; // positions transmises par cdm
|
||||||
|
const_devieD_CDM=2; // positions transmises par cdm
|
||||||
|
const_droit_CDM=0; // positions transmises par cdm
|
||||||
|
|
||||||
MaxElParcours=4000;
|
MaxElParcours=4000;
|
||||||
|
|
||||||
|
|
||||||
@@ -171,7 +170,7 @@ type TBranche = record
|
|||||||
Taiguillage = record
|
Taiguillage = record
|
||||||
modele : integer; // 0=n'existe pas 1=aiguillage 2=TJD 3=TJS 4=aiguillage triple
|
modele : integer; // 0=n'existe pas 1=aiguillage 2=TJD 3=TJS 4=aiguillage triple
|
||||||
position, // position actuelle : 1=dévié 2=droit
|
position, // position actuelle : 1=dévié 2=droit
|
||||||
Adrtriple,
|
Adrtriple, // 2eme adresse pour un aiguillage triple
|
||||||
temps, // temps de pilotage (durée de l'impulsion en x 100 ms)
|
temps, // temps de pilotage (durée de l'impulsion en x 100 ms)
|
||||||
inversion : integer; // pilotage inversé 0=normal 1=inversé
|
inversion : integer; // pilotage inversé 0=normal 1=inversé
|
||||||
vitesse : integer; // vitesse de franchissement de l"aiguillage en position déviée (60 ou 90)
|
vitesse : integer; // vitesse de franchissement de l"aiguillage en position déviée (60 ou 90)
|
||||||
@@ -205,9 +204,9 @@ TMA = (valide,devalide);
|
|||||||
var ancien_tablo_signalCplx,EtatsignalCplx : array[0..MaxAcc] of word;
|
var ancien_tablo_signalCplx,EtatsignalCplx : array[0..MaxAcc] of word;
|
||||||
AvecInitAiguillages,tempsCli,combine,NbreFeux,pasreponse,AdrDevie,precedent ,
|
AvecInitAiguillages,tempsCli,combine,NbreFeux,pasreponse,AdrDevie,precedent ,
|
||||||
NombreImages,signalCpx,branche_trouve,Indexbranche_trouve,Actuel,Signal_suivant,
|
NombreImages,signalCpx,branche_trouve,Indexbranche_trouve,Actuel,Signal_suivant,
|
||||||
Nbre_recu_cdm,Tempo_chgt_feux,Adj1,Adj2,protocole : integer;
|
Nbre_recu_cdm,Tempo_chgt_feux,Adj1,Adj2 : integer;
|
||||||
Hors_tension2,traceSign,TraceZone,Ferme,parSocket,ackCdm,
|
Hors_tension2,traceSign,TraceZone,Ferme,parSocket,ackCdm,
|
||||||
NackCDM,MsgSim : boolean;
|
NackCDM,MsgSim,succes,recu_cv,
|
||||||
TraceListe,clignotant,nack,Maj_feux_cours : boolean;
|
TraceListe,clignotant,nack,Maj_feux_cours : boolean;
|
||||||
|
|
||||||
branche : array [1..100] of string;
|
branche : array [1..100] of string;
|
||||||
@@ -219,6 +218,7 @@ const
|
|||||||
GrisF=$414141;
|
GrisF=$414141;
|
||||||
clOrange=$0077FF;
|
clOrange=$0077FF;
|
||||||
Feu_X=50;Feu_Y=91;
|
Feu_X=50;Feu_Y=91;
|
||||||
|
Max_Simule=1000;
|
||||||
couleurTrain : array[1..8] of Tcolor = (clYellow,clLime,clOrange,clAqua,clFuchsia,clLtGray,clred,clWhite);
|
couleurTrain : array[1..8] of Tcolor = (clYellow,clLime,clOrange,clAqua,clFuchsia,clLtGray,clred,clWhite);
|
||||||
|
|
||||||
var
|
var
|
||||||
@@ -241,10 +241,11 @@ var
|
|||||||
Mem1,Mem2 : integer;
|
Mem1,Mem2 : integer;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
Tablo_Simule : array[0..200] of
|
|
||||||
|
Tablo_Simule : array[0..Max_Simule] of
|
||||||
record
|
record
|
||||||
tick : longint;
|
tick : longint;
|
||||||
Detecteur,etat : integer ;
|
Detecteur,Aiguillage,etat : integer ;
|
||||||
end;
|
end;
|
||||||
Route : array[1..2000] of record
|
Route : array[1..2000] of record
|
||||||
Mem1,Mem2 : integer;
|
Mem1,Mem2 : integer;
|
||||||
@@ -3719,6 +3720,8 @@ begin
|
|||||||
suivant_alg3:=9999;exit;
|
suivant_alg3:=9999;exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
indexBranche_actuel:=IndexBranche_trouve;
|
||||||
|
branche_trouve_actuel:=branche_trouve;
|
||||||
|
|
||||||
Adr:=actuel;
|
Adr:=actuel;
|
||||||
Btype:=BrancheN[branche_trouve_actuel,indexBranche_actuel].Btype;
|
Btype:=BrancheN[branche_trouve_actuel,indexBranche_actuel].Btype;
|
||||||
@@ -3967,10 +3970,11 @@ begin
|
|||||||
trouve_element(adr,TypeEl); // branche_trouve IndexBranche_trouve
|
trouve_element(adr,TypeEl); // branche_trouve IndexBranche_trouve
|
||||||
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].Btype;
|
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].Btype;
|
||||||
suivant_alg3:=adr;
|
suivant_alg3:=adr;
|
||||||
exit;
|
exit;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if (aiguillage[Adr].modele=2) or (aiguillage[Adr].modele=3) then // TJD ou TJS
|
||||||
begin
|
begin
|
||||||
// récupérer les élements de la TJD/S
|
// récupérer les élements de la TJD/S
|
||||||
AdrTjdP:=aiguillage[Adr].Apointe; // 2eme adresse de la TJD/S
|
AdrTjdP:=aiguillage[Adr].Apointe; // 2eme adresse de la TJD/S
|
||||||
@@ -4122,43 +4126,108 @@ begin
|
|||||||
Abis:=aiguillage[AdrTjdP].AdevieBis;
|
Abis:=aiguillage[AdrTjdP].AdevieBis;
|
||||||
if A='Z' then typeGen:=1 else typeGen:=2; //TypeEL=(1=détécteur 2=aig 3=aig Bis)
|
if A='Z' then typeGen:=1 else typeGen:=2; //TypeEL=(1=détécteur 2=aig 3=aig Bis)
|
||||||
if Abis=1 then typeGen:=3;
|
if Abis=1 then typeGen:=3;
|
||||||
|
suivant_alg3:=adr;exit;
|
||||||
end;
|
end;
|
||||||
Affiche('139 - Erreur fatale - Aucun cas TJD/S : adr='+IntToSTR(Adr)+' '+intToSTR(AdrTJDP)+' prec='+IntTOSTR(prec),clred);
|
Affiche('139 - Erreur fatale - Aucun cas TJD/S : adr='+IntToSTR(Adr)+' '+intToSTR(AdrTJDP)+' prec='+IntTOSTR(prec),clred);
|
||||||
Affiche('139 - Erreur fatale - Aucun cas TJD/S : adr='+IntToSTR(Adr)+' '+intToSTR(AdrTJDP)+' prec='+IntTOSTR(prec),clred);
|
|
||||||
AfficheDebug('139 - Erreur fatale - Aucun cas TJD/S : adr='+IntToSTR(Adr)+' '+intToSTR(AdrTJDP)+' prec='+IntTOSTR(prec),clred);
|
AfficheDebug('139 - Erreur fatale - Aucun cas TJD/S : adr='+IntToSTR(Adr)+' '+intToSTR(AdrTJDP)+' prec='+IntTOSTR(prec),clred);
|
||||||
suivant_alg3:=9999;exit;
|
suivant_alg3:=9999;exit;
|
||||||
end;
|
|
||||||
if (aiguillage[Adr].modele=4) then // aiguillage triple
|
|
||||||
begin
|
|
||||||
end;
|
end;
|
||||||
Adr2:=aiguillage[Adr].AdrTriple;
|
|
||||||
|
if (aiguillage[Adr].modele=4) then // aiguillage triple
|
||||||
|
begin
|
||||||
|
Adr2:=aiguillage[Adr].AdrTriple;
|
||||||
|
if (aiguillage[adr].Apointe=prec) then
|
||||||
begin
|
begin
|
||||||
// ou avec l'interface
|
// aiguillage triple pris en pointe
|
||||||
//Affiche('position='+intToSTR(aiguillage[Adr].position),clyellow);
|
//Affiche('position='+intToSTR(aiguillage[Adr].position),clyellow);
|
||||||
|
if (aiguillage[Adr].position=const_droit) and (aiguillage[Adr2].position=const_droit) then
|
||||||
|
begin
|
||||||
|
if NivDebug=3 then AfficheDebug('Aiguillage triple pris en pointe droit',clYellow);
|
||||||
|
typeGen:=aiguillage[Adr].AdroitBis+1;
|
||||||
|
A:=aiguillage[Adr].AdroitB;
|
||||||
Adr:=aiguillage[Adr].Adroit;
|
Adr:=aiguillage[Adr].Adroit;
|
||||||
begin
|
if A='Z' then TypeEl:=1 else TypeEL:=2; //TypeEL=(1=détécteur 2=aig 3=aig Bis)
|
||||||
if NivDebug=3 then AfficheDebug('Aiguillage triple droit',clYellow);
|
|
||||||
if Abis=1 then TypeEl:=3;
|
if Abis=1 then TypeEl:=3;
|
||||||
//TSuiv=aiguillage[Adr].AdroitB;
|
trouve_element(Adr,TypeEl); // branche_trouve IndexBranche_trouve
|
||||||
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].BType;
|
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].BType;
|
||||||
end;
|
suivant_alg3:=adr;exit;
|
||||||
end;
|
end;
|
||||||
|
if (aiguillage[Adr].position<>const_droit) and (aiguillage[Adr2].position=const_droit) then
|
||||||
|
begin
|
||||||
|
if NivDebug=3 then AfficheDebug('Aiguillage triple dévié1 (à gauche)',clYellow);
|
||||||
|
typeGen:=aiguillage[Adr].AdevieBis+1;
|
||||||
|
A:=aiguillage[Adr].AdevieB;
|
||||||
Adr:=aiguillage[Adr].Adevie;
|
Adr:=aiguillage[Adr].Adevie;
|
||||||
begin
|
if A='Z' then TypeEl:=1 else TypeEL:=2; //TypeEL=(1=détécteur 2=aig 3=aig Bis)
|
||||||
if NivDebug=3 then AfficheDebug('Aiguillage triple dévié1 (gauche)',clYellow);
|
|
||||||
if Abis=1 then TypeEl:=3;
|
if Abis=1 then TypeEl:=3;
|
||||||
//TSuiv=aiguillage[Adr].AdevieB;
|
trouve_element(Adr,TypeEl); // branche_trouve IndexBranche_trouve
|
||||||
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].BType;
|
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].BType;
|
||||||
end;
|
suivant_alg3:=adr;exit;
|
||||||
end;
|
end;
|
||||||
|
if (aiguillage[Adr].position=const_droit) and (aiguillage[Adr2].position<>const_droit) then
|
||||||
|
begin
|
||||||
|
if NivDebug=3 then AfficheDebug('Aiguillage triple dévié2 (à droite)',clYellow);
|
||||||
|
typeGen:=aiguillage[Adr].Adevie2Bis+1;
|
||||||
|
A:=aiguillage[Adr].Adevie2B;
|
||||||
Adr:=aiguillage[Adr].Adevie2;
|
Adr:=aiguillage[Adr].Adevie2;
|
||||||
begin
|
|
||||||
if A='Z' then TypeEl:=1 else TypeEL:=2; //TypeEL=(1=détécteur 2=aig 3=aig Bis)
|
if A='Z' then TypeEl:=1 else TypeEL:=2; //TypeEL=(1=détécteur 2=aig 3=aig Bis)
|
||||||
typeGen:=aiguillage[Adr].Adevie2Bis+1;
|
if Abis=1 then TypeEl:=3;
|
||||||
//TSuiv=aiguillage[Adr].Adevie2B;
|
trouve_element(Adr,TypeEl); // branche_trouve IndexBranche_trouve
|
||||||
Adr:=aiguillage[Adr].Adevie2;
|
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].BType;
|
||||||
|
suivant_alg3:=adr;exit;
|
||||||
end;
|
end;
|
||||||
begin
|
begin
|
||||||
|
s:='Aiguillage triple '+IntToSTR(Adr)+' : configuration des aiguilles interdite';
|
||||||
|
if CDM_connecte then s:=s+': '+IntToSTR(aiguillage[Adr].position);
|
||||||
|
AfficheDebug(s,clYellow);
|
||||||
|
Affiche(s,clRed);
|
||||||
|
suivant_alg3:=9999;exit; // pour échappement
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if NivDebug=3 then AfficheDebug('Aiguillage triple pris en talon',clyellow);
|
||||||
|
if alg=2 then // on demande d'arreter si l'aiguillage en talon est mal positionné
|
||||||
|
begin
|
||||||
|
if (aiguillage[adr].position=const_droit) and (aiguillage[adr2].position=const_droit) then
|
||||||
|
begin
|
||||||
|
if prec<>aiguillage[Adr].Adroit then
|
||||||
|
begin
|
||||||
|
if NivDebug=3 then AfficheDebug('135.3 - Aiguillage '+intToSTR(adr)+'triple mal positionné',clyellow);
|
||||||
|
suivant_alg3:=9998;exit;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if NivDebug=3 then AfficheDebug('135.4 - Aiguillage '+intToSTR(adr)+'triple bien positionné',clyellow);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if (aiguillage[adr].position<>const_droit) and (aiguillage[adr2].position=const_droit) then
|
||||||
|
begin
|
||||||
|
if prec<>aiguillage[Adr].Adevie then
|
||||||
|
begin
|
||||||
|
if NivDebug=3 then AfficheDebug('135.3 - Aiguillage '+intToSTR(adr)+'triple mal positionné',clyellow);
|
||||||
|
suivant_alg3:=9998;exit;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if NivDebug=3 then AfficheDebug('135.4 - Aiguillage '+intToSTR(adr)+'triple bien positionné',clyellow);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if (aiguillage[adr].position=const_droit) and (aiguillage[adr2].position<>const_droit) then
|
||||||
|
begin
|
||||||
|
if prec<>aiguillage[Adr].Adevie2 then
|
||||||
|
begin
|
||||||
|
if NivDebug=3 then AfficheDebug('135.3 - Aiguillage '+intToSTR(adr)+'triple mal positionné',clyellow);
|
||||||
|
suivant_alg3:=9998;exit;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if NivDebug=3 then AfficheDebug('135.4 - Aiguillage '+intToSTR(adr)+'triple bien positionné',clyellow);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
A:=aiguillage[Adr].ApointeB;
|
||||||
|
Adr:=aiguillage[Adr].Apointe;
|
||||||
if A='Z' then TypeEl:=1 else TypeEL:=2; //TypeEL=(1=détécteur 2=aig 3=aig Bis)
|
if A='Z' then TypeEl:=1 else TypeEL:=2; //TypeEL=(1=détécteur 2=aig 3=aig Bis)
|
||||||
if Abis=1 then TypeEl:=3;
|
if Abis=1 then TypeEl:=3;
|
||||||
trouve_element(Adr,TypeEl); // branche_trouve IndexBranche_trouve
|
trouve_element(Adr,TypeEl); // branche_trouve IndexBranche_trouve
|
||||||
@@ -5122,8 +5191,6 @@ begin
|
|||||||
Signal_direction(AdrFeu);
|
Signal_direction(AdrFeu);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
etat:=etat_signal_suivant(AdrFeu,1) ; // état du signal suivant + adresse du signal suivant dans Signal_Suivant
|
|
||||||
|
|
||||||
etat:=etat_signal_suivant(AdrFeu,1) ; // état du signal suivant + adresse du signal suivant dans Signal_Suivant
|
etat:=etat_signal_suivant(AdrFeu,1) ; // état du signal suivant + adresse du signal suivant dans Signal_Suivant
|
||||||
|
|
||||||
@@ -5529,6 +5596,12 @@ begin
|
|||||||
begin
|
begin
|
||||||
inc(N_Event_tick);
|
inc(N_Event_tick);
|
||||||
// event_det_tick[N_event_tick].train:=0;
|
// event_det_tick[N_event_tick].train:=0;
|
||||||
|
|
||||||
|
event_det_tick[N_event_tick].tick:=tick;
|
||||||
|
event_det_tick[N_event_tick].detecteur[Adresse]:=etat01;
|
||||||
|
// Affiche('stockage de '+intToSTR(N_event_tick)+' à '+intToSTR(etat01),clyellow);
|
||||||
|
end;
|
||||||
|
|
||||||
// Mettre à jour le TCO
|
// Mettre à jour le TCO
|
||||||
if AvecTCO then
|
if AvecTCO then
|
||||||
begin
|
begin
|
||||||
@@ -5564,11 +5637,16 @@ begin
|
|||||||
afficheDebug(s,clyellow);
|
afficheDebug(s,clyellow);
|
||||||
end;
|
end;
|
||||||
event_det_tick[N_event_tick].train:=N_trains;
|
event_det_tick[N_event_tick].train:=N_trains;
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
}
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
}
|
||||||
|
end;
|
||||||
|
|
||||||
|
// évènement d'aiguillage
|
||||||
|
procedure Event_Aig(adresse,pos : integer);
|
||||||
|
begin
|
||||||
|
if (N_Event_tick<Max_Event_det_tick) then
|
||||||
|
begin
|
||||||
inc(N_Event_tick);
|
inc(N_Event_tick);
|
||||||
event_det_tick[N_event_tick].tick:=tick;
|
event_det_tick[N_event_tick].tick:=tick;
|
||||||
event_det_tick[N_event_tick].aiguillage:=adresse;
|
event_det_tick[N_event_tick].aiguillage:=adresse;
|
||||||
@@ -5706,25 +5784,25 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// état de l'aiguillage
|
// état de l'aiguillage
|
||||||
if bitsITT=$00 then // module d'aiguillages, N=1
|
if bitsITT=$00 then // module d'aiguillages, N=1
|
||||||
begin
|
begin
|
||||||
adraig:=((adresse * 4)+1 ); // *4 car N=1, c'est le "poids fort"
|
adraig:=((adresse * 4)+1 ); // *4 car N=1, c'est le "poids fort"
|
||||||
if (valeur and $C)=$8 then
|
if (valeur and $C)=$8 then
|
||||||
begin
|
begin
|
||||||
aiguillage[adraig+3].position:=2 ; // état aiguillage haut
|
aiguillage[adraig+3].position:=2 ; // état aiguillage haut
|
||||||
Event_Aig(adraig+3);
|
Event_Aig(adraig+3,2);
|
||||||
if trace then begin s:='accessoire '+intToSTR(adraig+3)+'=2';Affiche(s,clYellow);end;
|
if trace then begin s:='accessoire '+intToSTR(adraig+3)+'=2';Affiche(s,clYellow);end;
|
||||||
end;
|
end;
|
||||||
if (valeur and $C)=$4 then
|
if (valeur and $C)=$4 then
|
||||||
begin
|
begin
|
||||||
aiguillage[adraig+3].position:=1 ; // état aiguillage haut
|
aiguillage[adraig+3].position:=1 ; // état aiguillage haut
|
||||||
Event_Aig(adraig+3);
|
Event_Aig(adraig+3,1);
|
||||||
if trace then begin s:='accessoire '+intToSTR(adraig+3)+'=1';Affiche(s,clYellow);end;
|
if trace then begin s:='accessoire '+intToSTR(adraig+3)+'=1';Affiche(s,clYellow);end;
|
||||||
end;
|
end;
|
||||||
if (valeur and $3)=$2 then
|
if (valeur and $3)=$2 then
|
||||||
begin
|
begin
|
||||||
aiguillage[adraig+2].position:=2; // état aiguillage bas
|
aiguillage[adraig+2].position:=2; // état aiguillage bas
|
||||||
Event_Aig(adraig+2);
|
Event_Aig(adraig+2,2);
|
||||||
if trace then begin s:='accessoire '+intToSTR(adraig+2)+'=2';Affiche(s,clYellow);end;
|
if trace then begin s:='accessoire '+intToSTR(adraig+2)+'=2';Affiche(s,clYellow);end;
|
||||||
end;
|
end;
|
||||||
if (valeur and $3)=$1 then
|
if (valeur and $3)=$1 then
|
||||||
@@ -5766,25 +5844,25 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
if bitsITT=$00 then // module d'aiguillages
|
if bitsITT=$00 then // module d'aiguillages
|
||||||
begin
|
begin
|
||||||
adraig:=(adresse * 4)+1;
|
adraig:=(adresse * 4)+1;
|
||||||
if (valeur and $C)=$8 then
|
if (valeur and $C)=$8 then
|
||||||
begin
|
begin
|
||||||
aiguillage[adraig+1].position:=2 ; // état aiguillage haut
|
aiguillage[adraig+1].position:=2 ; // état aiguillage haut
|
||||||
Event_Aig(adraig+1);
|
Event_Aig(adraig+1,2);
|
||||||
if trace then begin s:='accessoire '+intToSTR(adraig+1)+'=2';Affiche(s,clYellow);end;
|
if trace then begin s:='accessoire '+intToSTR(adraig+1)+'=2';Affiche(s,clYellow);end;
|
||||||
end;
|
end;
|
||||||
if (valeur and $C)=$4 then
|
if (valeur and $C)=$4 then
|
||||||
begin
|
begin
|
||||||
aiguillage[adraig+1].position:=1 ; // état aiguillage haut
|
aiguillage[adraig+1].position:=1 ; // état aiguillage haut
|
||||||
Event_Aig(adraig+1);
|
Event_Aig(adraig+1,1);
|
||||||
if trace then begin s:='accessoire '+intToSTR(adraig+1)+'=1';Affiche(s,clYellow);end;
|
if trace then begin s:='accessoire '+intToSTR(adraig+1)+'=1';Affiche(s,clYellow);end;
|
||||||
end;
|
end;
|
||||||
if (valeur and $3)=$2 then
|
if (valeur and $3)=$2 then
|
||||||
begin
|
begin
|
||||||
aiguillage[adraig].position:=2; // état aiguillage bas
|
aiguillage[adraig].position:=2; // état aiguillage bas
|
||||||
Event_Aig(adraig);
|
Event_Aig(adraig,2);
|
||||||
if trace then begin s:='accessoire '+intToSTR(adraig)+'=2';Affiche(s,clYellow);end;
|
if trace then begin s:='accessoire '+intToSTR(adraig)+'=2';Affiche(s,clYellow);end;
|
||||||
end;
|
end;
|
||||||
if (valeur and $3)=$1 then
|
if (valeur and $3)=$1 then
|
||||||
@@ -5855,7 +5933,7 @@ end;
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
Xdecode_chaine_retro:=chaineint;
|
Xdecode_chaine_retro:=chaineint;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// décodage d'une chaine simple de la rétrosignalisation
|
// décodage d'une chaine simple de la rétrosignalisation
|
||||||
@@ -5867,7 +5945,7 @@ begin
|
|||||||
msg:='';
|
msg:='';
|
||||||
ack:=true;nack:=false;
|
ack:=true;nack:=false;
|
||||||
// décodage du 3eme octet de la chaîne
|
// décodage du 3eme octet de la chaîne
|
||||||
if chaineINT[1]=#1 then
|
if chaineINT[1]=#1 then
|
||||||
begin
|
begin
|
||||||
case chaineINT[2] of // page 13 doc XpressNet
|
case chaineINT[2] of // page 13 doc XpressNet
|
||||||
#1 : begin nack:=true;msg:='erreur timout transmission';end;
|
#1 : begin nack:=true;msg:='erreur timout transmission';end;
|
||||||
@@ -5909,17 +5987,19 @@ begin
|
|||||||
end;
|
end;
|
||||||
if nack then affiche(msg,clred) else affiche(msg,clyellow);
|
if nack then affiche(msg,clred) else affiche(msg,clyellow);
|
||||||
delete(chaineINT,1,2);
|
delete(chaineINT,1,2);
|
||||||
decode_chaine_retro:=chaineINT;
|
decode_chaine_retro:=chaineINT;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if ((chaineINT[1]=#$63) and (chaineINT[2]=#$14)) then // V3.6 uniquement
|
if ((chaineINT[1]=#$63) and (chaineINT[2]=#$14)) then // V3.6 uniquement
|
||||||
begin
|
begin
|
||||||
// réception d'un CV. DocXpressNet p26 63 14 01 03 chk
|
// réception d'un CV. DocXpressNet p26 63 14 01 03 chk
|
||||||
|
|
||||||
delete(chaineInt,1,2);
|
delete(chaineInt,1,2);
|
||||||
cvLoc:=ord(chaineINT[1]);
|
cvLoc:=ord(chaineINT[1]);
|
||||||
//Affiche('Réception CV'+IntToSTR(cvLoc)+' à '+IntToSTR(ord(chaineINT[2])),clyellow);
|
//Affiche('Réception CV'+IntToSTR(cvLoc)+' à '+IntToSTR(ord(chaineINT[2])),clyellow);
|
||||||
|
if cvLoc>255 then Affiche('Erreur Recu CV>255',clRed)
|
||||||
|
else
|
||||||
begin
|
begin
|
||||||
tablo_cv[cvLoc]:=ord(chaineINT[2]);
|
tablo_cv[cvLoc]:=ord(chaineINT[2]);
|
||||||
inc(N_Cv); // nombre de CV recus
|
inc(N_Cv); // nombre de CV recus
|
||||||
@@ -6067,7 +6147,7 @@ begin
|
|||||||
{$J-}
|
{$J-}
|
||||||
|
|
||||||
procedure connecte_USB;
|
procedure connecte_USB;
|
||||||
begin
|
begin
|
||||||
// initialisation de la comm USB
|
// initialisation de la comm USB
|
||||||
if NumPort<>0 then
|
if NumPort<>0 then
|
||||||
begin
|
begin
|
||||||
@@ -6168,8 +6248,8 @@ begin
|
|||||||
// lecture fichier de configuration config.cfg
|
// lecture fichier de configuration config.cfg
|
||||||
lit_config;
|
lit_config;
|
||||||
|
|
||||||
// TCO
|
// TCO
|
||||||
if avectco then
|
if avectco then
|
||||||
begin
|
begin
|
||||||
//créée la fenêtre TCO
|
//créée la fenêtre TCO
|
||||||
FormTCO:=TformTCO.Create(Self);
|
FormTCO:=TformTCO.Create(Self);
|
||||||
@@ -6203,14 +6283,14 @@ begin
|
|||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if portCommOuvert or parsocket then
|
if portCommOuvert or parsocket then
|
||||||
With Formprinc do
|
With Formprinc do
|
||||||
begin
|
begin
|
||||||
ButtonEcrCV.Enabled:=true;
|
ButtonEcrCV.Enabled:=true;
|
||||||
LireunfichierdeCV1.enabled:=true;
|
LireunfichierdeCV1.enabled:=true;
|
||||||
|
ButtonLitCV.Enabled:=true;
|
||||||
end
|
end
|
||||||
end
|
|
||||||
else
|
else
|
||||||
With Formprinc do
|
With Formprinc do
|
||||||
begin
|
begin
|
||||||
@@ -6226,6 +6306,7 @@ begin
|
|||||||
for i:=1 to NbreFeux do
|
for i:=1 to NbreFeux do
|
||||||
begin
|
begin
|
||||||
cree_image(i); // et initialisation tableaux signaux
|
cree_image(i); // et initialisation tableaux signaux
|
||||||
|
end;
|
||||||
Tempo_init:=10; // démarre les initialisation des signaux et des aiguillages dans 1 s
|
Tempo_init:=10; // démarre les initialisation des signaux et des aiguillages dans 1 s
|
||||||
|
|
||||||
// initialisation de la chronologie des évènements détecteurs
|
// initialisation de la chronologie des évènements détecteurs
|
||||||
@@ -6243,7 +6324,6 @@ begin
|
|||||||
N_Event_tick:=0 ; // dernier index
|
N_Event_tick:=0 ; // dernier index
|
||||||
NombreImages:=0;
|
NombreImages:=0;
|
||||||
|
|
||||||
// énumération des ports USB
|
|
||||||
// énumération des ports USB
|
// énumération des ports USB
|
||||||
//EnumerateDevices;
|
//EnumerateDevices;
|
||||||
//for i:=1 to NumLine do
|
//for i:=1 to NumLine do
|
||||||
@@ -6253,11 +6333,10 @@ begin
|
|||||||
//essai
|
//essai
|
||||||
// event_det[1]:=527;
|
// event_det[1]:=527;
|
||||||
// event_det[2]:=520;
|
// event_det[2]:=520;
|
||||||
// N_event_det:=2;
|
|
||||||
//aiguillage[20].Position:=const_droit+1;
|
|
||||||
//aiguillage[12].Position:=const_droit+1;
|
|
||||||
// N_event_det:=2;
|
// N_event_det:=2;
|
||||||
//aiguillage[20].Position:=const_droit+1;
|
//aiguillage[20].Position:=const_droit+1;
|
||||||
|
//aiguillage[12].Position:=const_droit+1;
|
||||||
|
//traceDet:=true;
|
||||||
// calcul_zones;
|
// calcul_zones;
|
||||||
//maj_feu(201);
|
//maj_feu(201);
|
||||||
// formdebug.Show;
|
// formdebug.Show;
|
||||||
@@ -6275,10 +6354,8 @@ begin
|
|||||||
//i:=Aiguille_deviee(176);
|
//i:=Aiguille_deviee(176);
|
||||||
//signal_direction(372);
|
//signal_direction(372);
|
||||||
//FormDebug.show;
|
//FormDebug.show;
|
||||||
//NivDebug:=3;
|
|
||||||
//NivDebug:=3;
|
//NivDebug:=3;
|
||||||
//test_memoire_zones(218);
|
//test_memoire_zones(218);
|
||||||
//Affiche(' Adj1='+intToStr(Adj1)+' Adj2='+intToStr(Adj2),clyellow);
|
|
||||||
//Det_Adj(520);
|
//Det_Adj(520);
|
||||||
//Affiche(' Adj1='+intToStr(Adj1)+' Adj2='+intToStr(Adj2),clyellow);
|
//Affiche(' Adj1='+intToStr(Adj1)+' Adj2='+intToStr(Adj2),clyellow);
|
||||||
//trace:=true;
|
//trace:=true;
|
||||||
@@ -6414,9 +6491,20 @@ begin
|
|||||||
|
|
||||||
|
|
||||||
//simulation
|
//simulation
|
||||||
|
if index_simule<>0 then
|
||||||
|
begin
|
||||||
|
if not(MsgSim) then begin Affiche('Simulation en cours ',Cyan);MsgSim:=true;end;
|
||||||
while tick=Tablo_simule[i_simule+1].tick do
|
while tick=Tablo_simule[i_simule+1].tick do
|
||||||
begin
|
begin
|
||||||
inc(I_simule);
|
inc(I_simule);
|
||||||
|
// evt détecteur ?
|
||||||
|
if Tablo_simule[i_simule].detecteur<>0 then
|
||||||
|
begin
|
||||||
|
Affiche('Simulation tick='+IntToSTR(tick)+' det='+intToSTR(Tablo_simule[i_simule].detecteur)+'='+IntToSTR(Tablo_simule[i_simule].etat),Cyan);
|
||||||
|
Event_Detecteur(Tablo_simule[i_simule].detecteur, Tablo_simule[i_simule].etat=1); // créer évt détecteur
|
||||||
|
end;
|
||||||
|
// evt aiguillage ?
|
||||||
|
if Tablo_simule[i_simule].aiguillage<>0 then
|
||||||
begin
|
begin
|
||||||
Affiche('Simulation tick='+IntToSTR(tick)+' aig='+intToSTR(Tablo_simule[i_simule].aiguillage)+'='+IntToSTR(Tablo_simule[i_simule].etat),Cyan);
|
Affiche('Simulation tick='+IntToSTR(tick)+' aig='+intToSTR(Tablo_simule[i_simule].aiguillage)+'='+IntToSTR(Tablo_simule[i_simule].etat),Cyan);
|
||||||
Event_Aig(Tablo_simule[i_simule].Aiguillage, Tablo_simule[i_simule].etat); // créer évt aiguillage
|
Event_Aig(Tablo_simule[i_simule].Aiguillage, Tablo_simule[i_simule].etat); // créer évt aiguillage
|
||||||
@@ -6441,7 +6529,19 @@ procedure TFormPrinc.ButtonCommandeClick(Sender: TObject);
|
|||||||
s:=checksum(s);
|
s:=checksum(s);
|
||||||
envoi(s);
|
envoi(s);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// bouton de commande d'un accessoire
|
||||||
|
procedure TFormPrinc.ButtonCommandeClick(Sender: TObject);
|
||||||
|
var adr,valeur,erreur : integer;
|
||||||
|
begin
|
||||||
|
val(EditAdresse.text,adr,erreur);
|
||||||
if (erreur<>0) or (adr<1) or (adr>2048) then
|
if (erreur<>0) or (adr<1) or (adr>2048) then
|
||||||
|
begin
|
||||||
|
EditAdresse.text:='1';
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
val(EditVal.Text,valeur,erreur);
|
||||||
if (erreur<>0) or (valeur<0) or (valeur>255) then
|
if (erreur<>0) or (valeur<0) or (valeur>255) then
|
||||||
begin
|
begin
|
||||||
EditVal.text:='1';
|
EditVal.text:='1';
|
||||||
@@ -6595,7 +6695,6 @@ begin
|
|||||||
Hors_tension2:=false;
|
Hors_tension2:=false;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TFormPrinc.MenuDeconnecterEthernetClick(Sender: TObject);
|
procedure TFormPrinc.MenuDeconnecterEthernetClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
@@ -6603,8 +6702,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function cde_cdm(s : string) : string;
|
function cde_cdm(s : string) : string;
|
||||||
var i : integer;
|
|
||||||
begin
|
|
||||||
var i : integer;
|
var i : integer;
|
||||||
begin
|
begin
|
||||||
i:=length(s)-1;
|
i:=length(s)-1;
|
||||||
@@ -6626,16 +6723,23 @@ begin
|
|||||||
s:='Dét '+intToSTR(Adresse_detecteur[j])+'=';
|
s:='Dét '+intToSTR(Adresse_detecteur[j])+'=';
|
||||||
if Detecteur[adresse_detecteur[j]] then s:=s+'1' else s:=s+'0';
|
if Detecteur[adresse_detecteur[j]] then s:=s+'1' else s:=s+'0';
|
||||||
s:=s+' Mem=';
|
s:=s+' Mem=';
|
||||||
if Mem[adresse_detecteur[j]] then s:=s+'1' else s:=s+'0';
|
if Mem[adresse_detecteur[j]] then s:=s+'1' else s:=s+'0';
|
||||||
Affiche(s,clYellow);
|
Affiche(s,clYellow);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormPrinc.Etatdesaiguillages1Click(Sender: TObject);
|
procedure TFormPrinc.Etatdesaiguillages1Click(Sender: TObject);
|
||||||
var i : integer;
|
var i,j,model : integer;
|
||||||
|
s : string;
|
||||||
begin
|
begin
|
||||||
Affiche('les positions des aiguillages BIS sont les mêmes que leurs homologues non bis',Cyan);
|
Affiche('les positions des aiguillages BIS sont les mêmes que leurs homologues non bis',Cyan);
|
||||||
for i:=1 to MaxAcc do
|
for i:=1 to MaxAcc do
|
||||||
|
begin
|
||||||
|
model:=aiguillage[i].modele ;
|
||||||
|
if model<>0 then
|
||||||
|
begin
|
||||||
|
s:='Aiguillage '+IntToSTR(i)+' : '+intToSTR(aiguillage[i].position);
|
||||||
|
if aiguillage[i].position=1 then s:=s+' (dévié)' else s:=s+' (droit)';
|
||||||
if model=4 then
|
if model=4 then
|
||||||
begin
|
begin
|
||||||
j:=aiguillage[i].AdrTriple;
|
j:=aiguillage[i].AdrTriple;
|
||||||
@@ -6696,8 +6800,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TFormPrinc.ClientSocketLenzConnect(Sender: TObject;Socket: TCustomWinSocket);
|
||||||
begin
|
begin
|
||||||
begin
|
|
||||||
Affiche('Lenz connecté ',clYellow);
|
Affiche('Lenz connecté ',clYellow);
|
||||||
AfficheDebug('Lenz connecté ',clYellow);
|
AfficheDebug('Lenz connecté ',clYellow);
|
||||||
parSocket:=True;
|
parSocket:=True;
|
||||||
@@ -6717,7 +6821,7 @@ end;
|
|||||||
parSocketCDM:=True;
|
parSocketCDM:=True;
|
||||||
MenuConnecterUSB.enabled:=false;
|
MenuConnecterUSB.enabled:=false;
|
||||||
DeConnecterUSB.enabled:=false;
|
DeConnecterUSB.enabled:=false;
|
||||||
ConnecterCDMRail.enabled:=false;
|
ConnecterCDMRail.enabled:=false;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -6756,14 +6860,50 @@ begin
|
|||||||
if i+5-j>0 then begin Delete(recuCDM,j,i+5-j) ;end else
|
if i+5-j>0 then begin Delete(recuCDM,j,i+5-j) ;end else
|
||||||
begin
|
begin
|
||||||
Affiche('Erreur 95',clred);
|
Affiche('Erreur 95',clred);
|
||||||
|
Affiche('j='+IntToSTR(j)+' i='+intToSTR(i),clred);
|
||||||
|
Nbre_recu_cdm:=0;
|
||||||
|
Affiche(recuCDM,clred);
|
||||||
|
exit;
|
||||||
end;
|
end;
|
||||||
Nbre_recu_cdm:=0;
|
val(ss,etat,erreur);
|
||||||
|
// Affiche('Aiguillage CDM'+intToSTR(adr)+'='+IntToStr(etat),clLime);
|
||||||
|
// conversion en position :
|
||||||
// CDM: 0=droit 1=droite 3=gauche
|
// CDM: 0=droit 1=droite 3=gauche
|
||||||
// logiciel : 1=dévié 2=droit
|
// logiciel : 1=dévié 2=droit
|
||||||
|
|
||||||
val(ss,etat,erreur);
|
// aiguillage normal
|
||||||
|
if aiguillage[adr].modele=1 then
|
||||||
|
begin
|
||||||
|
if etat=0 then etatAig:=2 else etatAig:=1;
|
||||||
|
aiguillage[adr].position:=etatAig;
|
||||||
|
aiguillageB[adr].position:=etatAig;
|
||||||
|
Event_Aig(adr,etatAig);
|
||||||
|
end;
|
||||||
|
// TJD TJS
|
||||||
|
if (aiguillage[adr].modele=2) or (aiguillage[adr].modele=3) then
|
||||||
|
begin
|
||||||
|
adr2:=aiguillage[adr].Apointe; // 2eme adresse de la TJD
|
||||||
|
case etat of
|
||||||
|
1 : begin etatAig:=1;EtatAig2:=2;end;
|
||||||
|
4 : begin etatAig:=1;EtatAig2:=1;end;
|
||||||
|
5 : begin etatAig:=2;EtatAig2:=1;end;
|
||||||
|
0 : begin etatAig:=2;EtatAig2:=2;end;
|
||||||
|
end;
|
||||||
|
aiguillage[adr].position:=etatAig;aiguillage[adr2].position:=etatAig2;
|
||||||
|
Event_Aig(adr,etatAig);
|
||||||
|
Event_Aig(adr2,etatAig2);
|
||||||
|
end;
|
||||||
|
if aiguillage[adr].modele=4 then // aiguillage triple
|
||||||
|
begin
|
||||||
|
// état de l'aiguillage 1
|
||||||
|
if (etat=0) or (etat=2) then etatAig:=2;
|
||||||
|
if etat=3 then etatAig:=1;
|
||||||
|
aiguillage[adr].Position:=etatAig;
|
||||||
|
// état de l'aiguillage 2
|
||||||
|
adr2:=aiguillage[adr].AdrTriple;
|
||||||
|
if (etat=0) or (etat=3) then etatAig2:=2;
|
||||||
if etat=2 then etatAig2:=1;
|
if etat=2 then etatAig2:=1;
|
||||||
// conversion en position : 1=dévié (CDM envoie 2 ou 1) 2=droit (CDM envoie 0)
|
aiguillage[adr2].Position:=etatAig2;
|
||||||
Event_Aig(adr,etatAig);
|
Event_Aig(adr,etatAig);
|
||||||
Event_Aig(adr2,etatAig2);
|
Event_Aig(adr2,etatAig2);
|
||||||
end;
|
end;
|
||||||
@@ -6874,7 +7014,7 @@ begin
|
|||||||
Affiche('Version 1.1 : gestion des tableaux indicateurs de direction',clLime);
|
Affiche('Version 1.1 : gestion des tableaux indicateurs de direction',clLime);
|
||||||
Affiche(' gestion du décodeur de signaux Unisemaf Paco (expérimental)',clLime);
|
Affiche(' gestion du décodeur de signaux Unisemaf Paco (expérimental)',clLime);
|
||||||
Affiche(' changement dynamique des feux en cliquant sur son image',clLime);
|
Affiche(' changement dynamique des feux en cliquant sur son image',clLime);
|
||||||
Affiche('Version 1.11 : compatibilité pour la rétrosignalisation non XpressNet (intellibox)',clLime);
|
Affiche('Version 1.11 : compatibilité pour la rétrosignalisation non XpressNet (intellibox)',clLime);
|
||||||
Affiche(' verrouillages routes pour trains consécutifs',clLime);
|
Affiche(' verrouillages routes pour trains consécutifs',clLime);
|
||||||
Affiche('Version 1.2 : Renforcement de l''algorithme de suivi des trains',clLime);
|
Affiche('Version 1.2 : Renforcement de l''algorithme de suivi des trains',clLime);
|
||||||
Affiche('Version 1.3 : Décodeur Unisemaf fonctionnel - Lecture/écriture des CV',clLime);
|
Affiche('Version 1.3 : Décodeur Unisemaf fonctionnel - Lecture/écriture des CV',clLime);
|
||||||
@@ -6886,26 +7026,30 @@ end;
|
|||||||
procedure TFormPrinc.ClientSocketLenzDisconnect(Sender: TObject;
|
procedure TFormPrinc.ClientSocketLenzDisconnect(Sender: TObject;
|
||||||
Socket: TCustomWinSocket);
|
Socket: TCustomWinSocket);
|
||||||
begin
|
begin
|
||||||
parSocket:=False;
|
|
||||||
parSocket:=False;
|
parSocket:=False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var i,j,etat : integer;
|
procedure TFormPrinc.ChronoDetectClick(Sender: TObject);
|
||||||
s : string;
|
|
||||||
var i,j,etat : integer;
|
var i,j,etat : integer;
|
||||||
s : string;
|
s : string;
|
||||||
begin
|
begin
|
||||||
for i:=1 to N_Event_tick do
|
for i:=1 to N_Event_tick do
|
||||||
begin
|
begin
|
||||||
trouve:=false;
|
|
||||||
for j:=1 to 1100 do
|
for j:=1 to 1100 do
|
||||||
begin
|
begin
|
||||||
|
etat:=event_det_tick[i].detecteur[j];
|
||||||
|
if etat<>-1 then
|
||||||
|
begin
|
||||||
s:=IntToSTR(i)+' Tick='+IntToSTR(event_det_tick[i].tick);
|
s:=IntToSTR(i)+' Tick='+IntToSTR(event_det_tick[i].tick);
|
||||||
if etat<>-1 then
|
s:=s+' Det='+IntToSTR(j)+'='+intToSTR(etat);
|
||||||
|
s:=s+' Det suiv='+intTostr(event_det_tick[i].suivant);
|
||||||
|
Affiche(s,clyellow);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
etat:=event_det_tick[i].aiguillage;
|
etat:=event_det_tick[i].aiguillage;
|
||||||
if etat<>-1 then
|
if etat<>-1 then
|
||||||
//s:=s+' Train n°'+intTostr(event_det_tick[i].Train);
|
|
||||||
s:=s+' Det suiv='+intTostr(event_det_tick[i].suivant);
|
|
||||||
begin
|
begin
|
||||||
s:=IntToSTR(i)+' Tick='+IntToSTR(event_det_tick[i].tick);
|
s:=IntToSTR(i)+' Tick='+IntToSTR(event_det_tick[i].tick);
|
||||||
s:=s+' Aig='+intToSTR(etat)+'='+intToSTR(event_det_tick[i].position);
|
s:=s+' Aig='+intToSTR(etat)+'='+intToSTR(event_det_tick[i].position);
|
||||||
@@ -6922,8 +7066,19 @@ var adr,valeur,erreur : integer;
|
|||||||
//TraceListe:=true;
|
//TraceListe:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFormPrinc.ButtonEcrCVClick(Sender: TObject);
|
||||||
|
var adr,valeur,erreur : integer;
|
||||||
|
s : string;
|
||||||
|
begin
|
||||||
|
// doc XpressNet page 55
|
||||||
|
val(EditAdresse.text,adr,erreur);
|
||||||
if (erreur<>0) or (Adr>255) or (Adr<0) then
|
if (erreur<>0) or (Adr>255) or (Adr<0) then
|
||||||
var adr,valeur,erreur : integer;
|
begin
|
||||||
|
EditAdresse.Text:='1';
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
val(EditVal.Text,valeur,erreur);
|
||||||
if (erreur<>0) or (valeur<0) or (valeur>255) then
|
if (erreur<>0) or (valeur<0) or (valeur>255) then
|
||||||
begin
|
begin
|
||||||
EditAdresse.text:='1';
|
EditAdresse.text:='1';
|
||||||
@@ -6996,7 +7151,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TFormPrinc.LireunfichierdeCV1Click(Sender: TObject);
|
procedure TFormPrinc.LireunfichierdeCV1Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Lire_fichier_CV;
|
Lire_fichier_CV;
|
||||||
@@ -7005,66 +7160,56 @@ begin
|
|||||||
procedure TFormPrinc.ButtonLitCVClick(Sender: TObject);
|
procedure TFormPrinc.ButtonLitCVClick(Sender: TObject);
|
||||||
var s,sa: string;
|
var s,sa: string;
|
||||||
fte : textfile;
|
fte : textfile;
|
||||||
i,cv,valeur,erreur : integer;
|
i,cv,valeur,erreur : integer;
|
||||||
begin
|
|
||||||
s:=GetCurrentDir;
|
|
||||||
//s:='C:\Program Files (x86)\Borland\Delphi7\Projects\Signaux_complexes_GL';
|
|
||||||
N_Cv:=0; // nombre de CV recus à 0
|
|
||||||
sa:='';
|
|
||||||
//for cv:=1 to 255 do
|
|
||||||
begin
|
|
||||||
cv:=3;
|
|
||||||
trace:=true;
|
|
||||||
begin
|
begin
|
||||||
s:=#$22+#$18+Char(cv); //CV de 1 à 255 + 1024 (V3.6)
|
s:=GetCurrentDir;
|
||||||
|
//s:='C:\Program Files (x86)\Borland\Delphi7\Projects\Signaux_complexes_GL';
|
||||||
|
N_Cv:=0; // nombre de CV recus à 0
|
||||||
|
sa:='';
|
||||||
|
Affiche('Lecture CV',clyellow);
|
||||||
|
|
||||||
|
val(EditAdresse.Text,cv,erreur);
|
||||||
|
if (erreur<>0) or (cv>255) or (cv<0) then
|
||||||
|
begin
|
||||||
|
EditAdresse.Text:='1';
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
//trace:=true;
|
||||||
|
|
||||||
|
|
||||||
|
s:=#$22+#$15+Char(cv); //CV de 1 à 256 (V3.0)
|
||||||
|
//s:=#$22+#$18+Char(cv); //CV de 1 à 255 + 1024 (V3.6)
|
||||||
|
s:=checksum(s);
|
||||||
|
// envoi de la trame : fait passer la centrale en mode programmation (service)
|
||||||
|
envoi_ss_ack(s);
|
||||||
|
|
||||||
|
// attendre la trame 01 04 05 (env 1s)
|
||||||
|
succes:=false;i:=0;
|
||||||
|
repeat
|
||||||
|
Application.processMessages;
|
||||||
|
Sleep(100);
|
||||||
|
inc(i);
|
||||||
|
until succes or (i>20);
|
||||||
|
|
||||||
if succes then
|
if succes then
|
||||||
begin
|
begin
|
||||||
recu_cv:=false;
|
recu_cv:=false;
|
||||||
|
|
||||||
//Affiche('reçu trame succes',clyellow);
|
//Affiche('reçu trame succes',clyellow);
|
||||||
s:=checksum(s);
|
|
||||||
s:=#$21+#$10; // demande d'envoi du résultat du mode service
|
s:=#$21+#$10; // demande d'envoi du résultat du mode service
|
||||||
s:=checksum(s);
|
s:=checksum(s);
|
||||||
//envoi(s);
|
//envoi(s);
|
||||||
envoi_ss_ack(s);
|
envoi_ss_ack(s);
|
||||||
// attente de la réponse de la centrale
|
Tempo(1);
|
||||||
tablo_CV[cv]:=0;
|
|
||||||
// attente de la réponse de la centrale
|
// attente de la réponse de la centrale
|
||||||
i:=0;
|
i:=0;
|
||||||
repeat
|
repeat
|
||||||
Tempo(2); // attend 200 ms
|
Tempo(2); // attend 200 ms
|
||||||
inc(i);
|
inc(i);
|
||||||
until (N_cv=cv) or (i>4);
|
|
||||||
until recu_cv or (i>4);
|
until recu_cv or (i>4);
|
||||||
begin
|
|
||||||
Affiche('Erreur attente trop longue CV',clred);
|
|
||||||
if (i>4) then
|
if (i>4) then
|
||||||
end;
|
begin
|
||||||
//tablo_cv[cv]:=123;
|
Affiche('Erreur attente trop longue CV',clred);
|
||||||
sa:=sa+'Cv'+IntToSTR(cv)+'='+IntToSTR(Tablo_cv[cv])+' ';
|
exit;
|
||||||
if cv mod 9=0 then
|
|
||||||
begin
|
|
||||||
Affiche(sa,clyellow);sa:='';
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
Affiche(sa,clyellow);sa:='';
|
|
||||||
|
|
||||||
with FormPrinc.SaveDialog do
|
|
||||||
begin
|
|
||||||
InitialDir:=s;
|
|
||||||
title:='Ecrire un nom de fichier dans lequel sauvegarder les CV';
|
|
||||||
DefaultExt:='txt';
|
|
||||||
Filter:='Fichiers texte (*.txt)|*.txt|Tous fichiers (*.*)|*.*';
|
|
||||||
|
|
||||||
if Execute then
|
|
||||||
begin
|
|
||||||
s:=FileName;
|
|
||||||
assignFile(fte,s);
|
|
||||||
rewrite(fte);
|
|
||||||
Writeln(fte,'cv valeur');
|
|
||||||
for cv:=1 to 255 do
|
|
||||||
begin
|
|
||||||
end;
|
end;
|
||||||
sa:=sa+'Cv'+IntToSTR(cv)+'='+IntToSTR(Tablo_cv[cv])+' ';
|
sa:=sa+'Cv'+IntToSTR(cv)+'='+IntToSTR(Tablo_cv[cv])+' ';
|
||||||
Affiche(sa,clyellow);sa:='';
|
Affiche(sa,clyellow);sa:='';
|
||||||
@@ -7073,25 +7218,6 @@ begin
|
|||||||
Affiche('Pas de réponse de l''interface',clOrange);
|
Affiche('Pas de réponse de l''interface',clOrange);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TFormPrinc.Quitter1Click(Sender: TObject);
|
|
||||||
begin
|
|
||||||
close;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TFormPrinc.Button1Click(Sender: TObject);
|
|
||||||
var s : string;
|
|
||||||
begin
|
|
||||||
s:=EditGenli.text; //+#13+#10+#10;
|
|
||||||
terminal:=true;
|
|
||||||
if portCommOuvert then
|
|
||||||
begin
|
|
||||||
Affiche('Envoi a genli de '+ EditGenli.text,clorange);
|
|
||||||
envoi_ss_ack(s);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TFormPrinc.Button2Click(Sender: TObject);
|
|
||||||
|
|
||||||
procedure TFormPrinc.Quitter1Click(Sender: TObject);
|
procedure TFormPrinc.Quitter1Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
@@ -7100,5 +7226,7 @@ begin
|
|||||||
|
|
||||||
procedure TFormPrinc.ConfigClick(Sender: TObject);
|
procedure TFormPrinc.ConfigClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
Tformconfig.create(self);
|
||||||
formconfig.showmodal;
|
formconfig.showmodal;
|
||||||
formconfig.close;
|
formconfig.close;
|
||||||
|
end;
|
||||||
|
|||||||
BIN
UnitSimule.dcu
BIN
UnitSimule.dcu
Binary file not shown.
@@ -46,14 +46,6 @@ object FormSimulation: TFormSimulation
|
|||||||
Text = '1'
|
Text = '1'
|
||||||
OnKeyPress = EditIntervalleKeyPress
|
OnKeyPress = EditIntervalleKeyPress
|
||||||
end
|
end
|
||||||
object CheckBoxRapide: TCheckBox
|
|
||||||
Left = 56
|
|
||||||
Top = 56
|
|
||||||
Width = 97
|
|
||||||
Height = 17
|
|
||||||
Caption = 'Mode rapide'
|
|
||||||
TabOrder = 2
|
|
||||||
end
|
|
||||||
object OpenDialog: TOpenDialog
|
object OpenDialog: TOpenDialog
|
||||||
Left = 48
|
Left = 48
|
||||||
Top = 96
|
Top = 96
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ type
|
|||||||
OpenDialog: TOpenDialog;
|
OpenDialog: TOpenDialog;
|
||||||
EditIntervalle: TEdit;
|
EditIntervalle: TEdit;
|
||||||
Label1: TLabel;
|
Label1: TLabel;
|
||||||
CheckBoxRapide: TCheckBox;
|
|
||||||
procedure ButtonChargeClick(Sender: TObject);
|
procedure ButtonChargeClick(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure EditIntervalleKeyPress(Sender: TObject; var Key: Char);
|
procedure EditIntervalleKeyPress(Sender: TObject; var Key: Char);
|
||||||
@@ -49,8 +48,8 @@ begin
|
|||||||
index_simule:=1;
|
index_simule:=1;
|
||||||
repeat
|
repeat
|
||||||
readln(fte,s);
|
readln(fte,s);
|
||||||
i:=pos('Tick=',s);
|
|
||||||
|
|
||||||
|
i:=pos('Tick=',s);
|
||||||
if i<>0 then
|
if i<>0 then
|
||||||
begin
|
begin
|
||||||
Delete(s,1,i+4);
|
Delete(s,1,i+4);
|
||||||
@@ -58,6 +57,8 @@ begin
|
|||||||
if intervalle<>0 then k:=Index_Simule*Intervalle*10+tick+80 else // démarre dans 8s
|
if intervalle<>0 then k:=Index_Simule*Intervalle*10+tick+80 else // démarre dans 8s
|
||||||
k:=Index_Simule+tick+80 ;
|
k:=Index_Simule+tick+80 ;
|
||||||
Tablo_simule[index_simule].tick:=k;
|
Tablo_simule[index_simule].tick:=k;
|
||||||
|
|
||||||
|
// détecteur?
|
||||||
i:=pos('Det=',s);
|
i:=pos('Det=',s);
|
||||||
if i<>0 then
|
if i<>0 then
|
||||||
begin
|
begin
|
||||||
@@ -71,7 +72,7 @@ begin
|
|||||||
val(s,k,erreur);
|
val(s,k,erreur);
|
||||||
Tablo_simule[index_simule].etat:=k;
|
Tablo_simule[index_simule].etat:=k;
|
||||||
|
|
||||||
s:='Tick='+intToSTR(Tablo_simule[index_simule].tick)+
|
s:=IntToSTR(Index_simule)+' Tick='+intToSTR(Tablo_simule[index_simule].tick)+
|
||||||
' Detecteur='+intToSTR(Tablo_simule[index_simule].detecteur)+
|
' Detecteur='+intToSTR(Tablo_simule[index_simule].detecteur)+
|
||||||
'='+intToSTR(Tablo_simule[index_simule].etat);
|
'='+intToSTR(Tablo_simule[index_simule].etat);
|
||||||
Affiche(s,ClLime);
|
Affiche(s,ClLime);
|
||||||
@@ -79,14 +80,37 @@ begin
|
|||||||
inc(index_simule);
|
inc(index_simule);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// aiguillage?
|
||||||
|
i:=pos('Aig=',s);
|
||||||
|
if i<>0 then
|
||||||
|
begin
|
||||||
|
Delete(s,1,i+3);
|
||||||
|
val(s,k,erreur);
|
||||||
|
Tablo_simule[index_simule].aiguillage:=k;
|
||||||
|
i:=pos('=',s);
|
||||||
|
if i<>0 then
|
||||||
|
begin
|
||||||
|
Delete(s,1,i);
|
||||||
|
val(s,k,erreur);
|
||||||
|
Tablo_simule[index_simule].etat:=k;
|
||||||
|
|
||||||
|
s:=IntToSTR(Index_simule)+' Tick='+intToSTR(Tablo_simule[index_simule].tick)+
|
||||||
|
' Aiguillage='+intToSTR(Tablo_simule[index_simule].aiguillage)+
|
||||||
|
'='+intToSTR(Tablo_simule[index_simule].etat);
|
||||||
|
Affiche(s,ClLime);
|
||||||
|
|
||||||
|
inc(index_simule);
|
||||||
end;
|
end;
|
||||||
sortie:=eof(fte) or (index_simule>199);
|
end;
|
||||||
|
end;
|
||||||
|
sortie:=eof(fte) or (index_simule>Max_Simule);
|
||||||
until sortie ;
|
until sortie ;
|
||||||
|
if index_simule>Max_Simule then Affiche('Tableau maximal atteint',clred);
|
||||||
Affiche('Intervalle='+intToSTR(intervalle),clyellow);
|
Affiche('Intervalle='+intToSTR(intervalle),clyellow);
|
||||||
dec(index_simule);
|
dec(index_simule);
|
||||||
closeFile(fte);
|
closeFile(fte);
|
||||||
FormSimulation.Close;
|
FormSimulation.Close;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
BIN
UnitTCO.dcu
BIN
UnitTCO.dcu
Binary file not shown.
435
UnitTCO.dfm
435
UnitTCO.dfm
@@ -1,10 +1,12 @@
|
|||||||
object FormTCO: TFormTCO
|
object FormTCO: TFormTCO
|
||||||
Left = 267
|
Left = 337
|
||||||
Top = 203
|
Top = 102
|
||||||
Width = 928
|
Width = 928
|
||||||
Height = 590
|
Height = 681
|
||||||
|
VertScrollBar.Visible = False
|
||||||
Caption = 'FormTCO'
|
Caption = 'FormTCO'
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
|
DragMode = dmAutomatic
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
Font.Height = -11
|
Font.Height = -11
|
||||||
@@ -12,9 +14,9 @@ object FormTCO: TFormTCO
|
|||||||
Font.Style = []
|
Font.Style = []
|
||||||
KeyPreview = True
|
KeyPreview = True
|
||||||
OldCreateOrder = False
|
OldCreateOrder = False
|
||||||
Position = poDefault
|
|
||||||
OnActivate = FormActivate
|
OnActivate = FormActivate
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
|
OnDockOver = FormDockOver
|
||||||
OnKeyDown = FormKeyDown
|
OnKeyDown = FormKeyDown
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
@@ -65,21 +67,341 @@ object FormTCO: TFormTCO
|
|||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Label1'
|
Caption = 'Label1'
|
||||||
end
|
end
|
||||||
object Button1: TButton
|
object Label4: TLabel
|
||||||
Left = 320
|
Left = 24
|
||||||
Top = 16
|
Top = 480
|
||||||
Width = 75
|
Width = 175
|
||||||
Height = 25
|
Height = 25
|
||||||
Caption = 'Button1'
|
Caption = 'Adresse de l'#39#233'l'#233'ment: '
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -21
|
||||||
|
Font.Name = 'Arial Narrow'
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 24
|
||||||
|
Top = 512
|
||||||
|
Width = 150
|
||||||
|
Height = 25
|
||||||
|
Caption = 'Type de l'#39#233'l'#233'ment: '
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -21
|
||||||
|
Font.Name = 'Arial Narrow'
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object ImagePalette1: TImage
|
||||||
|
Left = 440
|
||||||
|
Top = 480
|
||||||
|
Width = 41
|
||||||
|
Height = 41
|
||||||
|
DragMode = dmAutomatic
|
||||||
|
OnEndDrag = ImagePalette1EndDrag
|
||||||
|
OnMouseDown = ImagePalette1MouseDown
|
||||||
|
end
|
||||||
|
object ImagePalette2: TImage
|
||||||
|
Left = 512
|
||||||
|
Top = 480
|
||||||
|
Width = 41
|
||||||
|
Height = 41
|
||||||
|
DragMode = dmAutomatic
|
||||||
|
OnEndDrag = ImagePalette2EndDrag
|
||||||
|
OnMouseDown = ImagePalette2MouseDown
|
||||||
|
end
|
||||||
|
object ImagePalette3: TImage
|
||||||
|
Left = 584
|
||||||
|
Top = 480
|
||||||
|
Width = 41
|
||||||
|
Height = 41
|
||||||
|
DragMode = dmAutomatic
|
||||||
|
OnEndDrag = ImagePalette3EndDrag
|
||||||
|
OnMouseDown = ImagePalette3MouseDown
|
||||||
|
end
|
||||||
|
object ImagePalette4: TImage
|
||||||
|
Left = 656
|
||||||
|
Top = 480
|
||||||
|
Width = 41
|
||||||
|
Height = 41
|
||||||
|
DragMode = dmAutomatic
|
||||||
|
OnEndDrag = ImagePalette4EndDrag
|
||||||
|
OnMouseDown = ImagePalette4MouseDown
|
||||||
|
end
|
||||||
|
object ImagePaletteDroit: TImage
|
||||||
|
Left = 440
|
||||||
|
Top = 528
|
||||||
|
Width = 41
|
||||||
|
Height = 41
|
||||||
|
DragMode = dmAutomatic
|
||||||
|
OnEndDrag = ImagePaletteDroitEndDrag
|
||||||
|
OnMouseDown = ImagePaletteDroitMouseDown
|
||||||
|
end
|
||||||
|
object ImageSupG: TImage
|
||||||
|
Left = 512
|
||||||
|
Top = 528
|
||||||
|
Width = 41
|
||||||
|
Height = 41
|
||||||
|
DragMode = dmAutomatic
|
||||||
|
OnEndDrag = ImageSupGEndDrag
|
||||||
|
OnMouseDown = ImageSupGMouseDown
|
||||||
|
end
|
||||||
|
object ImageSupD: TImage
|
||||||
|
Left = 584
|
||||||
|
Top = 528
|
||||||
|
Width = 41
|
||||||
|
Height = 41
|
||||||
|
DragMode = dmAutomatic
|
||||||
|
OnEndDrag = ImageSupDEndDrag
|
||||||
|
OnMouseDown = ImageSupDMouseDown
|
||||||
|
end
|
||||||
|
object ImageInfD: TImage
|
||||||
|
Left = 656
|
||||||
|
Top = 528
|
||||||
|
Width = 41
|
||||||
|
Height = 41
|
||||||
|
DragMode = dmAutomatic
|
||||||
|
OnEndDrag = ImageInfDEndDrag
|
||||||
|
OnMouseDown = ImageInfDMouseDown
|
||||||
|
end
|
||||||
|
object ImageInfG: TImage
|
||||||
|
Left = 728
|
||||||
|
Top = 528
|
||||||
|
Width = 41
|
||||||
|
Height = 41
|
||||||
|
DragMode = dmAutomatic
|
||||||
|
OnEndDrag = ImageInfGEndDrag
|
||||||
|
OnMouseDown = ImageInfGMouseDown
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 424
|
||||||
|
Top = 488
|
||||||
|
Width = 9
|
||||||
|
Height = 19
|
||||||
|
Caption = '1'
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 496
|
||||||
|
Top = 488
|
||||||
|
Width = 9
|
||||||
|
Height = 19
|
||||||
|
Caption = '2'
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 568
|
||||||
|
Top = 488
|
||||||
|
Width = 9
|
||||||
|
Height = 19
|
||||||
|
Caption = '3'
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 640
|
||||||
|
Top = 488
|
||||||
|
Width = 9
|
||||||
|
Height = 19
|
||||||
|
Caption = '4'
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label10: TLabel
|
||||||
|
Left = 424
|
||||||
|
Top = 536
|
||||||
|
Width = 9
|
||||||
|
Height = 19
|
||||||
|
Caption = '5'
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label11: TLabel
|
||||||
|
Left = 496
|
||||||
|
Top = 536
|
||||||
|
Width = 9
|
||||||
|
Height = 19
|
||||||
|
Caption = '6'
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label12: TLabel
|
||||||
|
Left = 568
|
||||||
|
Top = 536
|
||||||
|
Width = 9
|
||||||
|
Height = 19
|
||||||
|
Caption = '7'
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label13: TLabel
|
||||||
|
Left = 640
|
||||||
|
Top = 536
|
||||||
|
Width = 9
|
||||||
|
Height = 19
|
||||||
|
Caption = '8'
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label14: TLabel
|
||||||
|
Left = 712
|
||||||
|
Top = 536
|
||||||
|
Width = 9
|
||||||
|
Height = 19
|
||||||
|
Caption = '9'
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label15: TLabel
|
||||||
|
Left = 24
|
||||||
|
Top = 544
|
||||||
|
Width = 158
|
||||||
|
Height = 25
|
||||||
|
Caption = 'Image de l'#39#233'l'#233'ment: '
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -21
|
||||||
|
Font.Name = 'Arial Narrow'
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object ImageDiag1: TImage
|
||||||
|
Left = 440
|
||||||
|
Top = 576
|
||||||
|
Width = 41
|
||||||
|
Height = 41
|
||||||
|
DragMode = dmAutomatic
|
||||||
|
OnEndDrag = ImageDiag1EndDrag
|
||||||
|
OnMouseDown = ImageDiag1MouseDown
|
||||||
|
end
|
||||||
|
object Label16: TLabel
|
||||||
|
Left = 416
|
||||||
|
Top = 584
|
||||||
|
Width = 18
|
||||||
|
Height = 19
|
||||||
|
Caption = '10'
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object ImageDiag2: TImage
|
||||||
|
Left = 512
|
||||||
|
Top = 576
|
||||||
|
Width = 41
|
||||||
|
Height = 41
|
||||||
|
DragMode = dmAutomatic
|
||||||
|
OnEndDrag = ImageDiag2EndDrag
|
||||||
|
OnMouseDown = ImageDiag2MouseDown
|
||||||
|
end
|
||||||
|
object Label17: TLabel
|
||||||
|
Left = 488
|
||||||
|
Top = 584
|
||||||
|
Width = 17
|
||||||
|
Height = 19
|
||||||
|
Caption = '11'
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object EditAdrElement: TEdit
|
||||||
|
Left = 200
|
||||||
|
Top = 480
|
||||||
|
Width = 89
|
||||||
|
Height = 33
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -21
|
||||||
|
Font.Name = 'Arial Narrow'
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = EditAdrElementChange
|
||||||
|
end
|
||||||
|
object EditTypeElement: TEdit
|
||||||
|
Left = 200
|
||||||
|
Top = 512
|
||||||
|
Width = 89
|
||||||
|
Height = 33
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -21
|
||||||
|
Font.Name = 'Arial Narrow'
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
ReadOnly = True
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnClick = Button1Click
|
Text = 'EditTypeElement'
|
||||||
|
end
|
||||||
|
object ButtonSauveTCO: TButton
|
||||||
|
Left = 784
|
||||||
|
Top = 480
|
||||||
|
Width = 91
|
||||||
|
Height = 33
|
||||||
|
Caption = 'Sauvegarder TCO'
|
||||||
|
TabOrder = 2
|
||||||
|
WordWrap = True
|
||||||
|
OnClick = ButtonSauveTCOClick
|
||||||
|
end
|
||||||
|
object ButtonRedessine: TButton
|
||||||
|
Left = 784
|
||||||
|
Top = 520
|
||||||
|
Width = 89
|
||||||
|
Height = 33
|
||||||
|
Caption = 'Redessine'
|
||||||
|
TabOrder = 3
|
||||||
|
OnClick = ButtonRedessineClick
|
||||||
end
|
end
|
||||||
object ScrollBox: TScrollBox
|
object ScrollBox: TScrollBox
|
||||||
Left = 16
|
Left = 16
|
||||||
Top = 40
|
Top = 40
|
||||||
Width = 865
|
Width = 865
|
||||||
Height = 433
|
Height = 433
|
||||||
TabOrder = 1
|
TabOrder = 4
|
||||||
object ImageTCO: TImage
|
object ImageTCO: TImage
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
@@ -88,13 +410,59 @@ object FormTCO: TFormTCO
|
|||||||
PopupMenu = PopupMenu1
|
PopupMenu = PopupMenu1
|
||||||
OnClick = ImageTCOClick
|
OnClick = ImageTCOClick
|
||||||
OnContextPopup = ImageTCOContextPopup
|
OnContextPopup = ImageTCOContextPopup
|
||||||
|
OnDragOver = ImageTCODragOver
|
||||||
|
OnMouseDown = ImageTCOMouseDown
|
||||||
|
OnMouseMove = ImageTCOMouseMove
|
||||||
|
OnMouseUp = ImageTCOMouseUp
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object EditTypeImage: TEdit
|
||||||
|
Left = 200
|
||||||
|
Top = 552
|
||||||
|
Width = 89
|
||||||
|
Height = 33
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -21
|
||||||
|
Font.Name = 'Arial Narrow'
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 5
|
||||||
|
Text = 'EditTypeImage'
|
||||||
|
OnKeyPress = EditTypeImageKeyPress
|
||||||
|
end
|
||||||
|
object Button1: TButton
|
||||||
|
Left = 784
|
||||||
|
Top = 560
|
||||||
|
Width = 89
|
||||||
|
Height = 25
|
||||||
|
Caption = 'Simu det 1'
|
||||||
|
TabOrder = 6
|
||||||
|
OnClick = Button1Click
|
||||||
|
end
|
||||||
|
object Button2: TButton
|
||||||
|
Left = 320
|
||||||
|
Top = 520
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Caption = 'Simu Det 0'
|
||||||
|
TabOrder = 7
|
||||||
|
OnClick = Button2Click
|
||||||
|
end
|
||||||
object PopupMenu1: TPopupMenu
|
object PopupMenu1: TPopupMenu
|
||||||
Left = 568
|
Left = 352
|
||||||
Top = 296
|
Top = 472
|
||||||
object Position1: TMenuItem
|
object MenuCouper: TMenuItem
|
||||||
Caption = 'Position'
|
Caption = 'Couper'
|
||||||
|
OnClick = MenuCouperClick
|
||||||
|
end
|
||||||
|
object MenuCopier: TMenuItem
|
||||||
|
Caption = 'Copier'
|
||||||
|
OnClick = MenuCopierClick
|
||||||
|
end
|
||||||
|
object MenuColler: TMenuItem
|
||||||
|
Caption = 'Coller'
|
||||||
|
OnClick = MenuCollerClick
|
||||||
end
|
end
|
||||||
object N1: TMenuItem
|
object N1: TMenuItem
|
||||||
Caption = '-'
|
Caption = '-'
|
||||||
@@ -109,6 +477,43 @@ object FormTCO: TFormTCO
|
|||||||
Caption = 'Aiguillage droit ; pointe '#224' droite'
|
Caption = 'Aiguillage droit ; pointe '#224' droite'
|
||||||
OnClick = aiguillageD_PDClick
|
OnClick = aiguillageD_PDClick
|
||||||
end
|
end
|
||||||
|
object N2: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object Aiguillagegauchepointedroite1: TMenuItem
|
||||||
|
Caption = 'Aiguillage gauche ; pointe '#224' droite'
|
||||||
|
OnClick = Aiguillagegauchepointedroite1Click
|
||||||
|
end
|
||||||
|
object Aiguillagedroitpointegauche1: TMenuItem
|
||||||
|
Caption = 'Aiguillage droit : pointe '#224' gauche'
|
||||||
|
OnClick = Aiguillagedroitpointegauche1Click
|
||||||
|
end
|
||||||
|
object N3: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object Elmentdroit1: TMenuItem
|
||||||
|
Caption = 'El'#233'ment droit'
|
||||||
|
OnClick = Elmentdroit1Click
|
||||||
|
end
|
||||||
|
object N4: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object Courbegaucheversdroite1: TMenuItem
|
||||||
|
Caption = 'Courbe infD'
|
||||||
|
OnClick = Courbegaucheversdroite1Click
|
||||||
|
end
|
||||||
|
object Courbedroiteversgauche1: TMenuItem
|
||||||
|
Caption = 'Courbe infG'
|
||||||
|
OnClick = Courbedroiteversgauche1Click
|
||||||
|
end
|
||||||
|
object CourbeSupD1: TMenuItem
|
||||||
|
Caption = 'Courbe SupD'
|
||||||
|
OnClick = CourbeSupD1Click
|
||||||
|
end
|
||||||
|
object CourbeSupG1: TMenuItem
|
||||||
|
Caption = 'Courbe SupG'
|
||||||
|
OnClick = CourbeSupG1Click
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
1398
UnitTCO.pas
1398
UnitTCO.pas
File diff suppressed because it is too large
Load Diff
112
configcapde.cfg
112
configcapde.cfg
@@ -1,112 +0,0 @@
|
|||||||
/******************************************
|
|
||||||
/ fichier de configuration de signaux complexes
|
|
||||||
/ cap de bouheyre avec signaux - 2018
|
|
||||||
/****************************************
|
|
||||||
/ Sans Log=0 / Avec Log=1 : génère un fichier log
|
|
||||||
Log=0
|
|
||||||
/ Affichage du débug du calcul des routes, et enregistrement dans le log si la variable précédente est à 1
|
|
||||||
TraceDet=0
|
|
||||||
/ si 1 envoie un 0 après le pilotage des décodeurs LEB
|
|
||||||
RazSignaux=0
|
|
||||||
/
|
|
||||||
/ modélisation des aiguillages : détermine les éléments connectés aux 3 branches des aiguilles (Pointe, Droit, Dévié (S)
|
|
||||||
/ adresse d'aiguillage[B],P=élément vers pointe D=élément vers Droit, S=élément vers dévié
|
|
||||||
/ B pour adresse d'aiguillage déja utilisée
|
|
||||||
/ Elément = détecteur (valeur uniquement numérique) ou aiguillage (adresse [TRI,TJS,TJD]+branche de connexion (P S ou D)
|
|
||||||
/ Exemples : 1,P518,D523,S3P signifie : définition de l'aiguillage @1 : sur pointe relié au détecteur 518
|
|
||||||
/ sur Droit relié au détecteur 518
|
|
||||||
/ sur Dévié, relié à l'aiguillage 3 en pointe
|
|
||||||
/ Voir la documentation des signaux complexes pour une description complete
|
|
||||||
/ S'il n'y a pas de détecteur connecté à une branche d'aiguillage, mettre 0.
|
|
||||||
1,P2P,D3P,S1BS
|
|
||||||
1B,P553,D16P,S1S
|
|
||||||
2,P1P,D4P,S2BS
|
|
||||||
2B,P521,D16D,S2S
|
|
||||||
3,P1D,D522,S5BP
|
|
||||||
4,P2D,D554,S6BP
|
|
||||||
5,P9P,S15P,D5BS
|
|
||||||
5B,P3S,S5D,D545
|
|
||||||
6,P10P,S546,D6BS
|
|
||||||
6B,P4S,D545,S6D
|
|
||||||
7,P15S,D566,S565
|
|
||||||
8,P20P,D566,S565
|
|
||||||
9,P5P,D530,S17P
|
|
||||||
10,P6P,D530,S18P
|
|
||||||
13,P17S,D563,S564
|
|
||||||
14,P18S,D563,S564
|
|
||||||
15,P5S,D546,S7P
|
|
||||||
16,P1BD,S16BS,D2BD
|
|
||||||
16B,P0,S16S,D557
|
|
||||||
17,P9S,D531,S13P
|
|
||||||
18,P10S,D562,S14P
|
|
||||||
20,P8P,D547,S0
|
|
||||||
21,P25P,S537,D23S
|
|
||||||
22,P24P,S561,D25S
|
|
||||||
23,P569,S21D,D538
|
|
||||||
24,P22P,S26P,D513
|
|
||||||
25,P21P,S22D,D570
|
|
||||||
26,P24S,S515,D514
|
|
||||||
28,P30P,S29P,D570
|
|
||||||
29,P28S,D516,S31P
|
|
||||||
30,P28P,D32S,S539
|
|
||||||
31TRI,27,P28S,D518,S0,S2-517
|
|
||||||
32,P571,D538,S30D
|
|
||||||
0
|
|
||||||
//
|
|
||||||
/ modélisation du réseau par branche
|
|
||||||
/ 1 ligne par branche - le sens de parcours de la description n'a pas d'importance.
|
|
||||||
/ Chaque ligne (branche) doit comporter au moins un détecteur et au moins aiguillage
|
|
||||||
/ @ détecteur A=@aiguillage
|
|
||||||
/ chaque ligne doit commencer par un aiguillage et se terminer par un aiguillage
|
|
||||||
/ Terminer par les brances par 0
|
|
||||||
/ Exemple : 519 est un détecteur - A2 est l'aiguillage 2 - A1B est l'aiguillage 1bis
|
|
||||||
/
|
|
||||||
/ rouge - jaune
|
|
||||||
A20,547,561,A22,A24,A26,515,518,A31,A29,A28,A30,539,522,A3,A1,A2,A4,A6B,545,A5B,A3
|
|
||||||
A26,514,517,A31
|
|
||||||
A26,515,518,A31
|
|
||||||
A24,513,516,A29
|
|
||||||
/grande boucle extérieure départ de couche rouge: de 569 à 569
|
|
||||||
A23,538,A32,571,553,A1B,A16,A2B,521,569,A23
|
|
||||||
/ grande boucle intérieure
|
|
||||||
A21,A25,570,A28
|
|
||||||
A4,554,537,A21
|
|
||||||
/ couche jaune
|
|
||||||
A10,530,A9,A5,A15,546,A6
|
|
||||||
A18,562,531,A17
|
|
||||||
A14,563,A13
|
|
||||||
A14,564,A13
|
|
||||||
/
|
|
||||||
A7,565,A8
|
|
||||||
A7,566,A8
|
|
||||||
A16B,557,0
|
|
||||||
0
|
|
||||||
/
|
|
||||||
/ liste des signaux
|
|
||||||
/ la liste doit être terminée par une adresse à 0
|
|
||||||
/ forme : 2=2 feux(carré violet/blanc) / 3=3 feux / 4=4 feux (carré) / 5=5 feux (carré + blanc)
|
|
||||||
/ 7=7 feux (carré+blanc + ralentissement / 9=9 feux (blanc ou violet + rappel ralentissement)
|
|
||||||
/ type de décodeur : 0=feu virtuel 1=digital Bahn 2=CDF 3=LDT 4=LEB
|
|
||||||
/ l'énumération des détecteurs ne nécessite pas de parenthèses si il est seul, mais il faut des parenthèses si
|
|
||||||
/ le signal concerne plusieurs voies (donc détecteurs)
|
|
||||||
/ Notation de chaque ligne:
|
|
||||||
/ adresse de base du signal, forme, réserve, type de décodeur [, (détecteur,..detecteur , élément suivant ..) ,
|
|
||||||
/ avec ou sans demande de verrouillage du feu au carré (0 ou 1)]
|
|
||||||
161,4,0,4,(538,A32),0
|
|
||||||
169,9,0,4,(539,A30),0,
|
|
||||||
177,9,0,4,(569,A23),0
|
|
||||||
185,4,0,4,(570,A25),0
|
|
||||||
193,4,0,4,(516,A29),0
|
|
||||||
201,2,0,4,(517,31TRI,518,31TRI),0
|
|
||||||
209,9,0,4,(561,547),0
|
|
||||||
217,2,0,4,(514,A26,515,A26),0
|
|
||||||
225,9,0,4,(516,A29),0
|
|
||||||
233,4,0,4,(547,A20),0
|
|
||||||
1001,3,0,0,(537,554),0
|
|
||||||
1003,3,0,0,(553,A1B),0
|
|
||||||
1005,3,0,0,(571,553),0
|
|
||||||
1007,3,0,0,(554,A4),0
|
|
||||||
1009,3,0,0,(522,539),0
|
|
||||||
1011,3,0,0,(521,569),0
|
|
||||||
1013,3,0,0,(565,A7),0
|
|
||||||
0
|
|
||||||
12
tco.cfg
Normal file
12
tco.cfg
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
/type(0=rien 1=voie/détecteur 2=aig 3=aigBis , adresse , image=1 à 10
|
||||||
|
/Dalle TCO
|
||||||
|
(2,123,1)(2,100,1)(1,513,5)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)
|
||||||
|
(2,124,2)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)
|
||||||
|
(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,8)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)
|
||||||
|
(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,9)(1,000,5)(2,000,1)(1,000,5)(0,000,8)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)
|
||||||
|
(2,007,0)(1,520,0)(2,020,0)(2,021,0)(2,028,0)(2,026,0)(0,000,10)(2,027,0)(2,025,0)(2,031,0)(1,534,0)(2,023,0)(0,000,11)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)
|
||||||
|
(0,000,0)(0,000,0)(0,000,0)(0,000,0)(1,000,5)(2,000,3)(1,000,5)(1,000,5)(1,000,5)(1,000,5)(1,000,5)(1,000,5)(1,000,5)(2,000,1)(1,000,5)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)
|
||||||
|
(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)
|
||||||
|
(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)
|
||||||
|
(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)
|
||||||
|
(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)(0,000,0)
|
||||||
Binary file not shown.
@@ -22,7 +22,7 @@ var
|
|||||||
FormVersion: TFormVersion;
|
FormVersion: TFormVersion;
|
||||||
Lance_verif : integer;
|
Lance_verif : integer;
|
||||||
|
|
||||||
Const Version='1.3'; //Version='1.2';// sert à la comparaison de la version publiée
|
Const Version='1.31'; //Version='1.2';// sert à la comparaison de la version publiée
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@@ -105,6 +105,7 @@ var s,s2,s3,Version_p,Url,LocalFile : string;
|
|||||||
V_publie,V_utile : real;
|
V_publie,V_utile : real;
|
||||||
begin
|
begin
|
||||||
//Affiche('vérifie version',clLime);
|
//Affiche('vérifie version',clLime);
|
||||||
|
// exit ;//&&&&&&&&&&&&&&&&&&
|
||||||
Url:='http://cdmrail.free.fr/ForumCDR/viewtopic.php?f=77&t=3906#p50499';
|
Url:='http://cdmrail.free.fr/ForumCDR/viewtopic.php?f=77&t=3906#p50499';
|
||||||
LocalFile:='page.txt';
|
LocalFile:='page.txt';
|
||||||
trouve_version:=false;
|
trouve_version:=false;
|
||||||
|
|||||||
13
versions.txt
Normal file
13
versions.txt
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
Version 1.0 : première version
|
||||||
|
Version 1.01 : gestion des trajectoires vers les buttoirs
|
||||||
|
Version 1.02 : vérification automatique des versions
|
||||||
|
Version 1.1 : gestion des tableaux indicateurs de direction
|
||||||
|
gestion du décodeur de signaux Unisemaf Paco (expérimental)
|
||||||
|
changement dynamique des feux en cliquant sur son image
|
||||||
|
Version 1.11 : compatibilité pour la rétrosignalisation XpressNet tiers (genli)
|
||||||
|
verrouillages routes pour trains consécutifs
|
||||||
|
Version 1.2 : Renforcement de l'algorithme de suivi des trains
|
||||||
|
Version 1.3 : Décodeur Unisemaf fonctionnel - Lecture/écriture des CV
|
||||||
|
Protocoles variables de l'interface
|
||||||
|
Configuration statique modifiable dans menu
|
||||||
|
Version 1.31 : Correction gestion aiguillage triple
|
||||||
Reference in New Issue
Block a user