Advertisement
Napfsuelze1984

reactor_test

Oct 28th, 2015
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. local reactor
  2. reactor = peripheral.wrap("back")
  3.  
  4. Grundstellung = 100 -- Rod-Anfangseinstellung
  5.  
  6. -- Grundeinstellung zum Programmstart
  7. reactor.setControlRodLevel(0, Grundstellung) -- 1
  8. Rod0 = reactor.getControlRodName(0)
  9. reactor.setControlRodLevel(1, Grundstellung) -- 2
  10. Rod1 = reactor.getControlRodName(1)
  11. reactor.setControlRodLevel(2, Grundstellung) -- 3
  12. Rod2 = reactor.getControlRodName(2)
  13. reactor.setControlRodLevel(3, Grundstellung) -- 4
  14. Rod3 = reactor.getControlRodName(3)
  15. reactor.setControlRodLevel(4, Grundstellung) -- 5
  16. Rod4 = reactor.getControlRodName(4)
  17.  
  18.  
  19. -- LaufzeitScheife
  20.  
  21. while true do
  22.  
  23. term.clear()
  24. term.setCursorPos(0, 0)
  25. print("")
  26.  
  27. if Mitte ~= 0 then
  28. reactor.setControlRodLevel(0, Grundstellung) -- 1
  29. Rod0 = reactor.getControlRodName(0)
  30. -- print(Rod0,"0 in Grundstellung")
  31. end
  32. if Mitte ~= 1 then
  33. reactor.setControlRodLevel(1, Grundstellung) -- 2
  34. Rod1 = reactor.getControlRodName(1)
  35. -- print(Rod0, "1 in Grundstellung")
  36. end
  37. if Mitte ~= 2 then
  38. reactor.setControlRodLevel(2, Grundstellung) -- 3
  39. Rod2 = reactor.getControlRodName(2)
  40. -- print(Rod2, "2 in Grundstellung")
  41. end
  42. if Mitte ~= 3 then
  43. reactor.setControlRodLevel(3, Grundstellung) -- 4
  44. Rod3 = reactor.getControlRodName(3)
  45. -- print(Rod3, "3 in Grundstellung")
  46. end
  47. if Mitte ~= 4 then
  48. reactor.setControlRodLevel(4, Grundstellung) -- 5
  49. Rod4 = reactor.getControlRodName(4)
  50. -- print(Rod4, "4 in Grundstellung")
  51. end
  52.  
  53. -- print("-----------------")
  54. -- print(reactor.getControlRodLevel(0))
  55. -- print(reactor.getControlRodLevel(1))
  56. -- print(reactor.getControlRodLevel(2))
  57. -- print(reactor.getControlRodLevel(3))
  58. -- print(reactor.getControlRodLevel(4))
  59.  
  60.  
  61. if Rod0 == "Pyra3Mitte" then print("Rod 0 ist Mitte", " Grundstellung = ", Grundstellung) Mitte = 0 sleep(1) end
  62. if Rod1 == "Pyra3Mitte" then print("Rod 1 ist Mitte", " Grundstellung = ", Grundstellung) Mitte = 1 sleep(1) end
  63. if Rod2 == "Pyra3Mitte" then print("Rod 2 ist Mitte", " Grundstellung = ", Grundstellung) Mitte = 2 sleep(1) end
  64. if Rod3 == "Pyra3Mitte" then print("Rod 3 ist Mitte", " Grundstellung = ", Grundstellung) Mitte = 3 sleep(1) end
  65. if Rod4 == "Pyra3Mitte" then print("Rod 4 ist Mitte", " Grundstellung = ", Grundstellung) Mitte = 4 sleep(1) end
  66. print("ExtremC.MAX= ", ExtremCounterMAX, " ExtremC.MIN= ", ExtremCounterMIN)
  67.  
  68. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement