Sending a signal when over a specified step :
Code: Select all
R = Circuit(red)
G = Circuit(green)
O = Circuit(green)
StorageTank(heavy_oil = 1250) => G
StorageTank(light_oil = 1250) => G
StorageTank(petroleum_gas = 1250) => G
Constant(1000 heavy_oil on all, 1500 light_oil on red, 2000 petroleum_gas on red) => R
R;G => Decider(each on green > each on red;each as binary on all) => O
O => Lamp (heavy_oil > 0)
O => Lamp (light_oil > 0)
O => Lamp (petroleum_gas > 0)
Code: Select all
R = Circuit(red)
O = Circuit(red)
StorageTank(heavy_oil = 1250) => O
StorageTank(light_oil = 1250) => O
StorageTank(petroleum_gas = 1250) => O
Constant(1000 heavy_oil, 1500 light_oil, 2000 petroleum_gas) => R
R => Arithmetic(each on all * -1; each on all) => O
O => Lamp (heavy_oil > 0)
O => Lamp (light_oil > 0)
O => Lamp (petroleum_gas > 0)