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.xsd" |
2 <project xmlns="http://www.plcopen.org/xml/tc6.xsd" |
3 xsi:schemaLocation="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" |
4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
5 xmlns:xhtml="http://www.w3.org/1999/xhtml"> |
5 xmlns:xhtml="http://www.w3.org/1999/xhtml"> |
6 <fileHeader companyName="beremiz" |
6 <fileHeader companyName="" |
7 productName="Beremiz" |
7 productName="Beremiz" |
8 productVersion="0.0" |
8 productVersion="0.0" |
9 creationDateTime="2008-12-14T16:21:19"/> |
9 creationDateTime="2008-12-14T16:21:19"/> |
10 <contentHeader name="Beremiz Python Support Tests" |
10 <contentHeader name="Beremiz Python Support Tests" |
11 modificationDateTime="2013-02-23T23:37:47"> |
11 modificationDateTime="2013-05-15T18:19:52"> |
12 <coordinateInfo> |
12 <coordinateInfo> |
13 <pageSize x="1024" y="1024"/> |
13 <pageSize x="1024" y="1024"/> |
14 <fbd> |
14 <fbd> |
15 <scaling x="5" y="5"/> |
15 <scaling x="5" y="5"/> |
16 </fbd> |
16 </fbd> |
613 <relPosition x="80" y="30"/> |
633 <relPosition x="80" y="30"/> |
614 </connectionPointOut> |
634 </connectionPointOut> |
615 </variable> |
635 </variable> |
616 </outputVariables> |
636 </outputVariables> |
617 </block> |
637 </block> |
618 <inVariable localId="27" height="30" width="75"> |
638 <inVariable localId="27" height="30" width="90"> |
619 <position x="305" y="770"/> |
639 <position x="300" y="770"/> |
620 <connectionPointOut> |
640 <connectionPointOut> |
621 <relPosition x="75" y="15"/> |
641 <relPosition x="90" y="15"/> |
622 </connectionPointOut> |
642 </connectionPointOut> |
623 <expression>TestInput</expression> |
643 <expression>TestInput</expression> |
624 </inVariable> |
644 </inVariable> |
625 <outVariable localId="28" height="30" width="90"> |
645 <outVariable localId="28" height="30" width="105"> |
626 <position x="395" y="705"/> |
646 <position x="395" y="705"/> |
627 <connectionPointIn> |
647 <connectionPointIn> |
628 <relPosition x="0" y="15"/> |
648 <relPosition x="0" y="15"/> |
629 <connection refLocalId="2"> |
649 <connection refLocalId="2"> |
630 <position x="395" y="720"/> |
650 <position x="395" y="720"/> |
637 <position x="415" y="770"/> |
657 <position x="415" y="770"/> |
638 <connectionPointIn> |
658 <connectionPointIn> |
639 <relPosition x="0" y="15"/> |
659 <relPosition x="0" y="15"/> |
640 <connection refLocalId="27"> |
660 <connection refLocalId="27"> |
641 <position x="415" y="785"/> |
661 <position x="415" y="785"/> |
642 <position x="380" y="785"/> |
662 <position x="390" y="785"/> |
643 </connection> |
663 </connection> |
644 </connectionPointIn> |
664 </connectionPointIn> |
645 <expression>FromInput</expression> |
665 <expression>FromInput</expression> |
646 </outVariable> |
666 </outVariable> |
647 <inVariable localId="2" height="30" width="30"> |
667 <inVariable localId="2" height="30" width="30"> |
845 <connectionPointOut> |
865 <connectionPointOut> |
846 <relPosition x="55" y="15"/> |
866 <relPosition x="55" y="15"/> |
847 </connectionPointOut> |
867 </connectionPointOut> |
848 <expression>'True'</expression> |
868 <expression>'True'</expression> |
849 </inVariable> |
869 </inVariable> |
850 <block localId="46" width="130" height="45" typeName="BYTE_TO_STRING"> |
870 <block localId="46" width="130" height="45" typeName="INT_TO_STRING"> |
851 <position x="900" y="970"/> |
871 <position x="900" y="970"/> |
852 <inputVariables> |
872 <inputVariables> |
853 <variable formalParameter="IN"> |
873 <variable formalParameter="IN"> |
854 <connectionPointIn> |
874 <connectionPointIn> |
855 <relPosition x="0" y="30"/> |
875 <relPosition x="0" y="30"/> |
856 <connection refLocalId="47"> |
876 <connection refLocalId="58"> |
857 <position x="900" y="1000"/> |
877 <position x="900" y="1000"/> |
858 <position x="850" y="1000"/> |
878 <position x="840" y="1000"/> |
859 </connection> |
879 </connection> |
860 </connectionPointIn> |
880 </connectionPointIn> |
861 </variable> |
881 </variable> |
862 </inputVariables> |
882 </inputVariables> |
863 <inOutVariables/> |
883 <inOutVariables/> |
867 <relPosition x="130" y="30"/> |
887 <relPosition x="130" y="30"/> |
868 </connectionPointOut> |
888 </connectionPointOut> |
869 </variable> |
889 </variable> |
870 </outputVariables> |
890 </outputVariables> |
871 </block> |
891 </block> |
872 <inVariable localId="47" height="30" width="80"> |
|
873 <position x="770" y="985"/> |
|
874 <connectionPointOut> |
|
875 <relPosition x="80" y="15"/> |
|
876 </connectionPointOut> |
|
877 <expression>BYTE#145</expression> |
|
878 </inVariable> |
|
879 <inVariable localId="50" height="30" width="105"> |
892 <inVariable localId="50" height="30" width="105"> |
880 <position x="200" y="1085"/> |
893 <position x="200" y="1085"/> |
881 <connectionPointOut> |
894 <connectionPointOut> |
882 <relPosition x="105" y="15"/> |
895 <relPosition x="105" y="15"/> |
883 </connectionPointOut> |
896 </connectionPointOut> |
1046 <connectionPointOut> |
1059 <connectionPointOut> |
1047 <relPosition x="75" y="15"/> |
1060 <relPosition x="75" y="15"/> |
1048 </connectionPointOut> |
1061 </connectionPointOut> |
1049 <expression>Test_TOD</expression> |
1062 <expression>Test_TOD</expression> |
1050 </inOutVariable> |
1063 </inOutVariable> |
|
1064 <inVariable localId="49" height="30" width="30"> |
|
1065 <position x="765" y="1200"/> |
|
1066 <connectionPointOut> |
|
1067 <relPosition x="30" y="15"/> |
|
1068 </connectionPointOut> |
|
1069 <expression>42</expression> |
|
1070 </inVariable> |
|
1071 <outVariable localId="57" height="30" width="50"> |
|
1072 <position x="845" y="1200"/> |
|
1073 <connectionPointIn> |
|
1074 <relPosition x="0" y="15"/> |
|
1075 <connection refLocalId="49"> |
|
1076 <position x="845" y="1215"/> |
|
1077 <position x="795" y="1215"/> |
|
1078 </connection> |
|
1079 </connectionPointIn> |
|
1080 <expression>TOTO</expression> |
|
1081 </outVariable> |
|
1082 <outVariable localId="56" height="30" width="50"> |
|
1083 <position x="845" y="1240"/> |
|
1084 <connectionPointIn> |
|
1085 <relPosition x="0" y="15"/> |
|
1086 <connection refLocalId="49"> |
|
1087 <position x="845" y="1255"/> |
|
1088 <position x="820" y="1255"/> |
|
1089 <position x="820" y="1215"/> |
|
1090 <position x="795" y="1215"/> |
|
1091 </connection> |
|
1092 </connectionPointIn> |
|
1093 <expression>TUTU</expression> |
|
1094 </outVariable> |
|
1095 <inVariable localId="58" height="30" width="145"> |
|
1096 <position x="715" y="985"/> |
|
1097 <connectionPointOut> |
|
1098 <relPosition x="145" y="15"/> |
|
1099 </connectionPointOut> |
|
1100 <expression>Second_Python_Var</expression> |
|
1101 </inVariable> |
|
1102 <outVariable localId="47" height="30" width="125"> |
|
1103 <position x="400" y="975"/> |
|
1104 <connectionPointIn> |
|
1105 <relPosition x="0" y="15"/> |
|
1106 <connection refLocalId="59"> |
|
1107 <position x="400" y="990"/> |
|
1108 <position x="330" y="990"/> |
|
1109 </connection> |
|
1110 </connectionPointIn> |
|
1111 <expression>Test_Python_Var</expression> |
|
1112 </outVariable> |
|
1113 <inVariable localId="59" height="30" width="30"> |
|
1114 <position x="300" y="975"/> |
|
1115 <connectionPointOut> |
|
1116 <relPosition x="30" y="15"/> |
|
1117 </connectionPointOut> |
|
1118 <expression>23</expression> |
|
1119 </inVariable> |
1051 </FBD> |
1120 </FBD> |
1052 </body> |
1121 </body> |
1053 </pou> |
1122 </pou> |
1054 <pou name="C_Pragma" pouType="functionBlock"> |
1123 <pou name="C_Pragma" pouType="functionBlock"> |
1055 <interface> |
1124 <interface> |
1118 <ST> |
1187 <ST> |
1119 <![CDATA[(* hereafter is a C pragma accessing FB interface in a clean way *) |
1188 <![CDATA[(* hereafter is a C pragma accessing FB interface in a clean way *) |
1120 {{ |
1189 {{ |
1121 char toPLC; |
1190 char toPLC; |
1122 char fromPLC = GetFbVar(IN); |
1191 char fromPLC = GetFbVar(IN); |
|
1192 extern int PLC_C_Call(char, char *); |
1123 if(PLC_C_Call(fromPLC, &toPLC)){ |
1193 if(PLC_C_Call(fromPLC, &toPLC)){ |
1124 SetFbVar(OUT, toPLC); |
1194 SetFbVar(OUT, toPLC); |
1125 } |
1195 } |
1126 if(0){ |
1196 if(0){ |
1127 /* that code demonstrate C access to complex types */ |
1197 /* that code demonstrate C access to complex types */ |