Superhaihi (talk | contribs) Replaced content with "This site has been hacked by Truong Quoc Huy" Tags: Replaced Reverted |
Hail12Pink (talk | contribs) m Reverted edits by Superhaihi (talk) to last revision by Hail12Pink Tag: Rollback |
||
Line 1: | Line 1: | ||
<br /> |
|||
This site has been hacked by Truong Quoc Huy |
|||
[[File:AutomaticReactor2.png|right|frameless]] |
|||
Automatic Reactor is a term used for [[Reactor|reactors]] which are regulated through mechanisms rather than the player. They are necessary for feasible multi-reactor power systems. |
|||
== Working == |
|||
There are two mechanisms per reactor, one for managing temperature, the other for dispensing uranium when it runs out. Rod control is achieved through temperature sensors, which read the reactor's temperature when attached to it, and sends signals when it moves out of range. When used with polysilicons, the signals can be used to lower or raise the control rods. |
|||
A sensor set to 20:1000 that sends signals through a pink polysilicon (Mode 0) will lower the rods, decreasing temperature. The opposite can be done with a blue polysilicon (Mode 1) and a 1001:1300 temperature range, which will raise them instead. |
|||
Additionally, you can place a Mode 2 polysilicon and a button to eject uranium from the reactor. |
|||
To refill a reactor, you need to attach a microcontroller to the dispenser and the reactor using ports. The code will use port ID 1 to read the reactor's fuel status, and port ID 2 to control the dispenser.<syntaxhighlight lang="lua" line="1"> |
|||
local reactor = GetPartFromPort(1, "Reactor") |
|||
local dispenser = GetPartFromPort(2, "Dispenser") |
|||
while wait() do |
|||
local fuel = reactor:GetFuel() |
|||
for i = 1, #fuel do |
|||
if fuel[i] <= 0 then |
|||
dispenser:Trigger() |
|||
wait(1) |
|||
dispenser:Trigger() |
|||
end |
|||
end |
|||
end |
|||
</syntaxhighlight>Note: Microcontrollers have to be powered to function. |
|||
[[Category:Tutorials]] |
Revision as of 03:21, 8 March 2022
Automatic Reactor is a term used for reactors which are regulated through mechanisms rather than the player. They are necessary for feasible multi-reactor power systems.
Working
There are two mechanisms per reactor, one for managing temperature, the other for dispensing uranium when it runs out. Rod control is achieved through temperature sensors, which read the reactor's temperature when attached to it, and sends signals when it moves out of range. When used with polysilicons, the signals can be used to lower or raise the control rods.
A sensor set to 20:1000 that sends signals through a pink polysilicon (Mode 0) will lower the rods, decreasing temperature. The opposite can be done with a blue polysilicon (Mode 1) and a 1001:1300 temperature range, which will raise them instead.
Additionally, you can place a Mode 2 polysilicon and a button to eject uranium from the reactor.
To refill a reactor, you need to attach a microcontroller to the dispenser and the reactor using ports. The code will use port ID 1 to read the reactor's fuel status, and port ID 2 to control the dispenser.
local reactor = GetPartFromPort(1, "Reactor")
local dispenser = GetPartFromPort(2, "Dispenser")
while wait() do
local fuel = reactor:GetFuel()
for i = 1, #fuel do
if fuel[i] <= 0 then
dispenser:Trigger()
wait(1)
dispenser:Trigger()
end
end
end
Note: Microcontrollers have to be powered to function.