taktgenerator.awlpro 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  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="2015-01-31 18:10:16.555914"
  4. date_modify="2018-07-08 18:00:14.732041"
  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="0"
  22. mnemonics="0"
  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="OB1"
  31. type="0"><![CDATA[
  32. ORGANIZATION_BLOCK OB 1
  33. VAR_TEMP
  34. OB1_EV_CLASS : BYTE; // Bits 0-3 = 1 (Coming event), Bits 4-7 = 1 (Event class 1)
  35. OB1_SCAN_1 : BYTE; // 1 (Cold restart scan 1 of OB 1), 3 (Scan 2-n of OB 1)
  36. OB1_PRIORITY : BYTE; // Priority of OB execution
  37. OB1_OB_NUMBR : BYTE; // 1 (Organization block 1, OB 1)
  38. OB1_RESERVED_1 : BYTE;
  39. OB1_RESERVED_2 : BYTE;
  40. OB1_PREV_CYCLE : INT; // Cycle time of previous OB 1 scan (milliseconds)
  41. OB1_MIN_CYCLE : INT; // Minimum cycle time of OB 1 (milliseconds)
  42. OB1_MAX_CYCLE : INT; // Maximum cycle time of OB 1 (milliseconds)
  43. OB1_DATE_TIME : DATE_AND_TIME; // Date and time OB 1 started
  44. END_VAR
  45. BEGIN
  46. CALL "taktgenerator_aufruf", DB 1
  47. END_ORGANIZATION_BLOCK
  48. ]]></source>
  49. <!-- AWL/STL source code -->
  50. <source enabled="1"
  51. name="Taktgenerator"
  52. type="0"><![CDATA[
  53. FUNCTION_BLOCK "flankenerkennung"
  54. TITLE =
  55. VERSION : 0.1
  56. VAR_INPUT
  57. signal : BOOL ;
  58. END_VAR
  59. VAR_OUTPUT
  60. pos_flanke : BOOL ;
  61. neg_flanke : BOOL ;
  62. END_VAR
  63. VAR
  64. fm_pos : BOOL ;
  65. fm_neg : BOOL ;
  66. END_VAR
  67. BEGIN
  68. NETWORK
  69. TITLE =Auswertung: Positive Flanke
  70. U #signal;
  71. FP #fm_pos;
  72. = #pos_flanke;
  73. NETWORK
  74. TITLE =Auswertung: Negative Flanke
  75. U #signal;
  76. FN #fm_neg;
  77. = #neg_flanke;
  78. END_FUNCTION_BLOCK
  79. FUNCTION_BLOCK "taktgenerator"
  80. TITLE =
  81. VERSION : 0.1
  82. VAR_INPUT
  83. T_PULS : TIMER ;
  84. T_PAUSE : TIMER ;
  85. W_PULS : S5TIME ;
  86. W_PAUSE : S5TIME ;
  87. END_VAR
  88. VAR_OUTPUT
  89. TAKT : BOOL ;
  90. IMP : BOOL ;
  91. IMN : BOOL ;
  92. END_VAR
  93. VAR
  94. flankenerkennung : "flankenerkennung";
  95. taktmerker : BOOL ;
  96. END_VAR
  97. BEGIN
  98. NETWORK
  99. TITLE =
  100. U( ;
  101. UN #taktmerker;
  102. L #W_PAUSE;
  103. SE #T_PAUSE;
  104. NOP 0;
  105. NOP 0;
  106. NOP 0;
  107. U #T_PAUSE;
  108. ) ;
  109. S #taktmerker;
  110. U( ;
  111. U #taktmerker;
  112. L #W_PULS;
  113. SE #T_PULS;
  114. NOP 0;
  115. NOP 0;
  116. NOP 0;
  117. U #T_PULS;
  118. ) ;
  119. R #taktmerker;
  120. U #taktmerker;
  121. = #TAKT;
  122. NETWORK
  123. TITLE =
  124. U #taktmerker;
  125. = L 0.0;
  126. BLD 103;
  127. CALL #flankenerkennung (
  128. signal := L 0.0,
  129. pos_flanke := #IMP,
  130. neg_flanke := #IMN);
  131. NOP 0;
  132. END_FUNCTION_BLOCK
  133. FUNCTION_BLOCK "taktgenerator_aufruf"
  134. TITLE =
  135. VERSION : 0.1
  136. VAR
  137. takt1 : "taktgenerator";
  138. takt2 : "taktgenerator";
  139. END_VAR
  140. BEGIN
  141. NETWORK
  142. TITLE =
  143. CALL #takt1 (
  144. T_PULS := T 1,
  145. T_PAUSE := T 2,
  146. W_PULS := S5T#2S,
  147. W_PAUSE := S5T#250MS,
  148. TAKT := A 0.0,
  149. IMP := A 0.1,
  150. IMN := A 0.2);
  151. NOP 0;
  152. NETWORK
  153. TITLE =
  154. U A 0.1;
  155. S A 0.4;
  156. U A 0.2;
  157. S A 0.5;
  158. NETWORK
  159. TITLE =
  160. CALL #takt2 (
  161. T_PULS := T 3,
  162. T_PAUSE := T 4,
  163. W_PULS := S5T#1S,
  164. W_PAUSE := S5T#3S,
  165. TAKT := A 1.0,
  166. IMP := A 1.1,
  167. IMN := A 1.2);
  168. NOP 0;
  169. NETWORK
  170. TITLE =
  171. U A 1.1;
  172. S A 1.4;
  173. U A 1.2;
  174. S A 1.5;
  175. END_FUNCTION_BLOCK
  176. ]]></source>
  177. <!-- AWL/STL source code -->
  178. <source enabled="1"
  179. name="DB"
  180. type="0"><![CDATA[
  181. DATA_BLOCK DB 1
  182. "taktgenerator_aufruf"
  183. BEGIN
  184. END_DATA_BLOCK
  185. ]]></source>
  186. </language_awl>
  187. <!-- Symbol table configuration -->
  188. <symbols>
  189. <!-- symbol table source code -->
  190. <source enabled="1"
  191. name="symbol table"
  192. type="3"><![CDATA[
  193. 126,array_db DB 60 DB 60
  194. 126,array_uebung FC 60 FC 60
  195. 126,BLKMOV SFC 20 SFC 20 Copy Variables
  196. 126,CREAT_DB SFC 22 SFC 22 Create Data Block
  197. 126,CTD SFB 1 SFB 1 Count Down
  198. 126,CTU SFB 0 SFB 0 Count Up
  199. 126,date_and_time_db DB 20 DB 20
  200. 126,date_and_time_uebung FC 8 FC 8
  201. 126,db_dynamisch FC 20 FC 20
  202. 126,db_zugriff FC 7 FC 7
  203. 126,dbtest_fb FB 40 FB 40
  204. 126,dbtest_fc FC 10 FC 10
  205. 126,DEL_DB SFC 23 SFC 23 Delete Data Block
  206. 126,DELETE FC 104 FC 104 Delete String
  207. 126,DT_DAY FC 107 FC 107 DT to DAY
  208. 126,flankenerkennung FB 20 FB 20
  209. 126,impulszaehler FB 30 FB 30
  210. 126,impulszaehler_aufruf FB 31 FB 31
  211. 126,laufbandsteuerung FC 3 FC 3
  212. 126,laufbandsteuerung_aufrufFC 4 FC 4
  213. 126,Motor UDT 99 UDT 99
  214. 126,multiinst_aufruf FB 100 FB 100
  215. 126,pufferspeicher FC 5 FC 5
  216. 126,pufferspeicher_aufruf FC 6 FC 6
  217. 126,READ_CLK SFC 1 SFC 1 Read System Clock
  218. 126,Rollfeld_Motor_aufruf FC 53 FC 53
  219. 126,Rollfeld_Motor_FC FC 52 FC 52
  220. 126,Rollfeld_Motoren DB 51 DB 51
  221. 126,SB_DT_DT FC 34 FC 34 Subtract DT - DT
  222. 126,stoeranzeige_fb FB 1 FB 1
  223. 126,stoeranzeige_fc FC 1 FC 1
  224. 126,string_db DB 50 DB 50
  225. 126,string_uebung FC 50 FC 50
  226. 126,taktgenerator FB 15 FB 15
  227. 126,taktgenerator_aufruf FB 16 FB 16
  228. 126,tauchbad FB 10 FB 10
  229. 126,tauchbad_aufruf FB 11 FB 11
  230. 126,TEST_DB SFC 24 SFC 24 Test Data Block
  231. 126,TON SFB 4 SFB 4 Generate an On Delay
  232. 126,TP SFB 3 SFB 3 Generate a Pulse
  233. 126,zaehler_fc FC 2 FC 2
  234. ]]></source>
  235. </symbols>
  236. <!-- Core server link configuration -->
  237. <core_link>
  238. <!-- Locally spawned core server -->
  239. <spawn_local enable="1"
  240. interpreters="$DEFAULT"
  241. port_range_begin="4183"
  242. port_range_end="8278" />
  243. <!-- Remote server connection -->
  244. <connect host="localhost"
  245. port="4151"
  246. timeout_ms="3000" />
  247. <!-- Transport tunnel -->
  248. <tunnel local_port="-1"
  249. type="0">
  250. <ssh executable="ssh"
  251. port="22"
  252. user="pi" />
  253. </tunnel>
  254. </core_link>
  255. <!-- Graphical user interface configuration -->
  256. <gui>
  257. <editor autoindent="1"
  258. paste_autoindent="1"
  259. validation="1" />
  260. </gui>
  261. </awlsim_project>