This commit is contained in:
f1iwq2
2020-02-27 17:52:56 +01:00
parent 107aa92290
commit 155b694a65
18 changed files with 506 additions and 853 deletions

View File

@@ -1,251 +0,0 @@
1 Tick=283 Det=521=0
2 Tick=283 Det=521=0
3 Tick=283 Det=524=0
4 Tick=283 Det=531=0
5 Tick=283 Det=518=0
6 Tick=283 Det=518=0
7 Tick=283 Det=519=0
8 Tick=283 Det=523=0
9 Tick=283 Det=526=0
10 Tick=283 Det=527=0
11 Tick=283 Det=526=0
12 Tick=283 Det=523=0
13 Tick=283 Det=513=1
14 Tick=283 Det=524=0
15 Tick=283 Det=515=0
16 Tick=283 Det=514=0
17 Tick=283 Det=516=1
18 Tick=283 Det=516=1
19 Tick=283 Det=515=0
20 Tick=283 Det=525=0
21 Tick=283 Det=528=0
22 Tick=283 Det=528=0
23 Tick=283 Det=522=0
24 Tick=283 Det=514=0
25 Tick=283 Det=522=0
26 Tick=283 Det=519=0
27 Tick=283 Det=527=0
28 Tick=283 Det=531=0
29 Tick=283 Det=525=0
30 Tick=283 Det=535=0
31 Tick=283 Det=535=0
32 Tick=283 Det=535=0
33 Tick=283 Det=535=0
34 Tick=284 Det=534=0
35 Tick=284 Det=534=0
36 Tick=284 Det=533=0
37 Tick=284 Det=533=0
38 Tick=284 Det=520=1
39 Tick=284 Det=520=1
40 Tick=284 Det=517=0
41 Tick=284 Det=517=0
42 Tick=284 Det=538=1
43 Tick=284 Det=538=1
44 Tick=284 Det=529=0
45 Tick=284 Det=529=0
46 Tick=284 Det=530=0
47 Tick=284 Det=530=0
48 Tick=284 Det=537=0
49 Tick=284 Det=537=0
50 Tick=284 Det=513=1
51 Tick=285 Det=518=0
52 Tick=285 Det=518=0
53 Tick=285 Det=519=1
54 Tick=285 Det=519=1
55 Tick=285 Det=520=0
56 Tick=285 Det=520=0
57 Tick=285 Det=517=0
58 Tick=285 Det=517=0
59 Tick=297 Det=518=0
60 Tick=297 Det=518=0
61 Tick=297 Det=519=0
62 Tick=297 Det=519=0
63 Tick=297 Det=520=0
64 Tick=297 Det=520=0
65 Tick=297 Det=517=0
66 Tick=297 Det=517=0
67 Tick=354 Det=513=0
68 Tick=354 Det=515=0
69 Tick=354 Det=514=0
70 Tick=354 Det=516=1
71 Tick=354 Det=516=1
72 Tick=354 Det=515=0
73 Tick=354 Det=514=0
74 Tick=354 Det=513=0
75 Tick=381 Det=531=1
76 Tick=381 Det=531=1
77 Tick=381 Det=529=0
78 Tick=381 Det=529=0
79 Tick=381 Det=530=0
80 Tick=381 Det=530=0
81 Tick=385 Det=531=0
82 Tick=385 Det=529=0
83 Tick=385 Det=529=0
84 Tick=385 Det=530=0
85 Tick=385 Det=530=0
86 Tick=390 Det=518=1
87 Tick=390 Det=518=1
88 Tick=390 Det=519=0
89 Tick=390 Det=519=0
90 Tick=390 Det=520=0
91 Tick=390 Det=520=0
92 Tick=390 Det=517=0
93 Tick=390 Det=517=0
94 Tick=399 Det=531=0
95 Tick=417 Det=518=1
96 Tick=417 Det=518=1
97 Tick=417 Det=519=1
98 Tick=417 Det=519=1
99 Tick=417 Det=520=0
100 Tick=417 Det=520=0
101 Tick=417 Det=517=0
102 Tick=417 Det=517=0
103 Tick=419 Det=518=0
104 Tick=419 Det=519=1
105 Tick=419 Det=519=1
106 Tick=419 Det=520=0
107 Tick=419 Det=520=0
108 Tick=419 Det=517=0
109 Tick=419 Det=517=0
110 Tick=423 Det=518=0
111 Tick=423 Det=518=0
112 Tick=423 Det=519=0
113 Tick=423 Det=519=0
114 Tick=423 Det=520=0
115 Tick=423 Det=520=0
116 Tick=423 Det=517=0
117 Tick=423 Det=517=0
118 Tick=439 Det=518=0
119 Tick=442 Det=521=0
120 Tick=442 Det=521=0
121 Tick=442 Det=524=0
122 Tick=442 Det=523=1
123 Tick=442 Det=523=1
124 Tick=442 Det=524=0
125 Tick=442 Det=522=0
126 Tick=442 Det=522=0
127 Tick=479 Det=521=0
128 Tick=479 Det=521=0
129 Tick=479 Det=524=0
130 Tick=479 Det=523=0
131 Tick=479 Det=524=0
132 Tick=479 Det=522=0
133 Tick=479 Det=522=0
134 Tick=482 Det=526=1
135 Tick=482 Det=527=0
136 Tick=482 Det=526=1
137 Tick=482 Det=525=0
138 Tick=482 Det=528=0
139 Tick=482 Det=528=0
140 Tick=482 Det=527=0
141 Tick=482 Det=525=0
142 Tick=493 Det=523=0
143 Tick=521 Det=527=0
144 Tick=521 Det=526=0
145 Tick=521 Det=525=0
146 Tick=521 Det=528=0
147 Tick=521 Det=528=0
148 Tick=521 Det=527=0
149 Tick=521 Det=525=0
150 Tick=534 Det=526=0
151 Tick=583 Det=513=1
152 Tick=583 Det=515=0
153 Tick=583 Det=514=0
154 Tick=583 Det=516=1
155 Tick=583 Det=516=1
156 Tick=583 Det=515=0
157 Tick=583 Det=514=0
158 Tick=583 Det=513=1
159 Tick=607 Det=515=0
160 Tick=607 Det=514=0
161 Tick=607 Det=516=1
162 Tick=607 Det=516=1
163 Tick=607 Det=515=0
164 Tick=607 Det=514=0
165 Tick=607 Det=513=0
166 Tick=618 Det=513=0
167 Tick=631 Det=531=1
168 Tick=631 Det=531=1
169 Tick=631 Det=529=0
170 Tick=631 Det=529=0
171 Tick=631 Det=530=0
172 Tick=631 Det=530=0
173 Tick=636 Det=531=0
174 Tick=636 Det=529=0
175 Tick=636 Det=529=0
176 Tick=636 Det=530=0
177 Tick=636 Det=530=0
178 Tick=640 Det=518=1
179 Tick=640 Det=518=1
180 Tick=640 Det=519=0
181 Tick=640 Det=519=0
182 Tick=640 Det=520=0
183 Tick=640 Det=520=0
184 Tick=640 Det=517=0
185 Tick=640 Det=517=0
186 Tick=645 Det=531=0
187 Tick=668 Det=518=1
188 Tick=668 Det=518=1
189 Tick=668 Det=519=1
190 Tick=668 Det=519=1
191 Tick=668 Det=520=0
192 Tick=668 Det=520=0
193 Tick=668 Det=517=0
194 Tick=668 Det=517=0
195 Tick=670 Det=518=0
196 Tick=670 Det=519=1
197 Tick=670 Det=519=1
198 Tick=670 Det=520=0
199 Tick=670 Det=520=0
200 Tick=670 Det=517=0
201 Tick=670 Det=517=0
202 Tick=672 Det=518=0
203 Tick=672 Det=518=0
204 Tick=672 Det=519=0
205 Tick=672 Det=519=0
206 Tick=672 Det=520=0
207 Tick=672 Det=520=0
208 Tick=672 Det=517=0
209 Tick=672 Det=517=0
210 Tick=690 Det=518=0
211 Tick=692 Det=521=0
212 Tick=692 Det=521=0
213 Tick=692 Det=524=0
214 Tick=692 Det=523=1
215 Tick=692 Det=523=1
216 Tick=692 Det=524=0
217 Tick=692 Det=522=0
218 Tick=692 Det=522=0
219 Tick=730 Det=521=0
220 Tick=730 Det=521=0
221 Tick=730 Det=524=0
222 Tick=730 Det=523=0
223 Tick=730 Det=524=0
224 Tick=730 Det=522=0
225 Tick=730 Det=522=0
226 Tick=733 Det=526=1
227 Tick=733 Det=527=0
228 Tick=733 Det=526=1
229 Tick=733 Det=525=0
230 Tick=733 Det=528=0
231 Tick=733 Det=528=0
232 Tick=733 Det=527=0
233 Tick=733 Det=525=0
234 Tick=744 Det=523=0
235 Tick=772 Det=527=0
236 Tick=772 Det=526=0
237 Tick=772 Det=525=0
238 Tick=772 Det=528=0
239 Tick=772 Det=528=0
240 Tick=772 Det=527=0
241 Tick=772 Det=525=0
242 Tick=785 Det=526=0
243 Tick=857 Det=513=1
244 Tick=857 Det=515=0
245 Tick=857 Det=514=0
246 Tick=857 Det=516=1
247 Tick=857 Det=516=1
248 Tick=857 Det=515=0
249 Tick=857 Det=514=0
250 Tick=857 Det=513=1

View File

