1 <?xml version='1.0' encoding='utf-8'?> |
1 <?xml version='1.0' encoding='utf-8'?> |
2 <project xmlns="http://www.plcopen.org/xml/tc6_0201" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xsi:schemaLocation="http://www.plcopen.org/xml/tc6_0201"> |
2 <project xmlns="http://www.plcopen.org/xml/tc6_0201" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xsi:schemaLocation="http://www.plcopen.org/xml/tc6_0201"> |
3 <fileHeader companyName="" productName="Beremiz" productVersion="0.0" creationDateTime="2008-12-14T16:21:19" contentDescription="This example shows many features in Beremiz: 1. How to implement python extensions. 2. How to implement basic C extension. 3. How to use C code in IEC POUs. 4. How to call C functions from python code. 5. How to avoid race conditions between IEC, C and python code. 6. How to convert betweet different IEC types. "/> |
3 <fileHeader companyName="" productName="Beremiz" productVersion="0.0" creationDateTime="2008-12-14T16:21:19" contentDescription="This example shows many features in Beremiz: 1. How to implement python extensions. 2. How to implement basic C extension. 3. How to use C code in IEC POUs. 4. How to call C functions from python code. 5. How to avoid race conditions between IEC, C and python code. 6. How to convert betweet different IEC types. "/> |
4 <contentHeader name="Beremiz Python Support Tests" modificationDateTime="2020-10-19T23:53:08"> |
4 <contentHeader name="Beremiz Python Support Tests" modificationDateTime="2022-07-03T16:04:31"> |
5 <coordinateInfo> |
5 <coordinateInfo> |
6 <pageSize x="1024" y="1024"/> |
6 <pageSize x="1024" y="1024"/> |
7 <fbd> |
7 <fbd> |
8 <scaling x="5" y="5"/> |
8 <scaling x="5" y="5"/> |
9 </fbd> |
9 </fbd> |
267 </variable> |
267 </variable> |
268 </externalVars> |
268 </externalVars> |
269 </interface> |
269 </interface> |
270 <body> |
270 <body> |
271 <FBD> |
271 <FBD> |
272 <inVariable localId="4" height="30" width="160" executionOrderId="0" negated="false"> |
272 <inVariable localId="4" height="30" width="315" executionOrderId="0" negated="false"> |
273 <position x="295" y="450"/> |
273 <position x="200" y="390"/> |
274 <connectionPointOut> |
274 <connectionPointOut> |
275 <relPosition x="160" y="15"/> |
275 <relPosition x="315" y="15"/> |
276 </connectionPointOut> |
276 </connectionPointOut> |
277 <expression>'666'</expression> |
277 <expression>'sys.stdout.write("Hello world\n")'</expression> |
278 </inVariable> |
278 </inVariable> |
279 <block localId="5" width="125" height="80" typeName="python_eval" instanceName="py1" executionOrderId="0"> |
279 <block localId="5" width="125" height="80" typeName="python_eval" instanceName="py1" executionOrderId="0"> |
280 <position x="686" y="400"/> |
280 <position x="686" y="400"/> |
281 <inputVariables> |
281 <inputVariables> |
282 <variable formalParameter="TRIG"> |
282 <variable formalParameter="TRIG"> |
291 </connectionPointIn> |
291 </connectionPointIn> |
292 </variable> |
292 </variable> |
293 <variable formalParameter="CODE"> |
293 <variable formalParameter="CODE"> |
294 <connectionPointIn> |
294 <connectionPointIn> |
295 <relPosition x="0" y="65"/> |
295 <relPosition x="0" y="65"/> |
296 <connection refLocalId="4"> |
296 <connection refLocalId="80" formalParameter="OUT"> |
297 <position x="686" y="465"/> |
297 <position x="686" y="465"/> |
298 <position x="455" y="465"/> |
298 <position x="653" y="465"/> |
|
299 <position x="653" y="485"/> |
|
300 <position x="630" y="485"/> |
299 </connection> |
301 </connection> |
300 </connectionPointIn> |
302 </connectionPointIn> |
301 </variable> |
303 </variable> |
302 </inputVariables> |
304 </inputVariables> |
303 <inOutVariables/> |
305 <inOutVariables/> |
735 <comment localId="30" height="105" width="465"> |
737 <comment localId="30" height="105" width="465"> |
736 <position x="50" y="925"/> |
738 <position x="50" y="925"/> |
737 <content> |
739 <content> |
738 <xhtml:p><![CDATA[You will be ready to use beremiz with C and Python when you will understand why "FromInput" is equal to 75. |
740 <xhtml:p><![CDATA[You will be ready to use beremiz with C and Python when you will understand why "FromInput" is equal to 75. |
739 Happy hacking! ]]></xhtml:p> |
741 Happy hacking! ]]></xhtml:p> |
740 </content> |
|
741 </comment> |
|
742 <comment localId="31" height="90" width="345"> |
|
743 <position x="295" y="485"/> |
|
744 <content> |
|
745 <xhtml:p><![CDATA[Sleep here is bad. It blocks other py_eval instances. Whith a wxGlade GUI, GUI freeze for a second.]]></xhtml:p> |
|
746 </content> |
742 </content> |
747 </comment> |
743 </comment> |
748 <comment localId="6" height="80" width="345"> |
744 <comment localId="6" height="80" width="345"> |
749 <position x="295" y="630"/> |
745 <position x="295" y="630"/> |
750 <content> |
746 <content> |
1441 <position x="590" y="1350"/> |
1437 <position x="590" y="1350"/> |
1442 </connection> |
1438 </connection> |
1443 </connectionPointIn> |
1439 </connectionPointIn> |
1444 <expression>Test_Python_Var</expression> |
1440 <expression>Test_Python_Var</expression> |
1445 </outVariable> |
1441 </outVariable> |
1446 <inVariable localId="79" executionOrderId="0" height="25" width="30" negated="false"> |
1442 <inVariable localId="79" executionOrderId="0" height="27" width="30" negated="false"> |
1447 <position x="560" y="1340"/> |
1443 <position x="560" y="1340"/> |
1448 <connectionPointOut> |
1444 <connectionPointOut> |
1449 <relPosition x="30" y="10"/> |
1445 <relPosition x="30" y="15"/> |
1450 </connectionPointOut> |
1446 </connectionPointOut> |
1451 <expression>23</expression> |
1447 <expression>23</expression> |
1452 </inVariable> |
1448 </inVariable> |
1453 <inOutVariable localId="78" executionOrderId="0" height="30" width="100" negatedOut="false" negatedIn="false"> |
1449 <inOutVariable localId="78" executionOrderId="0" height="30" width="100" negatedOut="false" negatedIn="false"> |
1454 <position x="280" y="1385"/> |
1450 <position x="280" y="1385"/> |
1462 <connectionPointOut> |
1458 <connectionPointOut> |
1463 <relPosition x="100" y="15"/> |
1459 <relPosition x="100" y="15"/> |
1464 </connectionPointOut> |
1460 </connectionPointOut> |
1465 <expression>SomeVarName</expression> |
1461 <expression>SomeVarName</expression> |
1466 </inOutVariable> |
1462 </inOutVariable> |
|
1463 <block localId="80" typeName="MOVE" executionOrderId="0" height="40" width="60"> |
|
1464 <position x="570" y="455"/> |
|
1465 <inputVariables> |
|
1466 <variable formalParameter="IN"> |
|
1467 <connectionPointIn> |
|
1468 <relPosition x="0" y="30"/> |
|
1469 <connection refLocalId="82"> |
|
1470 <position x="578" y="485"/> |
|
1471 <position x="532" y="485"/> |
|
1472 </connection> |
|
1473 </connectionPointIn> |
|
1474 </variable> |
|
1475 </inputVariables> |
|
1476 <inOutVariables/> |
|
1477 <outputVariables> |
|
1478 <variable formalParameter="OUT"> |
|
1479 <connectionPointOut> |
|
1480 <relPosition x="60" y="30"/> |
|
1481 </connectionPointOut> |
|
1482 </variable> |
|
1483 </outputVariables> |
|
1484 </block> |
|
1485 <connector name="Connection0" localId="81" height="30" width="130"> |
|
1486 <position x="545" y="390"/> |
|
1487 <connectionPointIn> |
|
1488 <relPosition x="0" y="15"/> |
|
1489 <connection refLocalId="4"> |
|
1490 <position x="545" y="405"/> |
|
1491 <position x="515" y="405"/> |
|
1492 </connection> |
|
1493 </connectionPointIn> |
|
1494 </connector> |
|
1495 <continuation name="Connection0" localId="82" height="30" width="130"> |
|
1496 <position x="410" y="470"/> |
|
1497 <connectionPointOut> |
|
1498 <relPosition x="130" y="15"/> |
|
1499 </connectionPointOut> |
|
1500 </continuation> |
1467 </FBD> |
1501 </FBD> |
1468 </body> |
1502 </body> |
1469 </pou> |
1503 </pou> |
1470 <pou name="C_Pragma" pouType="functionBlock"> |
1504 <pou name="C_Pragma" pouType="functionBlock"> |
1471 <interface> |
1505 <interface> |