Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Pretty messy but it works:
To transform a constant signal into a single pulse, we can do this by means of relay switches.
1. Place two Relays (Lets call them Relay1 and Relay2), ensure that one is set to ON while the other is set to OFF
2. Place a Signal Check Component (Lets call it S1) and place the values as follows:
Output = 0
False Output = 1
Target Signal = 1
3. Connect your constant signal source (lets call this X) to Relay1's set_state.
4. Connect X to the S1 signal in.
5. Make a connection starting from S1's signal out to Relay2's set_state.
When the constant signal now changes, it will open and close the relays, and one relay will always be open while the other is always closed.
Now you essentially convert the Constant Signal into a Open or Closed relay, using a new Signal Check Component that passes through both Relay1 and Relay2 will now activate depending if the Relay1 or Relay2 is opened or closed.
Constant signal > AND comp signal_in 1
Constant signal > NOT comp > Delay comp (0.4 delay) > AND comp signal_in 2
When sending 0, the NOT turns it into a 1 and goes into the delay. When the constant signal turns to 1 it goes to AND signal 1 instantly while the delay continues sending a 1 for another 0.4 seconds to AND signal 2 before the NOT inverted signal makes it way through. So for 0.4 seconds the AND comp sends a signal.
Oh but that might be sub-optimal for OP's purpose, it would at the very least spam the terminal for 0.4 seconds. But to my knowledge all the arithmetic and logic gates output a continuous signal anyway so it would actually spam forever?
--> XOR (Output: Empty, False Output: '1') --> Delay (0.05/0.1 sec, Reset when signal received) -->
Hmmm are you saying input like say Lever into the XOR, and the Delay output to the device to receive the pulse?
I'm trying to test this by having a light come on for one second, but it's not working. When I change the state it isn't really working. If it's set as a toggle, it'll toggle on or off after the delay time I set. If it's set to set_state it'll just kind of come on, and then never go off no matter what I do.
I'm wanting to set it to an alarm klaxon to have it go off for a couple seconds when it receives a pulse and then go off. I'm not great at these circuits in this game.
Yes, it's for a lever (or any constant signal). It will only fire a single pulse for a constant signal.
The 'output' field of the XOR must be empty, while the 'false output' field must contain a '1'. The output of the XOR then leads to a delay. I recommend to set the delay to 0.05. If a new signal comes faster than the duration of the delay, it's won't be recogniced. You must also check 'Reset when signal received' and UNcheck 'Reset when different signal received'.
The XOR will return a '1' every game tick as long as there is a NEGATIVE constant signal on it.
The delay will reset everytime it receives a '1', so also as long as the lever is negative.
The moment the lever is flicked the signal of the XOR ('1') stops, thus leading to the delay letting out it's signal (one single pulse).
You can simply just use the oscilator, realized it after reading the description.
https://barotraumagame.com/wiki/Wiring_Components#Oscillator_Component
Ehh, seems I misunderstood the OP, nvm.
Connection:
1. Lever (SIGNAL_OUT) -> Signal Check Component (SIGNAL_IN)
2. Signal Check Component (SIGNAL_OUT) -> Relay Component (SIGNAL_IN_1)
3. Relay Component (SIGNAL_OUT_1) -> To destination (this is going to be single pulse signal)
4. Lever (SIGNAL_OUT) -> Relay Component (SET_STATE)
When u switch lever off 0 signal will be able to go thru relay and instantly will be cut off with it self.
My issue was using a toggle switch, which needed to stay a toggle switch because it was linked into multiple systems, but a few of those systems needed a pulse instead.
Took me a while to figure it out and get it working, but my solution was to use 2 Signal Check Components and 2 Delay Components. The end result starts as an empty signal, but allows you to send a 1-pulse when the switch is flipped to constant 1, and a 0-pulse when the switch is flipped to constant 0.
Here is the setup:
Connection:
1. Lever (SIGNAL_OUT) -> Signal Check Component #1 (SIGNAL_IN)
2. Signal Check Component #1 (SIGNAL_OUT)
-> To destination
-> Signal Check Component #2 (SIGNAL_IN)
-> Delay Component #1 (SIGNAL_IN)
3. Signal Check Component #2 (SIGNAL_OUT)
-> Signal Check Component #1 (SET_OUTPUT)
-> Signal Check Component #1 (SET_TARGETSIGNAL)
-> Delay Component #2 (SIGNAL_IN)
4. Delay Component #1 (SIGNAL_OUT) -> Signal Check Component #2 (SET_OUTPUT)
5. Delay Component #2 (SIGNAL_OUT) -> SCComponent #2 (SET_TARGETSIGNAL)
If the initial input for SCC#1 is a "1" signal, set up the SCCs as follows:
SCC#1:
Output: 0
False output: BLANK
Target signal: 0
SCC#2:
Output: 1
False output: BLANK
Target signal: 0
If the initial input for SCC#1 is a "0" signal, set up the SCCs as follows:
SCC#1:
Output: 1
False output: BLANK
Target signal: 1
SCC#2:
Output: 0
False output: BLANK
Target signal: 1
Set the Delay Components' delay to 0,05, that seemed to be sufficient enough for the signal to go through.
In this setup, the initial signal is blocked by SCC#1, and a BLANK signal is sent ahead. When the switch is flipped, SCC#1 sends a pulse to the destination, triggers SCC#2, which then immediately resets SCC#1's target signal, cutting it off. SCC#2 then rewrites SCC#1 from "0 ; - ; 0" into "1 ; - ; 1", and the delayed signals rewrite SCC#2 from "1 ; - ; 0" into "0 ; - ; 1". The circuit only gives out a BLANK signal in between toggles, and with every toggle, the SCCs alternate their target and output.
If you are starting with a "0" signal, instead configure SCC#1 as "1 ; - ; 1" and SCC#2 as "0 ; - ; 1". And if you need a 1-pulse on a 0-constant, and a 0-pulse on a 1-constant, put a NOT Component BEFORE SCC#1 to flip the incoming signal. If you put the NOT Component after the output, the BLANK signal will be flipped and registered as a 1, and will muck up your system.
SCC #1:
- Output: 1
- False output: 0
- Target signal: 1
- Signal out -> SCC #2 Signal in
SCC #2:
- Output: 1
- False output: 0
- Target signal: 1
- Signal out -> NC Signal in
NC:
- Signal out -> SCC #1 Set target signal
- Signal out -> SCC #2 Set target signal
Circuit input (constant signal) -> SCC #1 Signal in
Circuit output (single tick on signal change) -> SCC #1 Signal out
This circuit can also be modified easily with a relay & and component to only give a tick when the change is from 0 -> 1, I imagine the reverse would also be a pretty simple adjustment.
1 signal checker (SG), 1 relay (RC), 1 Not component (NC)
Constant Signal Source:
Signal Out -> SG Signal In
Signal Out -> NC Signal In
SG:
Output: 1
False output: empty
Target signal: 1
Signal Out -> RC signal in
NC:
Signal Out -> RL Signal In
RC:
Signal Out -> Target In
when use switch and switched on, it will send signal once.
when switched off, it will not send any.
Lever → XOR
XOR → Lamp toggle