@@ -1,61 +0,0 @@
départ depuis 2 trains en 523 et 526
1 Tick=370 Det=523=1 BB
2 Tick=370 Det=526=1 CC en tete
3 Tick=370 Det=516=1 TGV en garage
4 Tick=371 Det=520=1 ???
-------------------------------
5 Tick=505 Det=526=0 CC quitte
6 Tick=550 Det=523=0 BB quitte
7 Tick=559 Det=526=1 BB arrive
8 Tick=578 Det=513=1 CC arrive
9 Tick=606 Det=513=0 CC quitte
10 Tick=638 Det=531=1 CC arrive
11 Tick=638 Det=526=0 BB quitte
12 Tick=643 Det=531=0 CC quitte
13 Tick=649 Det=518=1 CC arrive
14 Tick=649 Det=520=0 ???
15 Tick=685 Det=518=0 CC quitte
16 Tick=712 Det=513=1 BB arrive
17 Tick=716 Det=523=1 CC arrive
18 Tick=730 Det=513=0 BB quitte
19 Tick=766 Det=531=1 BB arrive
20 Tick=766 Det=523=0 CC quitte
21 Tick=774 Det=531=0 BB quitte
22 Tick=774 Det=526=1 CC arrive
23 Tick=779 Det=518=1 BB arrive
24 Tick=809 Det=518=0 BB quitte
25 Tick=819 Det=526=0 CC quitte
26 Tick=839 Det=523=1 BB arrive
27 Tick=871 Det=523=0 BB quitte
28 Tick=876 Det=526=1 BB arrive
29 Tick=933 Det=513=1 CC arrive
trains arretés
BB CC
1 523 1
2 526 1
5 526 0
6 523 0
7 526 1
8 513 1
9 513 0
10 531 1
11 526 0
12 531 0
13 518 1
14 520???
15 518 0
16 513 1
17 523 1
18 513 0
19 531 1
20 523 0
21 531 0
22 526 1
23 518 1
24 518 0
25 526 0
26 523 1
27 523 0
28 526 1
29 513 1

View File

@@ -1,306 +0,0 @@
1 Tick=1016 Det=521=0
2 Tick=1016 Det=521=0
3 Tick=1016 Det=524=0
4 Tick=1016 Det=531=0
5 Tick=1016 Det=518=0
6 Tick=1016 Det=518=0
7 Tick=1016 Det=519=0
8 Tick=1016 Det=523=0
9 Tick=1016 Det=526=1
10 Tick=1016 Det=527=0
11 Tick=1016 Det=526=1
12 Tick=1016 Det=523=0
13 Tick=1016 Det=513=0
14 Tick=1016 Det=524=0
15 Tick=1016 Det=515=0
16 Tick=1016 Det=514=0
17 Tick=1016 Det=516=1
18 Tick=1016 Det=516=1
19 Tick=1016 Det=515=0
20 Tick=1016 Det=525=0
21 Tick=1016 Det=528=1
22 Tick=1016 Det=528=1
23 Tick=1016 Det=522=0
24 Tick=1017 Det=514=0
25 Tick=1017 Det=522=0
26 Tick=1017 Det=519=0
27 Tick=1017 Det=527=0
28 Tick=1017 Det=531=0
29 Tick=1017 Det=525=0
30 Tick=1017 Det=535=0
31 Tick=1017 Det=535=0
32 Tick=1017 Det=535=0
33 Tick=1017 Det=535=0
34 Tick=1017 Det=534=0
35 Tick=1017 Det=534=0
36 Tick=1017 Det=533=0
37 Tick=1017 Det=533=0
38 Tick=1017 Det=520=0
39 Tick=1017 Det=520=0
40 Tick=1017 Det=517=0
41 Tick=1017 Det=517=0
42 Tick=1017 Det=538=0
43 Tick=1017 Det=538=0
44 Tick=1017 Det=529=0
45 Tick=1017 Det=529=0
46 Tick=1017 Det=530=0
47 Tick=1017 Det=530=0
48 Tick=1017 Det=537=0
49 Tick=1017 Det=537=0
50 Tick=1017 Det=513=0
51 Tick=1044 Det=526=0
52 Tick=1044 Det=527=0
53 Tick=1044 Det=526=0
54 Tick=1044 Det=525=0
55 Tick=1044 Det=528=1
56 Tick=1044 Det=528=1
57 Tick=1044 Det=527=0
58 Tick=1044 Det=525=0
59 Tick=1057 Det=526=0
60 Tick=1057 Det=527=0
61 Tick=1057 Det=526=0
62 Tick=1057 Det=525=0
63 Tick=1057 Det=528=0
64 Tick=1057 Det=528=0
65 Tick=1057 Det=527=0
66 Tick=1057 Det=525=0
67 Tick=1076 Det=531=1
68 Tick=1076 Det=531=1
69 Tick=1076 Det=529=0
70 Tick=1076 Det=529=0
71 Tick=1076 Det=530=0
72 Tick=1076 Det=530=0
73 Tick=1081 Det=531=0
74 Tick=1081 Det=529=0
75 Tick=1081 Det=529=0
76 Tick=1081 Det=530=0
77 Tick=1081 Det=530=0
78 Tick=1086 Det=518=1
79 Tick=1086 Det=518=1
80 Tick=1086 Det=519=0
81 Tick=1086 Det=519=0
82 Tick=1086 Det=520=0
83 Tick=1086 Det=520=0
84 Tick=1086 Det=517=0
85 Tick=1086 Det=517=0
86 Tick=1097 Det=531=0
87 Tick=1115 Det=518=0
88 Tick=1115 Det=519=0
89 Tick=1115 Det=519=0
90 Tick=1115 Det=520=0
91 Tick=1115 Det=520=0
92 Tick=1115 Det=517=0
93 Tick=1115 Det=517=0
94 Tick=1121 Det=518=0
95 Tick=1138 Det=521=0
96 Tick=1138 Det=521=0
97 Tick=1138 Det=524=0
98 Tick=1138 Det=523=1
99 Tick=1138 Det=523=1
100 Tick=1138 Det=524=0
101 Tick=1138 Det=522=0
102 Tick=1138 Det=522=0
103 Tick=1141 Det=513=1
104 Tick=1141 Det=515=0
105 Tick=1141 Det=514=0
106 Tick=1141 Det=516=1
107 Tick=1141 Det=516=1
108 Tick=1141 Det=515=0
109 Tick=1141 Det=514=0
110 Tick=1141 Det=513=1
111 Tick=1183 Det=521=0
112 Tick=1183 Det=521=0
113 Tick=1183 Det=524=0
114 Tick=1183 Det=523=0
115 Tick=1183 Det=524=0
116 Tick=1183 Det=522=0
117 Tick=1183 Det=522=0
118 Tick=1191 Det=526=1
119 Tick=1191 Det=527=0
120 Tick=1191 Det=526=1
121 Tick=1191 Det=525=0
122 Tick=1191 Det=528=0
123 Tick=1191 Det=528=0
124 Tick=1191 Det=527=0
125 Tick=1191 Det=525=0
126 Tick=1194 Det=513=0
127 Tick=1194 Det=515=0
128 Tick=1194 Det=514=0
129 Tick=1194 Det=516=1
130 Tick=1194 Det=516=1
131 Tick=1194 Det=515=0
132 Tick=1194 Det=514=0
133 Tick=1194 Det=513=0
134 Tick=1214 Det=523=0
135 Tick=1242 Det=531=1
136 Tick=1242 Det=531=1
137 Tick=1242 Det=529=0
138 Tick=1242 Det=529=0
139 Tick=1242 Det=530=0
140 Tick=1242 Det=530=0
141 Tick=1251 Det=531=0
142 Tick=1251 Det=529=0
143 Tick=1251 Det=529=0
144 Tick=1251 Det=530=0
145 Tick=1251 Det=530=0
146 Tick=1260 Det=518=1
147 Tick=1260 Det=518=1
148 Tick=1260 Det=519=0
149 Tick=1260 Det=519=0
150 Tick=1260 Det=520=0
151 Tick=1260 Det=520=0
152 Tick=1260 Det=517=0
153 Tick=1260 Det=517=0
154 Tick=1272 Det=531=0
155 Tick=1283 Det=527=0
156 Tick=1283 Det=526=0
157 Tick=1283 Det=525=0
158 Tick=1283 Det=528=0
159 Tick=1283 Det=528=0
160 Tick=1283 Det=527=0
161 Tick=1283 Det=525=0
162 Tick=1290 Det=526=0
163 Tick=1310 Det=518=0
164 Tick=1310 Det=519=0
165 Tick=1310 Det=519=0
166 Tick=1310 Det=520=0
167 Tick=1310 Det=520=0
168 Tick=1310 Det=517=0
169 Tick=1310 Det=517=0
170 Tick=1321 Det=518=0
171 Tick=1326 Det=513=0
172 Tick=1326 Det=515=0
173 Tick=1326 Det=514=1
174 Tick=1326 Det=516=1
175 Tick=1326 Det=516=1
176 Tick=1326 Det=515=0
177 Tick=1326 Det=514=1
178 Tick=1326 Det=513=0
179 Tick=1376 Det=513=1
180 Tick=1376 Det=515=0
181 Tick=1376 Det=514=1
182 Tick=1376 Det=516=1
183 Tick=1376 Det=516=1
184 Tick=1376 Det=515=0
185 Tick=1376 Det=514=1
186 Tick=1376 Det=513=1
187 Tick=1397 Det=521=0
188 Tick=1397 Det=521=0
189 Tick=1397 Det=524=0
190 Tick=1397 Det=523=0
191 Tick=1397 Det=523=0
192 Tick=1397 Det=524=0
193 Tick=1397 Det=522=1
194 Tick=1397 Det=522=1
195 Tick=1400 Det=515=0
196 Tick=1421 Det=514=0
197 Tick=1422 Det=513=0
198 Tick=1437 Det=531=1
199 Tick=1437 Det=531=1
200 Tick=1437 Det=529=0
201 Tick=1437 Det=529=0
202 Tick=1437 Det=530=0
203 Tick=1437 Det=530=0
204 Tick=1441 Det=531=0
205 Tick=1441 Det=531=0
206 Tick=1441 Det=529=0
207 Tick=1441 Det=529=0
208 Tick=1441 Det=530=0
209 Tick=1441 Det=530=0
210 Tick=1446 Det=518=1
211 Tick=1446 Det=518=1
212 Tick=1446 Det=519=0
213 Tick=1446 Det=519=0
214 Tick=1446 Det=520=0
215 Tick=1446 Det=520=0
216 Tick=1446 Det=517=0
217 Tick=1446 Det=517=0
218 Tick=1475 Det=518=0
219 Tick=1475 Det=519=0
220 Tick=1475 Det=519=0
221 Tick=1475 Det=520=0
222 Tick=1475 Det=520=0
223 Tick=1475 Det=517=0
224 Tick=1475 Det=517=0
225 Tick=1490 Det=518=0
226 Tick=1491 Det=521=0
227 Tick=1491 Det=521=0
228 Tick=1491 Det=524=0
229 Tick=1491 Det=523=0
230 Tick=1491 Det=523=0
231 Tick=1491 Det=524=0
232 Tick=1491 Det=522=0
233 Tick=1498 Det=521=0
234 Tick=1498 Det=521=0
235 Tick=1498 Det=524=0
236 Tick=1498 Det=523=1
237 Tick=1498 Det=523=1
238 Tick=1498 Det=524=0
239 Tick=1498 Det=522=0
240 Tick=1498 Det=522=0
241 Tick=1500 Det=522=0
242 Tick=1541 Det=521=0
243 Tick=1541 Det=521=0
244 Tick=1541 Det=524=0
245 Tick=1541 Det=526=0
246 Tick=1541 Det=527=1
247 Tick=1541 Det=526=0
248 Tick=1541 Det=523=0
249 Tick=1541 Det=524=0
250 Tick=1541 Det=525=0
251 Tick=1541 Det=528=0
252 Tick=1541 Det=528=0
253 Tick=1541 Det=522=0
254 Tick=1541 Det=522=0
255 Tick=1541 Det=527=1
256 Tick=1541 Det=525=0
257 Tick=1551 Det=526=1
258 Tick=1551 Det=527=1
259 Tick=1551 Det=526=1
260 Tick=1551 Det=525=0
261 Tick=1551 Det=528=0
262 Tick=1551 Det=528=0
263 Tick=1551 Det=527=1
264 Tick=1551 Det=525=0
265 Tick=1552 Det=523=0
266 Tick=1598 Det=527=1
267 Tick=1598 Det=526=0
268 Tick=1598 Det=525=0
269 Tick=1598 Det=528=0
270 Tick=1598 Det=528=0
271 Tick=1598 Det=527=1
272 Tick=1598 Det=525=0
273 Tick=1606 Det=526=0
274 Tick=1606 Det=526=0
275 Tick=1606 Det=525=0
276 Tick=1606 Det=528=0
277 Tick=1606 Det=528=0
278 Tick=1606 Det=527=0
279 Tick=1606 Det=525=0
280 Tick=1643 Det=518=0
281 Tick=1643 Det=518=0
282 Tick=1643 Det=519=1
283 Tick=1643 Det=519=1
284 Tick=1643 Det=520=0
285 Tick=1643 Det=520=0
286 Tick=1643 Det=517=0
287 Tick=1643 Det=517=0
288 Tick=1645 Det=527=0
289 Tick=1651 Det=526=0
290 Tick=1708 Det=513=1
291 Tick=1708 Det=515=0
292 Tick=1709 Det=514=0
293 Tick=1709 Det=516=1
294 Tick=1709 Det=516=1
295 Tick=1709 Det=515=0
296 Tick=1709 Det=514=0
297 Tick=1709 Det=513=1
298 Tick=1709 Det=518=0
299 Tick=1709 Det=518=0
300 Tick=1709 Det=519=0
301 Tick=1709 Det=519=0
302 Tick=1709 Det=520=0
303 Tick=1709 Det=520=0
304 Tick=1709 Det=517=0
305 Tick=1709 Det=517=0

