|
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"> |
|
3 <fileHeader companyName="Beremiz" productName="Beremiz" productVersion="1" creationDateTime="2012-09-12T23:30:19"/> |
|
4 <contentHeader name="Wiimote example" modificationDateTime="2017-06-06T13:10:31"> |
|
5 <coordinateInfo> |
|
6 <fbd> |
|
7 <scaling x="5" y="5"/> |
|
8 </fbd> |
|
9 <ld> |
|
10 <scaling x="0" y="0"/> |
|
11 </ld> |
|
12 <sfc> |
|
13 <scaling x="0" y="0"/> |
|
14 </sfc> |
|
15 </coordinateInfo> |
|
16 </contentHeader> |
|
17 <types> |
|
18 <dataTypes/> |
|
19 <pous> |
|
20 <pou name="main" pouType="program"> |
|
21 <interface> |
|
22 <localVars> |
|
23 <variable name="x"> |
|
24 <type> |
|
25 <INT/> |
|
26 </type> |
|
27 </variable> |
|
28 <variable name="y"> |
|
29 <type> |
|
30 <INT/> |
|
31 </type> |
|
32 </variable> |
|
33 <variable name="a"> |
|
34 <type> |
|
35 <INT/> |
|
36 </type> |
|
37 </variable> |
|
38 <variable name="b"> |
|
39 <type> |
|
40 <INT/> |
|
41 </type> |
|
42 </variable> |
|
43 <variable name="c"> |
|
44 <type> |
|
45 <INT/> |
|
46 </type> |
|
47 </variable> |
|
48 <variable name="b1"> |
|
49 <type> |
|
50 <WORD/> |
|
51 </type> |
|
52 </variable> |
|
53 <variable name="b0"> |
|
54 <type> |
|
55 <WORD/> |
|
56 </type> |
|
57 </variable> |
|
58 </localVars> |
|
59 <externalVars> |
|
60 <variable name="WiiNunchuckStickX"> |
|
61 <type> |
|
62 <INT/> |
|
63 </type> |
|
64 </variable> |
|
65 <variable name="WiiNunchuckStickY"> |
|
66 <type> |
|
67 <INT/> |
|
68 </type> |
|
69 </variable> |
|
70 <variable name="WiiNunchuckButtons"> |
|
71 <type> |
|
72 <WORD/> |
|
73 </type> |
|
74 </variable> |
|
75 <variable name="WiiButtons"> |
|
76 <type> |
|
77 <WORD/> |
|
78 </type> |
|
79 </variable> |
|
80 <variable name="WiiNunchuckAccX"> |
|
81 <type> |
|
82 <INT/> |
|
83 </type> |
|
84 </variable> |
|
85 <variable name="WiiNunchuckAccY"> |
|
86 <type> |
|
87 <INT/> |
|
88 </type> |
|
89 </variable> |
|
90 <variable name="WiiNunchuckAccZ"> |
|
91 <type> |
|
92 <INT/> |
|
93 </type> |
|
94 </variable> |
|
95 </externalVars> |
|
96 </interface> |
|
97 <body> |
|
98 <FBD> |
|
99 <outVariable localId="1" height="30" width="20"> |
|
100 <position x="345" y="40"/> |
|
101 <connectionPointIn> |
|
102 <relPosition x="0" y="15"/> |
|
103 <connection refLocalId="3"> |
|
104 <position x="345" y="55"/> |
|
105 <position x="295" y="55"/> |
|
106 </connection> |
|
107 </connectionPointIn> |
|
108 <expression>x</expression> |
|
109 </outVariable> |
|
110 <inVariable localId="3" height="30" width="150"> |
|
111 <position x="145" y="40"/> |
|
112 <connectionPointOut> |
|
113 <relPosition x="150" y="15"/> |
|
114 </connectionPointOut> |
|
115 <expression>WiiNunchuckStickX</expression> |
|
116 </inVariable> |
|
117 <inVariable localId="4" height="30" width="150"> |
|
118 <position x="145" y="100"/> |
|
119 <connectionPointOut> |
|
120 <relPosition x="150" y="15"/> |
|
121 </connectionPointOut> |
|
122 <expression>WiiNunchuckStickY</expression> |
|
123 </inVariable> |
|
124 <inVariable localId="5" height="30" width="155"> |
|
125 <position x="115" y="175"/> |
|
126 <connectionPointOut> |
|
127 <relPosition x="155" y="15"/> |
|
128 </connectionPointOut> |
|
129 <expression>WiiNunchuckButtons</expression> |
|
130 </inVariable> |
|
131 <inVariable localId="6" height="30" width="90"> |
|
132 <position x="180" y="225"/> |
|
133 <connectionPointOut> |
|
134 <relPosition x="90" y="15"/> |
|
135 </connectionPointOut> |
|
136 <expression>WiiButtons</expression> |
|
137 </inVariable> |
|
138 <outVariable localId="8" height="30" width="20"> |
|
139 <position x="345" y="100"/> |
|
140 <connectionPointIn> |
|
141 <relPosition x="0" y="15"/> |
|
142 <connection refLocalId="4"> |
|
143 <position x="345" y="115"/> |
|
144 <position x="295" y="115"/> |
|
145 </connection> |
|
146 </connectionPointIn> |
|
147 <expression>y</expression> |
|
148 </outVariable> |
|
149 <outVariable localId="9" height="30" width="30"> |
|
150 <position x="345" y="175"/> |
|
151 <connectionPointIn> |
|
152 <relPosition x="0" y="15"/> |
|
153 <connection refLocalId="5"> |
|
154 <position x="345" y="190"/> |
|
155 <position x="270" y="190"/> |
|
156 </connection> |
|
157 </connectionPointIn> |
|
158 <expression>b1</expression> |
|
159 </outVariable> |
|
160 <outVariable localId="10" height="30" width="30"> |
|
161 <position x="345" y="225"/> |
|
162 <connectionPointIn> |
|
163 <relPosition x="0" y="15"/> |
|
164 <connection refLocalId="6"> |
|
165 <position x="345" y="240"/> |
|
166 <position x="270" y="240"/> |
|
167 </connection> |
|
168 </connectionPointIn> |
|
169 <expression>b0</expression> |
|
170 </outVariable> |
|
171 <inVariable localId="11" height="30" width="135"> |
|
172 <position x="135" y="295"/> |
|
173 <connectionPointOut> |
|
174 <relPosition x="135" y="15"/> |
|
175 </connectionPointOut> |
|
176 <expression>WiiNunchuckAccX</expression> |
|
177 </inVariable> |
|
178 <inVariable localId="12" height="30" width="135"> |
|
179 <position x="135" y="340"/> |
|
180 <connectionPointOut> |
|
181 <relPosition x="135" y="15"/> |
|
182 </connectionPointOut> |
|
183 <expression>WiiNunchuckAccY</expression> |
|
184 </inVariable> |
|
185 <inVariable localId="13" height="30" width="130"> |
|
186 <position x="140" y="385"/> |
|
187 <connectionPointOut> |
|
188 <relPosition x="130" y="15"/> |
|
189 </connectionPointOut> |
|
190 <expression>WiiNunchuckAccZ</expression> |
|
191 </inVariable> |
|
192 <outVariable localId="14" height="30" width="20"> |
|
193 <position x="345" y="295"/> |
|
194 <connectionPointIn> |
|
195 <relPosition x="0" y="15"/> |
|
196 <connection refLocalId="11"> |
|
197 <position x="345" y="310"/> |
|
198 <position x="270" y="310"/> |
|
199 </connection> |
|
200 </connectionPointIn> |
|
201 <expression>a</expression> |
|
202 </outVariable> |
|
203 <outVariable localId="15" height="30" width="20"> |
|
204 <position x="345" y="340"/> |
|
205 <connectionPointIn> |
|
206 <relPosition x="0" y="15"/> |
|
207 <connection refLocalId="12"> |
|
208 <position x="345" y="355"/> |
|
209 <position x="270" y="355"/> |
|
210 </connection> |
|
211 </connectionPointIn> |
|
212 <expression>b</expression> |
|
213 </outVariable> |
|
214 <outVariable localId="16" height="30" width="20"> |
|
215 <position x="345" y="385"/> |
|
216 <connectionPointIn> |
|
217 <relPosition x="0" y="15"/> |
|
218 <connection refLocalId="13"> |
|
219 <position x="345" y="400"/> |
|
220 <position x="270" y="400"/> |
|
221 </connection> |
|
222 </connectionPointIn> |
|
223 <expression>c</expression> |
|
224 </outVariable> |
|
225 <comment localId="17" height="125" width="500"> |
|
226 <position x="450" y="30"/> |
|
227 <content> |
|
228 <xhtml:p><![CDATA[This example shows interaction of PLC program with Nintendo Wii Remote controller. |
|
229 |
|
230 To work this example requires python-cwiid library to be installed.]]></xhtml:p> |
|
231 </content> |
|
232 </comment> |
|
233 </FBD> |
|
234 </body> |
|
235 <documentation> |
|
236 <xhtml:p><![CDATA[]]></xhtml:p> |
|
237 </documentation> |
|
238 </pou> |
|
239 </pous> |
|
240 </types> |
|
241 <instances> |
|
242 <configurations> |
|
243 <configuration name="config"> |
|
244 <resource name="resource1"> |
|
245 <task name="tsk1" interval="T#1ms" priority="0"> |
|
246 <pouInstance name="inst1" typeName="main"/> |
|
247 </task> |
|
248 </resource> |
|
249 </configuration> |
|
250 </configurations> |
|
251 </instances> |
|
252 </project> |