stationeers.de Mod workshop · Dominik1199
DE Sign in
  1. Home
  2. IC10 academy
  3. Day 193

Day 193 of 365 · Pro · Month 7: Power and energy

Generators

Solid fuel and gas generator compared, monitoring the fuel in the slot and limiting the run time so a generator without effect does not run forever.

Lesson 18 min Week 28

What you learn today

  • Solid fuel and gas generator
  • Monitor fuel
  • Limit run time

The generator starts, the battery does not charge. A little over four minutes later the coal stack has burned; the cable to the battery had burned through. A chip that only knows “battery empty → generator on” never notices something like that.

Two generators

Solid fuel (StructureSolidFuelGenerator)Gas (StructureGasFuelGenerator is called StructureGasGenerator in the game)
Fuelcoal, charcoal or solid fuel in slot 0fuel gas with an oxidiser in the pipe
ReadOn, PowerGeneration, slot 0 QuantityOn, PowerGeneration, Pressure, Temperature, gas shares, Combustion
Output20 kW according to the Stationpedia, always fullfrom the combustion energy

According to the Stationpedia the solid fuel generator always delivers its full output while running, whether it is needed or not – and more than a normal cable carries. It belongs on heavy cables. The gas generator burns methane, hydrogen, alcohol or hydrazine with oxygen, nitrous oxide or ozone; only part of the energy becomes power, the rest stays as heat in the exhaust.

In the solid fuel generator one piece of coal burns for 5 s, charcoal for 1 s and solid fuel for 10 s – so a stack of 50 coal lasts a little over four minutes. According to the game code it needs no oxygen, but every piece releases exhaust into the room: coal 3 mol pollutant and 10 mol CO₂, charcoal 3 mol of each, solid fuel 20 mol pollutant and 5 mol CO₂. So it does not belong in the living quarters.

Monitoring the fuel

For the solid fuel generator the supply is in slot 0:

lbns fuel GEN HASH("Notstrom") 0 Quantity Average
sgtz on fuel         # do not even start without fuel

An empty generator with On 1 does nothing – except look as if it were running. For the gas generator you check the pressure in the feed instead.

Limiting the run time

A counter counts the ticks the generator runs in a row. If it rises above the limit without the battery getting full, something is wrong: cable, battery or load. Then the chip locks the generator out until someone acknowledges:

mul time time on     # off: counter to 0
add time time on     # on: +1
sgt tmp time MAXRUN
or lockout lockout tmp

mul and add with the same 0/1 value replace a select and a jump.

Warning

MAXRUN is only 20 ticks (10 s) here for testing. In the game take as long as the generator needs for a full charge, plus a reserve – one tick is 0.5 s, so 1200 ticks are 10 minutes.

Note

If the battery reading fails, the chip requests the generator – better burn fuel than stand in the dark. The run time limit catches the case that it runs forever doing so.

Exercise

Task

The solid fuel generator “Notstrom” charges the batteries “Akku”. The demand with hysteresis is done.

  • Generator only on when requested, fuel is in slot 0 and there is no lockout
  • If it runs more than 20 ticks in a row, lock out; the button “Quittieren” lifts the lockout
  • Flashing light “Generator” on with fewer than 5 pieces of fuel, on lockout or missing readings

Hints

Hint 1

Acknowledge: read the button, sgtz, seqz, then and lockout lockout tmp.

Hint 2

Generator: sgtz on fuel, “and” it with want and “no lockout”.

Hint 3

Run time: mul time time on, add time time on, then sgt against MAXRUN “or”-ed into the lockout.

Quiz

4 questions. You pass from 60 % – the server does the grading.

Complete the day

  • Passed the simulator exercise
  • Passed the quiz with at least 60 %

Without an account progress is saved in this browser only.

Report a mistake in this lesson

Please sign in to report. Sign in

Esc
↑ ↓ selectEnter open/ opens search anywhere