impulszaehler.awlpro 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  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-02-01 13:10:29.448326"
  4. date_modify="2018-07-08 18:00:12.603565"
  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 "Impulszaehler_aufruf", DB 1
  47. END_ORGANIZATION_BLOCK
  48. ]]></source>
  49. <!-- AWL/STL source code -->
  50. <source enabled="1"
  51. name="Impulszaehler"
  52. type="0"><![CDATA[
  53. FUNCTION_BLOCK "impulszaehler"
  54. TITLE =
  55. VERSION : 0.1
  56. VAR_INPUT
  57. Taste : BOOL ;
  58. Zeit_t1 : S5TIME ;
  59. Zeitglied_t1 : TIMER ;
  60. Zeit_t2 : S5TIME ;
  61. Zeitglied_T2 : TIMER ;
  62. Obere_Grenze : INT ;
  63. Schrittgroesse : INT ;
  64. END_VAR
  65. VAR_OUTPUT
  66. Impuls : BOOL ;
  67. END_VAR
  68. VAR_IN_OUT
  69. Sollwert : INT ;
  70. END_VAR
  71. VAR
  72. Taste_Flankenmerker : BOOL ;
  73. Zeit_t1_Flankenmerker : BOOL ;
  74. Zeit_t1_Zustand : BOOL ;
  75. END_VAR
  76. VAR_TEMP
  77. Impuls_temp : BOOL ;
  78. Neuer_Sollwert : INT ;
  79. END_VAR
  80. BEGIN
  81. NETWORK
  82. TITLE =
  83. U( ;
  84. U #Taste;
  85. L #Zeit_t2;
  86. SE #Zeitglied_T2;
  87. NOP 0;
  88. NOP 0;
  89. NOP 0;
  90. U #Zeitglied_T2;
  91. ) ;
  92. UN #Zeit_t1_Zustand;
  93. L #Zeit_t1;
  94. SV #Zeitglied_t1;
  95. UN #Taste;
  96. R #Zeitglied_t1;
  97. NOP 0;
  98. NOP 0;
  99. U #Zeitglied_t1;
  100. = #Zeit_t1_Zustand;
  101. NETWORK
  102. TITLE =
  103. U #Taste;
  104. FP #Taste_Flankenmerker;
  105. O( ;
  106. U #Zeit_t1_Zustand;
  107. FP #Zeit_t1_Flankenmerker;
  108. ) ;
  109. = #Impuls;
  110. = #Impuls_temp;
  111. NETWORK
  112. TITLE =
  113. L #Sollwert;
  114. L #Schrittgroesse;
  115. +I ;
  116. T #Neuer_Sollwert;
  117. NOP 0;
  118. NETWORK
  119. TITLE =
  120. U( ;
  121. L #Neuer_Sollwert;
  122. L #Obere_Grenze;
  123. >I ;
  124. ) ;
  125. SPBNB _001;
  126. L #Obere_Grenze;
  127. T #Neuer_Sollwert;
  128. _001: NOP 0;
  129. NETWORK
  130. TITLE =
  131. U #Impuls_temp;
  132. SPBNB _002;
  133. L #Neuer_Sollwert;
  134. T #Sollwert;
  135. _002: NOP 0;
  136. END_FUNCTION_BLOCK
  137. FUNCTION_BLOCK "impulszaehler_aufruf"
  138. TITLE =
  139. VERSION : 0.1
  140. VAR
  141. impulszaehler_1 : "impulszaehler";
  142. impulszaehler_2 : "impulszaehler";
  143. Sollwert_1 : INT ;
  144. Sollwert_2 : INT ;
  145. END_VAR
  146. BEGIN
  147. NETWORK
  148. TITLE =
  149. U E 0.0;
  150. = L 0.0;
  151. BLD 103;
  152. CALL #impulszaehler_1 (
  153. Taste := L 0.0,
  154. Zeit_t1 := S5T#1S,
  155. Zeitglied_t1 := T 1,
  156. Zeit_t2 := S5T#500MS,
  157. Zeitglied_T2 := T 2,
  158. Obere_Grenze := 2000,
  159. Schrittgroesse := 10,
  160. Impuls := M 10.0,
  161. Sollwert := #Sollwert_1);
  162. NOP 0;
  163. NETWORK
  164. TITLE =
  165. X M 11.0;
  166. X M 10.0;
  167. = M 11.0;
  168. NETWORK
  169. TITLE =
  170. U E 0.4;
  171. SPBNB _001;
  172. L 0;
  173. T #Sollwert_1;
  174. _001: NOP 0;
  175. NETWORK
  176. TITLE =
  177. U E 0.1;
  178. = L 0.0;
  179. BLD 103;
  180. CALL #impulszaehler_2 (
  181. Taste := L 0.0,
  182. Zeit_t1 := S5T#2S,
  183. Zeitglied_t1 := T 3,
  184. Zeit_t2 := S5T#1S,
  185. Zeitglied_T2 := T 4,
  186. Obere_Grenze := 3000,
  187. Schrittgroesse := 25,
  188. Impuls := M 10.1,
  189. Sollwert := #Sollwert_2);
  190. NOP 0;
  191. NETWORK
  192. TITLE =
  193. X M 11.1;
  194. X M 10.1;
  195. = M 11.1;
  196. NETWORK
  197. TITLE =
  198. U E 0.5;
  199. SPBNB _002;
  200. L 0;
  201. T #Sollwert_2;
  202. _002: NOP 0;
  203. END_FUNCTION_BLOCK
  204. ]]></source>
  205. <!-- AWL/STL source code -->
  206. <source enabled="1"
  207. name="DB"
  208. type="0"><![CDATA[
  209. DATA_BLOCK DB 1
  210. "Impulszaehler_aufruf"
  211. BEGIN
  212. END_DATA_BLOCK
  213. ]]></source>
  214. </language_awl>
  215. <!-- Symbol table configuration -->
  216. <symbols>
  217. <!-- symbol table source code -->
  218. <source enabled="1"
  219. name="Symbol table"
  220. type="3"><![CDATA[
  221. 126,array_db DB 60 DB 60
  222. 126,array_uebung FC 60 FC 60
  223. 126,BLKMOV SFC 20 SFC 20 Copy Variables
  224. 126,CREAT_DB SFC 22 SFC 22 Create Data Block
  225. 126,CTD SFB 1 SFB 1 Count Down
  226. 126,CTU SFB 0 SFB 0 Count Up
  227. 126,date_and_time_db DB 20 DB 20
  228. 126,date_and_time_uebung FC 8 FC 8
  229. 126,db_dynamisch FC 20 FC 20
  230. 126,db_zugriff FC 7 FC 7
  231. 126,dbtest_fb FB 40 FB 40
  232. 126,dbtest_fc FC 10 FC 10
  233. 126,DEL_DB SFC 23 SFC 23 Delete Data Block
  234. 126,DELETE FC 104 FC 104 Delete String
  235. 126,DT_DAY FC 107 FC 107 DT to DAY
  236. 126,flankenerkennung FB 20 FB 20
  237. 126,impulszaehler FB 30 FB 30
  238. 126,impulszaehler_aufruf FB 31 FB 31
  239. 126,laufbandsteuerung FC 3 FC 3
  240. 126,laufbandsteuerung_aufrufFC 4 FC 4
  241. 126,Motor UDT 99 UDT 99
  242. 126,multiinst_aufruf FB 100 FB 100
  243. 126,pufferspeicher FC 5 FC 5
  244. 126,pufferspeicher_aufruf FC 6 FC 6
  245. 126,READ_CLK SFC 1 SFC 1 Read System Clock
  246. 126,Rollfeld_Motor_aufruf FC 53 FC 53
  247. 126,Rollfeld_Motor_FC FC 52 FC 52
  248. 126,Rollfeld_Motoren DB 51 DB 51
  249. 126,SB_DT_DT FC 34 FC 34 Subtract DT - DT
  250. 126,stoeranzeige_fb FB 1 FB 1
  251. 126,stoeranzeige_fc FC 1 FC 1
  252. 126,string_db DB 50 DB 50
  253. 126,string_uebung FC 50 FC 50
  254. 126,taktgenerator FB 15 FB 15
  255. 126,taktgenerator_aufruf FB 16 FB 16
  256. 126,tauchbad FB 10 FB 10
  257. 126,tauchbad_aufruf FB 11 FB 11
  258. 126,TEST_DB SFC 24 SFC 24 Test Data Block
  259. 126,TON SFB 4 SFB 4 Generate an On Delay
  260. 126,TP SFB 3 SFB 3 Generate a Pulse
  261. 126,zaehler_fc FC 2 FC 2
  262. ]]></source>
  263. </symbols>
  264. <!-- Core server link configuration -->
  265. <core_link>
  266. <!-- Locally spawned core server -->
  267. <spawn_local enable="1"
  268. interpreters="$DEFAULT"
  269. port_range_begin="4183"
  270. port_range_end="8278" />
  271. <!-- Remote server connection -->
  272. <connect host="localhost"
  273. port="4151"
  274. timeout_ms="3000" />
  275. <!-- Transport tunnel -->
  276. <tunnel local_port="-1"
  277. type="0">
  278. <ssh executable="ssh"
  279. port="22"
  280. user="pi" />
  281. </tunnel>
  282. </core_link>
  283. <!-- Graphical user interface configuration -->
  284. <gui>
  285. <editor autoindent="1"
  286. paste_autoindent="1"
  287. validation="1" />
  288. </gui>
  289. </awlsim_project>