Empyrion - Galactic Survival

Empyrion - Galactic Survival

Kerulon Jul 12, 2017 @ 5:08am
Signal Logic: how to *extend* a signal?
Hi there!

I'm playing around with signal logic at the moment and came across a small issue i can't seem to solve.

Problem: To save power (fuel) i want devices to automatically shut down after a set period of time.

I'm using a motion sensor to detect when i'm standing in front of the machine and i want to give it, after i've left the area around it, let's say 30seconds (or some mins, just as i set it to) time to do it's job, then power off again.

And i haven't found a solution yet to extend a given signal.

The *delay* function only delays but does not extend the signal (if i'm only for a second at the motion sensor, then the delay function will be *on* while i'm at it, then *off* again, until it hits the set delay time und be *on* again for the 1sec i was in sensor range).

Any suggestions?

Regards, Kerulon
< >
Showing 1-14 of 14 comments
Haildodger Jul 12, 2017 @ 5:30am 
The problem with that scenario, is that it not only delays powering off, but also powering on. If you put something in the constructor and manually turn it on, then the switch was already counting down, and will reverse whatever the switch is curently set to. That set up might still work if you extend the allotted delay time (accounting for the time it takes for you to put stuff in, and select items to craft).

I'm not aware of any circuits configurations that would give you what you're looking for, but I'm no expert.

I don't use switches on my constructors. I just turn them off if they're not needed. I do have my food processor on follow, so when I leave the room it powers off. If I want it to stay on, I just turn it back on in the P menu, after I've exited.
Last edited by Haildodger; Jul 12, 2017 @ 6:38pm
Winterfalke Jul 12, 2017 @ 5:42am 
There is no logic function yet that will do what you want, we need a timer as opposed to the delay circuit. Unfortunately the logic is not well enough implemented to create a closed loop circuit to use the delay in a timer circuit.
Kangaroo Jul 12, 2017 @ 6:36am 
there is a 'set and reset' logical, were you can organize one sensor(input) as 'set'
and another signal(input) as 'reset'. but i never tried it out.
Kerulon Jul 12, 2017 @ 7:22am 
Thanks for the responses!

I have experimented with the flip-flop ("set reset" logical) but i didn't find a solution there. If it's as Winterfalke says, then we're screwed on this subject atm...
@HailDodger: I get it to power on as soon as i get near the machine as well as stay ON for the set time of delay (using an OR logic with sensor and delayed signal is inputs).
BUT, the 2nd part only works when i'm within sensor range for at least the amount of delay time specified (else, as said in my OP, there's a time gap, in which the machine gets switched off, until the signal from the delayed part hits 1 (ON) again)...

Although it's been quite a while, i got some experience with boolean algebra... i simply thought i had forgotten, how to program a signal widening circuit (and google didn't help either...) ^^

@oMeGa: that 2nd input is exactly what i'm missing. If i had to activate it manually, then i could simply use a switch near the machine to power it on/off, and if it's a sensor input from somewhere else, it will stop to work flawlessly, as soon as someone else is aboard and messes with the motionsensors. :steamsad:

Regards, Kerulon

EDIT: some clarifications
Last edited by Kerulon; Jul 12, 2017 @ 7:32am
Winterfalke Jul 12, 2017 @ 10:14am 
Originally posted by oMeGa:
there is a 'set and reset' logical, were you can organize one sensor(input) as 'set'
and another signal(input) as 'reset'. but i never tried it out.

Ideally, you would use the latch (set/reset logic) feeding through a delay back into itself to make a timing circuit, but the game is lacking a critical logical 'flow' or 'time line' that we normally call a ladder in electrical programming. It doesn't have an order of operations, so it tries to do everything at once, and that faults the logic. Until the game can process logic in order, we cant loop outputs back to inputs to make complete circuits.
Kangaroo Jul 12, 2017 @ 10:32am 
Originally posted by Kerulon:

[...]

@oMeGa: that 2nd input is exactly what i'm missing. If i had to activate it manually, then i could simply use a switch near the machine to power it on/off, and if it's a sensor input from somewhere else, it will stop to work flawlessly, as soon as someone else is aboard and messes with the motionsensors. :steamsad:

Regards, Kerulon

EDIT: some clarifications

sry my english isn't that well. it could be possible that winterfalke said that too: can't u set the delay logic as second input? because it's the timer delay that should stop(reset) the machines while the motion sensor should start it(set).

or didn't work it that way?
Last edited by Kangaroo; Jul 12, 2017 @ 10:33am
Kerulon Jul 12, 2017 @ 1:13pm 
Hi!

As i wrote in my last post, if i use the delayed signal as 2nd input, i have to stand (activate the sensor) at least as long as i set the delay time to, because that signal *starts* only after the set amount of delaytime.
Else i would get a gap in the *on time*, as the delayed signal isn't *on* yet, when i step out of the motion sensors range (no direct *on* signal anymore)...

Regards, Kerulon
TheJebblue Jul 12, 2017 @ 6:32pm 
haladmer did a signal logic video recentlly, might be some information of use in there:

https://www.youtube.com/watch?v=QjpJxmPtLjo&t=55s
Kerulon Jul 13, 2017 @ 12:32am 
Thanks for the URL, jebblue!

Unfortunately, Haladmers video just shows the basic functions (and, or, xorr) as well as how to set up sensors.

