raspberrypi-gpio.awlpro 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548
  1. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2. <!-- Awlsim project file generated by awlsim-0.66.0-pre -->
  3. <awlsim_project date_create="2016-03-16 00:00:00.000000"
  4. date_modify="2018-07-08 18:00:06.137893"
  5. format_version="1">
  6. <!-- CPU core configuration -->
  7. <cpu>
  8. <!-- CPU core feature specification -->
  9. <specs call_stack_size="256"
  10. nr_accus="2"
  11. nr_counters="256"
  12. nr_flags="2048"
  13. nr_inputs="128"
  14. nr_localbytes="1024"
  15. nr_outputs="128"
  16. nr_timers="256"
  17. parenthesis_stack_size="7" />
  18. <!-- CPU core configuration -->
  19. <config clock_memory_byte="16"
  20. cycle_time_limit_us="1000000"
  21. ext_insns_enable="0"
  22. mnemonics="2"
  23. ob_startinfo_enable="0"
  24. run_time_limit_us="-1" />
  25. </cpu>
  26. <!-- AWL/STL language configuration -->
  27. <language_awl>
  28. <!-- AWL/STL source code -->
  29. <source enabled="1"
  30. name="OB 1"
  31. type="0"><![CDATA[
  32. ORGANIZATION_BLOCK "OB_CYCLE"
  33. TITLE = Main cycle
  34. AUTHOR : Michael Buesch <m@bues.ch>
  35. // LICENSE : GPLv2+
  36. BEGIN
  37. // Run the main FUP block.
  38. CALL "FB_main", "DB_main"
  39. BE
  40. END_ORGANIZATION_BLOCK
  41. ]]></source>
  42. <!-- AWL/STL source code -->
  43. <source enabled="1"
  44. name="Light chaser"
  45. type="0"><![CDATA[
  46. FUNCTION "FC_lightchaser" : VOID
  47. TITLE = Light chaser
  48. AUTHOR : Michael Buesch <m@bues.ch>
  49. // LICENSE : GPLv2+
  50. VAR_INPUT
  51. PERIOD : S5TIME; // Timer period
  52. T : TIMER; // Timer cell
  53. MINVAL : DWORD; // Minimal #REG value
  54. MAXVAL : DWORD; // Maximal #REG value
  55. END_VAR
  56. VAR_IN_OUT
  57. REG : DWORD; // Shift register
  58. STATE : BOOL; // Timer state
  59. DIR : BOOL; // Shift direction
  60. END_VAR
  61. BEGIN
  62. // Self re-arming timer
  63. U #STATE
  64. L #PERIOD
  65. SV #T
  66. UN #T
  67. = #STATE
  68. // Select sweep direction
  69. L #MINVAL
  70. L #REG
  71. ==D // #MINVAL reached?
  72. S #DIR // reverse direction
  73. L #MAXVAL
  74. ==D // #MAXVAL reached?
  75. R #DIR // reverse direction
  76. // Shift #REG, if required
  77. L #REG
  78. UD L#-1
  79. L #MINVAL // Initial #REG value
  80. SPZ _001 // #REG is uninitialized?
  81. TAK
  82. U #STATE // Next state?
  83. SPBN _001
  84. U #DIR // Left or right?
  85. SPBN _000
  86. RLD 2 // Next state (left)
  87. _000: RRD 1 // Next state (right)
  88. _001: T #REG
  89. BE
  90. END_FUNCTION
  91. ]]></source>
  92. </language_awl>
  93. <!-- FUP/FBD language configuration -->
  94. <language_fup>
  95. <!-- FUP/FBD source code -->
  96. <source enabled="1"
  97. name="Main state machine"
  98. type="1"><![CDATA[
  99. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  100. <!-- Awlsim FUP/FBD source generated by awlsim-0.66.0-pre -->
  101. <FUP version="0" zoom="1.0">
  102. <blockdecl name='"FB_main"' type="FB">
  103. <instance_dbs>
  104. <db name='"DB_main"' />
  105. </instance_dbs>
  106. </blockdecl>
  107. <interface allow_initvalue="1"
  108. allow_inouts="1"
  109. allow_inputs="1"
  110. allow_outputs="1"
  111. allow_retval="0"
  112. allow_stats="1"
  113. allow_temps="1">
  114. <stats>
  115. <field comment="Timer state" name="timer_state" type="BOOL" uuid="f11d899f-8935-432b-9ec9-ced1f84d9c48" />
  116. <field comment="Light chaser register" name="lc_data" type="DWORD" uuid="afc6af01-1a9d-45d4-ac2a-e043395eead2" />
  117. </stats>
  118. <temps>
  119. <field comment="Light chaser mode active" name="lc_active" type="BOOL" uuid="3b57a8cc-b8fe-4c22-bdbc-03cf03afa44a" />
  120. <field comment="Light chaser state" name="lc_state" type="BOOL" uuid="1ab7ea92-59d7-4b8d-98ca-0385a780154e" />
  121. <field comment="Light chaser direction" name="lc_dir" type="BOOL" uuid="64030f49-554e-4d6f-ab2a-182278f44383" />
  122. </temps>
  123. </interface>
  124. <grids>
  125. <grid height="53" uuid="d6bef60f-d0e8-4469-9d5e-4abd0a7ff04f" width="12">
  126. <optimizers all="1" enabled="1" type="awl" />
  127. <wires>
  128. <wire id="0" uuid="70063dca-1e7b-49c9-82ee-204a2143d2e5" />
  129. <wire id="1" uuid="18d76357-d9d2-4861-b096-86a63e417d05" />
  130. <wire id="2" uuid="d45b63f3-fb06-4d36-8c8c-2567894e3274" />
  131. <wire id="3" uuid="c5d272d1-e73c-4b1d-819e-d674fedfafea" />
  132. <wire id="4" uuid="eebb5485-2268-4f86-89bd-ecdf35724668" />
  133. <wire id="5" uuid="269b61b6-0468-4e5c-9eae-7ce9e0fd2846" />
  134. <wire id="6" uuid="ffb9d059-c1ee-4ec6-a87f-9d58551370ec" />
  135. <wire id="7" uuid="96e8fc82-0b51-4182-aa2a-4abdf8b08a4e" />
  136. <wire id="8" uuid="76dd8234-481f-485e-b23d-96707ee60e4e" />
  137. <wire id="9" uuid="7f6e5077-676b-45b0-8fae-1d4b1e717f91" />
  138. <wire id="10" uuid="0a3a7623-f6b6-4310-b7ae-a19f2946a756" />
  139. <wire id="11" uuid="3d54d081-0f07-461e-9de7-5ce55090ed52" />
  140. <wire id="12" uuid="6d419c50-5690-49d6-a96a-bb24bdb18b8c" />
  141. <wire id="13" uuid="07b29338-fa98-4a20-a5af-353d5e5fe7e8" />
  142. <wire id="14" uuid="deb3e7c5-28ff-4887-aed9-b79a7c332277" />
  143. <wire id="15" uuid="2db0689d-e66e-41b2-bf4a-9201a62beb7c" />
  144. <wire id="16" uuid="e59c6073-1266-40a2-abd7-32b7590c339b" />
  145. <wire id="17" uuid="4346c5ef-e8b0-49b9-9596-e9e105c02d9e" />
  146. <wire id="18" uuid="0d88d306-25b7-4b9a-8692-8e5763fe4245" />
  147. <wire id="19" uuid="004e1a53-73f7-47d3-8762-d92eb8393a66" />
  148. <wire id="20" uuid="bafab982-4222-494d-a325-b86238bd2d1a" />
  149. <wire id="21" uuid="e9911f2a-c7b7-4a61-8664-ea0bf1aa42f8" />
  150. <wire id="22" uuid="99a26e39-8662-4465-9479-cb6a30457e73" />
  151. <wire id="23" uuid="bf7c0a12-fc29-4552-88b5-03ee76d803a4" />
  152. <wire id="24" uuid="5e27b2c4-c798-4fb8-a668-55c4cff18c69" />
  153. <wire id="25" uuid="471a20f4-c2fc-4c5c-8644-8d7bcfe6c9a3" />
  154. <wire id="26" uuid="e3c3d0d1-8386-4277-94f1-5423dcc9921d" />
  155. <wire id="27" uuid="888ec66a-e2eb-41e2-8ef3-ace4d1a2403f" />
  156. <wire id="28" uuid="7cb3714f-3efb-40cf-bf96-fb7578e0be1c" />
  157. <wire id="29" uuid="a71faefc-952e-46c4-bb26-3c389b77507a" />
  158. <wire id="30" uuid="08480109-d593-4ec9-94e2-fbba2343f6c9" />
  159. <wire id="31" uuid="57739b9a-1302-4f22-b9aa-1f28b47194ca" />
  160. </wires>
  161. <elements>
  162. <element content="// Self re-arming timer&#13;&#10;U&#9;#timer_state&#13;&#10;L&#9;S5T#500ms&#13;&#10;SV&#9;T 0&#13;&#10;" type="awl" uuid="e4e77b98-63c8-4a91-b6e4-fe70cb7dc24f" x="2" y="0" />
  163. <element content="// State counter&#13;&#10;U&#9;#timer_state&#13;&#10;ZV&#9;Z 0&#13;&#10;" type="awl" uuid="fb0dc070-ea2c-4d02-b942-e02fec8367a3" x="2" y="6" />
  164. <element content="#lc_data" subtype="load" type="operand" uuid="b3c056b0-97fe-4eb5-9c5d-3228d9ccdf30" x="1" y="48">
  165. <connections>
  166. <connection dir_in="0" dir_out="1" pos="0" uuid="04e39272-d8cf-4224-9df6-487c08aadb88" wire="26" />
  167. </connections>
  168. </element>
  169. <element content='"AB_raspi_GPIO"' subtype="assign" type="operand" uuid="23b2aab6-b144-411c-8094-49061192942a" x="3" y="47">
  170. <connections>
  171. <connection dir_in="1" dir_out="0" pos="0" uuid="96833969-dcbc-4a6a-9cde-6512a0e6c80a" wire="27" />
  172. </connections>
  173. </element>
  174. <element subtype="le-int" type="compare" uuid="db185ef0-f712-43ce-a87d-0dc35e73c742" x="2" y="36">
  175. <connections>
  176. <connection dir_in="1" dir_out="0" pos="0" text="EN" uuid="0368d095-5bc1-48e1-8c16-3af6bff89cdb" wire="-1" />
  177. <connection dir_in="1" dir_out="0" pos="1" text="IN0" uuid="8643446c-a972-4c44-987f-26b2a041ebb2" wire="0" />
  178. <connection dir_in="1" dir_out="0" pos="2" text="IN1" uuid="12363cef-c029-4093-a5d6-d820d0be0c3c" wire="1" />
  179. <connection dir_in="0" dir_out="1" pos="0" text="OUT0" uuid="52e2aec6-e83c-4642-948c-d9b6f5bf999f" wire="7" />
  180. <connection dir_in="0" dir_out="1" pos="1" text="ENO" uuid="27494954-f724-4904-8269-99dd193ba15c" wire="-1" />
  181. </connections>
  182. </element>
  183. <element content="Z 0" subtype="load" type="operand" uuid="a24f4032-f70d-4e1a-9b9c-9433ef9f1df5" x="1" y="37">
  184. <connections>
  185. <connection dir_in="0" dir_out="1" pos="0" uuid="a7b1e435-4d0c-4b4d-bfcd-1e87b6fbdde5" wire="0" />
  186. </connections>
  187. </element>
  188. <element content="15" subtype="load" type="operand" uuid="fe3c84ad-6647-4f6f-ba42-29d76a21174f" x="1" y="38">
  189. <connections>
  190. <connection dir_in="0" dir_out="1" pos="0" uuid="313bbb25-533c-49cf-9d05-c1c4c0b19b56" wire="1" />
  191. </connections>
  192. </element>
  193. <element subtype="ge-int" type="compare" uuid="c2a4f07f-3753-4aaf-a603-727e46a2eca8" x="2" y="11">
  194. <connections>
  195. <connection dir_in="1" dir_out="0" pos="0" text="EN" uuid="50df9195-0dad-49a2-b493-aad235162208" wire="-1" />
  196. <connection dir_in="1" dir_out="0" pos="1" text="IN0" uuid="a7bcf407-cda1-45ca-a6ad-0aea55f54002" wire="2" />
  197. <connection dir_in="1" dir_out="0" pos="2" text="IN1" uuid="cdd88d0d-55a0-4f7b-9dc4-b0150dfc959b" wire="3" />
  198. <connection dir_in="0" dir_out="1" pos="0" text="OUT0" uuid="8d59db60-45c4-4a7e-9c94-d7935c13711f" wire="4" />
  199. <connection dir_in="0" dir_out="1" pos="1" text="ENO" uuid="5c07db81-7d08-4930-ac33-5b0883693212" wire="-1" />
  200. </connections>
  201. </element>
  202. <element content="Z 0" subtype="load" type="operand" uuid="c63df485-42ee-4590-9ac6-38f585a12781" x="1" y="12">
  203. <connections>
  204. <connection dir_in="0" dir_out="1" pos="0" uuid="b3c5f39b-02ec-4123-abc3-c7c0a8effc39" wire="2" />
  205. </connections>
  206. </element>
  207. <element content="20" subtype="load" type="operand" uuid="24e3d6da-f817-4aa7-8461-6800b835b3ba" x="1" y="13">
  208. <connections>
  209. <connection dir_in="0" dir_out="1" pos="0" uuid="023b53bd-7b27-414c-a57f-a7e9d7684a47" wire="3" />
  210. </connections>
  211. </element>
  212. <element subtype="r" type="boolean" uuid="6edc4c22-1b07-44a6-83a3-2a9fae7071ad" x="7" y="11">
  213. <connections>
  214. <connection dir_in="1" dir_out="0" pos="0" text="R" uuid="6d280f7b-4abe-4678-9bf4-be1dcf852b32" wire="4" />
  215. <connection dir_in="0" dir_out="1" pos="0" text="Q" uuid="90c2cfa5-03ac-4512-a53b-aa3d4b7466ca" wire="-1" />
  216. </connections>
  217. <subelements>
  218. <element content="Z 0" subtype="embedded" type="operand" uuid="9b097723-1ad9-47fe-9af3-c967b92e3c89" x="0" y="0" />
  219. </subelements>
  220. </element>
  221. <element subtype="r" type="boolean" uuid="2ed06903-cf1e-43bb-af7c-32d26d7e7bbe" x="5" y="33">
  222. <connections>
  223. <connection dir_in="1" dir_out="0" pos="0" text="R" uuid="4e73be45-e5e9-4559-ad2a-38948d007d27" wire="8" />
  224. <connection dir_in="0" dir_out="1" pos="0" text="Q" uuid="b1b19b74-efb8-4594-a289-67768381a861" wire="-1" />
  225. </connections>
  226. <subelements>
  227. <element content="Z 0" subtype="embedded" type="operand" uuid="8576138b-93e7-4a8c-a82a-5f6937efac95" x="0" y="0" />
  228. </subelements>
  229. </element>
  230. <element subtype="eq-int" type="compare" uuid="fceb6aea-a3c5-43fc-b53d-14a940d53ae1" x="2" y="20">
  231. <connections>
  232. <connection dir_in="1" dir_out="0" pos="0" text="EN" uuid="4e2fc543-f409-4506-8b04-270b1ccb386c" wire="-1" />
  233. <connection dir_in="1" dir_out="0" pos="1" text="IN0" uuid="71d66e5b-86f5-4e5e-8d36-b51ebec990b3" wire="5" />
  234. <connection dir_in="1" dir_out="0" pos="2" text="IN1" uuid="08ff9443-5d93-4c28-a77e-c38d9b2c7427" wire="6" />
  235. <connection dir_in="0" dir_out="1" pos="0" text="OUT0" uuid="96a1ee16-dca1-4576-8a38-6dd2e2c82cb9" wire="20" />
  236. <connection dir_in="0" dir_out="1" pos="1" text="ENO" uuid="989945b1-a85f-4516-b4c9-bfa365268b9c" wire="-1" />
  237. </connections>
  238. </element>
  239. <element content="Z 0" subtype="load" type="operand" uuid="1ff00434-191e-4b63-8a9f-2f38d7b43be2" x="1" y="21">
  240. <connections>
  241. <connection dir_in="0" dir_out="1" pos="0" uuid="bfd0d4cf-eda4-471a-beb5-10b241b5d5ea" wire="5" />
  242. </connections>
  243. </element>
  244. <element content="17" subtype="load" type="operand" uuid="22cbddf5-44bf-4c98-848e-bccc3027f549" x="1" y="22">
  245. <connections>
  246. <connection dir_in="0" dir_out="1" pos="0" uuid="1df3e3d4-0f86-424f-897c-e218e5060c44" wire="6" />
  247. </connections>
  248. </element>
  249. <element subtype="or" type="boolean" uuid="83b9a38a-7131-4075-8e9a-fb84f452396b" x="5" y="36">
  250. <connections>
  251. <connection dir_in="1" dir_out="0" pos="0" uuid="ecba13fe-0f98-4abb-9cfd-9343d8183999" wire="8" />
  252. <connection dir_in="1" dir_out="0" pos="1" uuid="fbfc60cd-646a-4c4f-b40c-4b944c2baed8" wire="7" />
  253. <connection dir_in="0" dir_out="1" pos="0" text="Q" uuid="f8c42ad9-d60c-4ae1-a7a0-29a6e49405ed" wire="25" />
  254. </connections>
  255. </element>
  256. <element content='"E_simple_mode"' subtype="load" type="operand" uuid="e2812ea0-34df-4cd5-a82d-812618caa44c" x="3" y="34">
  257. <connections>
  258. <connection dir_in="0" dir_out="1" pos="0" uuid="6b406f71-8d4a-4242-8e54-0429b5bb4af0" wire="8" />
  259. </connections>
  260. </element>
  261. <element subtype="eq-int" type="compare" uuid="7d77c21c-c195-41fd-a0b7-a3945fe4b96a" x="2" y="29">
  262. <connections>
  263. <connection dir_in="1" dir_out="0" pos="0" text="EN" uuid="25bd3b64-2cbc-48a7-b0f7-8c1d4bea2189" wire="-1" />
  264. <connection dir_in="1" dir_out="0" pos="1" text="IN0" uuid="2d8a40ba-41b1-4caf-b33f-95023cb21946" wire="9" />
  265. <connection dir_in="1" dir_out="0" pos="2" text="IN1" uuid="d02316a4-cced-48d5-b796-920cc283ad59" wire="10" />
  266. <connection dir_in="0" dir_out="1" pos="0" text="OUT0" uuid="de589487-262d-46b9-a82a-499699054ec0" wire="17" />
  267. <connection dir_in="0" dir_out="1" pos="1" text="ENO" uuid="ffff1862-c26c-4bf5-8684-6d5d3f9b0ca7" wire="-1" />
  268. </connections>
  269. </element>
  270. <element content="Z 0" subtype="load" type="operand" uuid="078095a9-47cc-4feb-8eef-c04b63b337f9" x="1" y="30">
  271. <connections>
  272. <connection dir_in="0" dir_out="1" pos="0" uuid="6a114d3b-1a18-4f68-9d1f-307dc89e6acc" wire="9" />
  273. </connections>
  274. </element>
  275. <element content="16" subtype="load" type="operand" uuid="06bf160f-e686-44a4-b999-827ca66d3126" x="1" y="31">
  276. <connections>
  277. <connection dir_in="0" dir_out="1" pos="0" uuid="faeea0d0-86a7-472a-b2c6-2b5f2451b328" wire="10" />
  278. </connections>
  279. </element>
  280. <element type="move" uuid="5e8140f1-88c8-4b19-9f7c-9111cbadb3f8" x="7" y="29">
  281. <connections>
  282. <connection dir_in="1" dir_out="0" pos="0" text="EN" uuid="9d7c66f1-8384-4904-b02a-3b16d5c57dd3" wire="19" />
  283. <connection dir_in="1" dir_out="0" pos="1" text="IN" uuid="6b335f78-9306-47b1-bd62-fe6146d77c60" wire="11" />
  284. <connection dir_in="0" dir_out="1" pos="0" text="OUT0" uuid="6fb19131-81f9-4699-87e0-9048de00c32f" wire="12" />
  285. <connection dir_in="0" dir_out="1" pos="1" text="ENO" uuid="4107d1da-05c5-4a9a-a9e4-f0b7c744df17" wire="-1" />
  286. </connections>
  287. </element>
  288. <element content="B#16#55" subtype="load" type="operand" uuid="62085205-52b5-4a39-9c09-4a958156d383" x="6" y="31">
  289. <connections>
  290. <connection dir_in="0" dir_out="1" pos="0" uuid="149e95d3-08e5-4162-ab65-70d18a55ace1" wire="11" />
  291. </connections>
  292. </element>
  293. <element content='"AB_raspi_GPIO"' subtype="assign" type="operand" uuid="62e81189-1bc0-40f3-b8ea-26bf115c0309" x="8" y="30">
  294. <connections>
  295. <connection dir_in="1" dir_out="0" pos="0" uuid="2e67f82a-ae8a-4acc-b79a-bcb865ebf3f2" wire="12" />
  296. </connections>
  297. </element>
  298. <element type="move" uuid="89d6e171-7a22-4b54-8dbc-b751bd4b7c4b" x="7" y="20">
  299. <connections>
  300. <connection dir_in="1" dir_out="0" pos="0" text="EN" uuid="70e128b4-3e50-4343-a2c7-f014aa87c130" wire="21" />
  301. <connection dir_in="1" dir_out="0" pos="1" text="IN" uuid="5a9e34b7-937d-4f8e-9351-e9e22065f49f" wire="13" />
  302. <connection dir_in="0" dir_out="1" pos="0" text="OUT0" uuid="23be8f92-bb6f-4c82-abe5-8d7b27fc8aa1" wire="14" />
  303. <connection dir_in="0" dir_out="1" pos="1" text="ENO" uuid="deafab0a-6b09-4251-90b0-7a8429957f0e" wire="-1" />
  304. </connections>
  305. </element>
  306. <element content="B#16#AA" subtype="load" type="operand" uuid="4a823847-2a15-4271-8154-385b720dc9b4" x="6" y="22">
  307. <connections>
  308. <connection dir_in="0" dir_out="1" pos="0" uuid="dcbce199-ae8b-46e1-b3ea-1dce969c0332" wire="13" />
  309. </connections>
  310. </element>
  311. <element content='"AB_raspi_GPIO"' subtype="assign" type="operand" uuid="e0e9a9f5-e566-477b-99ee-8d5fc58f814a" x="8" y="21">
  312. <connections>
  313. <connection dir_in="1" dir_out="0" pos="0" uuid="04715f1f-bee5-462e-b886-d0f3be433b1b" wire="14" />
  314. </connections>
  315. </element>
  316. <element subtype="or" type="boolean" uuid="ed867334-6964-4564-adc9-853eac31900a" x="4" y="29">
  317. <connections>
  318. <connection dir_in="1" dir_out="0" pos="0" uuid="624d15fd-037f-4f7f-9731-487c98d2fccf" wire="18" />
  319. <connection dir_in="1" dir_out="0" pos="1" uuid="4333f1ba-a02b-40f8-95ba-4a07f7aa22c2" wire="17" />
  320. <connection dir_in="0" dir_out="1" pos="0" text="Q" uuid="53c35105-0c43-4ece-9dad-2c6af745d76f" wire="19" />
  321. </connections>
  322. </element>
  323. <element subtype="eq-int" type="compare" uuid="85955975-3428-4eb0-b227-ccf3d8a33600" x="2" y="25">
  324. <connections>
  325. <connection dir_in="1" dir_out="0" pos="0" text="EN" uuid="ed5911d1-896e-4079-ba5c-9d27b16c2e02" wire="-1" />
  326. <connection dir_in="1" dir_out="0" pos="1" text="IN0" uuid="58d49fe7-cd12-4d9e-b157-bcdde20e7189" wire="15" />
  327. <connection dir_in="1" dir_out="0" pos="2" text="IN1" uuid="4ead19c6-cea8-4bc5-a1b0-37e89e9cf08d" wire="16" />
  328. <connection dir_in="0" dir_out="1" pos="0" text="OUT0" uuid="406e2fa4-b657-43cb-9705-0bd7baa27ecd" wire="18" />
  329. <connection dir_in="0" dir_out="1" pos="1" text="ENO" uuid="ed2bf5a9-ce19-47f7-8d76-8151fa46e167" wire="-1" />
  330. </connections>
  331. </element>
  332. <element content="Z 0" subtype="load" type="operand" uuid="ccf29c34-8e96-4730-8cde-1d9cb697b14d" x="1" y="26">
  333. <connections>
  334. <connection dir_in="0" dir_out="1" pos="0" uuid="faa1e454-6b2a-4306-b407-f25c19dd74df" wire="15" />
  335. </connections>
  336. </element>
  337. <element content="18" subtype="load" type="operand" uuid="30388b6d-dc1d-413a-8a23-86b450eeef43" x="1" y="27">
  338. <connections>
  339. <connection dir_in="0" dir_out="1" pos="0" uuid="d152f5a7-c44f-46d0-ae41-4a85b694fdee" wire="16" />
  340. </connections>
  341. </element>
  342. <element subtype="or" type="boolean" uuid="eee87d65-8cc2-41a0-8b3b-d667c8d2a753" x="4" y="20">
  343. <connections>
  344. <connection dir_in="1" dir_out="0" pos="0" uuid="0e157776-cb9a-4934-928c-a596cc2a057b" wire="24" />
  345. <connection dir_in="1" dir_out="0" pos="1" uuid="2f8dda28-429a-4342-b071-696a16103c3b" wire="20" />
  346. <connection dir_in="0" dir_out="1" pos="0" text="Q" uuid="6f5bb152-8080-4388-9c75-6324832232a2" wire="21" />
  347. </connections>
  348. </element>
  349. <element subtype="eq-int" type="compare" uuid="e2191492-7bf3-498c-808c-4b0fb8b45ec9" x="2" y="16">
  350. <connections>
  351. <connection dir_in="1" dir_out="0" pos="0" text="EN" uuid="2cfc82ae-499b-4d8c-aa89-aaf347ed7969" wire="-1" />
  352. <connection dir_in="1" dir_out="0" pos="1" text="IN0" uuid="b45aa338-3dfa-4b88-9974-45cbabfb1657" wire="22" />
  353. <connection dir_in="1" dir_out="0" pos="2" text="IN1" uuid="f1080008-a07d-4d33-8a37-da5b874106cc" wire="23" />
  354. <connection dir_in="0" dir_out="1" pos="0" text="OUT0" uuid="9bf72cc7-efd0-4d31-b93c-ae3eb4585b51" wire="24" />
  355. <connection dir_in="0" dir_out="1" pos="1" text="ENO" uuid="f49baef3-627d-4300-81b3-647fe702f312" wire="-1" />
  356. </connections>
  357. </element>
  358. <element content="Z 0" subtype="load" type="operand" uuid="cc1cf043-0a45-43b0-a6c1-5e69dde64533" x="1" y="17">
  359. <connections>
  360. <connection dir_in="0" dir_out="1" pos="0" uuid="1c24dd3d-7041-4757-81ff-71811a1f7e68" wire="22" />
  361. </connections>
  362. </element>
  363. <element content="19" subtype="load" type="operand" uuid="5a8f0517-1f0c-4ecf-922a-487c546a7a7c" x="1" y="18">
  364. <connections>
  365. <connection dir_in="0" dir_out="1" pos="0" uuid="11bf87a2-b8bf-4a80-b65e-f37c10bc6908" wire="23" />
  366. </connections>
  367. </element>
  368. <element content="#lc_active" subtype="assign" type="operand" uuid="5d38c9a7-966d-4227-b101-cc2b09d05d9c" x="7" y="37">
  369. <connections>
  370. <connection dir_in="1" dir_out="0" pos="0" uuid="473372fb-2a79-4eba-9696-4ad3fe6eea7b" wire="25" />
  371. </connections>
  372. </element>
  373. <element content='&#9;U&#9;#lc_active&#13;&#10;&#9;SPBN&#9;ncha&#13;&#10;&#9;CALL "FC_lightchaser" (&#13;&#10;&#9;&#9;PERIOD&#9;:= S5T#100ms,&#13;&#10;&#9;&#9;T&#9;:= T 1,&#13;&#10;&#9;&#9;MINVAL&#9;:= DW#16#01000000,&#13;&#10;&#9;&#9;MAXVAL&#9;:= DW#16#80000000,&#13;&#10;&#9;&#9;REG&#9;:= #lc_data,&#13;&#10;&#9;&#9;STATE&#9;:= #lc_state,&#13;&#10;&#9;&#9;DIR&#9;:= #lc_dir,&#13;&#10;&#9;)&#13;&#10;ncha:&#9;NOP 0&#13;&#10;' type="awl" uuid="1a3b3c89-75fc-4685-a9af-d7c7d678ce5c" x="2" y="41" />
  374. <element content="24" subtype="load" type="operand" uuid="d8599d95-448b-4283-89ef-de72caf5786f" x="1" y="47">
  375. <connections>
  376. <connection dir_in="0" dir_out="1" pos="0" uuid="24a394d2-88b6-4b5f-b400-6f88592d4baf" wire="28" />
  377. </connections>
  378. </element>
  379. <element content="#lc_active" subtype="load" type="operand" uuid="1f5cae6f-8c94-42a5-bf14-c04f49fca58c" x="1" y="46">
  380. <connections>
  381. <connection dir_in="0" dir_out="1" pos="0" uuid="860fe2fc-0d81-44ae-a2ec-8319403ada4b" wire="29" />
  382. </connections>
  383. </element>
  384. <element subtype="srd" type="shift" uuid="8b3ed70a-554a-4e03-8e6e-0110eb4f9c39" x="2" y="46">
  385. <connections>
  386. <connection dir_in="1" dir_out="0" pos="0" text="EN" uuid="d93f6d6f-0f0c-45c9-b5c4-f745195bb595" wire="29" />
  387. <connection dir_in="1" dir_out="0" pos="1" text="N" uuid="256a0b01-30a5-41db-8377-4eabf98a95cd" wire="28" />
  388. <connection dir_in="1" dir_out="0" pos="2" text="IN" uuid="e76edb00-40d3-4b58-86d9-b1b016061273" wire="26" />
  389. <connection dir_in="0" dir_out="1" pos="0" text="OUT0" uuid="fd321600-f0f5-4051-98ba-388778923c6f" wire="27" />
  390. <connection dir_in="0" dir_out="1" pos="1" text="ENO" uuid="f5b6eb39-7d30-4a9a-9076-a5a072898e07" wire="-1" />
  391. </connections>
  392. </element>
  393. <element subtype="and" type="boolean" uuid="b8c38391-aa17-4436-8f8d-68c68824dab1" x="2" y="4">
  394. <connections>
  395. <connection dir_in="1" dir_out="0" inverted="1" pos="0" uuid="7bda20b3-d564-4468-868f-7d1d15825b0d" wire="30" />
  396. <connection dir_in="0" dir_out="1" pos="0" text="Q" uuid="b49fd501-f574-4e84-958a-4a769599464a" wire="31" />
  397. </connections>
  398. </element>
  399. <element content="T 0" subtype="load" type="operand" uuid="8a889cc8-acd8-42a9-862c-6dffc4ed8e80" x="1" y="4">
  400. <connections>
  401. <connection dir_in="0" dir_out="1" pos="0" uuid="6cfa0dc2-fbea-4143-8199-51864f1cdf58" wire="30" />
  402. </connections>
  403. </element>
  404. <element content="#timer_state" subtype="assign" type="operand" uuid="25b52182-5667-4359-9430-6bc914a47df4" x="3" y="4">
  405. <connections>
  406. <connection dir_in="1" dir_out="0" pos="0" uuid="5c2be997-ecf3-4b1f-ab50-4660499214a3" wire="31" />
  407. </connections>
  408. </element>
  409. </elements>
  410. </grid>
  411. </grids>
  412. </FUP>
  413. ]]></source>
  414. </language_fup>
  415. <!-- Symbol table configuration -->
  416. <symbols>
  417. <!-- symbol table source code -->
  418. <source enabled="1"
  419. name="Blocks"
  420. type="3"><![CDATA[
  421. 126,OB_CYCLE OB 1 OB 1
  422. 126,FB_main FB 1 FB 1
  423. 126,DB_main DB 1 FB 1
  424. 126,FC_lightchaser FC 1 FC 1
  425. ]]></source>
  426. <!-- symbol table source code -->
  427. <source enabled="1"
  428. name="Memory"
  429. type="3"><![CDATA[
  430. 126,MB_clockmem MB 16 BYTE
  431. 126,M_clockmem_0.1s M 16.0 BOOL
  432. 126,M_clockmem_0.2s M 16.1 BOOL
  433. 126,M_clockmem_0.4s M 16.2 BOOL
  434. 126,M_clockmem_0.5s M 16.3 BOOL
  435. 126,M_clockmem_0.8s M 16.4 BOOL
  436. 126,M_clockmem_1.0s M 16.5 BOOL
  437. 126,M_clockmem_1.6s M 16.6 BOOL
  438. 126,M_clockmem_2.0s M 16.7 BOOL
  439. ]]></source>
  440. <!-- symbol table source code -->
  441. <source enabled="1"
  442. name="Inputs"
  443. type="3"><![CDATA[
  444. 126,E_simple_mode E 0.0 BOOL
  445. ]]></source>
  446. <!-- symbol table source code -->
  447. <source enabled="1"
  448. name="Outputs"
  449. type="3"><![CDATA[
  450. 126,AB_raspi_GPIO AB 0 BYTE
  451. ]]></source>
  452. </symbols>
  453. <!-- Core server link configuration -->
  454. <core_link>
  455. <!-- Locally spawned core server -->
  456. <spawn_local enable="0"
  457. interpreters="$DEFAULT"
  458. port_range_begin="4183"
  459. port_range_end="8278" />
  460. <!-- Remote server connection -->
  461. <connect host="pilc"
  462. port="4151"
  463. timeout_ms="10000" />
  464. <!-- Transport tunnel -->
  465. <tunnel local_port="-1"
  466. type="1">
  467. <ssh executable="ssh"
  468. port="22"
  469. user="pi" />
  470. </tunnel>
  471. </core_link>
  472. <!-- Hardware modules configuration -->
  473. <hardware>
  474. <!-- Loaded hardware module -->
  475. <module name="rpigpio">
  476. <params>
  477. <param name="I0.0"
  478. value="BCM6" />
  479. <param name="I0.1"
  480. value="BCM13" />
  481. <param name="I0.2"
  482. value="BCM19" />
  483. <param name="I0.3"
  484. value="BCM26" />
  485. <param name="I0.4"
  486. value="BCM21" />
  487. <param name="I0.5"
  488. value="BCM20" />
  489. <param name="I0.6"
  490. value="BCM16" />
  491. <param name="I0.7"
  492. value="BCM12" />
  493. <param name="Q0.0"
  494. value="BCM4" />
  495. <param name="Q0.1"
  496. value="BCM17" />
  497. <param name="Q0.2"
  498. value="BCM27" />
  499. <param name="Q0.3"
  500. value="BCM22" />
  501. <param name="Q0.4"
  502. value="BCM10" />
  503. <param name="Q0.5"
  504. value="BCM9" />
  505. <param name="Q0.6"
  506. value="BCM11" />
  507. <param name="Q0.7"
  508. value="BCM5" />
  509. <param name="inputAddressBase"
  510. value="0" />
  511. <param name="outputAddressBase"
  512. value="0" />
  513. </params>
  514. </module>
  515. </hardware>
  516. <!-- Graphical user interface configuration -->
  517. <gui>
  518. <editor autoindent="1"
  519. paste_autoindent="1"
  520. validation="1" />
  521. </gui>
  522. </awlsim_project>