binaeruntersetzer.awl 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. FUNCTION "Binäruntersetzer FC" : VOID
  2. TITLE =Binaeruntersetzer
  3. VERSION : 0.1
  4. BEGIN
  5. NETWORK
  6. TITLE =Merker 1
  7. U "b1";
  8. FP "b1_fm";
  9. = "b1_imp";
  10. NETWORK
  11. TITLE =Merker rueckwaerts
  12. U "A0";
  13. U "A1";
  14. U "A2";
  15. S "MRUECK";
  16. UN "A0";
  17. UN "A1";
  18. UN "A2";
  19. R "MRUECK";
  20. NOP 0;
  21. NETWORK
  22. TITLE =Merker Ausgang 0
  23. UN "MRUECK";
  24. U "b1_imp";
  25. UN "A0";
  26. UN "A1";
  27. UN "A2";
  28. S "temp_A0";
  29. U "MRUECK";
  30. U "b1_imp";
  31. U "A0";
  32. UN "A1";
  33. UN "A2";
  34. R "temp_A0";
  35. NOP 0;
  36. NETWORK
  37. TITLE =Merker Ausgang 1
  38. UN "MRUECK";
  39. U "b1_imp";
  40. U "A0";
  41. UN "A1";
  42. UN "A2";
  43. S "temp_A1";
  44. U "MRUECK";
  45. U "b1_imp";
  46. U "A0";
  47. U "A1";
  48. UN "A2";
  49. R "temp_A1";
  50. NOP 0;
  51. NETWORK
  52. TITLE =Merker Ausgang 2
  53. UN "MRUECK";
  54. U "b1_imp";
  55. U "A0";
  56. U "A1";
  57. UN "A2";
  58. S "temp_A2";
  59. U "MRUECK";
  60. U "b1_imp";
  61. U "A0";
  62. U "A1";
  63. U "A2";
  64. R "temp_A2";
  65. NOP 0;
  66. NETWORK
  67. TITLE =Ausgang 0
  68. U "temp_A0";
  69. = "A0";
  70. NETWORK
  71. TITLE =Ausgang 1
  72. U "temp_A1";
  73. = "A1";
  74. NETWORK
  75. TITLE =Ausgang 2
  76. U "temp_A2";
  77. = "A2";
  78. END_FUNCTION
  79. ORGANIZATION_BLOCK "CYCLE"
  80. BEGIN
  81. // Eingangssignal simulieren
  82. UN M 16.0
  83. L S5T#1S
  84. SE T 1
  85. U T 1
  86. = M 16.0
  87. X M 16.0
  88. X M 16.1
  89. = M 16.1
  90. = "b1"
  91. // Binaeruntersetzer aufrufen
  92. CALL FC 4
  93. END_ORGANIZATION_BLOCK