3

I'm running number of nuclear reactor and I want to shut down MFSU have enough energy and start up not enough energy.

Nuclear reactor will waste fuel cell if connected MFSU already have fully charged, and I have Industrial information panel showing how much MFSU charged. I'm tired of manually switching levers on nuclear reactor.

Are there anyway detect MFSU(MFE) unit have half energy?

I'm using direwolf20's 1.6 version modpack.

It seems to be ComputerCraft could be a solution enter image description here

enter image description here

Edited : I found some workaround. Anyone know better idea? I'm pretty new to computercraft and lua so I don't want to use it. enter image description here

  • Hmm, do BuildCraft gates work with IndustrialCraft items? – user28379 Mar 29 '14 at 18:16
  • Yes, 'capacitor empty', 'capacitor full', 'capacitor has energy', 'space for energy', 'charging empty item', 'charging fully charged item', 'charging partially charged item', 'discharging empty item', 'discharging fully charged item', ''discharging partially charged item' – Zaphod Mar 31 '14 at 9:46
  • does a vanilla comparator work on it? – ratchet freak Mar 31 '14 at 12:05
2

2 solutions:

Method 1

I know you said you didn't want to use ComputerCraft however it's a more adaptable way than the other if you want to add more MFSU's. If you do, comment and I'll respond with info on how to. Put down a computer and do

edit reactor

In this file put:

mfe = peripheral.wrap("side")
while true do
  euPercent = mfe.getEUStored() / mfe.getEUCapacity()
  if euPercent==1 then
    redstone.setOutput("side", false)
  elseif euPercent<=.5 then
    redstone.setOutput("side", true)
  end
  sleep(1)
end

Save by hitting CTRL, selecting "Save" with the arrows, and hitting ENTER. Hit CTRL again, select "Exit" with the arrows, and hit ENTER.

Let's explain what that does:

mfe = peripheral.wrap("side") assigns the mfsu variable to peripheral.wrap("side"). Make sure to replace side with the side the MFSU is on.

while true do starts a while loop. This will do the code inside every tick unless there is a sleep.

euPercent = mfsu.getEUStored() / mfsu.getEUCapacity() reads the EU and divides it by the total capacity to get a decimal out of the total.

if euPercent==1 then checks if the MFSU is full. If it is, it runs any code till an else or end.

redstone.setOutput("side", false) sets the redstone output being emitted from side to false, turning off the reactors. Make sure you change side to the side which the redstone leading to your reactors is.

else if euPercent<=.5 then ends the code run by the previous if and starts an else if. This will, if the previous if is false, tests for if the if is true and if so, behaves the same as the if above.

redstone.setOutput("side", true) sets the redstone output being emitted from side to true, turning on the reactors. Make sure you change side to the side which the redstone leading to your reactors is.

sleep(1) waits for 1 second before going to the top of the while loop and running it all again.

Next, do edit startup. This will create a file run on startup of the computer. In it put:

 shell.run("reactor")

This means that on startup the reactor file created earlier will have the code in it run.

Method 2

Use a BuildCraft gate to detect when the MFSU is full and output a redstone signal. Then, invert this with a redstone torch. I'll add more details when I can(tommrow EST at like 9 AM).

  • Thank you for descriptive method 1 and you don't need method 2 further.(I don't want to waste your effort :) ) I already knew it. cobblestone structure pipe and iron gate and red wire from buildcraft. Or framed red alloy wire with not gate from project|red. – Zaphod Mar 31 '14 at 9:12
  • @Zaphod Mind marking this as correct? – yayestechlab Apr 3 '14 at 20:14
  • btw i blew up my world yesterday using this technique – Zaphod Apr 8 '14 at 0:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.