pixtend-peripheral-io.awlpro 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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="2018-02-19 20:48:29.703161"
  4. date_modify="2018-07-08 18:00:16.840889"
  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="-1"
  20. cycle_time_limit_us="1000000"
  21. ext_insns_enable="1"
  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="Main source"
  31. type="0"><![CDATA[
  32. FUNCTION FC 1 : VOID
  33. BEGIN
  34. // Set PWM0
  35. // The magic value is checked by the fake PiXtend-Spidev module
  36. L W#16#1337
  37. T PAW 42
  38. // Set PWM1
  39. // The magic value is checked by the fake PiXtend-Spidev module
  40. L W#16#4224
  41. T PAW 420
  42. // Check AI0
  43. // The fake PiXtend spidev module always reports 1 V
  44. L PEW 42
  45. L 2754
  46. __ASSERT== __ACCU 1, __ACCU 2
  47. // Check AI1
  48. // The fake PiXtend spidev module always reports 2 V
  49. L PEW 420
  50. L 5535
  51. __ASSERT== __ACCU 1, __ACCU 2
  52. END_FUNCTION
  53. ORGANIZATION_BLOCK OB 1
  54. BEGIN
  55. CALL FC 1
  56. // If we ran 5 test cycles then exit.
  57. L MW 100
  58. + 1
  59. T MW 100
  60. L 5
  61. <I
  62. BEB
  63. CALL SFC 46 // Exit test; Stop CPU.
  64. END_ORGANIZATION_BLOCK
  65. ORGANIZATION_BLOCK OB 100
  66. BEGIN
  67. L 0
  68. T MW 100
  69. CALL FC 1
  70. END_ORGANIZATION_BLOCK
  71. ]]></source>
  72. </language_awl>
  73. <!-- Symbol table configuration -->
  74. <symbols>
  75. <!-- symbol table source code -->
  76. <source enabled="1"
  77. name="Main table"
  78. type="3"><![CDATA[
  79. ]]></source>
  80. </symbols>
  81. <!-- Core server link configuration -->
  82. <core_link>
  83. <!-- Locally spawned core server -->
  84. <spawn_local enable="1"
  85. interpreters="$DEFAULT"
  86. port_range_begin="4183"
  87. port_range_end="8278" />
  88. <!-- Remote server connection -->
  89. <connect host="localhost"
  90. port="4151"
  91. timeout_ms="3000" />
  92. <!-- Transport tunnel -->
  93. <tunnel local_port="-1"
  94. type="0">
  95. <ssh executable="ssh"
  96. port="22"
  97. user="pi" />
  98. </tunnel>
  99. </core_link>
  100. <!-- Hardware modules configuration -->
  101. <hardware>
  102. <!-- Loaded hardware module -->
  103. <module name="pixtend">
  104. <params>
  105. <param name="analogIn0_10V"
  106. value="True" />
  107. <param name="analogIn0_addr"
  108. value="EW 42" />
  109. <param name="analogIn0_nos"
  110. value="10" />
  111. <param name="analogIn1_10V"
  112. value="True" />
  113. <param name="analogIn1_addr"
  114. value="EW 420" />
  115. <param name="analogIn1_nos"
  116. value="10" />
  117. <param name="analogIn2_addr" />
  118. <param name="analogIn2_nos"
  119. value="10" />
  120. <param name="analogIn3_addr" />
  121. <param name="analogIn3_nos"
  122. value="10" />
  123. <param name="analogIn_kHz"
  124. value="125" />
  125. <param name="analogOut0_addr" />
  126. <param name="analogOut1_addr" />
  127. <param name="digitalIn0_addr" />
  128. <param name="digitalIn1_addr" />
  129. <param name="digitalIn2_addr" />
  130. <param name="digitalIn3_addr" />
  131. <param name="digitalIn4_addr" />
  132. <param name="digitalIn5_addr" />
  133. <param name="digitalIn6_addr" />
  134. <param name="digitalIn7_addr" />
  135. <param name="digitalOut0_addr" />
  136. <param name="digitalOut1_addr" />
  137. <param name="digitalOut2_addr" />
  138. <param name="digitalOut3_addr" />
  139. <param name="digitalOut4_addr" />
  140. <param name="digitalOut5_addr" />
  141. <param name="enabled"
  142. value="True" />
  143. <param name="gpio0_addr" />
  144. <param name="gpio1_addr" />
  145. <param name="gpio2_addr" />
  146. <param name="gpio3_addr" />
  147. <param name="inputAddressBase"
  148. value="0" />
  149. <param name="outputAddressBase"
  150. value="0" />
  151. <param name="pollIntMs"
  152. value="25" />
  153. <param name="pwm0_addr"
  154. value="AW 42" />
  155. <param name="pwm1_addr"
  156. value="AW 420" />
  157. <param name="pwm_baseFreqHz"
  158. value="16000000" />
  159. <param name="pwm_period" />
  160. <param name="pwm_servoMode"
  161. value="False" />
  162. <param name="relay0_addr" />
  163. <param name="relay1_addr" />
  164. <param name="relay2_addr" />
  165. <param name="relay3_addr" />
  166. <param name="rs485"
  167. value="False" />
  168. <param name="testMode"
  169. value="False" />
  170. </params>
  171. </module>
  172. </hardware>
  173. <!-- Graphical user interface configuration -->
  174. <gui>
  175. <editor autoindent="1"
  176. paste_autoindent="1"
  177. validation="1" />
  178. </gui>
  179. </awlsim_project>