BIN
Signaux_complexes_GL.exe Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -210,7 +210,7 @@ object FormDebug: TFormDebug
Top = 96 Top = 96
Width = 281 Width = 281
Height = 17 Height = 17
Caption = 'Affichage des trames '#233'chang'#233'es avec LENZ' Caption = 'Affichage des trames '#233'chang'#233'es avec l'#39'interface'
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack Font.Color = clBlack
Font.Height = -11 Font.Height = -11

Binary file not shown.

Binary file not shown.

View File

@@ -1,9 +1,10 @@
object FormPrinc: TFormPrinc object FormPrinc: TFormPrinc
Left = 34 Left = 58
Top = 494 Top = 238
AutoSize = True
BorderStyle = bsSingle BorderStyle = bsSingle
Caption = 'Client TCP-IP CDM Rail ou USB - syst'#232'me LENZ' Caption = 'Client TCP-IP CDM Rail ou USB - syst'#232'me LENZ'
ClientHeight = 601 ClientHeight = 606
ClientWidth = 1196 ClientWidth = 1196
Color = clBtnFace Color = clBtnFace
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@@ -13,7 +14,7 @@ object FormPrinc: TFormPrinc
Font.Style = [] Font.Style = []
Menu = MainMenu1 Menu = MainMenu1
OldCreateOrder = False OldCreateOrder = False
Position = poDefault Position = poMainFormCenter
ShowHint = True ShowHint = True
OnClose = FormClose OnClose = FormClose
OnCreate = FormCreate OnCreate = FormCreate
@@ -21,33 +22,33 @@ object FormPrinc: TFormPrinc
TextHeight = 13 TextHeight = 13
object LabelTitre: TLabel object LabelTitre: TLabel
Left = 8 Left = 8
Top = 8 Top = 16
Width = 204 Width = 173
Height = 23 Height = 18
Caption = 'Signaux complexes GL' Caption = 'Signaux complexes GL'
Font.Charset = ANSI_CHARSET Font.Charset = ANSI_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -19 Font.Height = -16
Font.Name = 'Arial' Font.Name = 'Arial'
Font.Style = [fsItalic] Font.Style = [fsBold, fsItalic]
ParentFont = False ParentFont = False
end end
object LabelEtat: TLabel object LabelEtat: TLabel
Left = 344 Left = 456
Top = 8 Top = 16
Width = 305 Width = 152
Height = 22 Height = 18
Caption = 'LabelEtat' Caption = 'Initialisations en cours'
Font.Charset = ANSI_CHARSET Font.Charset = ANSI_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -19 Font.Height = -16
Font.Name = 'Arial' Font.Name = 'Arial'
Font.Style = [] Font.Style = []
ParentFont = False ParentFont = False
end end
object Image9feux: TImage object Image9feux: TImage
Left = 488 Left = 488
Top = 0 Top = 8
Width = 57 Width = 57
Height = 105 Height = 105
Picture.Data = { Picture.Data = {
@@ -236,8 +237,8 @@ object FormPrinc: TFormPrinc
Visible = False Visible = False
end end
object Image7feux: TImage object Image7feux: TImage
Left = 544 Left = 504
Top = 0 Top = 8
Width = 57 Width = 57
Height = 105 Height = 105
Picture.Data = { Picture.Data = {
@@ -405,7 +406,7 @@ object FormPrinc: TFormPrinc
end end
object Image5feux: TImage object Image5feux: TImage
Left = 280 Left = 280
Top = -8 Top = 0
Width = 41 Width = 41
Height = 89 Height = 89
Picture.Data = { Picture.Data = {
@@ -505,7 +506,7 @@ object FormPrinc: TFormPrinc
end end
object Image4feux: TImage object Image4feux: TImage
Left = 240 Left = 240
Top = 0 Top = 8
Width = 41 Width = 41
Height = 97 Height = 97
Picture.Data = { Picture.Data = {
@@ -597,7 +598,7 @@ object FormPrinc: TFormPrinc
end end
object Image3feux: TImage object Image3feux: TImage
Left = 616 Left = 616
Top = 0 Top = 8
Width = 33 Width = 33
Height = 57 Height = 57
Picture.Data = { Picture.Data = {
@@ -678,7 +679,7 @@ object FormPrinc: TFormPrinc
end end
object Image2feux: TImage object Image2feux: TImage
Left = 1096 Left = 1096
Top = 128 Top = 136
Width = 33 Width = 33
Height = 57 Height = 57
Picture.Data = { Picture.Data = {
@@ -752,7 +753,7 @@ object FormPrinc: TFormPrinc
end end
object Image2Dir: TImage object Image2Dir: TImage
Left = 968 Left = 968
Top = 40 Top = 48
Width = 41 Width = 41
Height = 25 Height = 25
Picture.Data = { Picture.Data = {
@@ -827,7 +828,7 @@ object FormPrinc: TFormPrinc
end end
object Image3Dir: TImage object Image3Dir: TImage
Left = 1008 Left = 1008
Top = 40 Top = 48
Width = 49 Width = 49
Height = 25 Height = 25
Picture.Data = { Picture.Data = {
@@ -905,7 +906,7 @@ object FormPrinc: TFormPrinc
end end
object Image4Dir: TImage object Image4Dir: TImage
Left = 1056 Left = 1056
Top = 40 Top = 48
Width = 57 Width = 57
Height = 25 Height = 25
Picture.Data = { Picture.Data = {
@@ -993,7 +994,7 @@ object FormPrinc: TFormPrinc
end end
object Image5Dir: TImage object Image5Dir: TImage
Left = 1112 Left = 1112
Top = 40 Top = 48
Width = 65 Width = 65
Height = 25 Height = 25
Picture.Data = { Picture.Data = {
@@ -1091,7 +1092,7 @@ object FormPrinc: TFormPrinc
end end
object Image6Dir: TImage object Image6Dir: TImage
Left = 1112 Left = 1112
Top = 128 Top = 80
Width = 81 Width = 81
Height = 25 Height = 25
Picture.Data = { Picture.Data = {
@@ -1199,7 +1200,7 @@ object FormPrinc: TFormPrinc
end end
object BoutVersion: TButton object BoutVersion: TButton
Left = 1008 Left = 1008
Top = 8 Top = 16
Width = 83 Width = 83
Height = 33 Height = 33
Caption = 'Dem version' Caption = 'Dem version'
@@ -1208,7 +1209,7 @@ object FormPrinc: TFormPrinc
end end
object ListBox1: TListBox object ListBox1: TListBox
Left = 8 Left = 8
Top = 40 Top = 48
Width = 633 Width = 633
Height = 520 Height = 520
Style = lbOwnerDrawFixed Style = lbOwnerDrawFixed
@@ -1225,7 +1226,7 @@ object FormPrinc: TFormPrinc
end end
object BoutonRaf: TButton object BoutonRaf: TButton
Left = 912 Left = 912
Top = 8 Top = 16
Width = 89 Width = 89
Height = 33 Height = 33
Caption = 'Rafraichissement' Caption = 'Rafraichissement'
@@ -1234,16 +1235,16 @@ object FormPrinc: TFormPrinc
end end
object ScrollBox1: TScrollBox object ScrollBox1: TScrollBox
Left = 648 Left = 648
Top = 160 Top = 136
Width = 537 Width = 537
Height = 405 Height = 437
Color = clWhite Color = clWhite
ParentColor = False ParentColor = False
TabOrder = 3 TabOrder = 3
end end
object GroupBox1: TGroupBox object GroupBox1: TGroupBox
Left = 656 Left = 656
Top = 0 Top = 8
Width = 249 Width = 249
Height = 97 Height = 97
Caption = 'Commande d'#39'accessoires' Caption = 'Commande d'#39'accessoires'
@@ -1274,6 +1275,7 @@ object FormPrinc: TFormPrinc
Top = 32 Top = 32
Width = 57 Width = 57
Height = 21 Height = 21
Hint = 'Adresse accessoire'
TabOrder = 0 TabOrder = 0
Text = '1' Text = '1'
end end
@@ -1312,7 +1314,7 @@ object FormPrinc: TFormPrinc
end end
object ButtonTest: TButton object ButtonTest: TButton
Left = 912 Left = 912
Top = 88 Top = 96
Width = 89 Width = 89
Height = 33 Height = 33
Caption = 'Demande '#233'tat r'#233'trosignalisation' Caption = 'Demande '#233'tat r'#233'trosignalisation'
@@ -1322,7 +1324,7 @@ object FormPrinc: TFormPrinc
end end
object ButtonInfo: TButton object ButtonInfo: TButton
Left = 1008 Left = 1008
Top = 48 Top = 56
Width = 81 Width = 81
Height = 33 Height = 33
Caption = 'Informations' Caption = 'Informations'
@@ -1330,8 +1332,8 @@ object FormPrinc: TFormPrinc
OnClick = ButtonInfoClick OnClick = ButtonInfoClick
end end
object GroupBox2: TGroupBox object GroupBox2: TGroupBox
Left = 654 Left = 982
Top = 103 Top = 87
Width = 211 Width = 211
Height = 46 Height = 46
Caption = 'Trains' Caption = 'Trains'
@@ -1356,25 +1358,25 @@ object FormPrinc: TFormPrinc
end end
object StatusBar1: TStatusBar object StatusBar1: TStatusBar
Left = 0 Left = 0
Top = 571 Top = 576
Width = 1196 Width = 1196
Height = 30 Height = 30
Panels = <> Panels = <>
SimplePanel = True SimplePanel = True
end end
object MSCommUSBLenz: TMSComm object MSCommUSBLenz: TMSComm
Left = 880 Left = 1024
Top = 128 Top = 136
Width = 32 Width = 32
Height = 32 Height = 32
OnComm = MSCommUSBLenzComm OnComm = MSCommUSBLenzComm
ControlData = { ControlData = {
2143341208000000ED030000ED03000001568A64000006000000010000040000 2143341208000000ED030000ED03000001568A64000006000000010000040000
00020000802500000000080000000000000000003F00000001000000} 00020000802500000000080000000000000000003F00000011000000}
end end
object loco: TButton object loco: TButton
Left = 1096 Left = 1096
Top = 8 Top = 16
Width = 75 Width = 75
Height = 33 Height = 33
Caption = 'loco' Caption = 'loco'
@@ -1383,7 +1385,7 @@ object FormPrinc: TFormPrinc
end end
object ButtonAffDebug: TButton object ButtonAffDebug: TButton
Left = 912 Left = 912
Top = 48 Top = 56
Width = 89 Width = 89
Height = 33 Height = 33
Caption = 'Affiche debug' Caption = 'Affiche debug'
@@ -1392,7 +1394,7 @@ object FormPrinc: TFormPrinc
end end
object ButtonReprise: TButton object ButtonReprise: TButton
Left = 1096 Left = 1096
Top = 48 Top = 56
Width = 75 Width = 75
Height = 33 Height = 33
Hint = Hint =
@@ -1402,6 +1404,34 @@ object FormPrinc: TFormPrinc
TabOrder = 12 TabOrder = 12
OnClick = ButtonRepriseClick OnClick = ButtonRepriseClick
end end
object EditGenli: TEdit
Left = 656
Top = 112
Width = 121
Height = 21
TabOrder = 13
Visible = False
end
object Button1: TButton
Left = 784
Top = 112
Width = 113
Height = 25
Caption = 'Envoi vers Genli'
TabOrder = 14
Visible = False
OnClick = Button1Click
end
object Button2: TButton
Left = 1040
Top = 80
Width = 97
Height = 25
Caption = 'Demande '#233'tat CTS'
TabOrder = 15
Visible = False
OnClick = Button2Click
end
object Timer1: TTimer object Timer1: TTimer
Interval = 100 Interval = 100
OnTimer = Timer1Timer OnTimer = Timer1Timer
@@ -1448,6 +1478,13 @@ object FormPrinc: TFormPrinc
Caption = 'Codification des feux' Caption = 'Codification des feux'
OnClick = Codificationdesfeux1Click OnClick = Codificationdesfeux1Click
end end
object N5: TMenuItem
Caption = '-'
end
object Quitter1: TMenuItem
Caption = 'Quitter'
OnClick = Quitter1Click
end
end end
object Interface1: TMenuItem object Interface1: TMenuItem
Caption = 'Interface' Caption = 'Interface'

View File

@@ -83,6 +83,11 @@ type
LireunfichierdeCV1: TMenuItem; LireunfichierdeCV1: TMenuItem;
LireunaccessoireversunfichierdeCV1: TMenuItem; LireunaccessoireversunfichierdeCV1: TMenuItem;
SaveDialog: TSaveDialog; SaveDialog: TSaveDialog;
N5: TMenuItem;
Quitter1: TMenuItem;
EditGenli: TEdit;
Button1: TButton;
Button2: TButton;
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure MSCommUSBLenzComm(Sender: TObject); procedure MSCommUSBLenzComm(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormClose(Sender: TObject; var Action: TCloseAction);
@@ -131,6 +136,9 @@ type
procedure ButtonRepriseClick(Sender: TObject); procedure ButtonRepriseClick(Sender: TObject);
procedure LireunfichierdeCV1Click(Sender: TObject); procedure LireunfichierdeCV1Click(Sender: TObject);
procedure LireunaccessoireversunfichierdeCV1Click(Sender: TObject); procedure LireunaccessoireversunfichierdeCV1Click(Sender: TObject);
procedure Quitter1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private private
{ Déclarations privées } { Déclarations privées }
@@ -196,7 +204,7 @@ TMA = (valide,devalide);
var ancien_tablo_signalCplx,EtatsignalCplx : array[0..MaxAcc] of word; var ancien_tablo_signalCplx,EtatsignalCplx : array[0..MaxAcc] of word;
AvecInitAiguillages,tempsCli,combine,NbreFeux,pasreponse,AdrDevie,precedent , AvecInitAiguillages,tempsCli,combine,NbreFeux,pasreponse,AdrDevie,precedent ,
NombreImages,signalCpx,branche_trouve,Indexbranche_trouve,Actuel,Signal_suivant, NombreImages,signalCpx,branche_trouve,Indexbranche_trouve,Actuel,Signal_suivant,
Nbre_recu_cdm,Tempo_chgt_feux,Adj1,Adj2,protocole : integer; Nbre_recu_cdm,Tempo_chgt_feux,Adj1,Adj2,protocole,TempoOctet,TimoutMaxInterface : integer;
Hors_tension2,traceSign,TraceZone,Ferme,parSocket,ackCdm, Hors_tension2,traceSign,TraceZone,Ferme,parSocket,ackCdm,
NackCDM,MsgSim : boolean; NackCDM,MsgSim : boolean;
TraceListe,clignotant,nack,Maj_feux_cours : boolean; TraceListe,clignotant,nack,Maj_feux_cours : boolean;
@@ -215,10 +223,10 @@ const
var var
FormPrinc: TFormPrinc; FormPrinc: TFormPrinc;
ack,portCommOuvert,trace,AffMem,AfficheDet,CDM_connecte,parSocketCDM, ack,portCommOuvert,trace,AffMem,AfficheDet,CDM_connecte,parSocketCDM,
DebugOuv,Raz_Acc_signaux,AvecInit,AvecTCO : boolean; DebugOuv,Raz_Acc_signaux,AvecInit,AvecTCO,terminal : boolean;
tablo : array of byte; tablo : array of byte;
Enregistrement,AdresseIP,chaine_Envoi,chaine_recue,AdresseIPCDM,recuCDM,Id_CDM,Af, Enregistrement,AdresseIP,chaine_Envoi,chaine_recue,AdresseIPCDM,recuCDM,Id_CDM,Af,
ConfStCom : string; ConfStCom,entete,suffixe : string;
maxaiguillage,detecteur_chgt,Temps,TpsRecuCom,NumPort,Tempo_init,Suivant,TypeGen, maxaiguillage,detecteur_chgt,Temps,TpsRecuCom,NumPort,Tempo_init,Suivant,TypeGen,
NbreImagePligne,Port,NbreBranches,Index2_det,branche_det,Index_det, NbreImagePligne,Port,NbreBranches,Index2_det,branche_det,Index_det,
portCDM,I_simule : integer; portCDM,I_simule : integer;
@@ -899,8 +907,7 @@ var i : integer;
check : byte; check : byte;
begin begin
check:=0; check:=0;
// on commence à 3 pour ne pas calculer le checksum sur FF FE for i:=1 to length(s) do
for i:=3 to length(s) do
begin begin
check:=check xor ord(s[i]); check:=check xor ord(s[i]);
end; end;
@@ -936,11 +943,56 @@ begin
end; end;
// envoi d'une chaîne à la centrale Lenz par USBLenz ou socket, n'attend pas l'ack // envoi d'une chaîne à la centrale par USBLenz ou socket, n'attend pas l'ack
// ici on envoie pas à CDM
procedure envoi_ss_ack(s : string); procedure envoi_ss_ack(s : string);
var i,timeout,valto : integer;
com : Tobject;
sa : string;
begin begin
if Trace then affiche_chaine_Hex(s,ClGreen); // com:=formprinc.MSCommUSBLenz;
if portCommOuvert then FormPrinc.MSCommUSBLenz.Output:=s; s:=entete+s+suffixe;
if Trace then Affiche('Tick='+IntToSTR(tick)+'/Env '+chaine_Hex(s),ClGreen);
// par port com-usb
if portCommOuvert then
begin
if (protocole=4) then // le protocole 4 contrôle simplement la ligne CTS avant de transmettre et temporise octet par octet
begin
i:=1;
valto:=10;
//Affiche('envoi en tenant compte cts',clyellow);
repeat
timeout:=0;
repeat
//Application.ProcessMessages;
inc(timeout);
Sleep(20);
until (Formprinc.MSCommUSBLenz.CTSHolding=true) or (timeout>valto);
if timeout<=valto then
begin
//if formprinc.MSCommUSBLenz.CTSHolding then sa:='CTS=1 ' else sa:='CTS=0 ';
FormPrinc.MSCommUSBLenz.Output:=s[i];
//if terminal then Affiche(sa+s[i],clyellow) else Affiche(sa+chaine_hex(s[i]),clyellow);
inc(i);
end;
until (i=length(s)+1) or (timeout>valto);
if timeout>valto then affiche('Erreur attente interface trop longue',clred);
end;
if (protocole=2) or (tempoOctet=0) then begin FormPrinc.MSCommUSBLenz.Output:=s;exit;end;
if (protocole=0) or (protocole=1) or (protocole=3) then
begin
for i:=1 to length(s) do
begin
FormPrinc.MSCommUSBLenz.Output:=s[i];
//if terminal then Affiche(s[i],clyellow) else Affiche(chaine_hex(s[i]),clyellow);
Application.ProcessMessages;
Sleep(TempoOctet);
end;
end;
end;
// par socket (ethernet)
if parSocket then Formprinc.ClientSocketLenz.Socket.SendText(s); if parSocket then Formprinc.ClientSocketLenz.Socket.SendText(s);
end; end;
@@ -948,7 +1000,7 @@ end;
function envoi(s : string) : boolean; function envoi(s : string) : boolean;
var temps : integer; var temps : integer;
begin begin
//if Hors_tension2=false then if Hors_tension2=false then
begin begin
envoi_ss_ack(s); envoi_ss_ack(s);
// attend l'ack // attend l'ack
@@ -957,12 +1009,13 @@ begin
begin begin
temps:=0; temps:=0;
repeat repeat
inc(temps);tempo(1); Application.processMessages;
until ferme or ack or nack or (temps>5); // l'interface répond < 5s en mode normal et 1,5 mn en mode programmation inc(temps);Sleep(100);
until ferme or ack or nack or (temps>TimoutMaxInterface); // 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);
if pasreponse>3 then hors_tension2:=true; // &&&&if pasreponse>3 then hors_tension2:=true;
end; end;
if ack then begin pasreponse:=0;hors_tension2:=false;end; if ack then begin pasreponse:=0;hors_tension2:=false;end;
end; end;
@@ -1042,9 +1095,9 @@ begin
fonction:=((adresse-1) mod 4)*2 + (octet-1); fonction:=((adresse-1) mod 4)*2 + (octet-1);
// pilotage // pilotage
if etat then if etat then
s:=#$ff+#$fe+#$52+Char(groupe)+char(fonction or $80) s:=#$52+Char(groupe)+char(fonction or $80)
else else
s:=#$ff+#$fe+#$52+Char(groupe)+char(fonction or $88); s:=#$52+Char(groupe)+char(fonction or $88);
s:=checksum(s); s:=checksum(s);
envoi(s); // envoi de la trame et attente Ack envoi(s); // envoi de la trame et attente Ack
@@ -1060,9 +1113,9 @@ begin
fonction:=((adresse-1) mod 4)*2 + (octet-1); fonction:=((adresse-1) mod 4)*2 + (octet-1);
// pilotage // pilotage
if octet=2 then if octet=2 then
s:=#$ff+#$fe+#$52+Char(groupe)+char(fonction or $80) s:=#$52+Char(groupe)+char(fonction or $80)
else else
s:=#$ff+#$fe+#$52+Char(groupe)+char(fonction or $88); s:=#$52+Char(groupe)+char(fonction or $88);
s:=checksum(s); s:=checksum(s);
if envoi(s) then exit else envoi(s); // envoi de la trame et attente Ack sinon renvoyer if envoi(s) then exit else envoi(s); // envoi de la trame et attente Ack sinon renvoyer
@@ -1104,7 +1157,7 @@ begin
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
s:=#$ff+#$fe+#$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);
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
@@ -1120,7 +1173,7 @@ begin
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:=#$ff+#$fe+#$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);
envoi(s); // envoi de la trame et attente Ack envoi(s); // envoi de la trame et attente Ack
end; end;
@@ -1142,7 +1195,7 @@ begin
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
s:=#$ff+#$fe+#$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);
envoi(s); // envoi de la trame et attente Ack 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 sleep(10); // temps minimal pour ne pas avoir le défaut station occupée qd on pilote un signal leb
@@ -1152,7 +1205,7 @@ begin
//if portCommOuvert or ParSocket then tempo(temps); //if portCommOuvert or ParSocket then tempo(temps);
// pilotage à 0 pour éteindre le pilotage de la bobine du relais // pilotage à 0 pour éteindre le pilotage de la bobine du relais
s:=#$ff+#$fe+#$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);
envoi(s); // envoi de la trame et attente Ack envoi(s); // envoi de la trame et attente Ack
end; end;
@@ -1161,7 +1214,7 @@ procedure vitesse_loco(loco : integer;vitesse : integer;sens : boolean);
var s : string; var s : string;
begin begin
if sens then vitesse:=vitesse or 128; if sens then vitesse:=vitesse or 128;
s:=#$ff+#$fe+#$e4+#$13+#$0+char(loco)+char(vitesse); s:=#$e4+#$13+#$0+char(loco)+char(vitesse);
s:=checksum(s); s:=checksum(s);
envoi(s); envoi(s);
end; end;
@@ -2995,11 +3048,31 @@ begin
delete(s,1,i); delete(s,1,i);
Val(s,protocole,erreur); Val(s,protocole,erreur);
end; end;
end;
end; end;
end; end;
end;
ConfStCom:=copy(sa,1,j-1);
i:=pos(':',ConfStCom);
val(ConfStCom[i-1],Numport,erreur);
if i<>0 then Delete(ConfStCom,1,i);
if (protocole=-1) or (protocole>4) or (i=0) then Affiche('Erreur port com mal déclaré : '+sa,clred);
// temporisation entre 2 caractères
s:=lit_ligne;
val(s,TempoOctet,erreur);
if erreur<>0 then Affiche('Erreur temporisation entre 2 octets',clred);
// temporisation attente maximale interface
s:=lit_ligne;
val(s,TimoutMaxInterface,erreur);
if erreur<>0 then Affiche('Erreur temporisation maximale interface',clred);
//entete
s:=lit_ligne;
val(s,i,erreur);
entete:='';
case i of case i of
ConfStCom:=copy(sa,1,j-1);
0 : begin entete:='';suffixe:='';end; 0 : begin entete:='';suffixe:='';end;
1 : begin entete:=#$FF+#$FE;suffixe:='';end; 1 : begin entete:=#$FF+#$FE;suffixe:='';end;
2 : begin entete:=#228;suffixe:=#13+#13+#10;end; 2 : begin entete:=#228;suffixe:=#13+#13+#10;end;
@@ -5327,13 +5400,13 @@ var s : string;
// demande l'état d'un accessoire à la centrale. Le résultat sera réceptionné sur réception des informations // demande l'état d'un accessoire à la centrale. Le résultat sera réceptionné sur réception des informations
// de rétrosignalisation. // de rétrosignalisation.
procedure demande_info_acc(adresse : integer); procedure demande_info_acc(adresse : integer);
var s : string; var s : string;
n : integer; n : integer;
begin begin
// envoyer 2 fois la commande, une fois avec N=0 pour récupérer le nibble bas, // envoyer 2 fois la commande, une fois avec N=0 pour récupérer le nibble bas,
// une autre fois avec N=1 pour récupérer le nibble haut // une autre fois avec N=1 pour récupérer le nibble haut
s:=#$FF+#$FE+#$42+char((adresse-1) div 4); s:=#$42+char((adresse-1) div 4);
n:=$80+((adresse-1) mod 4) div 2; n:=$80+((adresse-1) mod 4) div 2;
s:=s+char(n); // N=0 (bit 0) s:=s+char(n); // N=0 (bit 0)
s:=checksum(s); s:=checksum(s);
@@ -5392,11 +5465,10 @@ begin
procedure Event_Detecteur(Adresse : integer;etat : boolean); procedure Event_Detecteur(Adresse : integer;etat : boolean);
var i,trainAdj1,TrainAdj2,TrainActuel,Etat01 : integer; var i,trainAdj1,TrainAdj2,TrainActuel,Etat01 : integer;
s : string; s : string;
begin
begin begin
// vérifier si l'état du détecteur est déja stocké, car on peut reçevoir plusieurs évènements pour le même détecteur dans le même état
if Etat then Etat01:=1 else Etat01:=0; if Etat then Etat01:=1 else Etat01:=0;
// vérifier si l'état du détecteur est déja stocké, car on peut reçevoir plusieurs évènements pour le même détecteur dans le même état // vérifier si l'état du détecteur est déja stocké, car on peut reçevoir plusieurs évènements pour le même détecteur dans le même état
// on reçoit un doublon dans deux index consécutifs.
if N_Event_tick>=1 then if N_Event_tick>=1 then
begin begin
//Affiche('Event_det_tick['+intToSTR(N_event_tick)+'].detecteur['+intToSTR(Adresse)+']='+intToSTr(event_det_tick[N_event_tick].detecteur[Adresse]),clyellow); //Affiche('Event_det_tick['+intToSTR(N_event_tick)+'].detecteur['+intToSTR(Adresse)+']='+intToSTr(event_det_tick[N_event_tick].detecteur[Adresse]),clyellow);
@@ -5687,50 +5759,50 @@ begin
aiguillage[adraig].position:=1; // état aiguillage bas aiguillage[adraig].position:=1; // état aiguillage bas
Event_Aig(adraig); Event_Aig(adraig);
if trace then begin s:='accessoire '+intToSTR(adraig)+'=1';Affiche(s,clYellow);end; if trace then begin s:='accessoire '+intToSTR(adraig)+'=1';Affiche(s,clYellow);end;
end; end;
end; end;
end; end;
end; end;
function decode_chaine_retro(s : string) : string; function Xdecode_chaine_retro(s : string) : string;
var i : integer;
chaineInt : string; chaineInt : string;
chaineInt : string; begin
begin chaineInt:=s;
chaineInt:=s;
// réponse de l'information des accessoires // réponse de l'information des accessoires
if s[1]=#$42 then if s[1]=#$42 then
begin begin
delete(chaineInt,i,3); delete(chaineInt,1,1);
decode_retro(ord(chaineInt[i]),ord(chaineInt[i+1]));
//Xdecode_retro(ord(chaineInt[1]),ord(chaineInt[2])); //Xdecode_retro(ord(chaineInt[1]),ord(chaineInt[2]));
end delete(chaineInt,1,3);
end end
begin
i:=pos(#$FF+#$FD+#$81,chaineInt);
if (i<>0) and (length(chaineInt)>=5) then
begin
delete(chaineInt,i,5);
Affiche('Voie hors tension msg1',clRed);
end
else
else else
begin begin
if s[1]=#$81 then if s[1]=#$81 then
begin begin
delete(chaineInt,i,5); delete(chaineInt,1,2);
Affiche('Voie hors tension msg2',clRed);
Affiche('Voie hors tension msg1',clRed); Affiche('Voie hors tension msg1',clRed);
end Hors_tension2:=true;
end
else
begin
if s[1]=#$61 then
begin
delete(chaineInt,1,2);
Affiche('Voie hors tension msg2',clRed);
Hors_tension2:=false;
end
else else
begin begin
i:=pos(#$46+#$43+#$40,chaineInt); i:=pos(#$46+#$43+#$40,chaineInt);
if (i<>0) and (length(chaineInt)>=3) then if (i<>0) and (length(chaineInt)>=3) then
begin begin
delete(chaineInt,i,6); delete(chaineInt,1,3);
Affiche('Reprise msg 1',clOrange); Affiche('Reprise msg 1',clOrange);
Hors_tension2:=false; Hors_tension2:=false;
end end
else else
begin begin
i:=pos(#$46+#$43+#$50,chaineInt); i:=pos(#$46+#$43+#$50,chaineInt);
@@ -5744,7 +5816,141 @@ begin
begin begin
affiche('Erreur 2, chaîne rétrosig. inconnue recue:',clRed); affiche('Erreur 2, chaîne rétrosig. inconnue recue:',clRed);
affiche(chaine_HEX(chaineInt),clred); affiche(chaine_HEX(chaineInt),clred);
chaineInt:=''; chaineInt:='';
end;
end;
end;
end;
end;
Xdecode_chaine_retro:=chaineint;
end;
// décodage d'une chaine simple de la rétrosignalisation
function decode_chaine_retro(chaineINT : string) : string ;
var msg : string;
i,cv : integer;
begin
//affiche(chaine_hex(chaine),clyellow);
msg:='';
ack:=true;nack:=false;
// décodage du 3eme octet de la chaîne
if chaineINT[1]=#1 then
begin
case chaineINT[2] of // page 13 doc XpressNet
#1 : begin nack:=true;msg:='erreur timout transmission';end;
#2 : begin nack:=true;msg:='erreur timout centrale';end;
#3 : begin nack:=true;msg:='erreur communication inconnue';end;
#4 : begin msg:='succès';end;
#5 : begin nack:=true;msg:='plus de time slot';end;
#6 : begin nack:=true;msg:='débordement tampon LI100';end;
end;
if trace and (chaineINT[2]=#4) then Affiche(msg,clYellow);
if trace and (chaineINT[2]<>#4) then Affiche(msg,clRed);
delete(chaineINT,1,3);
decode_chaine_retro:=chaineINT;
exit;
end;
if chaineINT[1]=#2 then
begin
msg:='Version matérielle '+intTohex(ord(chaineINT[2]),2)+' - Version soft '+intToHex(ord(chaineINT[3]),2);
Affiche(msg,clYellow);
delete(chaineINT,1,2);
decode_chaine_retro:=chaineINT;
exit;
end;
if chaineINT[1]=#$61 then
begin
delete(chaineInt,1,1);
case chaineINT[1] of
#$00 : begin ack:=true;msg:='Voie hors tension';end;
#$01 : begin ack:=true;msg:='Reprise';end;
#$02 : begin ack:=true;msg:='Mode programmation ';end;
#$80 : begin nack:=true;msg:='erreurs de transferts- Voir doc XpressNet p29';end;
#$81 : begin nack:=true;msg:='Station occupée - Voir doc XpressNet p29';end;
#$82 : begin nack:=true;msg:='Commande non implantée';end;
else begin nack:=true;msg:='Réception inconnue';end;
end;
if nack then affiche(msg,clred) else affiche(msg,clyellow);
delete(chaineINT,1,2);
decode_chaine_retro:=chaineINT;
exit;
end;
if ((chaineINT[1]=#$63) and (chaineINT[2]=#$14)) then // V3.6 uniquement
begin
// réception d'un CV. DocXpressNet p26
delete(chaineInt,1,2);
cv:=ord(chaineINT[1]);
Affiche('Réception CV'+IntToSTR(cv)+' à '+IntToSTR(ord(chaineINT[2])),clyellow);
if cv>255 then Affiche('Erreur Recu CV>255',clRed)
else
begin
tablo_cv[cv]:=ord(chaineINT[2]);
inc(N_Cv); // nombre de CV recus
end;
decode_chaine_retro:=chaineINT;
exit;
end;
if chaineINT[1]=#$42 then
begin
delete(chaineInt,1,1);
decode_retro(ord(chaineInt[1]),ord(chaineInt[2]));
delete(chaineInt,1,3);
decode_chaine_retro:=chaineINT;
exit;
end;
if chaineINT[1]=#$81 then
begin
delete(chaineInt,1,2);
Affiche('Voie hors tension msg1',clRed);
Hors_tension2:=true;
decode_chaine_retro:=chaineINT;
exit;
end;
if chaineINT[1]=#$61 then
begin
delete(chaineInt,1,2);
Affiche('Voie hors tension msg2',clRed);
Hors_tension2:=false;
decode_chaine_retro:=chaineINT;
exit;
end;
if chaineINT[1]=#$46 then
begin
//FF FD 46 43 40 41 40 40 49 4D non documentée
//FF FD 46 43 50 41 50 40 50 54 non documentée
Affiche('Chaine non documentée recue: '+chaine_HEX(chaineINT),clred);
delete(chaineInt,1,8);
Hors_tension2:=false;
decode_chaine_retro:=chaineINT;
exit;
end;
i:=pos(#$46+#$43+#$50,chaineInt);
if (i<>0) and (length(chaineInt)>=3) then
begin
delete(chaineInt,1,3);
Affiche('Reprise msg 2',clOrange);
Hors_tension2:=false;
decode_chaine_retro:=chaineINT;
exit;
end;
if chaineInt[1]=#$81 then
begin
delete(chaineInt,1,2);
Affiche('Court circuit msg 1',clRed);
decode_chaine_retro:=chaineINT;
exit;
end; end;
ack:=false; ack:=false;
@@ -5753,102 +5959,19 @@ var chaineInt,msg : string;
decode_chaine_retro:=''; decode_chaine_retro:='';
end; end;
// procédure appellée après réception sur le port USB ou socket // procédure appellée après réception sur le port USB ou socket
procedure interprete_reponse(chaine : string); procedure interprete_reponse(chaine : string);
var chaineInt,msg : string; var chaineInt,msg : string;
i,cv : integer;
i,cv : integer; i,cv : integer;
begin
chaineInt:=chaine;
begin begin
//nack:=false; chaineINT:=chaine;
while length(chaineINT)>=5 do
begin while length(chaineINT)>=3 do
i:=pos(#$ff+#$fe,chaineINT);
if (i<>0) and (length(chaineINT)>3) then
begin
msg:='';
delete(chaineINT,i,2);
// décodage du 3eme octet de la chaîne
if chaineINT[1]=#1 then
begin
case chaineINT[i+1] of // page 13 doc XpressNet
begin begin
#2 : begin nack:=true;msg:='erreur timout centrale';end; if length(chaineINT)>4 then
#3 : begin nack:=true;msg:='erreur communication inconnue';end;
#4 : begin msg:='succès';ack:=true;end;
#5 : begin nack:=true;msg:='plus de time slot';end;
#6 : begin nack:=true;msg:='débordement tampon LI100';end;
end;
if trace and (chaineINT[i+1]=#4) then Affiche(msg,clYellow);
if trace and (chaineINT[i+1]<>#4) then Affiche(msg,clRed);
end
else
begin
if chaineINT[1]=#2 then
begin
ack:=true;
msg:='Version matérielle '+intTohex(ord(chaineINT[2]),2)+' - Version soft '+intToHex(ord(chaineINT[3]),2);
Affiche(msg,clYellow);
end
else
begin
if chaineINT[1]=#$42 then
begin
ack:=true;
delete(chaineInt,1,1);
decode_retro(ord(chaineInt[1]),ord(chaineInt[2]));
end
else
begin
if chaineINT[1]=#$61 then
begin
begin begin
case chaineINT[1] of // supprimer l'entete éventuelle
#$80 : begin nack:=true;msg:='erreurs de transferts- Voir doc XpressNet p29';end;
#$81 : begin nack:=true;msg:='Station occupée - Voir doc XpressNet p29';end;
#$82 : begin nack:=true;msg:='Commande non implantée';end;
else begin nack:=true;msg:='Réception inconnue';end;
end;
end
else
begin
if ((chaineINT[1]=#$63) and (chaineINT[2]=#$14)) then // V3.6 uniquement
begin
// réception d'un CV. DocXpressNet p26
delete(chaineInt,1,2);
cv:=ord(chaineINT[1]);
if cv>255 then Affiche('Erreur Recu CV>255',clRed)
else
begin
tablo_cv[cv]:=ord(chaineINT[2]);
inc(N_Cv); // nombre de CV recus
end;
end
else
Affiche(msg,clRed);
end;
end;
end;
end;
end;
if length(chaineINT)<=3 then delete(chaineINT,i,length(chaineINT))
else
begin
i:=pos(#$ff+#$fd,chaineINT);
if (i<>0) and (length(chaineINT)>=5) then
chaineINT:=decode_chaine_retro(chaineINT)
else
begin
i:=pos(#$FF+#$FD+#$81,chaineInt);
if (i<>0) and (length(chaineInt)>=6) then
begin
delete(chaineInt,i,6);
Affiche('Court circuit msg 1',clRed);
end
else
begin
affiche('Erreur 7, chaîne rétrosig. inconnue recue:'+chaine_HEX(chaineINT),clred);
if (chaineINT[1]=#$ff) and (chaineINT[2]=#$fe) then Delete(chaineINT,1,2); if (chaineINT[1]=#$ff) and (chaineINT[2]=#$fe) then Delete(chaineINT,1,2);
if (chaineINT[1]=#$ff) and (chaineINT[2]=#$fd) then Delete(chaineINT,1,2); if (chaineINT[1]=#$ff) and (chaineINT[2]=#$fd) then Delete(chaineINT,1,2);
end; end;
@@ -5875,13 +5998,18 @@ begin
end; end;
procedure connecte_USB; procedure connecte_USB;
begin begin
// initialisation de la comm USB // initialisation de la comm USB
if NumPort<>0 then if NumPort<>0 then
begin
With Formprinc.MSCommUSBLenz do
begin begin
Affiche('Demande ouverture com'+intToSTR(nuMPort)+':'+ConfStCom+','+IntToSTR(protocole),CLYellow); Affiche('Demande ouverture com'+intToSTR(nuMPort)+':'+ConfStCom+','+IntToSTR(protocole),CLYellow);
Settings:=ConfStCom; // COMx:vitesse,n,8,1 Settings:=ConfStCom; // COMx:vitesse,n,8,1
Affiche('demande ouverture com'+intToSTR(nuMPort)+':'+ConfStCom+','+IntToSTR(protocole),CLYellow); if protocole>=4 then Handshaking:=0 {0=aucun 1=Xon-Xoff 2=cts 3=RTS-Xon-Xoff 4=5=protocoles "maison"}
else Handshaking:=protocole;
SThreshold:=1;
RThreshold:=1; RThreshold:=1;
CommPort:=NumPort; CommPort:=NumPort;
DTREnable:=True; DTREnable:=True;
@@ -5900,11 +6028,20 @@ begin
else else
begin begin
portCommOuvert:=false; portCommOuvert:=false;
Affiche('Port Com nul dans le fichier de configuration',clyellow); Affiche('Port Com nul dans le fichier de configuration',clyellow);
end;
if portCommOuvert then
begin
affiche('port COM'+intToSTR(NumPort)+' ouvert',clGreen);
With Formprinc do
begin
LabelTitre.caption:=titre+' Interface connectée au COM'+IntToSTR(NumPort); LabelTitre.caption:=titre+' Interface connectée au COM'+IntToSTR(NumPort);
MenuConnecterUSB.enabled:=false; MenuConnecterUSB.enabled:=false;
DeConnecterUSB.enabled:=true;
ConnecterCDMRail.enabled:=false; ConnecterCDMRail.enabled:=false;
DeConnecterCDMRail.enabled:=false; DeConnecterCDMRail.enabled:=false;
end;
end end
else else
begin begin
@@ -5950,7 +6087,7 @@ begin
envoi_CDM(s); envoi_CDM(s);
if pos('_ACK',recuCDM)<>0 then Affiche('Services acceptés: aiguillages - détecteurs - actionneurs',clYellow); if pos('_ACK',recuCDM)<>0 then Affiche('Services acceptés: aiguillages - détecteurs - actionneurs',clYellow);
// demande les trains // demande les trains
////s:=place_id('C-C-01-0002-DSCTRN-DLOAD|000|'); ////s:=place_id('C-C-01-0002-DSCTRN-DLOAD|000|');
//envoi_CDM(s); //envoi_CDM(s);
end; end;
end end
@@ -5994,7 +6131,7 @@ begin
V_utile,V_publie : real; V_utile,V_publie : real;
begin begin
//AvecMaj:=false; //AvecMaj:=false;
TraceSign:=True; TraceSign:=True;
AF:='Client TCP-IP CDM Rail ou USB - système LENZ - Version '+Version; AF:='Client TCP-IP CDM Rail ou USB - système LENZ - Version '+Version;
Caption:=AF; Caption:=AF;
Application.onHint:=doHint; Application.onHint:=doHint;
@@ -6008,8 +6145,6 @@ begin
N_Trains:=0; N_Trains:=0;
NivDebug:=0; NivDebug:=0;
DebugOuv:=True; DebugOuv:=True;
//LireunaccessoireversunfichierdeCV1.Visible:=false;
//LireunaccessoireversunfichierdeCV1.Visible:=false; //LireunaccessoireversunfichierdeCV1.Visible:=false;
@@ -6041,7 +6176,7 @@ begin
//créée la fenêtre TCO //créée la fenêtre TCO
FormTCO:=TformTCO.Create(Self); FormTCO:=TformTCO.Create(Self);
FormTCO.show; FormTCO.show;
construit_TCO; construit_TCO;
affiche_TCO; affiche_TCO;
end; end;
@@ -6138,8 +6273,16 @@ begin
//i:=etat_signal_suivant(1001,1); //i:=etat_signal_suivant(1001,1);
// Affiche(IntToSTR(detecteur_suivant(25,2,529,1)),clyellow); // Affiche(IntToSTR(detecteur_suivant(25,2,529,1)),clyellow);
//i:=Aiguille_deviee(176); //i:=Aiguille_deviee(176);
//signal_direction(372);
//FormDebug.show;
//NivDebug:=3; //NivDebug:=3;
//test_memoire_zones(218);
//Det_Adj(520); //Det_Adj(520);
//Affiche(' Adj1='+intToStr(Adj1)+' Adj2='+intToStr(Adj2),clyellow);
//trace:=true;
//TraceListe:=true;
//interprete_reponse(#$FF+#$FD+#$46+#$43+#$40+#$41+#$40+#$40+#$49+#$4D);
Affiche('Fin des initialisations',clyellow); Affiche('Fin des initialisations',clyellow);
//Menu_interface(valide); //Menu_interface(valide);
@@ -6156,7 +6299,8 @@ begin
//trace:=true; //trace:=true;
if MSCommUSBLenz.commEvent=comEvReceive then if MSCommUSBLenz.commEvent=comEvReceive then
begin begin
TpsRecuCom:=0; TpsRecuCom:=0;
tablo:=MSCommUSBLenz.Input;
for i:=0 to length(tablo)-1 do for i:=0 to length(tablo)-1 do
begin begin
chaine_recue:=chaine_recue+char(tablo[i]); chaine_recue:=chaine_recue+char(tablo[i]);
@@ -6191,7 +6335,7 @@ begin
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)';
Affiche(s,cyan); Affiche(s,cyan);
pilote_acc(i,pos,aig); pilote_acc(i,pos,aig);
application.processMessages; application.processMessages;
end; end;
end; end;
@@ -6209,9 +6353,16 @@ begin
var i,a : integer; var i,a : integer;
begin begin
inc(tick); inc(tick);
if Tempo_init>0 then dec(Tempo_init); if Tempo_init>0 then dec(Tempo_init);
if (Tempo_init=1) and AvecInit then if (Tempo_init=1) and AvecInit then
begin
Affiche('Positionnement des feux',clYellow);
if not(ferme) then envoi_signauxCplx; // initialisation des feux
if not(ferme) and (AvecInitAiguillages=1) then
begin
Affiche('Positionnement des aiguillages',clYellow);
init_aiguillages; // initialisation des aiguillages
end; end;
if (AvecInitAiguillages=0) and not(ferme) and (parSocket or portCommOuvert) then if (AvecInitAiguillages=0) and not(ferme) and (parSocket or portCommOuvert) then
begin begin
@@ -6280,7 +6431,7 @@ end;
end; end;
end; end;
end; end;
// bouton version centrale Lenz // bouton version centrale Lenz
procedure TFormPrinc.BoutVersionClick(Sender: TObject); procedure TFormPrinc.BoutVersionClick(Sender: TObject);
@@ -6330,8 +6481,11 @@ 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';
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';
10065 : s:=s+': Port non connecté';
end; end;
if ErrorCode<>10060 then if ErrorCode<>10060 then
begin begin
@@ -6406,6 +6560,10 @@ begin
connecte_USB; connecte_USB;
end; end;
procedure TFormPrinc.DeconnecterUSBClick(Sender: TObject);
begin
Ferme:=true;
if portCommOuvert then begin portCommOuvert:=false;MSCommUSBLenz.Portopen:=false; end;
portCommOuvert:=false; portCommOuvert:=false;
ClientSocketLenz.close; ClientSocketLenz.close;
MenuConnecterUSB.enabled:=true; MenuConnecterUSB.enabled:=true;
@@ -6527,15 +6685,21 @@ begin
procedure TFormPrinc.ClientSocketLenzConnect(Sender: TObject;Socket: TCustomWinSocket); procedure TFormPrinc.ClientSocketLenzConnect(Sender: TObject;Socket: TCustomWinSocket);
begin begin
Affiche('Lenz connecté ',clYellow); Affiche('Lenz connecté ',clYellow);
AfficheDebug('Lenz connecté ',clYellow); AfficheDebug('Lenz connecté ',clYellow);
parSocket:=True; parSocket:=True;
ButtonEcrCV.Enabled:=true; ButtonEcrCV.Enabled:=true;
LireunfichierdeCV1.enabled:=true;
LireunaccessoireversunfichierdeCV1.Enabled:=true; LireunaccessoireversunfichierdeCV1.Enabled:=true;
LireunaccessoireversunfichierdeCV1.Enabled:=true; LabelTitre.caption:=titre+' Interface connectée par Ethernet';
LabelEtat.caption:='Interface connectée par Ethernet'; end;
end;
procedure TFormPrinc.ClientSocketCDMConnect(Sender: TObject;Socket: TCustomWinSocket);
var s : string; var s : string;
begin
s:='CDM rail connecté';
LabelTitre.caption:=titre+' '+s;
Affiche(s,clYellow);
AfficheDebug(s,clYellow); AfficheDebug(s,clYellow);
parSocketCDM:=True; parSocketCDM:=True;
MenuConnecterUSB.enabled:=false; MenuConnecterUSB.enabled:=false;
@@ -6638,6 +6802,9 @@ begin
deconnecte_CDM; deconnecte_CDM;
end; end;
procedure TFormPrinc.ClientSocketCDMDisconnect(Sender: TObject; Socket: TCustomWinSocket);
begin
LabelTitre.caption:=Titre;
Affiche('CDM rail déconnecté',Cyan); Affiche('CDM rail déconnecté',Cyan);
AfficheDebug('CDM rail déconnecté',Cyan); AfficheDebug('CDM rail déconnecté',Cyan);
CDM_connecte:=False; CDM_connecte:=False;
@@ -6748,12 +6915,12 @@ var adr,valeur,erreur : integer;
FormSimulation.showModal; FormSimulation.showModal;
//TraceListe:=true; //TraceListe:=true;
end; end;
procedure TFormPrinc.ButtonEcrCVClick(Sender: TObject); procedure TFormPrinc.ButtonEcrCVClick(Sender: TObject);
var adr,valeur,erreur : integer;
s : string; s : string;
begin begin
// doc XpressNet page 55 // doc XpressNet page 55
val(EditAdresse.text,adr,erreur); val(EditAdresse.text,adr,erreur);
val(EditVal.Text,valeur,erreur); val(EditVal.Text,valeur,erreur);
if (Adr>255) or (valeur>255) then exit; if (Adr>255) or (valeur>255) then exit;
@@ -6765,7 +6932,7 @@ end;
envoi(s); // envoi de la trame et attente Ack envoi(s); // envoi de la trame et attente Ack
// la centrale passe en mode service (p23) // la centrale passe en mode service (p23)
Affiche('CV'+intToSTR(Adr)+'='+intToSTR(valeur),clyellow); Affiche('CV'+intToSTR(Adr)+'='+intToSTR(valeur),clyellow);
end; end;
procedure TFormPrinc.ButtonRepriseClick(Sender: TObject); procedure TFormPrinc.ButtonRepriseClick(Sender: TObject);
@@ -6804,7 +6971,7 @@ begin
begin begin
delete(s,1,erreur); delete(s,1,erreur);
val(s,valeur,erreur); val(s,valeur,erreur);
Affiche('CV='+intToSTR(cv)+' Valeur='+IntToSTR(valeur),clLime); Affiche('CV='+intToSTR(cv)+' Valeur='+IntToSTR(valeur),clLime);
if cv>255 then Affiche('Erreur CV '+IntToSTR(cv)+'>255',clred); if cv>255 then Affiche('Erreur CV '+IntToSTR(cv)+'>255',clred);
if valeur>255 then Affiche('Erreur valeur '+IntToSTR(valeur)+'>255',clred); if valeur>255 then Affiche('Erreur valeur '+IntToSTR(valeur)+'>255',clred);
@@ -6837,13 +7004,13 @@ begin
s:=GetCurrentDir; s:=GetCurrentDir;
//s:='C:\Program Files (x86)\Borland\Delphi7\Projects\Signaux_complexes_GL'; //s:='C:\Program Files (x86)\Borland\Delphi7\Projects\Signaux_complexes_GL';
N_Cv:=0; // nombre de CV recus à 0 N_Cv:=0; // nombre de CV recus à 0
sa:=''; sa:='';
//for cv:=1 to 255 do //for cv:=1 to 255 do
begin begin
cv:=3; cv:=3;
trace:=true; trace:=true;
//s:=#$ff+#$fe+#$22+#$15+Char(cv); //CV de 1 à 256 (V3.0) //s:=#$ff+#$fe+#$22+#$15+Char(cv); //CV de 1 à 256 (V3.0)
s:=#$ff+#$fe+#$22+#$18+Char(cv); //CV de 1 à 255 + 1024 (V3.6) s:=#$22+#$18+Char(cv); //CV de 1 à 255 + 1024 (V3.6)
s:=checksum(s); s:=checksum(s);
// envoi(s); // envoi de la trame et attente Ack, la premiere trame fait passer la centrale en mode programmation (service) // envoi(s); // envoi de la trame et attente Ack, la premiere trame fait passer la centrale en mode programmation (service)
envoi_ss_ack(s); envoi_ss_ack(s);
@@ -6892,10 +7059,32 @@ begin
Writeln(fte,'cv valeur'); Writeln(fte,'cv valeur');
for cv:=1 to 255 do for cv:=1 to 255 do
begin begin
s:=IntToSTR(cv)+' '+intToSTR(tablo_CV[cv]);
s:=IntToSTR(cv)+' '+intToSTR(tablo_CV[cv]); s:=IntToSTR(cv)+' '+intToSTR(tablo_CV[cv]);
Writeln(fte,s); Writeln(fte,s);
end; end;
closeFile(fte);
end;
end;
end;
procedure TFormPrinc.Quitter1Click(Sender: TObject);
begin
close;
end;
procedure TFormPrinc.Button1Click(Sender: TObject);
var s : string;
begin
s:=EditGenli.text; //+#13+#10+#10;
terminal:=true;
if portCommOuvert then
begin
Affiche('Envoi a genli de '+ EditGenli.text,clorange);
envoi_ss_ack(s);
end;
end;
procedure TFormPrinc.Button2Click(Sender: TObject); procedure TFormPrinc.Button2Click(Sender: TObject);
begin begin
if MSCommUSBLenz.CTSHolding=true then Affiche('CTS=1',Clyellow) if MSCommUSBLenz.CTSHolding=true then Affiche('CTS=1',Clyellow)

Binary file not shown.

Binary file not shown.

View File

@@ -88,7 +88,19 @@ object FormTCO: TFormTCO
Top = 0 Top = 0
Width = 857 Width = 857
Height = 345 Height = 345
PopupMenu = PopupMenu1
OnClick = ImageTCOClick OnClick = ImageTCOClick
OnContextPopup = ImageTCOContextPopup
end
end
object PopupMenu1: TPopupMenu
Left = 568
Top = 296
object Position1: TMenuItem
Caption = 'Position'
end
object N1: TMenuItem
Caption = '-'
end end
end end
end end

View File

@@ -4,7 +4,7 @@ interface
uses uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids , UnitPrinc, StdCtrls, ExtCtrls; Dialogs, Grids , UnitPrinc, StdCtrls, ExtCtrls, Menus;
type type
TFormTCO = class(TForm) TFormTCO = class(TForm)
@@ -16,12 +16,17 @@ type
LabelY: TLabel; LabelY: TLabel;
ScrollBox: TScrollBox; ScrollBox: TScrollBox;
ImageTCO: TImage; ImageTCO: TImage;
PopupMenu1: TPopupMenu;
Position1: TMenuItem;
N1: TMenuItem;
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure DrawGridDrawCell(Sender: TObject; ACol, ARow: Integer; procedure DrawGridDrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState); Rect: TRect; State: TGridDrawState);
procedure Button1Click(Sender: TObject); procedure Button1Click(Sender: TObject);
procedure ImageTCOClick(Sender: TObject); procedure ImageTCOClick(Sender: TObject);
procedure FormActivate(Sender: TObject); procedure FormActivate(Sender: TObject);
procedure ImageTCOContextPopup(Sender: TObject; MousePos: TPoint;
var Handled: Boolean);
private private
{ Déclarations privées } { Déclarations privées }
public public
@@ -320,4 +325,17 @@ begin
formprinc.Hide; formprinc.Hide;
end; end;
procedure TFormTCO.ImageTCOContextPopup(Sender: TObject; MousePos: TPoint; var Handled: Boolean);
var Position: TPoint;
begin
GetCursorPos(Position);
Position:=ImageTCO.screenToCLient(Position);
Xclic:=position.X;YClic:=position.Y;
XclicCell:=Xclic div largeurCell +1;
YclicCell:=Yclic div hauteurCell +1;
LabelX.caption:=IntToSTR(XclicCell);
LabelY.caption:=IntToSTR(YclicCell);
end;
end. end.

View File

@@ -22,21 +22,36 @@
/ /
/ Adresse IP V4 du PC sur lequel s'execute CDM : port / Adresse IP V4 du PC sur lequel s'execute CDM : port
127.0.0.1:9999 127.0.0.1:9999
/ / ==========================================================================
/ D é f i n i t i o n de l'interface XpressNet pour utilisation en mode autonome
/ 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
192.168.1.23:5550 192.168.1.23:5550
/ /
/ port COM de l'adresse USB de l'interface LI100 / 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 LI100 >9, il faut le changer / attention de COM1 à 9 - Si le port de l'interface USB >9, il faut le changer
/ manuellement dans le gestionnaire des périphériques / manuellement dans le gestionnaire des périphériques
/ mettre 0 si inutilisée ou si CDM est utilisé en parallèle de ce programme (car CDM utilise la liaison USB) / mettre 0 si inutilisée
/ Le programme ne tentera pas de se connecter à la centrale si CDM rail est détécté / Le programme ne tentera pas de se connecter à la centrale si CDM rail est détecté
/ COMx:57600,N,8,1,2 = interfaces LENZ LI-USB et compatibles (le dernier paramètre est le protocole matériel: 0=aucun 1=Xon-Xoff 2=cts 3=RTS-Xon-Xoff) / Com:vitesse,parité,nombre de bits,bits de stop,protocole: 0=aucun 1=Xon-Xoff 2=RTS-CTS 3=RTS-Xon-Xoff 4=CTS
/ COMx:9600,N,8,1,0 = interfaces GENLI USB-RS232 et compatibles (0=pas de protocole) / voir notice page 29
/ /
COM3:57600,N,8,1,2 COM3:57600,N,8,1,2
/COM8:9600,N,8,1,0
/
/ Temporisation en ms d'envoi entre deux octets de la trame
50
/ 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
7
/
/ Entete: préfixe ajouté aux trames :
/ Entete=0 - n'ajoute rien aux trames - pour une interface RS232 ou GENLI
/ Entete=1 - Ajoute FF FE au début de chaque trame envoyée à l'interface : pour une interface USB, entete=1
/ Entete=2 - Ajoute E4 au début de chaque trame et 0D 0D 0A en fin de chaque trame : pour compatibilité arduino
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
0 0

Binary file not shown.

Binary file not shown.