raspberrypi-gpio.awlpro 28 KB

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