raspberrypi-gpio.awlpro 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584
  1. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2. <!-- Awlsim project file generated by awlsim-0.69.0-pre -->
  3. <awlsim_project date_create="2016-03-16 00:00:00.000000"
  4. date_modify="2019-01-15 21:40:21.266275"
  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.69.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="56" 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="269b61b6-0468-4e5c-9eae-7ce9e0fd2846" />
  133. <wire id="5" uuid="ffb9d059-c1ee-4ec6-a87f-9d58551370ec" />
  134. <wire id="6" uuid="96e8fc82-0b51-4182-aa2a-4abdf8b08a4e" />
  135. <wire id="7" uuid="76dd8234-481f-485e-b23d-96707ee60e4e" />
  136. <wire id="8" uuid="7f6e5077-676b-45b0-8fae-1d4b1e717f91" />
  137. <wire id="9" uuid="0a3a7623-f6b6-4310-b7ae-a19f2946a756" />
  138. <wire id="10" uuid="3d54d081-0f07-461e-9de7-5ce55090ed52" />
  139. <wire id="11" uuid="6d419c50-5690-49d6-a96a-bb24bdb18b8c" />
  140. <wire id="12" uuid="07b29338-fa98-4a20-a5af-353d5e5fe7e8" />
  141. <wire id="13" uuid="deb3e7c5-28ff-4887-aed9-b79a7c332277" />
  142. <wire id="14" uuid="2db0689d-e66e-41b2-bf4a-9201a62beb7c" />
  143. <wire id="15" uuid="e59c6073-1266-40a2-abd7-32b7590c339b" />
  144. <wire id="16" uuid="4346c5ef-e8b0-49b9-9596-e9e105c02d9e" />
  145. <wire id="17" uuid="0d88d306-25b7-4b9a-8692-8e5763fe4245" />
  146. <wire id="18" uuid="004e1a53-73f7-47d3-8762-d92eb8393a66" />
  147. <wire id="19" uuid="bafab982-4222-494d-a325-b86238bd2d1a" />
  148. <wire id="20" uuid="e9911f2a-c7b7-4a61-8664-ea0bf1aa42f8" />
  149. <wire id="21" uuid="99a26e39-8662-4465-9479-cb6a30457e73" />
  150. <wire id="22" uuid="bf7c0a12-fc29-4552-88b5-03ee76d803a4" />
  151. <wire id="23" uuid="5e27b2c4-c798-4fb8-a668-55c4cff18c69" />
  152. <wire id="24" uuid="471a20f4-c2fc-4c5c-8644-8d7bcfe6c9a3" />
  153. <wire id="25" uuid="e3c3d0d1-8386-4277-94f1-5423dcc9921d" />
  154. <wire id="26" uuid="888ec66a-e2eb-41e2-8ef3-ace4d1a2403f" />
  155. <wire id="27" uuid="7cb3714f-3efb-40cf-bf96-fb7578e0be1c" />
  156. <wire id="28" uuid="a71faefc-952e-46c4-bb26-3c389b77507a" />
  157. <wire id="29" uuid="57739b9a-1302-4f22-b9aa-1f28b47194ca" />
  158. <wire id="30" uuid="4eecab3e-4a4c-4911-8802-c44940cff241" />
  159. <wire id="31" uuid="c99fd34d-2461-4978-828a-f30fadc4b9d5" />
  160. <wire id="32" uuid="8ca53205-56c0-484b-85a6-f5eeb8cdb3ea" />
  161. <wire id="33" uuid="dafc6f11-a591-4bcd-a2e8-0ac5bc6a5daa" />
  162. <wire id="34" uuid="5e12a8b5-6034-4676-b22f-bddd64ffbde3" />
  163. </wires>
  164. <elements>
  165. <element content="#lc_data" subtype="load" type="operand" uuid="b3c056b0-97fe-4eb5-9c5d-3228d9ccdf30" x="1" y="51">
  166. <connections>
  167. <connection dir_in="0" dir_out="1" pos="0" uuid="04e39272-d8cf-4224-9df6-487c08aadb88" wire="25" />
  168. </connections>
  169. </element>
  170. <element content='"AB_raspi_GPIO"' subtype="assign" type="operand" uuid="23b2aab6-b144-411c-8094-49061192942a" x="3" y="50">
  171. <connections>
  172. <connection dir_in="1" dir_out="0" pos="0" uuid="96833969-dcbc-4a6a-9cde-6512a0e6c80a" wire="26" />
  173. </connections>
  174. </element>
  175. <element subtype="le-int" type="compare" uuid="db185ef0-f712-43ce-a87d-0dc35e73c742" x="2" y="39">
  176. <connections>
  177. <connection dir_in="1" dir_out="0" pos="0" text="EN" uuid="0368d095-5bc1-48e1-8c16-3af6bff89cdb" wire="-1" />
  178. <connection dir_in="1" dir_out="0" pos="1" text="IN0" uuid="8643446c-a972-4c44-987f-26b2a041ebb2" wire="0" />
  179. <connection dir_in="1" dir_out="0" pos="2" text="IN1" uuid="12363cef-c029-4093-a5d6-d820d0be0c3c" wire="1" />
  180. <connection dir_in="0" dir_out="1" pos="0" text="OUT0" uuid="52e2aec6-e83c-4642-948c-d9b6f5bf999f" wire="6" />
  181. <connection dir_in="0" dir_out="1" pos="1" text="ENO" uuid="27494954-f724-4904-8269-99dd193ba15c" wire="-1" />
  182. </connections>
  183. </element>
  184. <element content="Z 0" subtype="load" type="operand" uuid="a24f4032-f70d-4e1a-9b9c-9433ef9f1df5" x="1" y="40">
  185. <connections>
  186. <connection dir_in="0" dir_out="1" pos="0" uuid="a7b1e435-4d0c-4b4d-bfcd-1e87b6fbdde5" wire="0" />
  187. </connections>
  188. </element>
  189. <element content="15" subtype="load" type="operand" uuid="fe3c84ad-6647-4f6f-ba42-29d76a21174f" x="1" y="41">
  190. <connections>
  191. <connection dir_in="0" dir_out="1" pos="0" uuid="313bbb25-533c-49cf-9d05-c1c4c0b19b56" wire="1" />
  192. </connections>
  193. </element>
  194. <element subtype="ge-int" type="compare" uuid="c2a4f07f-3753-4aaf-a603-727e46a2eca8" x="2" y="14">
  195. <connections>
  196. <connection dir_in="1" dir_out="0" pos="0" text="EN" uuid="50df9195-0dad-49a2-b493-aad235162208" wire="-1" />
  197. <connection dir_in="1" dir_out="0" pos="1" text="IN0" uuid="a7bcf407-cda1-45ca-a6ad-0aea55f54002" wire="2" />
  198. <connection dir_in="1" dir_out="0" pos="2" text="IN1" uuid="cdd88d0d-55a0-4f7b-9dc4-b0150dfc959b" wire="3" />
  199. <connection dir_in="0" dir_out="1" pos="0" text="OUT0" uuid="8d59db60-45c4-4a7e-9c94-d7935c13711f" wire="31" />
  200. <connection dir_in="0" dir_out="1" pos="1" text="ENO" uuid="5c07db81-7d08-4930-ac33-5b0883693212" wire="-1" />
  201. </connections>
  202. </element>
  203. <element content="Z 0" subtype="load" type="operand" uuid="c63df485-42ee-4590-9ac6-38f585a12781" x="1" y="15">
  204. <connections>
  205. <connection dir_in="0" dir_out="1" pos="0" uuid="b3c5f39b-02ec-4123-abc3-c7c0a8effc39" wire="2" />
  206. </connections>
  207. </element>
  208. <element content="20" subtype="load" type="operand" uuid="24e3d6da-f817-4aa7-8461-6800b835b3ba" x="1" y="16">
  209. <connections>
  210. <connection dir_in="0" dir_out="1" pos="0" uuid="023b53bd-7b27-414c-a57f-a7e9d7684a47" wire="3" />
  211. </connections>
  212. </element>
  213. <element subtype="r" type="boolean" uuid="2ed06903-cf1e-43bb-af7c-32d26d7e7bbe" x="5" y="36">
  214. <connections>
  215. <connection dir_in="1" dir_out="0" pos="0" text="R" uuid="4e73be45-e5e9-4559-ad2a-38948d007d27" wire="7" />
  216. <connection dir_in="0" dir_out="1" pos="0" text="Q" uuid="b1b19b74-efb8-4594-a289-67768381a861" wire="-1" />
  217. </connections>
  218. <subelements>
  219. <element content="Z 0" subtype="embedded" type="operand" uuid="8576138b-93e7-4a8c-a82a-5f6937efac95" x="0" y="0" />
  220. </subelements>
  221. </element>
  222. <element subtype="eq-int" type="compare" uuid="fceb6aea-a3c5-43fc-b53d-14a940d53ae1" x="2" y="23">
  223. <connections>
  224. <connection dir_in="1" dir_out="0" pos="0" text="EN" uuid="4e2fc543-f409-4506-8b04-270b1ccb386c" wire="-1" />
  225. <connection dir_in="1" dir_out="0" pos="1" text="IN0" uuid="71d66e5b-86f5-4e5e-8d36-b51ebec990b3" wire="4" />
  226. <connection dir_in="1" dir_out="0" pos="2" text="IN1" uuid="08ff9443-5d93-4c28-a77e-c38d9b2c7427" wire="5" />
  227. <connection dir_in="0" dir_out="1" pos="0" text="OUT0" uuid="96a1ee16-dca1-4576-8a38-6dd2e2c82cb9" wire="19" />
  228. <connection dir_in="0" dir_out="1" pos="1" text="ENO" uuid="989945b1-a85f-4516-b4c9-bfa365268b9c" wire="-1" />
  229. </connections>
  230. </element>
  231. <element content="Z 0" subtype="load" type="operand" uuid="1ff00434-191e-4b63-8a9f-2f38d7b43be2" x="1" y="24">
  232. <connections>
  233. <connection dir_in="0" dir_out="1" pos="0" uuid="bfd0d4cf-eda4-471a-beb5-10b241b5d5ea" wire="4" />
  234. </connections>
  235. </element>
  236. <element content="17" subtype="load" type="operand" uuid="22cbddf5-44bf-4c98-848e-bccc3027f549" x="1" y="25">
  237. <connections>
  238. <connection dir_in="0" dir_out="1" pos="0" uuid="1df3e3d4-0f86-424f-897c-e218e5060c44" wire="5" />
  239. </connections>
  240. </element>
  241. <element subtype="or" type="boolean" uuid="83b9a38a-7131-4075-8e9a-fb84f452396b" x="5" y="39">
  242. <connections>
  243. <connection dir_in="1" dir_out="0" pos="0" uuid="ecba13fe-0f98-4abb-9cfd-9343d8183999" wire="7" />
  244. <connection dir_in="1" dir_out="0" pos="1" uuid="fbfc60cd-646a-4c4f-b40c-4b944c2baed8" wire="6" />
  245. <connection dir_in="0" dir_out="1" pos="0" text="Q" uuid="f8c42ad9-d60c-4ae1-a7a0-29a6e49405ed" wire="24" />
  246. </connections>
  247. </element>
  248. <element content='"E_simple_mode"' subtype="load" type="operand" uuid="e2812ea0-34df-4cd5-a82d-812618caa44c" x="3" y="37">
  249. <connections>
  250. <connection dir_in="0" dir_out="1" pos="0" uuid="6b406f71-8d4a-4242-8e54-0429b5bb4af0" wire="7" />
  251. </connections>
  252. </element>
  253. <element subtype="eq-int" type="compare" uuid="7d77c21c-c195-41fd-a0b7-a3945fe4b96a" x="2" y="32">
  254. <connections>
  255. <connection dir_in="1" dir_out="0" pos="0" text="EN" uuid="25bd3b64-2cbc-48a7-b0f7-8c1d4bea2189" wire="-1" />
  256. <connection dir_in="1" dir_out="0" pos="1" text="IN0" uuid="2d8a40ba-41b1-4caf-b33f-95023cb21946" wire="8" />
  257. <connection dir_in="1" dir_out="0" pos="2" text="IN1" uuid="d02316a4-cced-48d5-b796-920cc283ad59" wire="9" />
  258. <connection dir_in="0" dir_out="1" pos="0" text="OUT0" uuid="de589487-262d-46b9-a82a-499699054ec0" wire="16" />
  259. <connection dir_in="0" dir_out="1" pos="1" text="ENO" uuid="ffff1862-c26c-4bf5-8684-6d5d3f9b0ca7" wire="-1" />
  260. </connections>
  261. </element>
  262. <element content="Z 0" subtype="load" type="operand" uuid="078095a9-47cc-4feb-8eef-c04b63b337f9" x="1" y="33">
  263. <connections>
  264. <connection dir_in="0" dir_out="1" pos="0" uuid="6a114d3b-1a18-4f68-9d1f-307dc89e6acc" wire="8" />
  265. </connections>
  266. </element>
  267. <element content="16" subtype="load" type="operand" uuid="06bf160f-e686-44a4-b999-827ca66d3126" x="1" y="34">
  268. <connections>
  269. <connection dir_in="0" dir_out="1" pos="0" uuid="faeea0d0-86a7-472a-b2c6-2b5f2451b328" wire="9" />
  270. </connections>
  271. </element>
  272. <element type="move" uuid="5e8140f1-88c8-4b19-9f7c-9111cbadb3f8" x="7" y="32">
  273. <connections>
  274. <connection dir_in="1" dir_out="0" pos="0" text="EN" uuid="9d7c66f1-8384-4904-b02a-3b16d5c57dd3" wire="18" />
  275. <connection dir_in="1" dir_out="0" pos="1" text="IN" uuid="6b335f78-9306-47b1-bd62-fe6146d77c60" wire="10" />
  276. <connection dir_in="0" dir_out="1" pos="0" text="OUT0" uuid="6fb19131-81f9-4699-87e0-9048de00c32f" wire="11" />
  277. <connection dir_in="0" dir_out="1" pos="1" text="ENO" uuid="4107d1da-05c5-4a9a-a9e4-f0b7c744df17" wire="-1" />
  278. </connections>
  279. </element>
  280. <element content="B#16#55" subtype="load" type="operand" uuid="62085205-52b5-4a39-9c09-4a958156d383" x="6" y="34">
  281. <connections>
  282. <connection dir_in="0" dir_out="1" pos="0" uuid="149e95d3-08e5-4162-ab65-70d18a55ace1" wire="10" />
  283. </connections>
  284. </element>
  285. <element content='"AB_raspi_GPIO"' subtype="assign" type="operand" uuid="62e81189-1bc0-40f3-b8ea-26bf115c0309" x="8" y="33">
  286. <connections>
  287. <connection dir_in="1" dir_out="0" pos="0" uuid="2e67f82a-ae8a-4acc-b79a-bcb865ebf3f2" wire="11" />
  288. </connections>
  289. </element>
  290. <element type="move" uuid="89d6e171-7a22-4b54-8dbc-b751bd4b7c4b" x="7" y="23">
  291. <connections>
  292. <connection dir_in="1" dir_out="0" pos="0" text="EN" uuid="70e128b4-3e50-4343-a2c7-f014aa87c130" wire="20" />
  293. <connection dir_in="1" dir_out="0" pos="1" text="IN" uuid="5a9e34b7-937d-4f8e-9351-e9e22065f49f" wire="12" />
  294. <connection dir_in="0" dir_out="1" pos="0" text="OUT0" uuid="23be8f92-bb6f-4c82-abe5-8d7b27fc8aa1" wire="13" />
  295. <connection dir_in="0" dir_out="1" pos="1" text="ENO" uuid="deafab0a-6b09-4251-90b0-7a8429957f0e" wire="-1" />
  296. </connections>
  297. </element>
  298. <element content="B#16#AA" subtype="load" type="operand" uuid="4a823847-2a15-4271-8154-385b720dc9b4" x="6" y="25">
  299. <connections>
  300. <connection dir_in="0" dir_out="1" pos="0" uuid="dcbce199-ae8b-46e1-b3ea-1dce969c0332" wire="12" />
  301. </connections>
  302. </element>
  303. <element content='"AB_raspi_GPIO"' subtype="assign" type="operand" uuid="e0e9a9f5-e566-477b-99ee-8d5fc58f814a" x="8" y="24">
  304. <connections>
  305. <connection dir_in="1" dir_out="0" pos="0" uuid="04715f1f-bee5-462e-b886-d0f3be433b1b" wire="13" />
  306. </connections>
  307. </element>
  308. <element subtype="or" type="boolean" uuid="ed867334-6964-4564-adc9-853eac31900a" x="4" y="32">
  309. <connections>
  310. <connection dir_in="1" dir_out="0" pos="0" uuid="624d15fd-037f-4f7f-9731-487c98d2fccf" wire="17" />
  311. <connection dir_in="1" dir_out="0" pos="1" uuid="4333f1ba-a02b-40f8-95ba-4a07f7aa22c2" wire="16" />
  312. <connection dir_in="0" dir_out="1" pos="0" text="Q" uuid="53c35105-0c43-4ece-9dad-2c6af745d76f" wire="18" />
  313. </connections>
  314. </element>
  315. <element subtype="eq-int" type="compare" uuid="85955975-3428-4eb0-b227-ccf3d8a33600" x="2" y="28">
  316. <connections>
  317. <connection dir_in="1" dir_out="0" pos="0" text="EN" uuid="ed5911d1-896e-4079-ba5c-9d27b16c2e02" wire="-1" />
  318. <connection dir_in="1" dir_out="0" pos="1" text="IN0" uuid="58d49fe7-cd12-4d9e-b157-bcdde20e7189" wire="14" />
  319. <connection dir_in="1" dir_out="0" pos="2" text="IN1" uuid="4ead19c6-cea8-4bc5-a1b0-37e89e9cf08d" wire="15" />
  320. <connection dir_in="0" dir_out="1" pos="0" text="OUT0" uuid="406e2fa4-b657-43cb-9705-0bd7baa27ecd" wire="17" />
  321. <connection dir_in="0" dir_out="1" pos="1" text="ENO" uuid="ed2bf5a9-ce19-47f7-8d76-8151fa46e167" wire="-1" />
  322. </connections>
  323. </element>
  324. <element content="Z 0" subtype="load" type="operand" uuid="ccf29c34-8e96-4730-8cde-1d9cb697b14d" x="1" y="29">
  325. <connections>
  326. <connection dir_in="0" dir_out="1" pos="0" uuid="faa1e454-6b2a-4306-b407-f25c19dd74df" wire="14" />
  327. </connections>
  328. </element>
  329. <element content="18" subtype="load" type="operand" uuid="30388b6d-dc1d-413a-8a23-86b450eeef43" x="1" y="30">
  330. <connections>
  331. <connection dir_in="0" dir_out="1" pos="0" uuid="d152f5a7-c44f-46d0-ae41-4a85b694fdee" wire="15" />
  332. </connections>
  333. </element>
  334. <element subtype="or" type="boolean" uuid="eee87d65-8cc2-41a0-8b3b-d667c8d2a753" x="4" y="23">
  335. <connections>
  336. <connection dir_in="1" dir_out="0" pos="0" uuid="0e157776-cb9a-4934-928c-a596cc2a057b" wire="23" />
  337. <connection dir_in="1" dir_out="0" pos="1" uuid="2f8dda28-429a-4342-b071-696a16103c3b" wire="19" />
  338. <connection dir_in="0" dir_out="1" pos="0" text="Q" uuid="6f5bb152-8080-4388-9c75-6324832232a2" wire="20" />
  339. </connections>
  340. </element>
  341. <element subtype="eq-int" type="compare" uuid="e2191492-7bf3-498c-808c-4b0fb8b45ec9" x="2" y="19">
  342. <connections>
  343. <connection dir_in="1" dir_out="0" pos="0" text="EN" uuid="2cfc82ae-499b-4d8c-aa89-aaf347ed7969" wire="-1" />
  344. <connection dir_in="1" dir_out="0" pos="1" text="IN0" uuid="b45aa338-3dfa-4b88-9974-45cbabfb1657" wire="21" />
  345. <connection dir_in="1" dir_out="0" pos="2" text="IN1" uuid="f1080008-a07d-4d33-8a37-da5b874106cc" wire="22" />
  346. <connection dir_in="0" dir_out="1" pos="0" text="OUT0" uuid="9bf72cc7-efd0-4d31-b93c-ae3eb4585b51" wire="23" />
  347. <connection dir_in="0" dir_out="1" pos="1" text="ENO" uuid="f49baef3-627d-4300-81b3-647fe702f312" wire="-1" />
  348. </connections>
  349. </element>
  350. <element content="Z 0" subtype="load" type="operand" uuid="cc1cf043-0a45-43b0-a6c1-5e69dde64533" x="1" y="20">
  351. <connections>
  352. <connection dir_in="0" dir_out="1" pos="0" uuid="1c24dd3d-7041-4757-81ff-71811a1f7e68" wire="21" />
  353. </connections>
  354. </element>
  355. <element content="19" subtype="load" type="operand" uuid="5a8f0517-1f0c-4ecf-922a-487c546a7a7c" x="1" y="21">
  356. <connections>
  357. <connection dir_in="0" dir_out="1" pos="0" uuid="11bf87a2-b8bf-4a80-b65e-f37c10bc6908" wire="22" />
  358. </connections>
  359. </element>
  360. <element content="#lc_active" subtype="assign" type="operand" uuid="5d38c9a7-966d-4227-b101-cc2b09d05d9c" x="7" y="40">
  361. <connections>
  362. <connection dir_in="1" dir_out="0" pos="0" uuid="473372fb-2a79-4eba-9696-4ad3fe6eea7b" wire="24" />
  363. </connections>
  364. </element>
  365. <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="44" />
  366. <element content="24" subtype="load" type="operand" uuid="d8599d95-448b-4283-89ef-de72caf5786f" x="1" y="50">
  367. <connections>
  368. <connection dir_in="0" dir_out="1" pos="0" uuid="24a394d2-88b6-4b5f-b400-6f88592d4baf" wire="27" />
  369. </connections>
  370. </element>
  371. <element content="#lc_active" subtype="load" type="operand" uuid="1f5cae6f-8c94-42a5-bf14-c04f49fca58c" x="1" y="49">
  372. <connections>
  373. <connection dir_in="0" dir_out="1" pos="0" uuid="860fe2fc-0d81-44ae-a2ec-8319403ada4b" wire="28" />
  374. </connections>
  375. </element>
  376. <element subtype="srd" type="shift" uuid="8b3ed70a-554a-4e03-8e6e-0110eb4f9c39" x="2" y="49">
  377. <connections>
  378. <connection dir_in="1" dir_out="0" pos="0" text="EN" uuid="d93f6d6f-0f0c-45c9-b5c4-f745195bb595" wire="28" />
  379. <connection dir_in="1" dir_out="0" pos="1" text="N" uuid="256a0b01-30a5-41db-8377-4eabf98a95cd" wire="27" />
  380. <connection dir_in="1" dir_out="0" pos="2" text="IN" uuid="e76edb00-40d3-4b58-86d9-b1b016061273" wire="25" />
  381. <connection dir_in="0" dir_out="1" pos="0" text="OUT0" uuid="fd321600-f0f5-4051-98ba-388778923c6f" wire="26" />
  382. <connection dir_in="0" dir_out="1" pos="1" text="ENO" uuid="f5b6eb39-7d30-4a9a-9076-a5a072898e07" wire="-1" />
  383. </connections>
  384. </element>
  385. <element subtype="and" type="boolean" uuid="b8c38391-aa17-4436-8f8d-68c68824dab1" x="3" y="6">
  386. <connections>
  387. <connection dir_in="1" dir_out="0" inverted="1" pos="0" uuid="7bda20b3-d564-4468-868f-7d1d15825b0d" wire="34" />
  388. <connection dir_in="0" dir_out="1" pos="0" text="Q" uuid="b49fd501-f574-4e84-958a-4a769599464a" wire="29" />
  389. </connections>
  390. </element>
  391. <element content="#timer_state" subtype="assign" type="operand" uuid="25b52182-5667-4359-9430-6bc914a47df4" x="4" y="6">
  392. <connections>
  393. <connection dir_in="1" dir_out="0" pos="0" uuid="5c2be997-ecf3-4b1f-ab50-4660499214a3" wire="29" />
  394. </connections>
  395. </element>
  396. <element content="#timer_state" subtype="load" type="operand" uuid="1c9b7fdc-1c45-4825-9591-140a331962d2" x="3" y="12">
  397. <connections>
  398. <connection dir_in="0" dir_out="1" pos="0" uuid="34bb6b24-85ec-423c-ba43-7237d62d83b6" wire="30" />
  399. </connections>
  400. </element>
  401. <element subtype="cu" type="counter" uuid="8abc1934-1bb4-4c8d-8187-b660e4db3ded" x="4" y="9">
  402. <connections>
  403. <connection dir_in="1" dir_out="0" pos="0" text="EN" uuid="18c9d429-f481-4e3d-ba22-4ff4bd5390a7" wire="-1" />
  404. <connection dir_in="1" dir_out="0" pos="1" text="CU" uuid="ab4c6981-36c8-490c-8dec-ae83dc436538" wire="30" />
  405. <connection dir_in="1" dir_out="0" pos="2" text="S" uuid="3e59f183-9ffb-4d00-a32b-ceb18bd9d305" wire="-1" />
  406. <connection dir_in="1" dir_out="0" pos="3" text="PV" uuid="4b8441bc-f7ee-403a-b91d-369995499927" wire="-1" />
  407. <connection dir_in="1" dir_out="0" pos="4" text="R" uuid="3e59bdb6-d109-436e-98d3-3a408c2140c7" wire="31" />
  408. <connection dir_in="0" dir_out="1" pos="0" text="CV" uuid="bc4ae6d3-5ae2-4da0-bd9b-bcd06a229130" wire="-1" />
  409. <connection dir_in="0" dir_out="1" pos="1" text="CVB" uuid="944dde70-0dce-467d-9b3f-57e5e2432771" wire="-1" />
  410. <connection dir_in="0" dir_out="1" pos="2" text="Q" uuid="2c8a3ec5-6e29-4841-8454-207e4c2309d7" wire="-1" />
  411. <connection dir_in="0" dir_out="1" pos="3" text="ENO" uuid="cd8c4400-e022-466c-8865-e778d1285c3f" wire="-1" />
  412. </connections>
  413. <subelements>
  414. <element content="Z 0" subtype="embedded" type="operand" uuid="533e433b-f586-4af4-9532-ecc97b4b684d" x="0" y="0" />
  415. </subelements>
  416. </element>
  417. <element subtype="sv" type="timer" uuid="783a2f61-7ca2-4a52-b265-623dca8f5fe1" x="2" y="2">
  418. <connections>
  419. <connection dir_in="1" dir_out="0" pos="0" text="EN" uuid="945d6ac2-b1fb-435e-9efe-164d726b1cd0" wire="-1" />
  420. <connection dir_in="1" dir_out="0" pos="1" text="S" uuid="15ae73cc-59af-44a4-bd8a-be193168db4e" wire="32" />
  421. <connection dir_in="1" dir_out="0" pos="2" text="TV" uuid="4b5b6b31-15a7-4d05-bc8c-192e06c2134a" wire="33" />
  422. <connection dir_in="1" dir_out="0" pos="3" text="R" uuid="5ddf3173-dc20-47d7-aa63-a3f81315a8f5" wire="-1" />
  423. <connection dir_in="0" dir_out="1" pos="0" text="BIN" uuid="c89ed55b-a2d4-422c-8864-a25cb45b9ede" wire="-1" />
  424. <connection dir_in="0" dir_out="1" pos="1" text="BCD" uuid="46def617-7399-49c0-80b4-3d311ca094ae" wire="-1" />
  425. <connection dir_in="0" dir_out="1" pos="2" text="Q" uuid="a3a8f6e4-22dc-4e36-a9a2-d1089e9d8cf9" wire="34" />
  426. <connection dir_in="0" dir_out="1" pos="3" text="ENO" uuid="7905288e-b5a7-44cd-b531-38fb3fd8be14" wire="-1" />
  427. </connections>
  428. <subelements>
  429. <element content="T 0" subtype="embedded" type="operand" uuid="9b87005d-2c79-4071-9104-45a5fa73327c" x="0" y="0" />
  430. </subelements>
  431. </element>
  432. <element content="#timer_state" subtype="load" type="operand" uuid="2d6bf5af-416d-4f44-bd20-dead6a7cdaea" x="1" y="5">
  433. <connections>
  434. <connection dir_in="0" dir_out="1" pos="0" uuid="617a1282-06d8-4fa5-b1d1-4263ba3ad979" wire="32" />
  435. </connections>
  436. </element>
  437. <element content="S5T#500ms" subtype="load" type="operand" uuid="ee60f192-4575-42e4-b2fc-56d2681fe213" x="1" y="6">
  438. <connections>
  439. <connection dir_in="0" dir_out="1" pos="0" uuid="7114c7c5-c360-4de3-9c2c-c1a96f128f7a" wire="33" />
  440. </connections>
  441. </element>
  442. <element content="self-rearming timer" type="comment" uuid="7bb10f62-d562-46db-a30d-600b7eb19f8c" x="1" y="1" />
  443. <element content="state counter" type="comment" uuid="fa8fbeef-e4bc-459e-897b-ac39dd98c047" x="3" y="9" />
  444. </elements>
  445. </grid>
  446. </grids>
  447. </FUP>
  448. ]]></source>
  449. </language_fup>
  450. <!-- Symbol table configuration -->
  451. <symbols>
  452. <!-- symbol table source code -->
  453. <source enabled="1"
  454. name="Blocks"
  455. type="3"><![CDATA[
  456. 126,OB_CYCLE OB 1 OB 1
  457. 126,FB_main FB 1 FB 1
  458. 126,DB_main DB 1 FB 1
  459. 126,FC_lightchaser FC 1 FC 1
  460. ]]></source>
  461. <!-- symbol table source code -->
  462. <source enabled="1"
  463. name="Memory"
  464. type="3"><![CDATA[
  465. 126,MB_clockmem MB 16 BYTE
  466. 126,M_clockmem_0.1s M 16.0 BOOL
  467. 126,M_clockmem_0.2s M 16.1 BOOL
  468. 126,M_clockmem_0.4s M 16.2 BOOL
  469. 126,M_clockmem_0.5s M 16.3 BOOL
  470. 126,M_clockmem_0.8s M 16.4 BOOL
  471. 126,M_clockmem_1.0s M 16.5 BOOL
  472. 126,M_clockmem_1.6s M 16.6 BOOL
  473. 126,M_clockmem_2.0s M 16.7 BOOL
  474. ]]></source>
  475. <!-- symbol table source code -->
  476. <source enabled="1"
  477. name="Inputs"
  478. type="3"><![CDATA[
  479. 126,E_simple_mode E 0.0 BOOL
  480. ]]></source>
  481. <!-- symbol table source code -->
  482. <source enabled="1"
  483. name="Outputs"
  484. type="3"><![CDATA[
  485. 126,AB_raspi_GPIO AB 0 BYTE
  486. ]]></source>
  487. </symbols>
  488. <!-- Core server link configuration -->
  489. <core_link>
  490. <!-- Locally spawned core server -->
  491. <spawn_local enable="0"
  492. interpreters="$DEFAULT"
  493. port_range_begin="4183"
  494. port_range_end="8278" />
  495. <!-- Remote server connection -->
  496. <connect host="pilc"
  497. port="4151"
  498. timeout_ms="10000" />
  499. <!-- Transport tunnel -->
  500. <tunnel local_port="-1"
  501. type="1">
  502. <ssh executable="ssh"
  503. port="22"
  504. user="pi" />
  505. </tunnel>
  506. </core_link>
  507. <!-- Hardware modules configuration -->
  508. <hardware>
  509. <!-- Loaded hardware module -->
  510. <module name="rpigpio">
  511. <params>
  512. <param name="I0.0"
  513. value="BCM6" />
  514. <param name="I0.1"
  515. value="BCM13" />
  516. <param name="I0.2"
  517. value="BCM19" />
  518. <param name="I0.3"
  519. value="BCM26" />
  520. <param name="I0.4"
  521. value="BCM21" />
  522. <param name="I0.5"
  523. value="BCM20" />
  524. <param name="I0.6"
  525. value="BCM16" />
  526. <param name="I0.7"
  527. value="BCM12" />
  528. <param name="Q0.0"
  529. value="BCM4" />
  530. <param name="Q0.1"
  531. value="BCM17" />
  532. <param name="Q0.2"
  533. value="BCM27" />
  534. <param name="Q0.3"
  535. value="BCM22" />
  536. <param name="Q0.4"
  537. value="BCM10" />
  538. <param name="Q0.5"
  539. value="BCM9" />
  540. <param name="Q0.6"
  541. value="BCM11" />
  542. <param name="Q0.7"
  543. value="BCM5" />
  544. <param name="inputAddressBase"
  545. value="0" />
  546. <param name="outputAddressBase"
  547. value="0" />
  548. </params>
  549. </module>
  550. </hardware>
  551. <!-- Graphical user interface configuration -->
  552. <gui>
  553. <!-- AWL editor settings -->
  554. <editor autoindent="1"
  555. paste_autoindent="1"
  556. validation="1" />
  557. </gui>
  558. </awlsim_project>