acme-000.awl 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  1. DATA_BLOCK DB 1
  2. TITLE =
  3. VERSION : 0.1
  4. STRUCT
  5. DB_VAR : INT := 20; //Temporary placeholder variable
  6. DB_VAR1_1 : INT := 11; //sf
  7. END_STRUCT ;
  8. BEGIN
  9. DB_VAR := 0;
  10. DB_VAR1_1 := 11;
  11. END_DATA_BLOCK
  12. DATA_BLOCK DB 2
  13. TITLE =
  14. VERSION : 0.1
  15. STRUCT
  16. DB_VAR : INT := 22; //Temporary placeholder variable
  17. DB_VAR1 : INT := 2; //Temporary placeholder variable1
  18. DB_VAR2 : INT := 11; //AWQ
  19. END_STRUCT ;
  20. BEGIN
  21. DB_VAR := 0;
  22. DB_VAR1 := 2;
  23. DB_VAR2 := 11;
  24. END_DATA_BLOCK
  25. FUNCTION FC 182 : VOID
  26. TITLE =P R O C E S S F A U L T
  27. AUTHOR : Xaadem
  28. FAMILY : MEASURE
  29. NAME : PROC_FLT
  30. VERSION : 0.1
  31. VAR_INPUT
  32. Alarm_Acknowledge : BOOL ; //Alarm Acknowledge
  33. INPUT : BOOL ; //High High limit exceeded
  34. ALARM : BOOL ; //Generate an alarm
  35. END_VAR
  36. VAR_OUTPUT
  37. ALARM_OUT : BOOL ; //High High Alarm
  38. LIMIT_OUT : BOOL ; //Limit reached
  39. HORN : BOOL ; //One shot (Pulse) for assign a fault horn
  40. LIMIT : INT ; //Visualisation
  41. END_VAR
  42. VAR_IN_OUT
  43. STATUS : WORD ; //Status flag for save the internal flags until next call
  44. END_VAR
  45. VAR_TEMP
  46. HORN_HH : BOOL ; //Internal flag horn pulse
  47. Spare01 : BOOL ; //Internal flag horn pulse
  48. Spare02 : BOOL ; //Internal flag horn pulse
  49. Spare03 : BOOL ; //Internal flag horn pulse
  50. Spare04 : BOOL ; //Internal flag horn pulse
  51. Spare05 : BOOL ; //Internal flag horn pulse
  52. Spare06 : BOOL ; //Internal flag horn pulse
  53. HORN_SPARE : BOOL ; //Internal flag horn pulse
  54. Spare_1_0 : BOOL ; //Spare
  55. Spare_1_1 : BOOL ; //Spare
  56. Spare_1_2 : BOOL ; //Spare
  57. Spare_1_3 : BOOL ; //Spare
  58. Spare_1_4 : BOOL ; //Spare
  59. Alarm_reset : BOOL ; //Alarm acknowledge
  60. Spare_1_6 : BOOL ; //Spare
  61. Spare_1_7 : BOOL ; //Spare
  62. Alarm_Not_Acknowl : BOOL ; //HH Alarm still not acknowledged
  63. Aux_Pulse_Alarm : BOOL ; //H Alarm still not acknowledged
  64. Aux_Pulse_Horn : BOOL ; //L Alarm still not acknowledged
  65. LL_Alarm_Not_Acknowl : BOOL ; //LL Alarm still not acknowledged
  66. LOOP_Alarm_Not_Acknowl : BOOL ; //LOOP Alarm still not acknowledged
  67. FAULT1_Alarm_Not_Acknowl : BOOL ; //Fault 1 Alarm still not acknowledged
  68. FAULT2_Alarm_Not_Acknowl : BOOL ; //Fault 2 Alarm still not acknowledged
  69. Spare_Alarm_Not_Acknowl : BOOL ; //Spare Alarm still not acknowledged
  70. HH_Static_Alarm : BOOL ; //HH Static Alarm
  71. H_Static_Alarm : BOOL ; //H Static Alarm
  72. L_Static_Alarm : BOOL ; //L Static Alarm
  73. LL_Static_Alarm : BOOL ; //LL Static Alarm
  74. LOOP_Static_Alarm : BOOL ; //LOOP Static Alarm
  75. FAULT1_Static_Alarm : BOOL ; //Fault 1 Static Alarm
  76. FAULT2_Static_Alarm : BOOL ; //Fault 2 Static Alarm
  77. Spare_Static_Alarm : BOOL ; //Spare Static Alarm
  78. Dummy : BOOL ;
  79. END_VAR
  80. BEGIN
  81. NETWORK
  82. TITLE =Alarm Reset
  83. A #Alarm_Acknowledge;
  84. = #Alarm_reset;
  85. NETWORK
  86. TITLE =restore status flags auxiliary for pulses
  87. L #STATUS;
  88. T LW 2;
  89. NOP 0;
  90. NETWORK
  91. TITLE =
  92. L 2;
  93. T #LIMIT;
  94. NOP 0;
  95. NETWORK
  96. TITLE =HH_ALARM: New alarm not acknowledged, Horn pulse
  97. A #Alarm_reset;
  98. R #Alarm_Not_Acknowl;
  99. A #INPUT;
  100. A #ALARM;
  101. FP #Aux_Pulse_Alarm;
  102. S #Alarm_Not_Acknowl;
  103. A #Alarm_Not_Acknowl;
  104. = L 5.0;
  105. A L 5.0;
  106. FP #Aux_Pulse_Horn;
  107. = #HORN;
  108. A L 5.0;
  109. JNB _001;
  110. L 4;
  111. T #LIMIT;
  112. _001: NOP 0;
  113. NETWORK
  114. TITLE =ALARM: Static fault acknowledged or not
  115. O #Alarm_Not_Acknowl;
  116. O ;
  117. A #INPUT;
  118. A #ALARM;
  119. = #ALARM_OUT;
  120. = #HH_Static_Alarm;
  121. NETWORK
  122. TITLE =Alarm acknowledged, but still existing
  123. AN #Alarm_Not_Acknowl;
  124. A #INPUT;
  125. JNB _002;
  126. L 5;
  127. T #LIMIT;
  128. _002: NOP 0;
  129. NETWORK
  130. TITLE =Limit reached, but no alarm
  131. A #INPUT;
  132. AN #ALARM;
  133. AN #Alarm_Not_Acknowl;
  134. JNB _003;
  135. L 3;
  136. T #LIMIT;
  137. _003: NOP 0;
  138. NETWORK
  139. TITLE =Limit reached
  140. A #INPUT;
  141. = #LIMIT_OUT;
  142. NETWORK
  143. TITLE =Store static fault flags status flags auxiliary for set pulses
  144. L LW 2;
  145. T #STATUS;
  146. NOP 0;
  147. END_FUNCTION
  148. FUNCTION FC 1 : VOID
  149. TITLE =GROUP 00: General Control
  150. AUTHOR : Xaadem
  151. FAMILY : GENERAL
  152. NAME : GENERAL
  153. VERSION : 0.0
  154. BEGIN
  155. NETWORK
  156. TITLE =
  157. //******************************************************************************
  158. // C O N S T A N T H I G H - S I G N A L
  159. //******************************************************************************
  160. O M 20.1;
  161. ON M 20.1;
  162. = M 20.1;
  163. NETWORK
  164. TITLE =
  165. //******************************************************************************
  166. // C O N S T A N T L O W - S I G N A L
  167. //******************************************************************************
  168. A M 20.0;
  169. AN M 20.0;
  170. = M 20.0;
  171. NETWORK
  172. TITLE =
  173. //*****************************************************************************
  174. // I N D I C A T I O N M A I N S W I T C H D R I V E S
  175. //*****************************************************************************
  176. O I 5.1;
  177. O I 1.3;
  178. = Q 4.6;
  179. NETWORK
  180. TITLE =
  181. //*****************************************************************************
  182. // C O N T A C T O R B Y P A S S E M E R G E N C Y E N D
  183. //*****************************************************************************
  184. A I 5.2;
  185. = Q 4.7;
  186. NETWORK
  187. TITLE =Control Desk +C010
  188. //*****************************************************************************
  189. // S E L E C T M A N U A L M O D E
  190. //*****************************************************************************
  191. A I 0.5;
  192. AN I 0.6;
  193. AN I 0.7;
  194. = M 29.0;
  195. A M 29.0;
  196. O I 1.3;
  197. = Q 0.4;
  198. NETWORK
  199. TITLE =Control Desk +C010
  200. //****************************************************************************
  201. //
  202. // S E L E C T A U T O M A T I C F R O M C O N T R O L D E S K
  203. //*****************************************************************************
  204. AN I 0.5;
  205. A I 0.6;
  206. AN I 0.7;
  207. = M 29.1;
  208. A M 29.1;
  209. O I 1.3;
  210. = Q 0.5;
  211. NETWORK
  212. TITLE =Control Desk +C010
  213. //****************************************************************************
  214. //
  215. // S E L E C T A U T O M A T I C F R O M C C R
  216. //*****************************************************************************
  217. AN I 0.5;
  218. AN I 0.6;
  219. A I 0.7;
  220. = M 29.2;
  221. A M 29.2;
  222. O I 1.3;
  223. = Q 0.6;
  224. NETWORK
  225. TITLE =Yard conveyor on
  226. //****************************************************************************
  227. // I N D I C A T I O N P A N E L
  228. //*****************************************************************************
  229. O I 4.2;
  230. O I 1.3;
  231. = Q 1.5;
  232. NETWORK
  233. TITLE =Yard conveyor bypass
  234. //****************************************************************************
  235. // I N D I C A T I O N P A N E L
  236. //*****************************************************************************
  237. O I 1.6;
  238. O I 1.3;
  239. = Q 1.6;
  240. NETWORK
  241. TITLE =
  242. //******************************************************************************
  243. // O V E R A L L R E S E T
  244. //******************************************************************************
  245. A( ;
  246. O M 20.5;
  247. O( ;
  248. A M 114.0;
  249. FP M 20.6;
  250. ) ;
  251. ) ;
  252. L S5T#10S;
  253. SF T 4;
  254. NOP 0;
  255. NOP 0;
  256. NOP 0;
  257. A T 4;
  258. = M 20.7;
  259. NETWORK
  260. TITLE =
  261. //******************************************************************************
  262. // C O U N T E R O P E R A T I N G H O U R S
  263. //******************************************************************************
  264. NETWORK
  265. TITLE =Control Desk +C010
  266. //==============================================================================
  267. // C O N T R O L V O L T A G E O N
  268. //==============================================================================
  269. O I 0.2;
  270. O I 1.3;
  271. = Q 4.3;
  272. NETWORK
  273. TITLE =
  274. //===============================================================================
  275. // E M E R G E N C Y - O F F
  276. //===============================================================================
  277. A I 0.3;
  278. = L 0.0;
  279. BLD 103;
  280. AN I 0.4;
  281. = L 0.1;
  282. BLD 103;
  283. A M 20.1;
  284. = L 0.2;
  285. BLD 103;
  286. CALL FC 182 (
  287. Alarm_Acknowledge := L 0.0,
  288. INPUT := L 0.1,
  289. ALARM := L 0.2,
  290. ALARM_OUT := M 114.0,
  291. LIMIT_OUT := M 114.1,
  292. HORN := M 114.2,
  293. LIMIT := DB1.DBW 2,
  294. STATUS := DB1.DBW 0);
  295. NOP 0;
  296. NETWORK
  297. TITLE =
  298. //******************************************************************************
  299. // M A I N S W I T C H M O T O R D R I V E S
  300. //******************************************************************************
  301. NETWORK
  302. TITLE =
  303. //******************************************************************************
  304. // F U N D A M E N T A L I N T E R L O C K F R O M C C R
  305. //******************************************************************************
  306. NETWORK
  307. TITLE =Indication at Control Desk +C010
  308. //===============================================================================
  309. // E M E R G E N C Y - O F F
  310. //===============================================================================
  311. O M 114.0;
  312. O I 1.3;
  313. = Q 0.2;
  314. NETWORK
  315. TITLE =Reset Emergency off relais
  316. //===============================================================================
  317. // E M E R G E N C Y - O F F
  318. //===============================================================================
  319. A I 0.3;
  320. = Q 0.3;
  321. NETWORK
  322. TITLE =
  323. //===============================================================================
  324. // F U S E F A U L T
  325. //===============================================================================
  326. NETWORK
  327. TITLE =
  328. //===============================================================================
  329. // M O T O R F A U L T ( F U S E T R I P P E D A T M C C)
  330. //===============================================================================
  331. NETWORK
  332. TITLE =Switch on the horn
  333. //===============================================================================
  334. //S U M M A R Y O F F A U L T P U L S E S T O A S S I G N T H E
  335. // H O R N
  336. //===============================================================================
  337. O M 114.2;
  338. O M 115.2;
  339. O M 101.2;
  340. O M 22.0;
  341. O M 206.2;
  342. O M 207.2;
  343. = M 23.7;
  344. NETWORK
  345. TITLE =Summary: Faults
  346. //===============================================================================
  347. // S U M M A R Y O F A L L F A U L T S
  348. //===============================================================================
  349. O M 114.0;
  350. O M 115.0;
  351. O M 101.0;
  352. O M 24.0;
  353. O M 206.0;
  354. O M 207.0;
  355. = L 0.0;
  356. O L 0.0;
  357. O I 1.3;
  358. = Q 1.0;
  359. A L 0.0;
  360. BLD 102;
  361. = Q 0.1;
  362. A L 0.0;
  363. BLD 102;
  364. = Q 3.4;
  365. NETWORK
  366. TITLE =Control Desk +C010
  367. //*****************************************************************************
  368. // H O R N A C K N O W L E D G E
  369. //*****************************************************************************
  370. A M 23.7;
  371. S Q 1.1;
  372. A( ;
  373. O I 1.5;
  374. O M 20.5;
  375. ) ;
  376. R Q 1.1;
  377. NOP 0;
  378. NETWORK
  379. TITLE =Alarm acknowledge
  380. //******************************************************************************
  381. // A L A R M A C K N O W L E D G E
  382. //******************************************************************************
  383. O M 20.7;
  384. O I 1.4;
  385. = M 21.0;
  386. NETWORK
  387. TITLE =Reset Frequency Converter from Panel
  388. //******************************************************************************
  389. // A L A R M A C K N O W L E D G E
  390. //******************************************************************************
  391. O M 48.0;
  392. O M 20.0;
  393. = L 0.0;
  394. AN L 0.0;
  395. A M 20.1;
  396. = Q 4.4;
  397. AN L 0.0;
  398. A M 20.1;
  399. = Q 4.5;
  400. NETWORK
  401. TITLE =Request start-up warning
  402. //******************************************************************************
  403. // S T A R T U P W A R N I N G
  404. //******************************************************************************
  405. A( ;
  406. A( ;
  407. A M 35.1;
  408. A M 35.0;
  409. A M 44.0;
  410. AN M 38.3;
  411. FP M 29.3;
  412. O( ;
  413. A I 1.2;
  414. FP M 28.0;
  415. ) ;
  416. ) ;
  417. S M 27.2;
  418. A( ;
  419. AN M 44.1;
  420. FP M 47.0;
  421. O T 3;
  422. O M 20.7;
  423. O( ;
  424. A M 38.3;
  425. FP M 38.7;
  426. ) ;
  427. O( ;
  428. A I 1.2;
  429. FP M 29.4;
  430. A Q 0.0;
  431. ) ;
  432. ) ;
  433. R M 27.2;
  434. A M 27.2;
  435. ) ;
  436. A M 10.7;
  437. = Q 0.0;
  438. NETWORK
  439. TITLE =Start-up pre-warning time
  440. //******************************************************************************
  441. // S T A R T U P W A R N I N G
  442. //******************************************************************************
  443. A M 27.2;
  444. L S5T#5S;
  445. SD T 2;
  446. NOP 0;
  447. NOP 0;
  448. NOP 0;
  449. A T 2;
  450. = M 27.3;
  451. NETWORK
  452. TITLE =Start-up time
  453. //******************************************************************************
  454. // S T A R T U P W A R N I N G
  455. //******************************************************************************
  456. A( ;
  457. A M 27.2;
  458. L S5T#5S;
  459. SD T 5;
  460. NOP 0;
  461. NOP 0;
  462. NOP 0;
  463. A T 5;
  464. ) ;
  465. L S5T#5S;
  466. SE T 3;
  467. NOP 0;
  468. NOP 0;
  469. NOP 0;
  470. NOP 0;
  471. NETWORK
  472. TITLE =Call FC 3
  473. //******************************************************************************
  474. // C A L L F U N C T I O N S
  475. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  476. NETWORK
  477. TITLE =Call FC 10
  478. //******************************************************************************
  479. // C A L L F U N C T I O N S
  480. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  481. END_FUNCTION
  482. ORGANIZATION_BLOCK OB 1
  483. TITLE = "Main Program Sweep (Cycle)"
  484. AUTHOR : Xaadem
  485. VERSION : 0.1
  486. VAR_TEMP
  487. OB1_EV_CLASS : BYTE ; //Bits 0-3 = 1 (Coming event), Bits 4-7 = 1 (Event class 1)
  488. OB1_SCAN_1 : BYTE ; //1 (Cold restart scan 1 of OB 1), 3 (Scan 2-n of OB 1)
  489. OB1_PRIORITY : BYTE ; //Priority of OB Execution
  490. OB1_OB_NUMBR : BYTE ; //1 (Organization block 1, OB1)
  491. OB1_RESERVED_1 : BYTE ; //Reserved for system
  492. OB1_RESERVED_2 : BYTE ; //Reserved for system
  493. OB1_PREV_CYCLE : INT ; //Cycle time of previous OB1 scan (milliseconds)
  494. OB1_MIN_CYCLE : INT ; //Minimum cycle time of OB1 (milliseconds)
  495. OB1_MAX_CYCLE : INT ; //Maximum cycle time of OB1 (milliseconds)
  496. OB1_DATE_TIME : DATE_AND_TIME ; //Date and time OB1 started
  497. END_VAR
  498. BEGIN
  499. NETWORK
  500. TITLE =
  501. UC FC 1;
  502. NETWORK
  503. TITLE =
  504. END_ORGANIZATION_BLOCK