V2.4
This commit is contained in:
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
+42
-18
@@ -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
|
||||||
|
|||||||
+44
-6
@@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
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
|
||||||
|
|||||||
Binary file not shown.
+15
-2
@@ -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
|
||||||
|
|||||||
+6
-1
@@ -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.
|
||||||
|
|||||||
Binary file not shown.
+1
-1
@@ -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
|
||||||
|
|||||||
+157
-129
@@ -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;
|
|||||||
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 : boolean;
|
trouve_NOTIF_VERSION,trouve_verif_version,trouve_fonte,trouve_tempo_aig : boolean;
|
||||||
bd,virgule,i_detect,i,erreur,aig,aig2,detect,offset,index, adresse,j,position,temporisation,invers,indexPointe,indexDevie,indexDroit,
|
bd,virgule,i_detect,i,erreur,aig,aig2,detect,offset,index, adresse,j,position,temporisation,invers,indexPointe,indexDevie,indexDroit,
|
||||||
ComptEl,Compt_IT,Num_Element,k,modele,adr,adr2,erreur2,l,t,Nligne,postriple,
|
ComptEl,Compt_IT,Num_Element,k,modele,adr,adr2,erreur2,l,t,Nligne,postriple,itl,
|
||||||
postjd,postjs,nv,it : integer;
|
postjd,postjs,nv,it,Num_Champ : integer;
|
||||||
function lit_ligne : string ;
|
function lit_ligne : string ;
|
||||||
begin
|
begin
|
||||||
repeat
|
repeat
|
||||||
@@ -3460,6 +3428,7 @@ begin
|
|||||||
trouve_retro:=false;
|
trouve_retro:=false;
|
||||||
trouve_sec_init:=false;
|
trouve_sec_init:=false;
|
||||||
trouve_init_aig:=false;
|
trouve_init_aig:=false;
|
||||||
|
trouve_tempo_aig:=false;
|
||||||
trouve_INTER_CAR:=false;
|
trouve_INTER_CAR:=false;
|
||||||
trouve_entete:=false;
|
trouve_entete:=false;
|
||||||
trouve_IPV4_INTERFACE:=false;
|
trouve_IPV4_INTERFACE:=false;
|
||||||
@@ -3483,7 +3452,6 @@ begin
|
|||||||
Aiguillage[i].temps:=5 ;
|
Aiguillage[i].temps:=5 ;
|
||||||
Aiguillage[i].inversion:=0;
|
Aiguillage[i].inversion:=0;
|
||||||
Aiguillage[i].inversionCDM:=0;
|
Aiguillage[i].inversionCDM:=0;
|
||||||
Aiguillage[i].objet:=0;
|
|
||||||
end;
|
end;
|
||||||
for i:=1 to 1024 do
|
for i:=1 to 1024 do
|
||||||
begin
|
begin
|
||||||
@@ -3491,16 +3459,17 @@ begin
|
|||||||
Detecteur[i].train:='0';
|
Detecteur[i].train:='0';
|
||||||
Ancien_detecteur[i]:=false;
|
Ancien_detecteur[i]:=false;
|
||||||
end;
|
end;
|
||||||
//ChDir(s);
|
|
||||||
Affiche('lecture du fichier de configuration client-GL.cfg',clyellow);
|
Affiche('lecture du fichier de configuration client-GL.cfg',clyellow);
|
||||||
{$I-}
|
{$I+}
|
||||||
try
|
try
|
||||||
assign(fichier,'client-GL.cfg');
|
assign(fichier,'client-GL.cfg');
|
||||||
reset(fichier);
|
reset(fichier);
|
||||||
except
|
except
|
||||||
Affiche('Fichier client-gl.cfg non trouvé',clred);
|
Affiche('Erreur fatale: fichier client-gl.cfg non trouvé',clred);
|
||||||
|
exit;
|
||||||
end;
|
end;
|
||||||
{$I+}
|
{$I-}
|
||||||
nv:=0; it:=0;
|
nv:=0; it:=0;
|
||||||
{lecture du fichier de configuration}
|
{lecture du fichier de configuration}
|
||||||
// taille de fonte
|
// taille de fonte
|
||||||
@@ -3623,6 +3592,17 @@ begin
|
|||||||
if fenetre=1 then Formprinc.windowState:=wsMaximized;
|
if fenetre=1 then Formprinc.windowState:=wsMaximized;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
sa:=uppercase(Tempo_Aig_ch)+'=';
|
||||||
|
i:=pos(sa,s);
|
||||||
|
if i<>0 then
|
||||||
|
begin
|
||||||
|
inc(nv);
|
||||||
|
trouve_Tempo_aig:=true;
|
||||||
|
delete(s,i,length(sa));
|
||||||
|
val(s,Tempo_Aig,erreur);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
i:=pos(uppercase(section_init),s);
|
i:=pos(uppercase(section_init),s);
|
||||||
if i<>0 then
|
if i<>0 then
|
||||||
begin
|
begin
|
||||||
@@ -3731,11 +3711,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
inc(it);
|
inc(it);
|
||||||
|
|
||||||
until (Nv>=18) or (it>30);
|
until (Nv>=19) or (it>30);
|
||||||
|
|
||||||
//affiche(IntToSTR(Nv)+' variables',cyan);
|
//affiche(IntToSTR(Nv)+' variables',cyan);
|
||||||
s:='';
|
s:='';
|
||||||
if (it>30) then s:='ERREUR: manque variables dans config-gl.cfg :';
|
if (nv<19) then s:='ERREUR: manque variables dans config-gl.cfg :';
|
||||||
|
|
||||||
if not(trouve_NbDetDist) then s:=s+' '+nb_det_dist_ch;
|
if not(trouve_NbDetDist) then s:=s+' '+nb_det_dist_ch;
|
||||||
if not(trouve_ipv4_PC) then s:=s+' '+IpV4_PC_ch;
|
if not(trouve_ipv4_PC) then s:=s+' '+IpV4_PC_ch;
|
||||||
@@ -3750,6 +3730,7 @@ begin
|
|||||||
if not(trouve_CDM) then s:=s+' '+CDM_ch;
|
if not(trouve_CDM) then s:=s+' '+CDM_ch;
|
||||||
if not(trouve_Serveur_interface) then s:=s+' '+Serveur_interface_ch;
|
if not(trouve_Serveur_interface) then s:=s+' '+Serveur_interface_ch;
|
||||||
if not(trouve_fenetre) then s:=s+' '+fenetre_ch;
|
if not(trouve_fenetre) then s:=s+' '+fenetre_ch;
|
||||||
|
if not(trouve_tempo_aig) then s:=s+' '+tempo_aig_ch;
|
||||||
if not(trouve_NOTIF_VERSION) then s:=s+' '+NOTIF_VERSION_ch;
|
if not(trouve_NOTIF_VERSION) then s:=s+' '+NOTIF_VERSION_ch;
|
||||||
if not(trouve_verif_version) then s:=s+' '+verif_version_ch;
|
if not(trouve_verif_version) then s:=s+' '+verif_version_ch;
|
||||||
if not(trouve_fonte) then s:=s+' '+fonte_ch;
|
if not(trouve_fonte) then s:=s+' '+fonte_ch;
|
||||||
@@ -3761,12 +3742,15 @@ begin
|
|||||||
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');
|
assign(fichier,'config.cfg');
|
||||||
reset(fichier);
|
reset(fichier);
|
||||||
except
|
except
|
||||||
Affiche('Fichier config.cfg non trouvé',clred);
|
Affiche('Fichier config.cfg non trouvé',clred);
|
||||||
|
exit;
|
||||||
end;
|
end;
|
||||||
|
{$I-}
|
||||||
|
|
||||||
s:=Lit_ligne; //variable log non utilisée
|
s:=Lit_ligne; //variable log non utilisée
|
||||||
s:=Lit_ligne; // trace_det
|
s:=Lit_ligne; // trace_det
|
||||||
@@ -3835,14 +3819,14 @@ begin
|
|||||||
delete(s,1,virgule);
|
delete(s,1,virgule);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//Affiche('S='+s,clyellow);
|
Num_Champ:=1;
|
||||||
//debugconfig:=true;
|
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
|
||||||
if (enregistrement[1]='P') then
|
if (enregistrement[1]='P') then
|
||||||
begin
|
begin
|
||||||
|
inc(Num_Champ);
|
||||||
if tjd then begin affiche('Erreur P interdit dans une TJD : '+sOrigine,clred);closefile(fichier);exit; end;
|
if tjd then begin affiche('Erreur P interdit dans une TJD : '+sOrigine,clred);closefile(fichier);exit; end;
|
||||||
if debugconfig then Affiche('Section P - enregistrement='+enregistrement,clYellow);
|
if debugconfig then Affiche('Section P - enregistrement='+enregistrement,clYellow);
|
||||||
ComptEl:=ComptEl+1;
|
ComptEl:=ComptEl+1;
|
||||||
@@ -3860,9 +3844,9 @@ begin
|
|||||||
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
|
||||||
|
inc(Num_Champ);
|
||||||
if debugconfig then Affiche('Section D - enregistrement='+enregistrement,clYellow);
|
if debugconfig then Affiche('Section D - enregistrement='+enregistrement,clYellow);
|
||||||
ComptEl:=ComptEl+1;
|
ComptEl:=ComptEl+1;
|
||||||
|
|
||||||
if tjd then
|
if tjd then
|
||||||
begin
|
begin
|
||||||
s:=Enregistrement;
|
s:=Enregistrement;
|
||||||
@@ -3899,6 +3883,7 @@ begin
|
|||||||
if (length(enregistrement)<>0) then
|
if (length(enregistrement)<>0) then
|
||||||
if (enregistrement[1]='S') then
|
if (enregistrement[1]='S') then
|
||||||
begin
|
begin
|
||||||
|
inc(Num_Champ);
|
||||||
if debugconfig then Affiche('Section S - enregistrement='+enregistrement,clYellow);
|
if debugconfig then Affiche('Section S - enregistrement='+enregistrement,clYellow);
|
||||||
ComptEl:=ComptEl+1;
|
ComptEl:=ComptEl+1;
|
||||||
|
|
||||||
@@ -3946,38 +3931,48 @@ begin
|
|||||||
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
|
||||||
enregistrement:='';
|
inc(Num_Champ);
|
||||||
//Affiche(intTostr(adr),clblue);
|
delete(enregistrement,1,1);
|
||||||
Aiguillage[aig].inversionCDM:=adr;
|
end;
|
||||||
end;
|
Val(enregistrement,adr,erreur);
|
||||||
|
if erreur<>0 then begin Affiche('Erreur Inversion ; ligne '+sOrigine,clred);closefile(fichier);exit;end;
|
||||||
|
enregistrement:='';
|
||||||
|
//Affiche(intTostr(adr),clblue);
|
||||||
|
Aiguillage[aig].inversionCDM:=adr;
|
||||||
|
end;
|
||||||
|
|
||||||
//Affiche(s+'/'+Enregistrement,clLime);
|
|
||||||
// si vitesse définie
|
// si vitesse définie
|
||||||
Val(enregistrement,adr,erreur);
|
if Num_Champ=4 then
|
||||||
if erreur=0 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);
|
||||||
enregistrement:=copy(s,1,virgule-1);
|
if (erreur=0) or (erreur=1) then
|
||||||
delete(s,1,virgule);
|
begin
|
||||||
s:='';enregistrement:='';
|
//Affiche('section vitesse définie aig='+intToSTR(aig)+'/'+intToSTR(adr),clyellow);
|
||||||
end;
|
aiguillage[aig].vitesse:=adr;
|
||||||
|
enregistrement:='';
|
||||||
until enregistrement='' ;
|
virgule:=pos(',',s);if virgule=0 then virgule:=length(s)+1;
|
||||||
|
enregistrement:=copy(s,1,virgule-1);
|
||||||
|
delete(s,1,virgule);
|
||||||
|
s:='';//enregistrement:='';
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
inc(itl);
|
||||||
|
until (enregistrement='') or (itl>2);
|
||||||
|
if itl>2 then begin Affiche('Erreur 400 ligne '+sOrigine,clred);closefile(fichier);exit;end;
|
||||||
end;
|
end;
|
||||||
// Affiche(s,clLime);
|
|
||||||
until (s='0');
|
until (s='0');
|
||||||
//Affiche(IntToSTR(maxaiguillage)+' Aiguillages',clYellow);
|
//Affiche(IntToSTR(maxaiguillage)+' Aiguillages',clYellow);
|
||||||
|
|
||||||
|
Affiche('Définition des branches',clyellow);
|
||||||
Affiche('définition des branches',clyellow);
|
|
||||||
// branches de réseau
|
// branches de réseau
|
||||||
NDetecteurs:=0; Nligne:=1;
|
NDetecteurs:=0; Nligne:=1;
|
||||||
i:=1;i_detect:=1;
|
i:=1;i_detect:=1;
|
||||||
@@ -6290,12 +6285,16 @@ Procedure Maj_feux;
|
|||||||
var i : integer;
|
var i : integer;
|
||||||
begin
|
begin
|
||||||
//Affiche('MAJ FEUX',clOrange);
|
//Affiche('MAJ FEUX',clOrange);
|
||||||
Maj_feux_cours:=TRUE;
|
if not(maj_feux_cours) then
|
||||||
for i:=1 to NbreFeux do
|
|
||||||
begin
|
begin
|
||||||
Maj_feu(Feux[i].Adresse);
|
Maj_feux_cours:=TRUE;
|
||||||
|
|
||||||
|
for i:=1 to NbreFeux do
|
||||||
|
begin
|
||||||
|
Maj_feu(Feux[i].Adresse);
|
||||||
|
end;
|
||||||
|
Maj_feux_cours:=FALSE;
|
||||||
end;
|
end;
|
||||||
Maj_feux_cours:=FALSE;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@@ -6558,10 +6557,14 @@ end;
|
|||||||
procedure demande_etat_acc;
|
procedure demande_etat_acc;
|
||||||
var i : integer;
|
var i : integer;
|
||||||
begin
|
begin
|
||||||
Affiche('Demande état des aiguillages',ClYellow);
|
if portCommOuvert or parSocketLenz then
|
||||||
for i:=1 to maxaiguillage do
|
|
||||||
begin
|
begin
|
||||||
demande_info_acc(i);
|
Affiche('Demande état des aiguillages',ClYellow);
|
||||||
|
for i:=1 to maxaiguillage do
|
||||||
|
begin
|
||||||
|
demande_info_acc(i);
|
||||||
|
Affiche('Demande état aiguillage '+intToSTR(i),clLime);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -6778,21 +6781,31 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// évènement d'aiguillage
|
// évènement d'aiguillage (accessoire)
|
||||||
|
// pos = const_droit=2 ou const_devie=1
|
||||||
procedure Event_Aig(adresse,pos : integer);
|
procedure Event_Aig(adresse,pos : integer);
|
||||||
var s: string;
|
var s: string;
|
||||||
faire_event: boolean;
|
faire_event,inv : boolean;
|
||||||
|
prov,i : integer;
|
||||||
begin
|
begin
|
||||||
// ------------------- traitement du numéro d'objet -------------------------
|
// vérifier que l'évènement accessoire vient bien d'un aiguillage et pas d'un feu
|
||||||
{ init objet
|
i:=0;
|
||||||
if aiguillage[adresse].objet=0 then
|
repeat
|
||||||
|
inc(i);
|
||||||
|
until (i>MaxAiguillage) or (i=adresse);
|
||||||
|
if i>MaxAiguillage then exit; // non ce n'est pas un aiguillage, on sort
|
||||||
|
|
||||||
|
// si l'aiguillage est inversé dans CDM et qu'on est en mode autonome, inverser sa position
|
||||||
|
inv:=false;
|
||||||
|
if (aiguillage[adresse].inversionCDM=1) then // and (portCommOuvert or parSocketLenz) then
|
||||||
begin
|
begin
|
||||||
aiguillage[adresse].objet:=objet;
|
prov:=pos;
|
||||||
//affiche('stockage Aiguillage '+intToSTR(adresse)+' objet='+intToSTR(objet),clYellow);
|
inv:=true;
|
||||||
|
if prov=const_droit then pos:=const_devie else pos:=const_droit;
|
||||||
end;
|
end;
|
||||||
}
|
|
||||||
// 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;
|
||||||
|
|
||||||
@@ -6800,13 +6813,13 @@ begin
|
|||||||
if (N_Event_tick>=Max_Event_det_tick) then
|
if (N_Event_tick>=Max_Event_det_tick) then
|
||||||
begin
|
begin
|
||||||
N_Event_tick:=0;
|
N_Event_tick:=0;
|
||||||
Affiche('Raz Evts détecteurs',clLime);
|
Affiche('Raz Evts ',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é';
|
||||||
|
if inv then s:=s+' INV';
|
||||||
if AffAigDet then
|
if AffAigDet then
|
||||||
begin
|
begin
|
||||||
//if objet<>0 then s:=s+' objet='+IntToSTR(objet);
|
|
||||||
Affiche(s,clyellow);
|
Affiche(s,clyellow);
|
||||||
AfficheDebug(s,clyellow);
|
AfficheDebug(s,clyellow);
|
||||||
end;
|
end;
|
||||||
@@ -6816,7 +6829,6 @@ begin
|
|||||||
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;
|
||||||
event_det_tick[N_event_tick].etat:=pos;
|
event_det_tick[N_event_tick].etat:=pos;
|
||||||
//event_det_tick[N_event_tick].objet:=objet;
|
|
||||||
|
|
||||||
// Mettre à jour le TCO
|
// Mettre à jour le TCO
|
||||||
if AvecTCO then
|
if AvecTCO then
|
||||||
@@ -6828,17 +6840,34 @@ begin
|
|||||||
if faire_event then evalue;
|
if faire_event then evalue;
|
||||||
end;
|
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);
|
||||||
|
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;
|
||||||
|
|
||||||
// pilotage d'un accessoire (décodeur d'aiguillage, de signal)
|
// pilotage d'un accessoire (décodeur d'aiguillage, de signal)
|
||||||
// octet = 0 ou 1 ou 2
|
// octet = 1 (dévié) ou 2 (droit)
|
||||||
// la sortie "octet" est mise à 1 puis à 0
|
// 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);
|
||||||
var groupe,temps : integer ;
|
var groupe,temps : integer ;
|
||||||
fonction : byte;
|
fonction : byte;
|
||||||
s : string;
|
s : string;
|
||||||
|
label mise0;
|
||||||
begin
|
begin
|
||||||
//Affiche(IntToSTR(adresse)+' '+intToSTr(octet),clYellow);
|
//Affiche(IntToSTR(adresse)+' '+intToSTr(octet),clYellow);
|
||||||
// pilotage par CDM rail
|
|
||||||
|
// pilotage par CDM rail -----------------
|
||||||
if CDM_connecte then
|
if CDM_connecte then
|
||||||
begin
|
begin
|
||||||
//AfficheDebug(intToSTR(adresse),clred);
|
//AfficheDebug(intToSTR(adresse),clred);
|
||||||
@@ -6847,24 +6876,23 @@ begin
|
|||||||
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);
|
||||||
|
sleep(50);
|
||||||
s:=chaine_CDM_Acc(adresse,0);
|
s:=chaine_CDM_Acc(adresse,0);
|
||||||
envoi_CDM(s);
|
envoi_CDM(s);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// pilotage par USB ou par éthernet de la centrale
|
// pilotage par USB ou par éthernet de la centrale ------------
|
||||||
|
|
||||||
// Affiche('Accessoire '+intToSTR(adresse),clLime);
|
|
||||||
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;
|
||||||
|
|
||||||
if (octet=0) or (octet>2) then exit;
|
if (octet=0) or (octet>2) then exit;
|
||||||
//if (octet>2) then exit;
|
|
||||||
groupe:=(adresse-1) div 4;
|
groupe:=(adresse-1) div 4;
|
||||||
fonction:=((adresse-1) mod 4)*2 + (octet-1);
|
fonction:=((adresse-1) mod 4)*2 + (octet-1);
|
||||||
// pilotage à 1
|
// pilotage à 1
|
||||||
@@ -6872,10 +6900,10 @@ begin
|
|||||||
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
|
||||||
|
|
||||||
// si l'accessoire est un feu et sans raz des signaux, sortir
|
// si l'accessoire est un feu et sans raz des signaux, sortir
|
||||||
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
|
||||||
@@ -6883,7 +6911,7 @@ begin
|
|||||||
temps:=aiguillage[adresse].temps;if temps=0 then temps:=4;
|
temps:=aiguillage[adresse].temps;if temps=0 then temps:=4;
|
||||||
if portCommOuvert or parSocketLenz then tempo(temps);
|
if portCommOuvert or parSocketLenz then tempo(temps);
|
||||||
end;
|
end;
|
||||||
sleep(50);
|
//sleep(50);
|
||||||
|
|
||||||
// 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
|
||||||
@@ -7587,7 +7615,7 @@ begin
|
|||||||
Srvc_PosTrain:=false;
|
Srvc_PosTrain:=false;
|
||||||
Srvc_sig:=false;
|
Srvc_sig:=false;
|
||||||
|
|
||||||
AF:='Client TCP-IP CDM Rail ou USB - système LENZ - Version '+Version;
|
AF:='Client TCP-IP CDM Rail ou USB - système XpressNet - Version '+Version;
|
||||||
Caption:=AF;
|
Caption:=AF;
|
||||||
Application.onHint:=doHint;
|
Application.onHint:=doHint;
|
||||||
|
|
||||||
@@ -7642,9 +7670,9 @@ begin
|
|||||||
// 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
|
||||||
Affiche('CDM absent - Ouverture liaison vers centrale Lenz',clYellow);
|
Affiche('CDM absent',clYellow);
|
||||||
// ouverture par USB
|
// ouverture par USB
|
||||||
Affiche('demande connexion à la centrale Lenz par USB',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
|
||||||
@@ -7652,7 +7680,7 @@ begin
|
|||||||
// Initialisation de la comm socket LENZ
|
// Initialisation de la comm socket LENZ
|
||||||
if AdresseIP<>'0' then
|
if AdresseIP<>'0' then
|
||||||
begin
|
begin
|
||||||
Affiche('demande connexion à la centrale Lenz par Ethernet',clyellow);
|
Affiche('Demande connexion à la centrale par Ethernet protocole XpressNet',clyellow);
|
||||||
ClientSocketLenz.port:=port;
|
ClientSocketLenz.port:=port;
|
||||||
ClientSocketLenz.Address:=AdresseIP;
|
ClientSocketLenz.Address:=AdresseIP;
|
||||||
ClientSocketLenz.Open;
|
ClientSocketLenz.Open;
|
||||||
@@ -7788,6 +7816,7 @@ begin
|
|||||||
if pos=1 then s:=s+' (dévié)' else s:=s+' (droit)';
|
if pos=1 then s:=s+' (dévié)' else s:=s+' (droit)';
|
||||||
Affiche(s,cyan);
|
Affiche(s,cyan);
|
||||||
pilote_acc(i,pos,aig);
|
pilote_acc(i,pos,aig);
|
||||||
|
sleep(Tempo_Aig);
|
||||||
application.processMessages;
|
application.processMessages;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -8042,7 +8071,7 @@ begin
|
|||||||
10061 : s:=s+': Connexion refusée';
|
10061 : s:=s+': Connexion refusée';
|
||||||
10065 : s:=s+': Port non connecté';
|
10065 : s:=s+': Port non connecté';
|
||||||
end;
|
end;
|
||||||
affiche(s,clOrange);
|
if errorcode<>10061 then affiche(s,clOrange);
|
||||||
if nivDebug=3 then afficheDebug(s,clOrange);
|
if nivDebug=3 then afficheDebug(s,clOrange);
|
||||||
parSocketLenz:=false;
|
parSocketLenz:=false;
|
||||||
ErrorCode:=0;
|
ErrorCode:=0;
|
||||||
@@ -8061,7 +8090,7 @@ begin
|
|||||||
10061 : s:=s+': Connexion refusée';
|
10061 : s:=s+': Connexion refusée';
|
||||||
10065 : s:=s+': Port non connecté';
|
10065 : s:=s+': Port non connecté';
|
||||||
end;
|
end;
|
||||||
affiche(s,ClOrange);
|
if errorcode<>10061 then affiche(s,ClOrange);
|
||||||
afficheDebug(s,ClOrange);
|
afficheDebug(s,ClOrange);
|
||||||
CDM_connecte:=false;
|
CDM_connecte:=false;
|
||||||
if (portCommOuvert=false) and (parSocketLenz=false) then LabelTitre.caption:=titre;
|
if (portCommOuvert=false) and (parSocketLenz=false) then LabelTitre.caption:=titre;
|
||||||
@@ -8181,7 +8210,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormPrinc.Etatdesaiguillages1Click(Sender: TObject);
|
procedure TFormPrinc.Etatdesaiguillages1Click(Sender: TObject);
|
||||||
var i,j,model,objet : integer;
|
var i,j,model : integer;
|
||||||
s : string;
|
s : string;
|
||||||
begin
|
begin
|
||||||
for i:=1 to MaxAcc do
|
for i:=1 to MaxAcc do
|
||||||
@@ -8194,8 +8223,6 @@ begin
|
|||||||
if aiguillage[i].position=const_droit then s:=s+' (droit)';
|
if aiguillage[i].position=const_droit then s:=s+' (droit)';
|
||||||
if aiguillage[i].position=const_inconnu then s:=s+' inconnue';
|
if aiguillage[i].position=const_inconnu then s:=s+' inconnue';
|
||||||
|
|
||||||
objet:=aiguillage[i].objet;
|
|
||||||
if objet<>0 then s:=s+' objet='+intToSTR(objet);
|
|
||||||
if model=4 then // aig triple
|
if model=4 then // aig triple
|
||||||
begin
|
begin
|
||||||
j:=aiguillage[i].AdrTriple;
|
j:=aiguillage[i].AdrTriple;
|
||||||
@@ -8237,7 +8264,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
if aiguillage[i].modele=4 then s:=s+' Dévié2='+intToSTR(aiguillage[i].ADevie2)+aiguillage[i].ADevie2B;
|
if aiguillage[i].modele=4 then s:=s+' Dévié2='+intToSTR(aiguillage[i].ADevie2)+aiguillage[i].ADevie2B;
|
||||||
if aiguillage[i].vitesse<>0 then s:=s+' Vitesse déviée='+intToSTR(aiguillage[i].vitesse);
|
if aiguillage[i].vitesse<>0 then s:=s+' Vitesse déviée='+intToSTR(aiguillage[i].vitesse);
|
||||||
if aiguillage[i].inversion<>0 then s:=s+' pilotage inversé';
|
if aiguillage[i].inversionCDM<>0 then s:=s+' pilotage inversé';
|
||||||
|
|
||||||
Affiche(s,clYellow);
|
Affiche(s,clYellow);
|
||||||
end;
|
end;
|
||||||
@@ -8374,19 +8401,20 @@ begin
|
|||||||
if aiguillage[adr].modele=1 then
|
if aiguillage[adr].modele=1 then
|
||||||
begin
|
begin
|
||||||
//Affiche('Normal',clyellow);
|
//Affiche('Normal',clyellow);
|
||||||
if etat=0 then etatAig:=2 else etatAig:=1;
|
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:=1;EtatAig2:=2;end;
|
1 : begin etatAig:=const_devie;EtatAig2:=const_droit;end;
|
||||||
4 : begin etatAig:=1;EtatAig2:=1;end;
|
4 : begin etatAig:=const_devie;EtatAig2:=const_devie;end;
|
||||||
5 : begin etatAig:=2;EtatAig2:=1;end;
|
5 : begin etatAig:=const_droit;EtatAig2:=const_devie;end;
|
||||||
0 : begin etatAig:=2;EtatAig2:=2;end;
|
0 : begin etatAig:=const_droit;EtatAig2:=const_droit;end;
|
||||||
end;
|
end;
|
||||||
if (aiguillage[adr].inversionCDM=1) or (aiguillage[adr2].inversionCDM=1) then
|
if (aiguillage[adr].inversionCDM=1) or (aiguillage[adr2].inversionCDM=1) then
|
||||||
begin
|
begin
|
||||||
|
|||||||
BIN
Binary file not shown.
+11
-9
@@ -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
|
||||||
|
|||||||
+33
-33
@@ -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-)
|
||||||
|
|||||||
+1
-1
@@ -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