V2.4
This commit is contained in:
Binary file not shown.
Binary file not shown.
BIN
UnitConfig.dcu
BIN
UnitConfig.dcu
Binary file not shown.
@@ -1,6 +1,6 @@
|
|||||||
object FormConfig: TFormConfig
|
object FormConfig: TFormConfig
|
||||||
Left = 194
|
Left = 228
|
||||||
Top = 249
|
Top = 189
|
||||||
Hint =
|
Hint =
|
||||||
'Modifie les fichiers de configuration selon les s'#233'lections chois' +
|
'Modifie les fichiers de configuration selon les s'#233'lections chois' +
|
||||||
'ies'
|
'ies'
|
||||||
@@ -1753,7 +1753,7 @@ object FormConfig: TFormConfig
|
|||||||
end
|
end
|
||||||
object ButtonAppliquerEtFermer: TButton
|
object ButtonAppliquerEtFermer: TButton
|
||||||
Left = 384
|
Left = 384
|
||||||
Top = 464
|
Top = 472
|
||||||
Width = 201
|
Width = 201
|
||||||
Height = 25
|
Height = 25
|
||||||
Caption = 'Enregistrer la configuration et Fermer'
|
Caption = 'Enregistrer la configuration et Fermer'
|
||||||
@@ -1764,7 +1764,7 @@ object FormConfig: TFormConfig
|
|||||||
end
|
end
|
||||||
object Button2: TButton
|
object Button2: TButton
|
||||||
Left = 24
|
Left = 24
|
||||||
Top = 464
|
Top = 472
|
||||||
Width = 201
|
Width = 201
|
||||||
Height = 25
|
Height = 25
|
||||||
Caption = 'Fermer sans enregistrer la configuration'
|
Caption = 'Fermer sans enregistrer la configuration'
|
||||||
@@ -1775,8 +1775,8 @@ object FormConfig: TFormConfig
|
|||||||
Left = 8
|
Left = 8
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 585
|
Width = 585
|
||||||
Height = 441
|
Height = 457
|
||||||
ActivePage = TabSheetBranches
|
ActivePage = TabSheetAig
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clBackground
|
Font.Color = clBackground
|
||||||
Font.Height = -11
|
Font.Height = -11
|
||||||
@@ -2120,7 +2120,7 @@ object FormConfig: TFormConfig
|
|||||||
ImageIndex = 1
|
ImageIndex = 1
|
||||||
object Label9: TLabel
|
object Label9: TLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 384
|
Top = 400
|
||||||
Width = 297
|
Width = 297
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Ces param'#232'tres sont utilis'#233's en fonctionnement sans CDM Rail'
|
Caption = 'Ces param'#232'tres sont utilis'#233's en fonctionnement sans CDM Rail'
|
||||||
@@ -2131,7 +2131,7 @@ object FormConfig: TFormConfig
|
|||||||
Top = 8
|
Top = 8
|
||||||
Width = 297
|
Width = 297
|
||||||
Height = 113
|
Height = 113
|
||||||
Caption = 'Acc'#232's USB - S'#233'rie '#224' l'#39'interface vers la centrale LENZ'
|
Caption = 'Acc'#232's USB/S'#233'rie '#224' l'#39'interface vers la centrale via XpressNet'
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object Label3: TLabel
|
object Label3: TLabel
|
||||||
Left = 16
|
Left = 16
|
||||||
@@ -2212,7 +2212,7 @@ object FormConfig: TFormConfig
|
|||||||
object RadioButton3: TRadioButton
|
object RadioButton3: TRadioButton
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 56
|
Top = 56
|
||||||
Width = 265
|
Width = 273
|
||||||
Height = 17
|
Height = 17
|
||||||
Caption = '2 : Ent'#234'te E4 - Suffixe 0D 0D 0A (arduino XpressNet)'
|
Caption = '2 : Ent'#234'te E4 - Suffixe 0D 0D 0A (arduino XpressNet)'
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
@@ -2223,7 +2223,7 @@ object FormConfig: TFormConfig
|
|||||||
Top = 216
|
Top = 216
|
||||||
Width = 297
|
Width = 297
|
||||||
Height = 73
|
Height = 73
|
||||||
Caption = 'Acc'#232's r'#233'seau '#224' l'#39'interface vers la centrale LENZ Ethernet'
|
Caption = 'Acc'#232's Ethernet '#224' l'#39'interface vers la centrale via XpressNet'
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object Label7: TLabel
|
object Label7: TLabel
|
||||||
Left = 14
|
Left = 14
|
||||||
@@ -2267,8 +2267,8 @@ object FormConfig: TFormConfig
|
|||||||
BevelKind = bkFlat
|
BevelKind = bkFlat
|
||||||
BorderStyle = bsNone
|
BorderStyle = bsNone
|
||||||
Lines.Strings = (
|
Lines.Strings = (
|
||||||
'1. Port COM de l'#39'adresse USB de l'#39'interface LI-USB - '
|
'1. Port COM de l'#39'adresse USB de l'#39'interface '
|
||||||
'LI100 - LI100F - LI101F - GENLI.'
|
'XpressNet.'
|
||||||
'Attention de COM1 '#224' 9 - Si le port de l'#39'interface '
|
'Attention de COM1 '#224' 9 - Si le port de l'#39'interface '
|
||||||
'USB>9, il faut le changer manuellement dans le '
|
'USB>9, il faut le changer manuellement dans le '
|
||||||
'gestionnaire des p'#233'riph'#233'riques. Mettre 0 si inutilis'#233'e. '
|
'gestionnaire des p'#233'riph'#233'riques. Mettre 0 si inutilis'#233'e. '
|
||||||
@@ -2335,9 +2335,16 @@ object FormConfig: TFormConfig
|
|||||||
Left = 8
|
Left = 8
|
||||||
Top = 296
|
Top = 296
|
||||||
Width = 297
|
Width = 297
|
||||||
Height = 81
|
Height = 89
|
||||||
Caption = 'Divers'
|
Caption = 'Divers'
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
|
object Label32: TLabel
|
||||||
|
Left = 14
|
||||||
|
Top = 66
|
||||||
|
Width = 200
|
||||||
|
Height = 13
|
||||||
|
Caption = 'Temporisation de s'#233'quencement d'#39'init (ms)'
|
||||||
|
end
|
||||||
object CheckBoxRazSignaux: TCheckBox
|
object CheckBoxRazSignaux: TCheckBox
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 16
|
Top = 16
|
||||||
@@ -2362,6 +2369,14 @@ object FormConfig: TFormConfig
|
|||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
end
|
end
|
||||||
|
object EditTempoAig: TEdit
|
||||||
|
Left = 224
|
||||||
|
Top = 62
|
||||||
|
Width = 41
|
||||||
|
Height = 21
|
||||||
|
TabOrder = 2
|
||||||
|
Text = 'EditTempoAig'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object TabSheetAig: TTabSheet
|
object TabSheetAig: TTabSheet
|
||||||
@@ -2502,9 +2517,9 @@ object FormConfig: TFormConfig
|
|||||||
Caption = 'LabelTJD1'
|
Caption = 'LabelTJD1'
|
||||||
end
|
end
|
||||||
object GroupBox10: TGroupBox
|
object GroupBox10: TGroupBox
|
||||||
Left = 40
|
Left = 8
|
||||||
Top = 64
|
Top = 64
|
||||||
Width = 201
|
Width = 273
|
||||||
Height = 73
|
Height = 73
|
||||||
Caption = 'Vitesse de franchissement d'#233'vi'#233' :'
|
Caption = 'Vitesse de franchissement d'#233'vi'#233' :'
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
@@ -2693,9 +2708,9 @@ object FormConfig: TFormConfig
|
|||||||
object LabelAdrSig: TLabel
|
object LabelAdrSig: TLabel
|
||||||
Left = 13
|
Left = 13
|
||||||
Top = 20
|
Top = 20
|
||||||
Width = 154
|
Width = 52
|
||||||
Height = 19
|
Height = 19
|
||||||
Caption = 'Adresse du signal = '
|
Caption = 'Signal '
|
||||||
Font.Charset = ANSI_CHARSET
|
Font.Charset = ANSI_CHARSET
|
||||||
Font.Color = clBlack
|
Font.Color = clBlack
|
||||||
Font.Height = -16
|
Font.Height = -16
|
||||||
@@ -2798,7 +2813,7 @@ object FormConfig: TFormConfig
|
|||||||
Top = 48
|
Top = 48
|
||||||
Width = 129
|
Width = 129
|
||||||
Height = 21
|
Height = 21
|
||||||
ItemHeight = 0
|
ItemHeight = 13
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
OnChange = ComboBoxDecChange
|
OnChange = ComboBoxDecChange
|
||||||
end
|
end
|
||||||
@@ -2883,6 +2898,15 @@ object FormConfig: TFormConfig
|
|||||||
TabOrder = 10
|
TabOrder = 10
|
||||||
OnClick = CheckVerrouCarreClick
|
OnClick = CheckVerrouCarreClick
|
||||||
end
|
end
|
||||||
|
object EditAdrSig: TEdit
|
||||||
|
Left = 72
|
||||||
|
Top = 18
|
||||||
|
Width = 41
|
||||||
|
Height = 21
|
||||||
|
TabOrder = 11
|
||||||
|
Text = ' '
|
||||||
|
OnChange = EditAdrSigChange
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object RichSig: TRichEdit
|
object RichSig: TRichEdit
|
||||||
Left = 0
|
Left = 0
|
||||||
|
|||||||
@@ -186,6 +186,9 @@ type
|
|||||||
Label31: TLabel;
|
Label31: TLabel;
|
||||||
RichAct: TRichEdit;
|
RichAct: TRichEdit;
|
||||||
CheckBoxInitAig: TCheckBox;
|
CheckBoxInitAig: TCheckBox;
|
||||||
|
EditAdrSig: TEdit;
|
||||||
|
Label32: TLabel;
|
||||||
|
EditTempoAig: TEdit;
|
||||||
procedure ButtonAppliquerEtFermerClick(Sender: TObject);
|
procedure ButtonAppliquerEtFermerClick(Sender: TObject);
|
||||||
procedure Button2Click(Sender: TObject);
|
procedure Button2Click(Sender: TObject);
|
||||||
procedure FormActivate(Sender: TObject);
|
procedure FormActivate(Sender: TObject);
|
||||||
@@ -224,6 +227,7 @@ type
|
|||||||
procedure CheckRAZClick(Sender: TObject);
|
procedure CheckRAZClick(Sender: TObject);
|
||||||
procedure Edit_HGChange(Sender: TObject);
|
procedure Edit_HGChange(Sender: TObject);
|
||||||
procedure CheckInverseClick(Sender: TObject);
|
procedure CheckInverseClick(Sender: TObject);
|
||||||
|
procedure EditAdrSigChange(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Déclarations privées }
|
{ Déclarations privées }
|
||||||
public
|
public
|
||||||
@@ -248,6 +252,7 @@ TCO_ch='TCO';
|
|||||||
CDM_ch='CDM';
|
CDM_ch='CDM';
|
||||||
Serveur_interface_ch='Serveur_interface';
|
Serveur_interface_ch='Serveur_interface';
|
||||||
fenetre_ch='Fenetre';
|
fenetre_ch='Fenetre';
|
||||||
|
Tempo_aig_ch='Tempo_Aig';
|
||||||
NOTIF_VERSION_ch='NOTIF_VERSION';
|
NOTIF_VERSION_ch='NOTIF_VERSION';
|
||||||
verif_version_ch='verif_version';
|
verif_version_ch='verif_version';
|
||||||
Fonte_ch='Fonte';
|
Fonte_ch='Fonte';
|
||||||
@@ -484,8 +489,10 @@ begin
|
|||||||
if c<>'Z' then s:=s+c;
|
if c<>'Z' then s:=s+c;
|
||||||
end;
|
end;
|
||||||
// vitesse de franchissement
|
// vitesse de franchissement
|
||||||
if aiguillage[i].vitesse=30 then s:=s+',30';
|
if aiguillage[i].vitesse=0 then s:=s+',V0';
|
||||||
if aiguillage[i].vitesse=60 then s:=s+',60';
|
if aiguillage[i].vitesse=30 then s:=s+',V30';
|
||||||
|
if aiguillage[i].vitesse=60 then s:=s+',V60';
|
||||||
|
if aiguillage[i].inversionCDM=1 then s:=s+',I1' else s:=s+',I0';
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -663,6 +670,10 @@ begin
|
|||||||
writeln(fichierN,Init_Aig_ch+'='+s);
|
writeln(fichierN,Init_Aig_ch+'='+s);
|
||||||
copie_commentaire;
|
copie_commentaire;
|
||||||
|
|
||||||
|
// temporisation initialisation des aiguillages
|
||||||
|
writeln(fichierN,Tempo_aig_ch+'=',IntToSTR(Tempo_aig));
|
||||||
|
copie_commentaire;
|
||||||
|
|
||||||
// plein écran
|
// plein écran
|
||||||
writeln(fichierN,Fenetre_ch+'=',fenetre);
|
writeln(fichierN,Fenetre_ch+'=',fenetre);
|
||||||
copie_commentaire;
|
copie_commentaire;
|
||||||
@@ -844,6 +855,10 @@ begin
|
|||||||
changeInterface:=changeInterface or (i<>port);
|
changeInterface:=changeInterface or (i<>port);
|
||||||
port:=i;
|
port:=i;
|
||||||
|
|
||||||
|
Val(editTempoAig.Text,i,erreur);
|
||||||
|
if i>3000 then begin labelInfo.Caption:='Temporisation de séquencement incorrecte ';exit;end;
|
||||||
|
Tempo_Aig:=i;
|
||||||
|
|
||||||
// contrôle protocole interface COM3:57600,N,8,1,2
|
// contrôle protocole interface COM3:57600,N,8,1,2
|
||||||
s:=EditComUSB.Text;
|
s:=EditComUSB.Text;
|
||||||
if not(config_com(s)) then begin labelInfo.Caption:='Protocole série USB Interface incorrect';exit;end;
|
if not(config_com(s)) then begin labelInfo.Caption:='Protocole série USB Interface incorrect';exit;end;
|
||||||
@@ -969,7 +984,7 @@ begin
|
|||||||
EditP2.Visible:=false;
|
EditP2.Visible:=false;
|
||||||
EditP3.Visible:=false;
|
EditP3.Visible:=false;
|
||||||
EditP4.Visible:=false;
|
EditP4.Visible:=false;
|
||||||
CheckInverse.Visible:=false;
|
// CheckInverse.Visible:=false;
|
||||||
LabelTJD1.Visible:=false;
|
LabelTJD1.Visible:=false;
|
||||||
LabelTJD2.Visible:=false;
|
LabelTJD2.Visible:=false;
|
||||||
EditDevieS2.Visible:=false;
|
EditDevieS2.Visible:=false;
|
||||||
@@ -994,6 +1009,7 @@ begin
|
|||||||
EditPortCDM.Text:=IntToSTR(portCDM);
|
EditPortCDM.Text:=IntToSTR(portCDM);
|
||||||
EditIPLenz.text:=AdresseIP;
|
EditIPLenz.text:=AdresseIP;
|
||||||
EditportLenz.text:=IntToSTR(Port);
|
EditportLenz.text:=IntToSTR(Port);
|
||||||
|
EditTempoAig.Text:=IntToSTR(Tempo_Aig);
|
||||||
EditComUSB.Text:=PortCom;
|
EditComUSB.Text:=PortCom;
|
||||||
EditTempoOctetUSB.text:=IntToSTR(TempoOctet);
|
EditTempoOctetUSB.text:=IntToSTR(TempoOctet);
|
||||||
EditTempoReponse.Text:=IntToSTR(TimoutMaxInterface);
|
EditTempoReponse.Text:=IntToSTR(TimoutMaxInterface);
|
||||||
@@ -1257,12 +1273,16 @@ begin
|
|||||||
EditP2.Visible:=false;
|
EditP2.Visible:=false;
|
||||||
EditP3.Visible:=false;
|
EditP3.Visible:=false;
|
||||||
EditP4.Visible:=false;
|
EditP4.Visible:=false;
|
||||||
CheckInverse.Visible:=false;
|
// CheckInverse.Visible:=false;
|
||||||
labelTJD1.Visible:=false;
|
labelTJD1.Visible:=false;
|
||||||
LabelTJD2.Visible:=false;
|
LabelTJD2.Visible:=false;
|
||||||
EditDevieS2.Visible:=false;
|
EditDevieS2.Visible:=false;
|
||||||
Label18.Visible:=false;
|
Label18.Visible:=false;
|
||||||
tjd:=false;
|
tjd:=false;
|
||||||
|
CheckInverse.checked:=aiguillage[adresse].inversionCDM=1;
|
||||||
|
if aiguillage[adresse].vitesse=0 then begin RadioButtonSans.checked:=true;RadioButton30kmh.checked:=false;RadioButton60kmh.checked:=false;end;
|
||||||
|
if aiguillage[adresse].vitesse=30 then begin RadioButtonSans.checked:=false;RadioButton30kmh.checked:=true;RadioButton60kmh.checked:=false;end;
|
||||||
|
if aiguillage[adresse].vitesse=60 then begin RadioButtonSans.checked:=false;RadioButton30kmh.checked:=false;RadioButton60kmh.checked:=true;end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
// affiche(s,clOrange);
|
// affiche(s,clOrange);
|
||||||
@@ -1370,8 +1390,7 @@ begin
|
|||||||
|
|
||||||
RE_ColorLine(Formconfig.RichSig,ligneCliquee,Clyellow);
|
RE_ColorLine(Formconfig.RichSig,ligneCliquee,Clyellow);
|
||||||
|
|
||||||
ss:='Signal '+InttoSTr(Adresse);
|
FormConfig.EditAdrSig.text:=InttoSTr(Adresse);
|
||||||
formconfig.LabelAdrSig.Caption:= ss;
|
|
||||||
i:=Index_feu(adresse);
|
i:=Index_feu(adresse);
|
||||||
with formconfig.ImageSignal do
|
with formconfig.ImageSignal do
|
||||||
begin
|
begin
|
||||||
@@ -2359,6 +2378,25 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFormConfig.EditAdrSigChange(Sender: TObject);
|
||||||
|
var s : string;
|
||||||
|
i, erreur : integer;
|
||||||
|
begin
|
||||||
|
if clicliste then exit;
|
||||||
|
|
||||||
|
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||||
|
with Formconfig do
|
||||||
|
begin
|
||||||
|
s:=EditAdrSig.Text;
|
||||||
|
Val(s,i,erreur);
|
||||||
|
if erreur<>0 then begin LabelInfo.caption:='Erreur adresse signal ';exit;end;
|
||||||
|
LabelInfo.caption:=' ';
|
||||||
|
feux[lignecliquee+1].Adresse:=i;
|
||||||
|
s:=encode_sig(lignecliquee+1);
|
||||||
|
RichSig.Lines[lignecliquee]:=s;
|
||||||
|
feux[lignecliquee+1].modifie:=true;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
BIN
UnitDebug.dcu
BIN
UnitDebug.dcu
Binary file not shown.
@@ -99,7 +99,6 @@ var
|
|||||||
NbEl : integer;
|
NbEl : integer;
|
||||||
Det : array[1..3] of integer; // tableau des evts détecteurs par train
|
Det : array[1..3] of integer; // tableau des evts détecteurs par train
|
||||||
end;
|
end;
|
||||||
// tick 1/10s,détecteur
|
|
||||||
N_Event_tick : integer ; // dernier index
|
N_Event_tick : integer ; // dernier index
|
||||||
|
|
||||||
// tableau des évènements détecteurs et aiguillages
|
// tableau des évènements détecteurs et aiguillages
|
||||||
|
|||||||
BIN
UnitPilote.dcu
BIN
UnitPilote.dcu
Binary file not shown.
@@ -31,17 +31,30 @@ object FormPilote: TFormPilote
|
|||||||
end
|
end
|
||||||
object ImagePilote: TImage
|
object ImagePilote: TImage
|
||||||
Left = 208
|
Left = 208
|
||||||
Top = 64
|
Top = 48
|
||||||
Width = 113
|
Width = 113
|
||||||
Height = 129
|
Height = 129
|
||||||
end
|
end
|
||||||
object LabelNbFeux: TLabel
|
object LabelNbFeux: TLabel
|
||||||
Left = 208
|
Left = 208
|
||||||
Top = 208
|
Top = 224
|
||||||
Width = 120
|
Width = 120
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Nombre de feux '#224' allumer'
|
Caption = 'Nombre de feux '#224' allumer'
|
||||||
end
|
end
|
||||||
|
object LabelDec: TLabel
|
||||||
|
Left = 216
|
||||||
|
Top = 192
|
||||||
|
Width = 72
|
||||||
|
Height = 19
|
||||||
|
Caption = 'LabelDec'
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
object GroupBox1: TGroupBox
|
object GroupBox1: TGroupBox
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 40
|
Top = 40
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ type
|
|||||||
ButtonPilote: TButton;
|
ButtonPilote: TButton;
|
||||||
EditNbreFeux: TEdit;
|
EditNbreFeux: TEdit;
|
||||||
LabelNbFeux: TLabel;
|
LabelNbFeux: TLabel;
|
||||||
|
LabelDec: TLabel;
|
||||||
procedure RadioVertClick(Sender: TObject);
|
procedure RadioVertClick(Sender: TObject);
|
||||||
procedure RadioVertCliClick(Sender: TObject);
|
procedure RadioVertCliClick(Sender: TObject);
|
||||||
procedure RadioJauneClick(Sender: TObject);
|
procedure RadioJauneClick(Sender: TObject);
|
||||||
@@ -211,11 +212,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormPilote.FormCreate(Sender: TObject);
|
procedure TFormPilote.FormCreate(Sender: TObject);
|
||||||
var i : integer;
|
var i,d : integer;
|
||||||
begin
|
begin
|
||||||
radioVert.Checked:=false;
|
radioVert.Checked:=false;
|
||||||
radioVertCli.Checked:=false;
|
radioVertCli.Checked:=false;
|
||||||
i:=index_feu(AdrPilote);
|
i:=index_feu(AdrPilote);
|
||||||
|
d:=feux[i].decodeur;
|
||||||
|
//labelDec.Caption:=decodeur[d];
|
||||||
|
//Affiche(decodeur[d],clred);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -259,4 +263,5 @@ if ord(Key) = VK_RETURN then
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
BIN
UnitPrinc.dcu
BIN
UnitPrinc.dcu
Binary file not shown.
@@ -1235,7 +1235,7 @@ object FormPrinc: TFormPrinc
|
|||||||
Top = 24
|
Top = 24
|
||||||
Width = 49
|
Width = 49
|
||||||
Height = 21
|
Height = 21
|
||||||
Hint = 'Adresse accessoire ou de CV'
|
Hint = 'Adresse accessoire'
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
Text = '1'
|
Text = '1'
|
||||||
end
|
end
|
||||||
|
|||||||
298
UnitPrinc.pas
298
UnitPrinc.pas
@@ -194,13 +194,12 @@ type TBranche = record
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
Taiguillage = record
|
Taiguillage = record
|
||||||
objet : integer; // objet dans CDM rail
|
|
||||||
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 (positions centrale lenz)
|
position, // position actuelle : 1=dévié 2=droit (centrale LENZ)
|
||||||
Adrtriple, // 2eme adresse pour un aiguillage triple
|
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é pour la commande (en mode sans CDM) 0=normal 1=inversé (positionné dans fichier config_gl section_init
|
inversion : integer; // pilotage inversé pour la commande (en mode sans CDM) 0=normal 1=inversé (positionné dans fichier config_gl section_init
|
||||||
InversionCDM : integer ; // inversion pour les aiguillages en lecture (paramètre I)
|
InversionCDM : integer ; // inversion pour les aiguillages en lecture (paramètre I1)
|
||||||
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)
|
||||||
|
|
||||||
ADroit : integer ; // (TJD:identifiant extérieur) connecté sur la position droite en talon
|
ADroit : integer ; // (TJD:identifiant extérieur) connecté sur la position droite en talon
|
||||||
@@ -234,7 +233,7 @@ TMA = (valide,devalide);
|
|||||||
|
|
||||||
var
|
var
|
||||||
ancien_tablo_signalCplx,EtatsignalCplx : array[0..MaxAcc] of word;
|
ancien_tablo_signalCplx,EtatsignalCplx : array[0..MaxAcc] of word;
|
||||||
tempsCli,NbreFeux,pasreponse,AdrDevie,fenetre,
|
tempsCli,NbreFeux,pasreponse,AdrDevie,fenetre,Tempo_Aig,
|
||||||
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,NbrePN,ServeurInterfaceCDM,
|
Nbre_recu_cdm,Tempo_chgt_feux,Adj1,Adj2,NbrePN,ServeurInterfaceCDM,
|
||||||
ServeurRetroCDM,TailleFonte,Nb_Det_Dist : integer;
|
ServeurRetroCDM,TailleFonte,Nb_Det_Dist : integer;
|
||||||
@@ -360,6 +359,7 @@ procedure connecte_USB;
|
|||||||
procedure deconnecte_usb;
|
procedure deconnecte_usb;
|
||||||
function IsWow64Process: Boolean;
|
function IsWow64Process: Boolean;
|
||||||
procedure Dessine_feu_mx(CanvasDest : Tcanvas;x,y : integer;FrX,frY : real;adresse : integer;orientation : integer);
|
procedure Dessine_feu_mx(CanvasDest : Tcanvas;x,y : integer;FrX,frY : real;adresse : integer;orientation : integer);
|
||||||
|
procedure Pilote_acc0_X(adresse : integer;octet : byte);
|
||||||
procedure pilote_acc(adresse : integer;octet : byte;Acc : TAccessoire);
|
procedure pilote_acc(adresse : integer;octet : byte;Acc : TAccessoire);
|
||||||
function etat_signal_suivant(Adresse,rang : integer) : integer;
|
function etat_signal_suivant(Adresse,rang : integer) : integer;
|
||||||
function suivant_alg3(prec : integer;typeELprec : integer;var actuel : integer;typeElActuel : integer;alg : integer) : integer;
|
function suivant_alg3(prec : integer;typeELprec : integer;var actuel : integer;typeElActuel : integer;alg : integer) : integer;
|
||||||
@@ -1086,7 +1086,7 @@ function Index_feu(adresse : integer) : integer;
|
|||||||
var i : integer;
|
var i : integer;
|
||||||
trouve : boolean;
|
trouve : boolean;
|
||||||
begin
|
begin
|
||||||
i:=1;
|
i:=1;
|
||||||
repeat
|
repeat
|
||||||
trouve:=feux[i].adresse=adresse;
|
trouve:=feux[i].adresse=adresse;
|
||||||
if not(trouve) then inc(i);
|
if not(trouve) then inc(i);
|
||||||
@@ -1121,7 +1121,6 @@ Procedure TFormprinc.ImageOnClick(Sender : Tobject);
|
|||||||
var s : string;
|
var s : string;
|
||||||
P_image_pilote : Timage;
|
P_image_pilote : Timage;
|
||||||
i,erreur : integer;
|
i,erreur : integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
P_image_pilote:=Sender as TImage; // récupérer l'objet image de la forme pilote
|
P_image_pilote:=Sender as TImage; // récupérer l'objet image de la forme pilote
|
||||||
s:=P_Image_pilote.Hint;
|
s:=P_Image_pilote.Hint;
|
||||||
@@ -1354,8 +1353,8 @@ begin
|
|||||||
temps:=0;
|
temps:=0;
|
||||||
repeat
|
repeat
|
||||||
Application.processMessages;
|
Application.processMessages;
|
||||||
inc(temps);Sleep(100);
|
inc(temps);Sleep(50);
|
||||||
until ferme or ack or nack or (temps>TimoutMaxInterface); // l'interface répond < 5s en mode normal et 1,5 mn en mode programmation
|
until ferme or ack or nack or (temps>(TimoutMaxInterface*3)); // l'interface répond < 5s en mode normal et 1,5 mn en mode programmation
|
||||||
if not(ack) or nack then
|
if not(ack) or nack then
|
||||||
begin
|
begin
|
||||||
Affiche('Pas de réponse de l''interface',clRed);inc(pasreponse);
|
Affiche('Pas de réponse de l''interface',clRed);inc(pasreponse);
|
||||||
@@ -1402,7 +1401,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// prépare la chaîne de commande pour un accessoire via CDM
|
// prépare la chaîne de commande pour un accessoire via CDM
|
||||||
Function chaine_CDM_Acc(adresse,etat1 : integer) : string;
|
Function chaine_CDM_Acc(adresse,etat : integer) : string;
|
||||||
var so,sx,s : string;
|
var so,sx,s : string;
|
||||||
begin
|
begin
|
||||||
{ exemple de commande envoyée au serveur pour un manoeuvrer accessoire
|
{ exemple de commande envoyée au serveur pour un manoeuvrer accessoire
|
||||||
@@ -1421,7 +1420,7 @@ begin
|
|||||||
}
|
}
|
||||||
so:=place_id('C-C-01-0004-CMDACC-DCCAC');
|
so:=place_id('C-C-01-0004-CMDACC-DCCAC');
|
||||||
s:=s+'AD='+format('%.*d',[1,adresse])+';';
|
s:=s+'AD='+format('%.*d',[1,adresse])+';';
|
||||||
s:=s+'STATE='+format('%.*d',[1,etat1])+';';
|
s:=s+'STATE='+format('%.*d',[1,etat])+';';
|
||||||
|
|
||||||
sx:=format('%.*d',[2,2])+'|'; // 2 paramètres
|
sx:=format('%.*d',[2,2])+'|'; // 2 paramètres
|
||||||
so:=so+ '|'+format('%.*d',[3,length(s)+length(sx)])+'|'+sx;
|
so:=so+ '|'+format('%.*d',[3,length(s)+length(sx)])+'|'+sx;
|
||||||
@@ -1477,38 +1476,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// pilote accessoire en entrée 0->2 1->1
|
|
||||||
procedure pilote_acc01(adresse : integer;octet : byte);
|
|
||||||
var groupe : integer ;
|
|
||||||
fonction : byte;
|
|
||||||
s : string;
|
|
||||||
begin
|
|
||||||
// test si pilotage inversé
|
|
||||||
if octet=0 then octet:=2;
|
|
||||||
if aiguillage[adresse].inversion=1 then
|
|
||||||
begin
|
|
||||||
if octet=1 then octet:=2 else octet:=1;
|
|
||||||
end;
|
|
||||||
if (octet=0) or (octet>2) then exit;
|
|
||||||
groupe:=(adresse-1) div 4;
|
|
||||||
fonction:=((adresse-1) mod 4)*2 + (octet-1);
|
|
||||||
// pilotage à 1
|
|
||||||
s:=#$52+Char(groupe)+char(fonction or $88); // activer la sortie
|
|
||||||
s:=checksum(s);
|
|
||||||
envoi(s); // envoi de la trame et attente Ack
|
|
||||||
sleep(10); // temps minimal pour ne pas avoir le défaut station occupée qd on pilote un signal leb
|
|
||||||
//temps:=aiguillage[adresse].temps;if temps=0 then temps:=4;
|
|
||||||
// si l'accessoire est un feu, fixer l tempo à 1
|
|
||||||
//if index_feu(adresse)<>0 then temps:=1;
|
|
||||||
|
|
||||||
//if portCommOuvert or parSocketLenz then tempo(temps);
|
|
||||||
// pilotage à 0 pour éteindre le pilotage de la bobine du relais
|
|
||||||
s:=#$52+Char(groupe)+char(fonction or $80); // désactiver la sortie
|
|
||||||
s:=checksum(s);
|
|
||||||
envoi(s); // envoi de la trame et attente Ack
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure vitesse_loco(loco : integer;vitesse : integer;sens : boolean);
|
procedure vitesse_loco(loco : integer;vitesse : integer;sens : boolean);
|
||||||
var s : string;
|
var s : string;
|
||||||
begin
|
begin
|
||||||
@@ -1763,15 +1730,16 @@ var code,aspect,combine : word;
|
|||||||
s : string;
|
s : string;
|
||||||
procedure envoi5_LEB(selection :byte);
|
procedure envoi5_LEB(selection :byte);
|
||||||
var i : integer;
|
var i : integer;
|
||||||
|
octet : byte;
|
||||||
begin
|
begin
|
||||||
s:='';
|
s:='';
|
||||||
for i:=0 to 4 do
|
for i:=0 to 4 do
|
||||||
begin
|
begin
|
||||||
if (testBit(selection,i)) then begin pilote_acc(adresse+i,1,feu);s:=s+'1';end
|
if (testBit(selection,i)) then begin octet:=1;s:=s+'1';end
|
||||||
else begin pilote_acc(adresse+i,2,feu) ; s:=s+'0';end;
|
else begin octet:=2 ; s:=s+'0';end;
|
||||||
//if (testBit(selection,i)) then begin pilote_acc(adresse+i,1);s:=s+'1';end
|
Pilote_acc(adresse+i,octet,feu);
|
||||||
//else begin pilote_acc(adresse+i,2) ; s:=s+'0';end;
|
// le décodeur LEB nécessite qu'on envoie 0 après son pilotage ; si on est en mode usb ou ethernet
|
||||||
//Sleep(60);
|
if (portCommOuvert or parSocketLenz) then Pilote_acc0_X(adresse+i,octet);
|
||||||
end;
|
end;
|
||||||
//Affiche(inttoStr(selection),clOrange);
|
//Affiche(inttoStr(selection),clOrange);
|
||||||
//Affiche(s,clOrange);
|
//Affiche(s,clOrange);
|
||||||
@@ -3407,10 +3375,10 @@ var s,sa,chaine,SOrigine: string;
|
|||||||
IndexBranche_trouve:=i;
|
IndexBranche_trouve:=i;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure lit_config;
|
procedure lit_config;
|
||||||
var s,sa,chaine,SOrigine: string;
|
var s,sa,chaine,SOrigine: string;
|
||||||
c,paig : char;
|
c,paig : char;
|
||||||
tec,tjd,tjs,s2,trouve,triple,debugConfig,multiple,fini,finifeux,trouve_NbDetDist,trouve_ipv4_PC,trouve_retro,
|
tec,tjd,tjs,s2,trouve,triple,debugConfig,multiple,fini,finifeux,trouve_NbDetDist,trouve_ipv4_PC,trouve_retro,
|
||||||
trouve_sec_init,trouve_init_aig,trouve_lay,trouve_IPV4_INTERFACE,trouve_PROTOCOLE_SERIE,trouve_INTER_CAR,
|
trouve_sec_init,trouve_init_aig,trouve_lay,trouve_IPV4_INTERFACE,trouve_PROTOCOLE_SERIE,trouve_INTER_CAR,
|
||||||
trouve_Tempo_maxi,trouve_Entete,trouve_tco,trouve_cdm,trouve_Serveur_interface,trouve_fenetre,
|
trouve_Tempo_maxi,trouve_Entete,trouve_tco,trouve_cdm,trouve_Serveur_interface,trouve_fenetre,
|
||||||
trouve_NOTIF_VERSION,trouve_verif_version,trouve_fonte,trouve_tempo_aig : boolean;
|
trouve_NOTIF_VERSION,trouve_verif_version,trouve_fonte,trouve_tempo_aig : boolean;
|
||||||
@@ -3460,6 +3428,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
debugConfig:=false;
|
||||||
trouve_NbDetDist:=false;
|
trouve_NbDetDist:=false;
|
||||||
trouve_ipv4_PC:=false;
|
trouve_ipv4_PC:=false;
|
||||||
trouve_retro:=false;
|
trouve_retro:=false;
|
||||||
@@ -3483,7 +3452,6 @@ begin
|
|||||||
Nb_Det_Dist:=3;
|
Nb_Det_Dist:=3;
|
||||||
// initialisation des aiguillages avec des valeurs par défaut
|
// initialisation des aiguillages avec des valeurs par défaut
|
||||||
for i:=1 to MaxAcc do
|
for i:=1 to MaxAcc do
|
||||||
begin
|
|
||||||
begin
|
begin
|
||||||
Aiguillage[i].modele:=0 ; // sans existence
|
Aiguillage[i].modele:=0 ; // sans existence
|
||||||
Aiguillage[i].position:=const_inconnu; // position inconnue
|
Aiguillage[i].position:=const_inconnu; // position inconnue
|
||||||
@@ -3491,16 +3459,17 @@ begin
|
|||||||
Aiguillage[i].inversion:=0;
|
Aiguillage[i].inversion:=0;
|
||||||
Aiguillage[i].inversionCDM:=0;
|
Aiguillage[i].inversionCDM:=0;
|
||||||
end;
|
end;
|
||||||
for i:=1 to 1024 do
|
for i:=1 to 1024 do
|
||||||
begin
|
begin
|
||||||
Detecteur[i].etat:=false;
|
Detecteur[i].etat:=false;
|
||||||
Detecteur[i].train:='0';
|
Detecteur[i].train:='0';
|
||||||
Ancien_detecteur[i]:=false;
|
Ancien_detecteur[i]:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Affiche('lecture du fichier de configuration client-GL.cfg',clyellow);
|
Affiche('lecture du fichier de configuration client-GL.cfg',clyellow);
|
||||||
|
{$I+}
|
||||||
try
|
try
|
||||||
try
|
assign(fichier,'client-GL.cfg');
|
||||||
reset(fichier);
|
reset(fichier);
|
||||||
except
|
except
|
||||||
Affiche('Erreur fatale: fichier client-gl.cfg non trouvé',clred);
|
Affiche('Erreur fatale: fichier client-gl.cfg non trouvé',clred);
|
||||||
@@ -3623,6 +3592,17 @@ begin
|
|||||||
if i<>0 then
|
if i<>0 then
|
||||||
begin
|
begin
|
||||||
inc(nv);
|
inc(nv);
|
||||||
|
trouve_fenetre:=true;
|
||||||
|
delete(s,i,length(sa));
|
||||||
|
val(s,fenetre,erreur);
|
||||||
|
if fenetre=1 then Formprinc.windowState:=wsMaximized;
|
||||||
|
end;
|
||||||
|
|
||||||
|
sa:=uppercase(Tempo_Aig_ch)+'=';
|
||||||
|
i:=pos(sa,s);
|
||||||
|
if i<>0 then
|
||||||
|
begin
|
||||||
|
inc(nv);
|
||||||
trouve_Tempo_aig:=true;
|
trouve_Tempo_aig:=true;
|
||||||
delete(s,i,length(sa));
|
delete(s,i,length(sa));
|
||||||
val(s,Tempo_Aig,erreur);
|
val(s,Tempo_Aig,erreur);
|
||||||
@@ -3731,11 +3711,11 @@ begin
|
|||||||
trouve_NbDetDist:=true;
|
trouve_NbDetDist:=true;
|
||||||
delete(s,i,length(sa));
|
delete(s,i,length(sa));
|
||||||
i:=0;
|
i:=0;
|
||||||
val(s,i,erreur);
|
val(s,i,erreur);
|
||||||
if i<2 then begin i:=2;Affiche('Attention '+nb_det_dist_ch+' ramené à '+IntToSTR(i),clOrange); end;
|
if i<2 then begin i:=2;Affiche('Attention '+nb_det_dist_ch+' ramené à '+IntToSTR(i),clOrange); end;
|
||||||
Nb_Det_Dist:=i;
|
Nb_Det_Dist:=i;
|
||||||
end;
|
end;
|
||||||
inc(it);
|
inc(it);
|
||||||
|
|
||||||
until (Nv>=19) or (it>30);
|
until (Nv>=19) or (it>30);
|
||||||
|
|
||||||
@@ -3750,6 +3730,7 @@ begin
|
|||||||
if not(trouve_init_aig) then s:=s+' '+INIT_AIG_ch;
|
if not(trouve_init_aig) then s:=s+' '+INIT_AIG_ch;
|
||||||
if not(trouve_lay) then s:=s+' '+LAY_ch;
|
if not(trouve_lay) then s:=s+' '+LAY_ch;
|
||||||
if not(trouve_INTER_CAR) then s:=s+' '+INTER_CAR_ch;
|
if not(trouve_INTER_CAR) then s:=s+' '+INTER_CAR_ch;
|
||||||
|
if not(trouve_Tempo_maxi) then s:=s+' '+Tempo_maxi_ch;
|
||||||
if not(trouve_Entete) then s:=s+' '+Entete_ch;
|
if not(trouve_Entete) then s:=s+' '+Entete_ch;
|
||||||
if not(trouve_TCO) then s:=s+' '+TCO_ch;
|
if not(trouve_TCO) then s:=s+' '+TCO_ch;
|
||||||
if not(trouve_CDM) then s:=s+' '+CDM_ch;
|
if not(trouve_CDM) then s:=s+' '+CDM_ch;
|
||||||
@@ -3761,12 +3742,15 @@ begin
|
|||||||
if not(trouve_fonte) then s:=s+' '+fonte_ch;
|
if not(trouve_fonte) then s:=s+' '+fonte_ch;
|
||||||
|
|
||||||
if s<>'' then affiche(s,clred);
|
if s<>'' then affiche(s,clred);
|
||||||
|
|
||||||
//Affiche('Valeurs d''initialisation des aiguillages',clyellow);
|
//Affiche('Valeurs d''initialisation des aiguillages',clyellow);
|
||||||
|
|
||||||
closefile(fichier);
|
closefile(fichier);
|
||||||
|
|
||||||
Affiche('lecture du fichier de configuration config.cfg',clyellow);
|
Affiche('lecture du fichier de configuration config.cfg',clyellow);
|
||||||
|
{$I+}
|
||||||
try
|
try
|
||||||
|
assign(fichier,'config.cfg');
|
||||||
reset(fichier);
|
reset(fichier);
|
||||||
except
|
except
|
||||||
Affiche('Fichier config.cfg non trouvé',clred);
|
Affiche('Fichier config.cfg non trouvé',clred);
|
||||||
@@ -3835,14 +3819,14 @@ begin
|
|||||||
ComptEl:=0;Compt_It:=0;Num_element:=Num_element+1;
|
ComptEl:=0;Compt_It:=0;Num_element:=Num_element+1;
|
||||||
// préparer l'enregistrement pour la boucle de ligne
|
// préparer l'enregistrement pour la boucle de ligne
|
||||||
virgule:=pos(',',s);
|
virgule:=pos(',',s);
|
||||||
if tjd then enregistrement:=s else
|
if tjd then enregistrement:=s else
|
||||||
begin
|
begin
|
||||||
enregistrement:=copy(s,1,virgule-1);
|
|
||||||
enregistrement:=copy(s,1,virgule-1);
|
enregistrement:=copy(s,1,virgule-1);
|
||||||
delete(s,1,virgule);
|
delete(s,1,virgule);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Num_Champ:=1;
|
Num_Champ:=1;
|
||||||
|
itl:=0;
|
||||||
repeat // parcoure la ligne
|
repeat // parcoure la ligne
|
||||||
if (debugConfig) then Affiche('boucle de ligne: '+s,clYellow);
|
if (debugConfig) then Affiche('boucle de ligne: '+s,clYellow);
|
||||||
if (length(enregistrement)<>0) then
|
if (length(enregistrement)<>0) then
|
||||||
@@ -3854,15 +3838,15 @@ begin
|
|||||||
ComptEl:=ComptEl+1;
|
ComptEl:=ComptEl+1;
|
||||||
decodeAig(enregistrement,detect,c);
|
decodeAig(enregistrement,detect,c);
|
||||||
if c='' then c:='Z';
|
if c='' then c:='Z';
|
||||||
aiguillage[aig].Apointe:=detect;
|
aiguillage[aig].Apointe:=detect;
|
||||||
aiguillage[aig].ApointeB:=c;
|
aiguillage[aig].ApointeB:=c;
|
||||||
|
|
||||||
virgule:=pos(',',s);if virgule=0 then virgule:=length(s)+1;
|
virgule:=pos(',',s);if virgule=0 then virgule:=length(s)+1;
|
||||||
enregistrement:=copy(s,1,virgule-1);
|
enregistrement:=copy(s,1,virgule-1);
|
||||||
delete(s,1,virgule);
|
delete(s,1,virgule);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
if (length(enregistrement)<>0) then // section droite
|
if (length(enregistrement)<>0) then // section droite
|
||||||
if (enregistrement[1]='D') then
|
if (enregistrement[1]='D') then
|
||||||
begin
|
begin
|
||||||
@@ -3899,6 +3883,7 @@ begin
|
|||||||
virgule:=pos(',',s);if virgule=0 then virgule:=length(s)+1;
|
virgule:=pos(',',s);if virgule=0 then virgule:=length(s)+1;
|
||||||
enregistrement:=copy(s,1,virgule-1);
|
enregistrement:=copy(s,1,virgule-1);
|
||||||
delete(s,1,virgule);
|
delete(s,1,virgule);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if (length(enregistrement)<>0) then
|
if (length(enregistrement)<>0) then
|
||||||
@@ -3946,38 +3931,48 @@ begin
|
|||||||
if S2 and not(tec) then begin aiguillage[aig].Adevie2:=detect;aiguillage[aig].Adevie2B:=c;end;
|
if S2 and not(tec) then begin aiguillage[aig].Adevie2:=detect;aiguillage[aig].Adevie2B:=c;end;
|
||||||
if S2 and tec then begin aiguillage[aig].Adevie2:=detect;aiguillage[aig].Adevie2B:='T';end;
|
if S2 and tec then begin aiguillage[aig].Adevie2:=detect;aiguillage[aig].Adevie2B:='T';end;
|
||||||
|
|
||||||
|
virgule:=pos(',',s);if virgule=0 then virgule:=length(s)+1;
|
||||||
enregistrement:=copy(s,1,virgule-1);
|
enregistrement:=copy(s,1,virgule-1);
|
||||||
enregistrement:=copy(s,1,virgule-1);
|
delete(s,1,virgule);
|
||||||
delete(s,1,virgule);
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
|
// inversion aiguillage
|
||||||
if (length(enregistrement)<>0) then
|
if (length(enregistrement)<>0) then
|
||||||
if (enregistrement[1]='I') then
|
if (Num_champ=5) then
|
||||||
begin
|
begin
|
||||||
delete(enregistrement,1,1);
|
if (enregistrement[1]='I') then
|
||||||
Val(enregistrement,adr,erreur);
|
begin
|
||||||
|
inc(Num_Champ);
|
||||||
|
delete(enregistrement,1,1);
|
||||||
|
end;
|
||||||
|
Val(enregistrement,adr,erreur);
|
||||||
if erreur<>0 then begin Affiche('Erreur Inversion ; ligne '+sOrigine,clred);closefile(fichier);exit;end;
|
if erreur<>0 then begin Affiche('Erreur Inversion ; ligne '+sOrigine,clred);closefile(fichier);exit;end;
|
||||||
//Affiche(intTostr(adr),clblue);
|
enregistrement:='';
|
||||||
Aiguillage[aig].inversionCDM:=adr;
|
|
||||||
//Affiche(intTostr(adr),clblue);
|
//Affiche(intTostr(adr),clblue);
|
||||||
|
Aiguillage[aig].inversionCDM:=adr;
|
||||||
//Affiche(s+'/'+Enregistrement,clLime);
|
end;
|
||||||
// si vitesse définie
|
|
||||||
Val(enregistrement,adr,erreur);
|
// si vitesse définie
|
||||||
if erreur=0 then
|
if Num_Champ=4 then
|
||||||
begin
|
begin
|
||||||
//Affiche('section vitesse définie aig='+intToSTR(aig)+'/'+intToSTR(adr),clyellow);
|
inc(num_champ);
|
||||||
aiguillage[aig].vitesse:=adr;
|
if (length(enregistrement)<>0) then
|
||||||
enregistrement:='';
|
if enregistrement[1]='V' then delete(enregistrement,1,1);
|
||||||
virgule:=pos(',',s);if virgule=0 then virgule:=length(s)+1;
|
Val(enregistrement,adr,erreur);
|
||||||
|
if (erreur=0) or (erreur=1) then
|
||||||
|
begin
|
||||||
|
//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;
|
||||||
|
enregistrement:=copy(s,1,virgule-1);
|
||||||
|
delete(s,1,virgule);
|
||||||
s:='';//enregistrement:='';
|
s:='';//enregistrement:='';
|
||||||
delete(s,1,virgule);
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
inc(itl);
|
inc(itl);
|
||||||
until enregistrement='' ;
|
until (enregistrement='') or (itl>2);
|
||||||
end;
|
|
||||||
if itl>2 then begin Affiche('Erreur 400 ligne '+sOrigine,clred);closefile(fichier);exit;end;
|
if itl>2 then begin Affiche('Erreur 400 ligne '+sOrigine,clred);closefile(fichier);exit;end;
|
||||||
end;
|
end;
|
||||||
until (s='0');
|
until (s='0');
|
||||||
@@ -6290,12 +6285,16 @@ Procedure Maj_feux;
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
envoi_signauxCplx;
|
envoi_signauxCplx;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
var i : integer;
|
Procedure Maj_feux;
|
||||||
begin
|
var i : integer;
|
||||||
//Affiche('MAJ FEUX',clOrange);
|
begin
|
||||||
|
//Affiche('MAJ FEUX',clOrange);
|
||||||
|
if not(maj_feux_cours) then
|
||||||
|
begin
|
||||||
|
Maj_feux_cours:=TRUE;
|
||||||
|
|
||||||
for i:=1 to NbreFeux do
|
for i:=1 to NbreFeux do
|
||||||
begin
|
begin
|
||||||
Maj_feu(Feux[i].Adresse);
|
Maj_feu(Feux[i].Adresse);
|
||||||
@@ -6558,11 +6557,15 @@ end;
|
|||||||
s:=checksum(s);
|
s:=checksum(s);
|
||||||
envoi(s);
|
envoi(s);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure demande_etat_acc;
|
// demande l'état de tous les accessoires par l'interface
|
||||||
var i : integer;
|
procedure demande_etat_acc;
|
||||||
|
var i : integer;
|
||||||
|
begin
|
||||||
|
if portCommOuvert or parSocketLenz then
|
||||||
|
begin
|
||||||
|
Affiche('Demande état des aiguillages',ClYellow);
|
||||||
for i:=1 to maxaiguillage do
|
for i:=1 to maxaiguillage do
|
||||||
begin
|
begin
|
||||||
demande_info_acc(i);
|
demande_info_acc(i);
|
||||||
@@ -6778,21 +6781,31 @@ begin
|
|||||||
// attention à partir de cette section le code est susceptible de ne pas être exécuté
|
// attention à partir de cette section le code est susceptible de ne pas être exécuté
|
||||||
|
|
||||||
// Mettre à jour le TCO
|
// Mettre à jour le TCO
|
||||||
if AvecTCO then
|
if AvecTCO then
|
||||||
|
begin
|
||||||
formTCO.Maj_TCO(Adresse);
|
formTCO.Maj_TCO(Adresse);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// évènement d'aiguillage (accessoire)
|
// évènement d'aiguillage (accessoire)
|
||||||
|
// pos = const_droit=2 ou const_devie=1
|
||||||
// évènement d'aiguillage
|
procedure Event_Aig(adresse,pos : integer);
|
||||||
procedure Event_Aig(adresse,pos : integer);
|
var s: string;
|
||||||
|
faire_event,inv : boolean;
|
||||||
|
prov,i : integer;
|
||||||
|
begin
|
||||||
|
// vérifier que l'évènement accessoire vient bien d'un aiguillage et pas d'un feu
|
||||||
|
i:=0;
|
||||||
|
repeat
|
||||||
|
inc(i);
|
||||||
until (i>MaxAiguillage) or (i=adresse);
|
until (i>MaxAiguillage) or (i=adresse);
|
||||||
faire_event: boolean;
|
if i>MaxAiguillage then exit; // non ce n'est pas un aiguillage, on sort
|
||||||
begin
|
|
||||||
|
// si l'aiguillage est inversé dans CDM et qu'on est en mode autonome, inverser sa position
|
||||||
inv:=false;
|
inv:=false;
|
||||||
{ init objet
|
if (aiguillage[adresse].inversionCDM=1) then // and (portCommOuvert or parSocketLenz) then
|
||||||
if aiguillage[adresse].objet=0 then
|
begin
|
||||||
begin
|
prov:=pos;
|
||||||
inv:=true;
|
inv:=true;
|
||||||
if prov=const_droit then pos:=const_devie else pos:=const_droit;
|
if prov=const_droit then pos:=const_devie else pos:=const_droit;
|
||||||
end;
|
end;
|
||||||
@@ -6800,13 +6813,13 @@ begin
|
|||||||
// ne pas faire l'évaluation si l'ancien état de l'aiguillage est indéterminée (9)
|
// ne pas faire l'évaluation si l'ancien état de l'aiguillage est indéterminée (9)
|
||||||
// car le RUN vient de démarrer
|
// car le RUN vient de démarrer
|
||||||
faire_event:=aiguillage[adresse].position<>9;
|
faire_event:=aiguillage[adresse].position<>9;
|
||||||
aiguillage[adresse].position:=pos;
|
aiguillage[adresse].position:=pos;
|
||||||
|
|
||||||
// ------------- stockage évènement aiguillage dans tampon event_det_tick -------------------------
|
// ------------- stockage évènement aiguillage dans tampon event_det_tick -------------------------
|
||||||
if (N_Event_tick>=Max_Event_det_tick) then
|
if (N_Event_tick>=Max_Event_det_tick) then
|
||||||
|
begin
|
||||||
N_Event_tick:=0;
|
N_Event_tick:=0;
|
||||||
Affiche('Raz Evts ',clLime);
|
Affiche('Raz Evts ',clLime);
|
||||||
Affiche('Raz Evts détecteurs',clLime);
|
|
||||||
end;
|
end;
|
||||||
s:='Tick='+IntToSTR(tick)+' Evt Aig '+intToSTR(adresse)+'='+intToSTR(pos);
|
s:='Tick='+IntToSTR(tick)+' Evt Aig '+intToSTR(adresse)+'='+intToSTR(pos);
|
||||||
if pos=const_droit then s:=s+' droit' else s:=s+' dévié';
|
if pos=const_droit then s:=s+' droit' else s:=s+' dévié';
|
||||||
@@ -6816,7 +6829,6 @@ begin
|
|||||||
Affiche(s,clyellow);
|
Affiche(s,clyellow);
|
||||||
AfficheDebug(s,clyellow);
|
AfficheDebug(s,clyellow);
|
||||||
end;
|
end;
|
||||||
FormDebug.MemoEvtDet.lines.add(s) ;
|
|
||||||
FormDebug.MemoEvtDet.lines.add(s) ;
|
FormDebug.MemoEvtDet.lines.add(s) ;
|
||||||
if (n_Event_tick mod 10) =0 then affiche_memoire;
|
if (n_Event_tick mod 10) =0 then affiche_memoire;
|
||||||
inc(N_Event_tick);
|
inc(N_Event_tick);
|
||||||
@@ -6828,17 +6840,34 @@ begin
|
|||||||
if AvecTCO then
|
if AvecTCO then
|
||||||
begin
|
begin
|
||||||
formTCO.Maj_TCO(Adresse);
|
formTCO.Maj_TCO(Adresse);
|
||||||
|
end;
|
||||||
|
|
||||||
|
// l'évaluation des routes est à faire selon conditions
|
||||||
|
if faire_event then evalue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
// pilote une sortie à 0 dont l'adresse est à octet
|
||||||
|
procedure Pilote_acc0_X(adresse : integer;octet : byte);
|
||||||
|
var groupe : integer ;
|
||||||
|
fonction : byte;
|
||||||
|
s : string;
|
||||||
|
begin
|
||||||
|
if debug_dec_sig then AfficheDebug('Tick='+IntToSTR(Tick)+' signal '+intToSTR(adresse)+' '+intToSTR(octet),clorange);
|
||||||
|
groupe:=(adresse-1) div 4;
|
||||||
fonction:=((adresse-1) mod 4)*2 + (octet-1);
|
fonction:=((adresse-1) mod 4)*2 + (octet-1);
|
||||||
|
s:=#$52+Char(groupe)+char(fonction or $80); // désactiver la sortie
|
||||||
s:=checksum(s);
|
s:=checksum(s);
|
||||||
envoi(s); // envoi de la trame et attente Ack
|
envoi(s); // envoi de la trame et attente Ack
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// pilotage d'un accessoire (décodeur d'aiguillage, de signal)
|
// pilotage d'un accessoire (décodeur d'aiguillage, de signal)
|
||||||
// octet = 1 (dévié) ou 2 (droit)
|
// octet = 1 (dévié) ou 2 (droit)
|
||||||
|
// la sortie "octet" est mise à 1 puis à 0
|
||||||
// acc = aig ou feu
|
// acc = aig ou feu
|
||||||
procedure pilote_acc(adresse : integer;octet : byte;Acc : TAccessoire);
|
procedure pilote_acc(adresse : integer;octet : byte;Acc : TAccessoire);
|
||||||
procedure pilote_acc(adresse : integer;octet : byte;Acc : TAccessoire);
|
var groupe,temps : integer ;
|
||||||
|
fonction : byte;
|
||||||
s : string;
|
s : string;
|
||||||
label mise0;
|
label mise0;
|
||||||
begin
|
begin
|
||||||
@@ -6847,24 +6876,23 @@ begin
|
|||||||
// pilotage par CDM rail -----------------
|
// pilotage par CDM rail -----------------
|
||||||
if CDM_connecte then
|
if CDM_connecte then
|
||||||
begin
|
begin
|
||||||
|
//AfficheDebug(intToSTR(adresse),clred);
|
||||||
if debug_dec_sig and (acc=feu) then AfficheDebug('Tick='+IntToSTR(Tick)+' signal '+intToSTR(adresse)+' '+intToSTR(octet),clorange);
|
if debug_dec_sig and (acc=feu) then AfficheDebug('Tick='+IntToSTR(Tick)+' signal '+intToSTR(adresse)+' '+intToSTR(octet),clorange);
|
||||||
s:=chaine_CDM_Acc(adresse,octet);
|
s:=chaine_CDM_Acc(adresse,octet);
|
||||||
envoi_CDM(s);
|
envoi_CDM(s);
|
||||||
if (acc=feu) and not(Raz_Acc_signaux) then exit;
|
if (acc=feu) and not(Raz_Acc_signaux) then exit;
|
||||||
if debug_dec_sig and (acc=feu) then AfficheDebug('Tick='+IntToSTR(Tick)+' signal '+intToSTR(adresse)+' 0',clorange);
|
if debug_dec_sig and (acc=feu) then AfficheDebug('Tick='+IntToSTR(Tick)+' signal '+intToSTR(adresse)+' 0',clorange);
|
||||||
if debug_dec_sig and (acc=feu) then AfficheDebug('Tick='+IntToSTR(Tick)+' signal '+intToSTR(adresse)+' 0',clorange);
|
sleep(50);
|
||||||
s:=chaine_CDM_Acc(adresse,0);
|
|
||||||
envoi_CDM(s);
|
|
||||||
s:=chaine_CDM_Acc(adresse,0);
|
s:=chaine_CDM_Acc(adresse,0);
|
||||||
envoi_CDM(s);
|
envoi_CDM(s);
|
||||||
exit;
|
exit;
|
||||||
// pilotage par USB ou par éthernet de la centrale
|
end;
|
||||||
|
|
||||||
// pilotage par USB ou par éthernet de la centrale ------------
|
// pilotage par USB ou par éthernet de la centrale ------------
|
||||||
if (hors_tension2=false) and (portCommOuvert or parSocketLenz) then
|
if (hors_tension2=false) and (portCommOuvert or parSocketLenz) then
|
||||||
begin
|
begin
|
||||||
// test si pilotage aiguillage inversé
|
// test si pilotage aiguillage inversé
|
||||||
if aiguillage[adresse].inversion=1 then
|
if (acc=aig) and (aiguillage[adresse].inversion=1) then
|
||||||
begin
|
begin
|
||||||
if octet=1 then octet:=2 else octet:=1;
|
if octet=1 then octet:=2 else octet:=1;
|
||||||
end;
|
end;
|
||||||
@@ -6872,10 +6900,10 @@ begin
|
|||||||
if (octet=0) or (octet>2) then exit;
|
if (octet=0) or (octet>2) then exit;
|
||||||
|
|
||||||
groupe:=(adresse-1) div 4;
|
groupe:=(adresse-1) div 4;
|
||||||
|
fonction:=((adresse-1) mod 4)*2 + (octet-1);
|
||||||
// pilotage à 1
|
// pilotage à 1
|
||||||
s:=#$52+Char(groupe)+char(fonction or $88); // activer la sortie
|
s:=#$52+Char(groupe)+char(fonction or $88); // activer la sortie
|
||||||
s:=checksum(s);
|
s:=checksum(s);
|
||||||
s:=checksum(s);
|
|
||||||
if debug_dec_sig and (acc=feu) then AfficheDebug('Tick='+IntToSTR(Tick)+' signal '+intToSTR(adresse)+' '+intToSTR(octet),clorange);
|
if debug_dec_sig and (acc=feu) then AfficheDebug('Tick='+IntToSTR(Tick)+' signal '+intToSTR(adresse)+' '+intToSTR(octet),clorange);
|
||||||
envoi(s); // envoi de la trame et attente Ack
|
envoi(s); // envoi de la trame et attente Ack
|
||||||
|
|
||||||
@@ -6883,7 +6911,7 @@ begin
|
|||||||
if (acc=feu) and not(Raz_Acc_signaux) then exit;
|
if (acc=feu) and not(Raz_Acc_signaux) then exit;
|
||||||
|
|
||||||
// si aiguillage, faire une temporisation
|
// si aiguillage, faire une temporisation
|
||||||
//if (index_feu(adresse)=0) or (Acc=aig) then
|
//if (index_feu(adresse)=0) or (Acc=aig) then
|
||||||
if Acc=Aig then
|
if Acc=Aig then
|
||||||
begin
|
begin
|
||||||
temps:=aiguillage[adresse].temps;if temps=0 then temps:=4;
|
temps:=aiguillage[adresse].temps;if temps=0 then temps:=4;
|
||||||
@@ -6894,7 +6922,7 @@ begin
|
|||||||
// pilotage à 0 pour éteindre le pilotage de la bobine du relais
|
// pilotage à 0 pour éteindre le pilotage de la bobine du relais
|
||||||
s:=#$52+Char(groupe)+char(fonction or $80); // désactiver la sortie
|
s:=#$52+Char(groupe)+char(fonction or $80); // désactiver la sortie
|
||||||
s:=checksum(s);
|
s:=checksum(s);
|
||||||
if debug_dec_sig and (acc=feu) then AfficheDebug('Tick='+IntToSTR(Tick)+' signal '+intToSTR(adresse)+' 0',clorange);
|
if debug_dec_sig and (acc=feu) then AfficheDebug('Tick='+IntToSTR(Tick)+' signal '+intToSTR(adresse)+' 0',clorange);
|
||||||
envoi(s); // envoi de la trame et attente Ack
|
envoi(s); // envoi de la trame et attente Ack
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@@ -6947,7 +6975,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
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"
|
||||||
@@ -7587,7 +7615,7 @@ begin
|
|||||||
TraceSign:=True;
|
TraceSign:=True;
|
||||||
PremierFD:=false;
|
PremierFD:=false;
|
||||||
// services commIP CDM par défaut
|
// services commIP CDM par défaut
|
||||||
Srvc_Aig:=true;
|
Srvc_Aig:=true;
|
||||||
Srvc_Det:=true;
|
Srvc_Det:=true;
|
||||||
Srvc_Act:=true;
|
Srvc_Act:=true;
|
||||||
Srvc_PosTrain:=false;
|
Srvc_PosTrain:=false;
|
||||||
@@ -7642,9 +7670,9 @@ begin
|
|||||||
ButtonAffTCO.visible:=AvecTCO;
|
ButtonAffTCO.visible:=AvecTCO;
|
||||||
Loco.Visible:=not(Diffusion);
|
Loco.Visible:=not(Diffusion);
|
||||||
|
|
||||||
// tenter la liaison vers CDM rail
|
// tenter la liaison vers CDM rail
|
||||||
if not(CDM_connecte) then connecte_CDM;
|
if not(CDM_connecte) then connecte_CDM;
|
||||||
|
|
||||||
// si CDM n'est pas connecté, on ouvre la liaison vers la centrale
|
// si CDM n'est pas connecté, on ouvre la liaison vers la centrale
|
||||||
if not(CDM_connecte) then
|
if not(CDM_connecte) then
|
||||||
begin
|
begin
|
||||||
@@ -7652,7 +7680,7 @@ begin
|
|||||||
// ouverture par USB
|
// ouverture par USB
|
||||||
Affiche('Demande connexion à la centrale par USB protocole XpressNet',clyellow);
|
Affiche('Demande connexion à la centrale par USB protocole XpressNet',clyellow);
|
||||||
connecte_USB;
|
connecte_USB;
|
||||||
if not(portCommOuvert) then
|
if not(portCommOuvert) then
|
||||||
begin
|
begin
|
||||||
// sinon ouvrir socket vers la centrale
|
// sinon ouvrir socket vers la centrale
|
||||||
// Initialisation de la comm socket LENZ
|
// Initialisation de la comm socket LENZ
|
||||||
@@ -7788,6 +7816,7 @@ begin
|
|||||||
for i:=1 to maxaiguillage do
|
for i:=1 to maxaiguillage do
|
||||||
begin
|
begin
|
||||||
if aiguillage[i].modele<>0 then // si l'aiguillage existe
|
if aiguillage[i].modele<>0 then // si l'aiguillage existe
|
||||||
|
begin
|
||||||
pos:=aiguillage[i].position;
|
pos:=aiguillage[i].position;
|
||||||
s:='Init aiguillage '+intToSTR(i)+'='+intToSTR(pos);
|
s:='Init aiguillage '+intToSTR(i)+'='+intToSTR(pos);
|
||||||
if pos=1 then s:=s+' (dévié)' else s:=s+' (droit)';
|
if pos=1 then s:=s+' (dévié)' else s:=s+' (droit)';
|
||||||
@@ -8042,7 +8071,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
s:='Erreur '+IntToSTR(ErrorCode)+' socket IP Lenz';
|
s:='Erreur '+IntToSTR(ErrorCode)+' socket IP Lenz';
|
||||||
case ErrorCode of
|
case ErrorCode of
|
||||||
10053 : s:=s+': Connexion avortée - Timeout';
|
10053 : s:=s+': Connexion avortée - Timeout';
|
||||||
10054 : s:=s+': Connexion avortée par tiers';
|
10054 : s:=s+': Connexion avortée par tiers';
|
||||||
10060 : s:=s+': Timeout';
|
10060 : s:=s+': Timeout';
|
||||||
10061 : s:=s+': Connexion refusée';
|
10061 : s:=s+': Connexion refusée';
|
||||||
@@ -8061,7 +8090,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
s:='Erreur '+IntToSTR(ErrorCode)+' socket IP CDM Rail';
|
s:='Erreur '+IntToSTR(ErrorCode)+' socket IP CDM Rail';
|
||||||
case ErrorCode of
|
case ErrorCode of
|
||||||
10053 : s:=s+': Connexion avortée - Timeout';
|
10053 : s:=s+': Connexion avortée - Timeout';
|
||||||
10054 : s:=s+': Connexion avortée par tiers';
|
10054 : s:=s+': Connexion avortée par tiers';
|
||||||
10060 : s:=s+': Timeout';
|
10060 : s:=s+': Timeout';
|
||||||
10061 : s:=s+': Connexion refusée';
|
10061 : s:=s+': Connexion refusée';
|
||||||
@@ -8181,7 +8210,7 @@ begin
|
|||||||
if Detecteur[adr].etat then s:=s+'1' else s:=s+'0';
|
if Detecteur[adr].etat then s:=s+'1' else s:=s+'0';
|
||||||
s:=s+' '+Detecteur[Adr].train;
|
s:=s+' '+Detecteur[Adr].train;
|
||||||
//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;
|
||||||
@@ -8194,8 +8223,6 @@ begin
|
|||||||
begin
|
begin
|
||||||
model:=aiguillage[i].modele ;
|
model:=aiguillage[i].modele ;
|
||||||
if model<>0 then
|
if model<>0 then
|
||||||
begin
|
|
||||||
s:='Aiguillage '+IntToSTR(i)+' : '+intToSTR(aiguillage[i].position);
|
|
||||||
begin
|
begin
|
||||||
s:='Aiguillage '+IntToSTR(i)+' : '+intToSTR(aiguillage[i].position);
|
s:='Aiguillage '+IntToSTR(i)+' : '+intToSTR(aiguillage[i].position);
|
||||||
if aiguillage[i].position=const_devie then s:=s+' (dévié)' ;
|
if aiguillage[i].position=const_devie then s:=s+' (dévié)' ;
|
||||||
@@ -8237,7 +8264,7 @@ begin
|
|||||||
s:=s+' Dévie='+IntToSTR(aiguillage[i].ADevie)+aiguillage[i].ADevieB+
|
s:=s+' Dévie='+IntToSTR(aiguillage[i].ADevie)+aiguillage[i].ADevieB+
|
||||||
' Droit='+IntToSTR(aiguillage[i].ADroit)+aiguillage[i].ADroitB;
|
' Droit='+IntToSTR(aiguillage[i].ADroit)+aiguillage[i].ADroitB;
|
||||||
if aiguillage[i].modele=2 then
|
if aiguillage[i].modele=2 then
|
||||||
begin
|
begin
|
||||||
s:=s+' DestDroit='+intToSTR(aiguillage[i].Ddroit)+aiguillage[i].DdroitB;
|
s:=s+' DestDroit='+intToSTR(aiguillage[i].Ddroit)+aiguillage[i].DdroitB;
|
||||||
s:=s+' DestDévié='+intToSTR(aiguillage[i].DDevie)+aiguillage[i].DdevieB;
|
s:=s+' DestDévié='+intToSTR(aiguillage[i].DDevie)+aiguillage[i].DdevieB;
|
||||||
end;
|
end;
|
||||||
@@ -8374,19 +8401,20 @@ begin
|
|||||||
Delete(commandeCDM,i,7);
|
Delete(commandeCDM,i,7);
|
||||||
|
|
||||||
//Affiche('Aig '+inttostr(adr)+' pos='+IntToSTR(etat),clyellow);
|
//Affiche('Aig '+inttostr(adr)+' pos='+IntToSTR(etat),clyellow);
|
||||||
//Affiche(commandeCDM,clyellow);
|
//Affiche(commandeCDM,clyellow);
|
||||||
|
|
||||||
// aiguillage normal
|
// aiguillage normal
|
||||||
|
if aiguillage[adr].modele=1 then
|
||||||
begin
|
begin
|
||||||
//Affiche('Normal',clyellow);
|
//Affiche('Normal',clyellow);
|
||||||
if etat=const_droit_CDM then etatAig:=const_droit else etatAig:=const_devie;
|
if etat=const_droit_CDM then etatAig:=const_droit else etatAig:=const_devie;
|
||||||
Event_Aig(adr,etatAig);
|
Event_Aig(adr,etatAig);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// TJD TJS
|
// TJD TJS
|
||||||
if (aiguillage[adr].modele=2) or (aiguillage[adr].modele=3) then
|
if (aiguillage[adr].modele=2) or (aiguillage[adr].modele=3) then
|
||||||
begin
|
begin
|
||||||
//Affiche('TJD/S',clyellow);
|
//Affiche('TJD/S',clyellow);
|
||||||
//adr2:=aiguillage[adr].Apointe; // 2eme adresse de la TJD
|
//adr2:=aiguillage[adr].Apointe; // 2eme adresse de la TJD
|
||||||
case etat of
|
case etat of
|
||||||
1 : begin etatAig:=const_devie;EtatAig2:=const_droit;end;
|
1 : begin etatAig:=const_devie;EtatAig2:=const_droit;end;
|
||||||
|
|||||||
BIN
UnitTCO.dcu
BIN
UnitTCO.dcu
Binary file not shown.
@@ -1,4 +1,3 @@
|
|||||||
/******************************************
|
|
||||||
/ fichier de configuration de client-GL.log
|
/ fichier de configuration de client-GL.log
|
||||||
/ gily - f1iwq - 2018
|
/ gily - f1iwq - 2018
|
||||||
/******************************************
|
/******************************************
|
||||||
@@ -28,7 +27,7 @@ IpV4_PC=127.0.0.1:9999
|
|||||||
/ Adresse IP V4 de l'interface LI-USB Ethernet : port
|
/ Adresse IP V4 de l'interface LI-USB Ethernet : port
|
||||||
/ par défaut le port est 5550
|
/ par défaut le port est 5550
|
||||||
/ ne pas connecter le port ou mettre 0 si on travaille avec l'interface USB
|
/ ne pas connecter le port ou mettre 0 si on travaille avec l'interface USB
|
||||||
IPV4_Interface=192.168.1.23:5550
|
IPV4_INTERFACE=192.168.1.23:5550
|
||||||
/
|
/
|
||||||
/ port COM de l'adresse USB de l'interface LU-USB - LI100 - LI100F - LI101F - GENLI
|
/ port COM de l'adresse USB de l'interface LU-USB - LI100 - LI100F - LI101F - GENLI
|
||||||
/ attention de COM1 à 9 - Si le port de l'interface USB >9, il faut le changer
|
/ attention de COM1 à 9 - Si le port de l'interface USB >9, il faut le changer
|
||||||
@@ -38,11 +37,12 @@ IPV4_Interface=192.168.1.23:5550
|
|||||||
/ Com:vitesse,parité,nombre de bits,bits de stop,protocole: 0=aucun 1=Xon-Xoff 2=RTS-CTS 3=RTS-Xon-Xoff 4=CTS
|
/ Com:vitesse,parité,nombre de bits,bits de stop,protocole: 0=aucun 1=Xon-Xoff 2=RTS-CTS 3=RTS-Xon-Xoff 4=CTS
|
||||||
/ voir notice page 29
|
/ voir notice page 29
|
||||||
/
|
/
|
||||||
Protocole_serie=COM3:57600,N,8,1,2
|
PROTOCOLE_SERIE=COM3:57600,N,8,1,2
|
||||||
/COM8:9600,N,8,1,0
|
/COM8:9600,N,8,1,0
|
||||||
/
|
/
|
||||||
/ Temporisation en ms d'envoi entre deux octets de la trame
|
/ Temporisation en ms d'envoi entre deux octets de la trame
|
||||||
Inter_Car=50
|
INTER_CAR=50
|
||||||
|
/
|
||||||
/ Temporisation maximale de contrôle après non réponse de l'interface, en tranches de 100ms
|
/ Temporisation maximale de contrôle après non réponse de l'interface, en tranches de 100ms
|
||||||
/ à adapter en fonction de l'interface. Ex 7=700ms d'attente maxi
|
/ à adapter en fonction de l'interface. Ex 7=700ms d'attente maxi
|
||||||
Tempo_maxi=7
|
Tempo_maxi=7
|
||||||
@@ -55,25 +55,27 @@ Entete=1
|
|||||||
/ ===============================================================================
|
/ ===============================================================================
|
||||||
/
|
/
|
||||||
/ Avec (1) ou sans (0) initialisation des aiguillages au démarrage selon le tableau ci après
|
/ Avec (1) ou sans (0) initialisation des aiguillages au démarrage selon le tableau ci après
|
||||||
Init_Aig=0
|
Init_Aig=1
|
||||||
|
/Temporisation entre aiguillages en ms à l'initialisation en mode autonome
|
||||||
|
Tempo_Aig=100
|
||||||
/
|
/
|
||||||
/ Fenêtre d'exécution en plein écran (1) ou réduite (0)
|
/ Fenêtre d'exécution en plein écran (1) ou réduite (0)
|
||||||
Fenetre=0
|
Fenetre=0
|
||||||
/
|
/
|
||||||
/ Nombre de détecteurs considérés comme trop distants dans la recherche d'un détecteur "suivant"
|
/ Nombre de détecteurs considérés comme trop distants dans la recherche d'un détecteur "suivant"
|
||||||
Nb_Det_Dist=3
|
nb_det_dist=3
|
||||||
/
|
/
|
||||||
/ Vérification des versions au démarrage
|
/ Vérification des versions au démarrage
|
||||||
verif_version=1
|
verif_version=1
|
||||||
/ Notification de nouvelle version
|
/ Notification de nouvelle version
|
||||||
notif_version=0
|
NOTIF_VERSION=0
|
||||||
/ Avec TCO
|
/ Avec TCO
|
||||||
TCO=0
|
TCO=0
|
||||||
/ Lancement de CDM Rail au démarrage
|
/ Lancement de CDM Rail au démarrage
|
||||||
CDM=0
|
CDM=0
|
||||||
/ Nom du fichier LAY à ouvrir depuis CDM sans caractères spéciaux ( : / )
|
/ Nom du fichier LAY à ouvrir depuis CDM sans caractères spéciaux ( : / )
|
||||||
/reseau_gily_signal_ajoute.lay
|
/reseau_gily_signal_ajoute.lay
|
||||||
LAY=RESEAU_GILY_SIGNAL_AJOUTE.LAY
|
Lay=RESEAU_GILY_SIGNAL_AJOUTE.LAY
|
||||||
/
|
/
|
||||||
/ Démarrage du serveur d'interface automatique
|
/ Démarrage du serveur d'interface automatique
|
||||||
/ 0=ne pas démarrer automatiquement le serveur d'interfaces
|
/ 0=ne pas démarrer automatiquement le serveur d'interfaces
|
||||||
@@ -85,7 +87,7 @@ LAY=RESEAU_GILY_SIGNAL_AJOUTE.LAY
|
|||||||
/ 6=FIS88 FeedBack (S88/S88N)
|
/ 6=FIS88 FeedBack (S88/S88N)
|
||||||
/ 7=RS2PC (Rs FeedBack interface)
|
/ 7=RS2PC (Rs FeedBack interface)
|
||||||
/ 8=DCC++
|
/ 8=DCC++
|
||||||
Serveur_interface=0
|
Serveur_interface=1
|
||||||
/
|
/
|
||||||
/ Interface de rétrosignalisation pour LENZ/DCC++
|
/ Interface de rétrosignalisation pour LENZ/DCC++
|
||||||
/ 1=auto
|
/ 1=auto
|
||||||
|
|||||||
66
config.cfg
66
config.cfg
@@ -8,7 +8,7 @@ Log=0
|
|||||||
TraceDet=0
|
TraceDet=0
|
||||||
/ Envoie un 0 après le pilotage des décodeurs
|
/ Envoie un 0 après le pilotage des décodeurs
|
||||||
/ Mettre 1 si utilisation de décodeurs LEB
|
/ Mettre 1 si utilisation de décodeurs LEB
|
||||||
RazSignaux=1
|
RazSignaux=0
|
||||||
/
|
/
|
||||||
/ modélisation des aiguillages : détermine les éléments connectés aux 3 branches des aiguilles (Pointe, Droit, Dévié (S)
|
/ modélisation des aiguillages : détermine les éléments connectés aux 3 branches des aiguilles (Pointe, Droit, Dévié (S)
|
||||||
/ adresse d'aiguillage,P=élément vers pointe D=élément vers Droit, S=élément vers dévié.
|
/ adresse d'aiguillage,P=élément vers pointe D=élément vers Droit, S=élément vers dévié.
|
||||||
@@ -17,39 +17,39 @@ RazSignaux=1
|
|||||||
/ Exemple : 1,P518,D523,S3P signifie : définition de l'aiguillage @1 : sur pointe relié au détecteur 518
|
/ Exemple : 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 Droit relié au détecteur 518
|
||||||
/ sur Dévié, relié à l'aiguillage 3 en pointe
|
/ sur Dévié, relié à l'aiguillage 3 en pointe
|
||||||
/ Pour une TJD : 26TJD,D530,S529,P28
|
/ Pour une TJD : 26TJD,D530,S529,P28 - P désigne l'autre adresse de la TJD
|
||||||
/ P désigne l'autre adresse de la TJD
|
/ V=Vitesse de franchissement de l'aiguillage en position déviée (0,30,60)
|
||||||
/ Aiguillage triple
|
/ I1=aiguillage à inversion de commande dans CDM
|
||||||
/
|
/
|
||||||
/ S'il n'y a pas de détecteur connecté à une branche d'aiguillage, mettre 0.
|
/ S'il n'y a pas de détecteur connecté à une branche d'aiguillage, mettre 0.
|
||||||
1,P518,D523,S3P,30
|
1,P518,D523,S3P,V30,I0
|
||||||
2,P12S,D519,S5S
|
2,P12S,D519,S5S,V0,I0
|
||||||
3,P1S,D4P,S5D
|
3,P1S,D4P,S5D,V0,I0
|
||||||
4,P3D,D6S,S514
|
4,P3D,D6S,S514,V0,I0
|
||||||
5,P515,D3S,S2S
|
5,P515,D3S,S2S,V0,I0
|
||||||
6,P516,D0,S4D
|
6,P516,D0,S4D,V0,I0
|
||||||
7,P527,D519,S520
|
7,P527,D519,S520,V0,I0
|
||||||
8,P527,D521,S522
|
8,P527,D521,S522,V0,I0
|
||||||
9,P526,D513,S515,60
|
9,P526,D513,S515,V60,I0
|
||||||
10,P19P,D29P,S528,30
|
10,P19P,D29P,S528,V30,I0
|
||||||
11,P18P,D30D,S525
|
11,P18P,D30D,S525,V0,I0
|
||||||
12,P517,D20S,S2P
|
12,P517,D20S,S2P,V0,I0
|
||||||
17,P525,D535,S528
|
17,P525,D535,S528,V0,I0
|
||||||
18,P11P,D23P,S517
|
18,P11P,D23P,S517,V0,I0
|
||||||
19,P10P,D22P,S531
|
19,P10P,D22P,S531,V0,I0
|
||||||
20,P520,D21P,S12D
|
20,P520,D21P,S12D,V0,I0
|
||||||
21,P20D,D28D,S28D
|
21,P20D,D28D,S28D,V0,I0
|
||||||
22,P19D,D537,S538
|
22,P19D,D537,S538,V0,I0
|
||||||
23,P18D,D538,S534
|
23,P18D,D538,S534,V0,I0
|
||||||
24,P538,D32S,S533
|
24,P538,D32S,S533,V0,I0
|
||||||
25,P31S,D529,S27P
|
25,P31S,D529,S27P,V0,I0
|
||||||
26TJD,D(530,28D),S(529,28S),I0
|
26TJD,D(530,28D),S(529,28S),I0
|
||||||
27,P25S,D530,S537
|
27,P25S,D530,S537,V0,I0
|
||||||
28TJD,D(21D,26D),S(21S,26S),I0
|
28TJD,D(21D,26D),S(21S,26S),I0
|
||||||
29,P10D,D513,S30S,60
|
29,P10D,D513,S30S,V60,I0
|
||||||
30,P524,D11D,S29D
|
30,P524,D11D,S29D,V0,I0
|
||||||
31,P534,D0,S25P
|
31,P534,D0,S25P,V0,I0
|
||||||
32,P22S,D0,S24D
|
32,P22S,D0,S24D,V0,I0
|
||||||
0
|
0
|
||||||
//
|
//
|
||||||
/ modélisation du réseau par branche
|
/ modélisation du réseau par branche
|
||||||
@@ -95,7 +95,7 @@ A31,0
|
|||||||
176,7,0,1,(520,A20),1
|
176,7,0,1,(520,A20),1
|
||||||
190,7,0,1,(523,526),0
|
190,7,0,1,(523,526),0
|
||||||
204,9,0,1,(527,A7),1
|
204,9,0,1,(527,A7),1
|
||||||
218,7,0,1,(525,A17),1
|
218,7,0,1,(525,A17),0
|
||||||
232,2,1,1,(516,A6),0
|
232,2,1,1,(516,A6),0
|
||||||
260,9,1,1,(518,A1),1
|
260,9,1,1,(518,A1),1
|
||||||
274,3,0,1,(524,521),0
|
274,3,0,1,(524,521),0
|
||||||
@@ -126,10 +126,10 @@ A31,0
|
|||||||
/ (act_ferme_voie1,act_ouvre_voie1),(act_ferme_voie2,act_ouvre_voie2),...,PN(adresse_ferme,adresse_ouvre)
|
/ (act_ferme_voie1,act_ouvre_voie1),(act_ferme_voie2,act_ouvre_voie2),...,PN(adresse_ferme,adresse_ouvre)
|
||||||
/
|
/
|
||||||
/ Klaxon (F2)
|
/ Klaxon (F2)
|
||||||
/815,1,CC406526,F2,400
|
815,1,CC406526,F2,400
|
||||||
/
|
/
|
||||||
/ passage à niveau à 2 voies
|
/ passage à niveau à 2 voies
|
||||||
/(815,830),(820,840),PN(121+,121-)
|
(815,830),(820,840),PN(121+,121-)
|
||||||
/
|
/
|
||||||
/ passage à niveau à 1 voie
|
/ passage à niveau à 1 voie
|
||||||
/(815,809),PN(131+,131-)
|
/(815,809),PN(131+,131-)
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ var
|
|||||||
Lance_verif : integer;
|
Lance_verif : integer;
|
||||||
verifVersion,notificationVersion : boolean;
|
verifVersion,notificationVersion : boolean;
|
||||||
|
|
||||||
Const Version='2.31'; // sert à la comparaison de la version publiée
|
Const Version='2.4'; // sert à la comparaison de la version publiée
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,11 @@ version 2.21 : Param
|
|||||||
version 2.3 : Changement de la méthode de réception des trames du protocole IPC de CDM-Rail
|
version 2.3 : Changement de la méthode de réception des trames du protocole IPC de CDM-Rail
|
||||||
Affichage au démarrage des variables manquantes du fichier config-gl.cfg
|
Affichage au démarrage des variables manquantes du fichier config-gl.cfg
|
||||||
version 2.31 : Amélioration calcul des routes depuis buttoir
|
version 2.31 : Amélioration calcul des routes depuis buttoir
|
||||||
|
Lancement du TCO à la validation dans la configuration
|
||||||
|
version 2.4 : Optimisation de la gestion des évènements aiguillages
|
||||||
|
Gestion des aiguillages inversés dans CDM pour le mode autonome
|
||||||
|
Debug pilotage feux LEB
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user