Regards, Kerulon
Kangaroo Jul 13, 2017 @ 9:47am 
i think i got it.
First set the delay logic to the time u want. as Input set the motion sensor.

2nd add a set/reset with 1st input= Motion Sensor, 2nd input= delay logic
set the machine(in my case constructor)
give the Output a name (in my case OnOff)
3rd the machine u want to turn off need the output of the set/reset logic as On/Off-trigger with the 'Following' setting (without the I for inverted)
Kerulon Jul 13, 2017 @ 11:17am 
Thanks for the idea, but i already tried that.

This would mean, the machine *always* turns off the set amount of delaytime after i stepped into the motion sensors range which would be the solution, *but*;
if i stand whithin range while the delayed signal kicks in (resets the latch thus *should* stop the machine) we got a flip-flop (set-reset latch) with *both* inputs at ON.
That state isn't defined and i doubt, that the output of the latch is then stable...
If one got fuel to waste, you can of course always set the delay to something huge like 5mins or so, which doesn't eliminate the problem, but should be fairly save.

I want to use this mainly for my food processor, as i'll manually switch of the Constructors, because they can work as quick as a few seconds (just craft one or two things), or for quite a while (processing stacks of ore or making a stack of fuel cells ;))

The processor should (after the farms are all set) mainly be used for like 9x canned veggie which can be queued in quickly and then always needs a specific amount of time.
In this scenario the set-reset latch would be sufficient.
Unfortunately, on occasion i stand at the processor for a bit longer, that is, when i craft medical stuff. I could of course use an on/off switch to keep the processor on while doing that...

But isn't the whole sensor thingie about *not* having to use manual switches (which can be forgotten to put out again, thus negating the whole circuit )? :steamsalty:

Regards, Kerulon

EDIT: I just implemented this... it does not work properly, as you can NOT use/switch ON the machine while the delaysignal is active... that is, after the delaytime amount, the machine switches off FOR the time of the set delaytime!
Last edited by Kerulon; Jul 13, 2017 @ 12:11pm
Sleepless Knight Sep 1, 2017 @ 8:28pm 
I tried to set up a series of lights to turn on / off in a row as on a airport runnway (rabbit).
Works but cant get it to repeat automatically for reasons mentioned above.
I dont see any posts/comments from the devs here, and wonder if their working on a solution?
:steamsad:
WildFire™ May 21, 2019 @ 5:24am 
Been awhile since this post. But what you want to do is to create inverts off the signals and compare them against the other signal states. This may be easier to use screenshots or a video but I am going to attempt to pass the information along here in text.


Originally posted by Kerulon:
I'm using a motion sensor to detect when i'm standing in front of the machine and i want to give it, after i've left the area around it, let's say 30seconds (or some mins, just as i set it to) time to do it's job, then power off again.

---Signal Setups---

Lets give the Motion Sensor's 'Tx Signal' a name:
mt_Inside

Now lets create in invert of that signal with
mt_Inside Inverter('1') mt_Outside

Since we want the timer to come on after we leave the area we are going to add the delay to the inverted signal - so when we leave the area the game begins to count for 30 seconds.
mt_Outside 30:Delay over30

Now lets go ahead and create an invert of the new delayed signal:
over30 Inverter('1') under30

---State Setups---

There are only 4 possible states in this setup: Inside-under30, Outside-over30, Outside-under30, and Inside-over30. Notice how you can never be inside and Outside at the same time nor can you be Waiting 30 and NotWaiting ("under30") because they are inverted.

So create the four 2xAND circuits:
Inside AND('&') under30 = SignalA
Inside AND('&') over30 = SignalB
Outside AND('&') under30 = SignalC
Outside AND('&') over30 = SignalD

---Identify and Define the states---
This is just to wrap your head around when each of the new signals would be active or not. remember never more than 1 can ever be on at the same time -we have narrowed them done to a 'state' afterall.

SignalA = Insdie the area. You stepped back into the area before the 30 seconds have passed.

SignalB = Inside the area. You just stepped into the Motion Sensor area after being away awhile.

SignalC = Outside the area. You just left the sensors area.

SignalD = Outside the area. Would be most of the time. This is any time you've been out of the area for atleast 30 seconds. (In theory)

---Narrow them down further---
So now we have the situations and signals ready it is time to pass them along in arguments to get the outcome. We want the constructor to be ON and working while we are inside and for the 30 seconds after we are outside. This is simply SignalA, SignalB and SignalC. SignalD is when we want it to be OFF.
This would be one 4xOR circuit:
SignalA OR SignalB OR SignalC OR 0 = Ctrl_Device

Alternately, since SignalA and SignalB are both the 'Inside' we can widen the scoop and simply use 'inside' instead of SignalA and SignalB.
create the one 2xOR circuit:
Inside OR SignalC = Ctrl_Device

On the constructor we are going to assign 'Ctrl_Device' to ON/OFF and set it to 'Follow'. That is it.

This method will work but it has no 'failsafe' meaning if you walk in and out of the area it will fire off the circuits. Additionally delays will be problematic if your moving in and out of the areas too quickly.
Last edited by WildFire™; May 21, 2019 @ 5:28am
Geronimo Feb 9, 2021 @ 1:36pm 
Huge thanks WildFire, very useful and well explained.

=>(Shameless necromancy)
< >
Showing 1-14 of 14 comments
Per page: 1530 50

Date Posted: Jul 12, 2017 @ 5:08am
Posts: 14