|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <project xmlns="http://www.plcopen.org/xml/tc6.xsd" |
|
3 xsi:schemaLocation="http://www.plcopen.org/xml/tc6.xsd" |
|
4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
5 xmlns:xhtml="http://www.w3.org/1999/xhtml"> |
|
6 <fileHeader companyName="Laurent BESSARD" |
|
7 productName="test_ethercat" |
|
8 productVersion="1.0" |
|
9 creationDateTime="2011-10-20T19:01:52"/> |
|
10 <contentHeader name="test_ethercat" |
|
11 modificationDateTime="2012-05-20T19:26:53"> |
|
12 <coordinateInfo> |
|
13 <fbd> |
|
14 <scaling x="0" y="0"/> |
|
15 </fbd> |
|
16 <ld> |
|
17 <scaling x="0" y="0"/> |
|
18 </ld> |
|
19 <sfc> |
|
20 <scaling x="0" y="0"/> |
|
21 </sfc> |
|
22 </coordinateInfo> |
|
23 </contentHeader> |
|
24 <types> |
|
25 <dataTypes/> |
|
26 <pous> |
|
27 <pou name="Prog" pouType="program"> |
|
28 <interface> |
|
29 <localVars> |
|
30 <variable name="CLOCK" address="%QX0.0.2.28672.1"> |
|
31 <type> |
|
32 <BOOL/> |
|
33 </type> |
|
34 </variable> |
|
35 <variable name="GREENLED" address="%QX0.0.2.28688.1"> |
|
36 <type> |
|
37 <BOOL/> |
|
38 </type> |
|
39 <initialValue> |
|
40 <simpleValue value="TRUE"/> |
|
41 </initialValue> |
|
42 </variable> |
|
43 <variable name="ControlWord" address="%QW0.0.3.24640.0"> |
|
44 <type> |
|
45 <UINT/> |
|
46 </type> |
|
47 </variable> |
|
48 <variable name="StatusWord" address="%IW0.0.3.24641.0"> |
|
49 <type> |
|
50 <UINT/> |
|
51 </type> |
|
52 </variable> |
|
53 <variable name="ErrorCode" address="%IW0.0.3.24639.0"> |
|
54 <type> |
|
55 <UINT/> |
|
56 </type> |
|
57 </variable> |
|
58 <variable name="ModeDisplay" address="%IB0.0.3.24673.0"> |
|
59 <type> |
|
60 <SINT/> |
|
61 </type> |
|
62 </variable> |
|
63 <variable name="ActualPosition" address="%ID0.0.3.24676.0"> |
|
64 <type> |
|
65 <DINT/> |
|
66 </type> |
|
67 </variable> |
|
68 <variable name="TargetPosition" address="%QD0.0.3.24698.0"> |
|
69 <type> |
|
70 <DINT/> |
|
71 </type> |
|
72 </variable> |
|
73 </localVars> |
|
74 </interface> |
|
75 <body> |
|
76 <ST> |
|
77 <![CDATA[CLOCK := NOT CLOCK;]]> |
|
78 </ST> |
|
79 </body> |
|
80 </pou> |
|
81 <pou name="test_MCL" pouType="program"> |
|
82 <interface> |
|
83 <localVars> |
|
84 <variable name="CLOCK"> |
|
85 <type> |
|
86 <UDINT/> |
|
87 </type> |
|
88 </variable> |
|
89 </localVars> |
|
90 <localVars> |
|
91 <variable name="Axis" address="%IW0.0.3.0"> |
|
92 <type> |
|
93 <INT/> |
|
94 </type> |
|
95 </variable> |
|
96 </localVars> |
|
97 <localVars> |
|
98 <variable name="switch"> |
|
99 <type> |
|
100 <derived name="MC_Power"/> |
|
101 </type> |
|
102 </variable> |
|
103 <variable name="move1"> |
|
104 <type> |
|
105 <derived name="MC_MoveAbsolute"/> |
|
106 </type> |
|
107 </variable> |
|
108 </localVars> |
|
109 </interface> |
|
110 <body> |
|
111 <FBD> |
|
112 <inVariable localId="1" height="27" width="53"> |
|
113 <position x="45" y="36"/> |
|
114 <connectionPointOut> |
|
115 <relPosition x="53" y="13"/> |
|
116 </connectionPointOut> |
|
117 <expression>CLOCK</expression> |
|
118 </inVariable> |
|
119 <block localId="2" width="111" height="116" typeName="ADD"> |
|
120 <position x="149" y="5"/> |
|
121 <inputVariables> |
|
122 <variable formalParameter="IN1"> |
|
123 <connectionPointIn> |
|
124 <relPosition x="0" y="44"/> |
|
125 <connection refLocalId="1"> |
|
126 <position x="149" y="49"/> |
|
127 <position x="98" y="49"/> |
|
128 </connection> |
|
129 </connectionPointIn> |
|
130 </variable> |
|
131 <variable formalParameter="IN2"> |
|
132 <connectionPointIn> |
|
133 <relPosition x="0" y="92"/> |
|
134 <connection refLocalId="3"> |
|
135 <position x="149" y="97"/> |
|
136 <position x="98" y="97"/> |
|
137 </connection> |
|
138 </connectionPointIn> |
|
139 </variable> |
|
140 </inputVariables> |
|
141 <inOutVariables/> |
|
142 <outputVariables> |
|
143 <variable formalParameter="OUT"> |
|
144 <connectionPointOut> |
|
145 <relPosition x="111" y="44"/> |
|
146 </connectionPointOut> |
|
147 </variable> |
|
148 </outputVariables> |
|
149 </block> |
|
150 <inVariable localId="3" height="27" width="18"> |
|
151 <position x="80" y="84"/> |
|
152 <connectionPointOut> |
|
153 <relPosition x="18" y="13"/> |
|
154 </connectionPointOut> |
|
155 <expression>1</expression> |
|
156 </inVariable> |
|
157 <outVariable localId="4" height="27" width="53"> |
|
158 <position x="302" y="36"/> |
|
159 <connectionPointIn> |
|
160 <relPosition x="0" y="13"/> |
|
161 <connection refLocalId="2" formalParameter="OUT"> |
|
162 <position x="302" y="49"/> |
|
163 <position x="260" y="49"/> |
|
164 </connection> |
|
165 </connectionPointIn> |
|
166 <expression>CLOCK</expression> |
|
167 </outVariable> |
|
168 <inVariable localId="5" height="27" width="53"> |
|
169 <position x="46" y="234"/> |
|
170 <connectionPointOut> |
|
171 <relPosition x="53" y="13"/> |
|
172 </connectionPointOut> |
|
173 <expression>CLOCK</expression> |
|
174 </inVariable> |
|
175 <inVariable localId="6" height="27" width="50"> |
|
176 <position x="49" y="268"/> |
|
177 <connectionPointOut> |
|
178 <relPosition x="50" y="13"/> |
|
179 </connectionPointOut> |
|
180 <expression>4000</expression> |
|
181 </inVariable> |
|
182 <block localId="7" width="99" height="89" typeName="GT"> |
|
183 <position x="155" y="210"/> |
|
184 <inputVariables> |
|
185 <variable formalParameter="IN1"> |
|
186 <connectionPointIn> |
|
187 <relPosition x="0" y="37"/> |
|
188 <connection refLocalId="5"> |
|
189 <position x="155" y="247"/> |
|
190 <position x="99" y="247"/> |
|
191 </connection> |
|
192 </connectionPointIn> |
|
193 </variable> |
|
194 <variable formalParameter="IN2"> |
|
195 <connectionPointIn> |
|
196 <relPosition x="0" y="71"/> |
|
197 <connection refLocalId="6"> |
|
198 <position x="155" y="281"/> |
|
199 <position x="99" y="281"/> |
|
200 </connection> |
|
201 </connectionPointIn> |
|
202 </variable> |
|
203 </inputVariables> |
|
204 <inOutVariables/> |
|
205 <outputVariables> |
|
206 <variable formalParameter="OUT"> |
|
207 <connectionPointOut> |
|
208 <relPosition x="99" y="37"/> |
|
209 </connectionPointOut> |
|
210 </variable> |
|
211 </outputVariables> |
|
212 </block> |
|
213 <block localId="8" width="159" height="204" typeName="MC_Power" instanceName="switch"> |
|
214 <position x="398" y="173"/> |
|
215 <inputVariables> |
|
216 <variable formalParameter="Axis"> |
|
217 <connectionPointIn> |
|
218 <relPosition x="0" y="38"/> |
|
219 <connection refLocalId="9"> |
|
220 <position x="398" y="211"/> |
|
221 <position x="344" y="211"/> |
|
222 </connection> |
|
223 </connectionPointIn> |
|
224 </variable> |
|
225 <variable formalParameter="Enable"> |
|
226 <connectionPointIn> |
|
227 <relPosition x="0" y="74"/> |
|
228 <connection refLocalId="7" formalParameter="OUT"> |
|
229 <position x="398" y="247"/> |
|
230 <position x="254" y="247"/> |
|
231 </connection> |
|
232 </connectionPointIn> |
|
233 </variable> |
|
234 <variable formalParameter="EnablePositive"> |
|
235 <connectionPointIn> |
|
236 <relPosition x="0" y="110"/> |
|
237 </connectionPointIn> |
|
238 </variable> |
|
239 <variable formalParameter="EnableNegative"> |
|
240 <connectionPointIn> |
|
241 <relPosition x="0" y="146"/> |
|
242 </connectionPointIn> |
|
243 </variable> |
|
244 </inputVariables> |
|
245 <inOutVariables/> |
|
246 <outputVariables> |
|
247 <variable formalParameter="Axis"> |
|
248 <connectionPointOut> |
|
249 <relPosition x="159" y="38"/> |
|
250 </connectionPointOut> |
|
251 </variable> |
|
252 <variable formalParameter="Status"> |
|
253 <connectionPointOut> |
|
254 <relPosition x="159" y="74"/> |
|
255 </connectionPointOut> |
|
256 </variable> |
|
257 <variable formalParameter="Valid"> |
|
258 <connectionPointOut> |
|
259 <relPosition x="159" y="110"/> |
|
260 </connectionPointOut> |
|
261 </variable> |
|
262 <variable formalParameter="Error"> |
|
263 <connectionPointOut> |
|
264 <relPosition x="159" y="146"/> |
|
265 </connectionPointOut> |
|
266 </variable> |
|
267 <variable formalParameter="ErrorID"> |
|
268 <connectionPointOut> |
|
269 <relPosition x="159" y="182"/> |
|
270 </connectionPointOut> |
|
271 </variable> |
|
272 </outputVariables> |
|
273 </block> |
|
274 <inVariable localId="9" height="27" width="36"> |
|
275 <position x="308" y="198"/> |
|
276 <connectionPointOut> |
|
277 <relPosition x="36" y="13"/> |
|
278 </connectionPointOut> |
|
279 <expression>Axis</expression> |
|
280 </inVariable> |
|
281 <block localId="10" width="252" height="389" typeName="MC_MoveAbsolute" instanceName="move1"> |
|
282 <position x="744" y="173"/> |
|
283 <inputVariables> |
|
284 <variable formalParameter="Axis"> |
|
285 <connectionPointIn> |
|
286 <relPosition x="0" y="38"/> |
|
287 <connection refLocalId="8" formalParameter="Axis"> |
|
288 <position x="744" y="211"/> |
|
289 <position x="557" y="211"/> |
|
290 </connection> |
|
291 </connectionPointIn> |
|
292 </variable> |
|
293 <variable formalParameter="Execute"> |
|
294 <connectionPointIn> |
|
295 <relPosition x="0" y="74"/> |
|
296 <connection refLocalId="8" formalParameter="Status"> |
|
297 <position x="744" y="247"/> |
|
298 <position x="557" y="247"/> |
|
299 </connection> |
|
300 </connectionPointIn> |
|
301 </variable> |
|
302 <variable formalParameter="ContinuousUpdate"> |
|
303 <connectionPointIn> |
|
304 <relPosition x="0" y="110"/> |
|
305 </connectionPointIn> |
|
306 </variable> |
|
307 <variable formalParameter="Position"> |
|
308 <connectionPointIn> |
|
309 <relPosition x="0" y="146"/> |
|
310 <connection refLocalId="11"> |
|
311 <position x="744" y="319"/> |
|
312 <position x="672" y="319"/> |
|
313 </connection> |
|
314 </connectionPointIn> |
|
315 </variable> |
|
316 <variable formalParameter="Velocity"> |
|
317 <connectionPointIn> |
|
318 <relPosition x="0" y="182"/> |
|
319 <connection refLocalId="12"> |
|
320 <position x="744" y="355"/> |
|
321 <position x="671" y="355"/> |
|
322 </connection> |
|
323 </connectionPointIn> |
|
324 </variable> |
|
325 <variable formalParameter="Acceleration"> |
|
326 <connectionPointIn> |
|
327 <relPosition x="0" y="218"/> |
|
328 <connection refLocalId="12"> |
|
329 <position x="744" y="391"/> |
|
330 <position x="707" y="391"/> |
|
331 <position x="707" y="355"/> |
|
332 <position x="671" y="355"/> |
|
333 </connection> |
|
334 </connectionPointIn> |
|
335 </variable> |
|
336 <variable formalParameter="Deceleration"> |
|
337 <connectionPointIn> |
|
338 <relPosition x="0" y="254"/> |
|
339 <connection refLocalId="12"> |
|
340 <position x="744" y="427"/> |
|
341 <position x="707" y="427"/> |
|
342 <position x="707" y="355"/> |
|
343 <position x="671" y="355"/> |
|
344 </connection> |
|
345 </connectionPointIn> |
|
346 </variable> |
|
347 <variable formalParameter="Jerk"> |
|
348 <connectionPointIn> |
|
349 <relPosition x="0" y="290"/> |
|
350 </connectionPointIn> |
|
351 </variable> |
|
352 <variable formalParameter="Direction"> |
|
353 <connectionPointIn> |
|
354 <relPosition x="0" y="326"/> |
|
355 </connectionPointIn> |
|
356 </variable> |
|
357 <variable formalParameter="BufferMode"> |
|
358 <connectionPointIn> |
|
359 <relPosition x="0" y="362"/> |
|
360 </connectionPointIn> |
|
361 </variable> |
|
362 </inputVariables> |
|
363 <inOutVariables/> |
|
364 <outputVariables> |
|
365 <variable formalParameter="Axis"> |
|
366 <connectionPointOut> |
|
367 <relPosition x="252" y="38"/> |
|
368 </connectionPointOut> |
|
369 </variable> |
|
370 <variable formalParameter="Done"> |
|
371 <connectionPointOut> |
|
372 <relPosition x="252" y="74"/> |
|
373 </connectionPointOut> |
|
374 </variable> |
|
375 <variable formalParameter="Busy"> |
|
376 <connectionPointOut> |
|
377 <relPosition x="252" y="110"/> |
|
378 </connectionPointOut> |
|
379 </variable> |
|
380 <variable formalParameter="Active"> |
|
381 <connectionPointOut> |
|
382 <relPosition x="252" y="146"/> |
|
383 </connectionPointOut> |
|
384 </variable> |
|
385 <variable formalParameter="CommandAborted"> |
|
386 <connectionPointOut> |
|
387 <relPosition x="252" y="182"/> |
|
388 </connectionPointOut> |
|
389 </variable> |
|
390 <variable formalParameter="Error"> |
|
391 <connectionPointOut> |
|
392 <relPosition x="252" y="218"/> |
|
393 </connectionPointOut> |
|
394 </variable> |
|
395 <variable formalParameter="ErrorID"> |
|
396 <connectionPointOut> |
|
397 <relPosition x="252" y="254"/> |
|
398 </connectionPointOut> |
|
399 </variable> |
|
400 </outputVariables> |
|
401 </block> |
|
402 <inVariable localId="11" height="27" width="54"> |
|
403 <position x="630" y="306"/> |
|
404 <connectionPointOut> |
|
405 <relPosition x="54" y="13"/> |
|
406 </connectionPointOut> |
|
407 <expression>1800.0</expression> |
|
408 </inVariable> |
|
409 <inVariable localId="12" height="27" width="46"> |
|
410 <position x="637" y="342"/> |
|
411 <connectionPointOut> |
|
412 <relPosition x="46" y="13"/> |
|
413 </connectionPointOut> |
|
414 <expression>360.0</expression> |
|
415 </inVariable> |
|
416 </FBD> |
|
417 </body> |
|
418 </pou> |
|
419 </pous> |
|
420 </types> |
|
421 <instances> |
|
422 <configurations> |
|
423 <configuration name="conf"> |
|
424 <resource name="res"> |
|
425 <task name="main_task" interval="T#0.5ms" priority="0"> |
|
426 <pouInstance name="main_instance" typeName="Prog"/> |
|
427 <pouInstance name="test_MCL_instance" typeName="test_MCL"/> |
|
428 </task> |
|
429 </resource> |
|
430 </configuration> |
|
431 </configurations> |
|
432 </instances> |
|
433 </project> |