In other languages: 日本語

Virtual signals: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
m (Bilka moved page Automatic control/Virtual signals to Virtual signals over redirect: Moving page out of the Automatic control section)
(Improved page, moved some information form the automatic control section here)
Line 1: Line 1:
{{Languages}}
{{Languages}}
[[File:virtual_signals.png|thumb|300px]][[File:logic_signals.png|300px|thumb|There are three types of logic signals]]
[[File:virtual_signals.png|thumb|300px]][[File:logic_signals.png|300px|thumb|There are three types of logic signals]]
'''Virtual signals''' can used as signals in [[Circuit network]]s. They can be outputted by all devices that can send signals to the circuit network. If a circuit network contains virtual signals, they act like a normal item signal, so you can perform comparisons and arithmetical operations.
'''Virtual signals''' can used as signals in [[Circuit network]]s. If a circuit network contains virtual signals, they act like a normal item signal, so you can perform comparisons and arithmetical operations.


== Containing signals ==
== Containing signals ==
Line 7: Line 7:
* numbers 0-9
* numbers 0-9
* letters A-Z
* letters A-Z
* colored (red, green, blue, yellow, magenta, cyan, white, gray, black)
* colors (red, green, blue, yellow, magenta, cyan, white, gray, black)


== Usage ==
Each signal has:
Virtual signals are useful to control [[Automatic control/Devices|devices]] if the control not depend on items (e.g. if you want to have the robot count as signal). They also are used as output by [[Arithmetic combinator]]s, where two amounts of items are processed and you can't decide which item is the output.
* a ''name'' (for example "N") and
* a ''value'' (for example "19").


== Special signals ==
== Logic signals ==
There are also some logic signals in Factorio which are accessible by clicking certain signal slots on [[Automatic control/Devices|devices]]. They have special functions to control information with multiple signals. These three signals are:
There are also some logic signals in Factorio which are accessible by clicking certain signal slots on devices. They have special functions to control information with multiple signals. These three signals are:
* Everything (red)
* Everything (red)
* Anything (green)
* Anything (green)
* Each (yellow)
* Each (yellow)
=== Everything ===
=== Everything ===
; As input
; As input
Line 35: Line 37:
| {{imagelink|basic-transport-belt|Transport belts}} | {{imagelink|basic-inserter|Inserters}} | {{imagelink|gate|Gate}} | {{imagelink|rail-signal|Rail signal}} | {{imagelink|lamp|Lamp}} | {{imagelink|offshore-pump|Offshore Pump}} | {{imagelink|small-pump|Small pump}} | {{imagelink|decider-combinator|Decider Combinator}} | {{imagelink|power-switch|Power switch}} |-
| {{imagelink|basic-transport-belt|Transport belts}} | {{imagelink|basic-inserter|Inserters}} | {{imagelink|gate|Gate}} | {{imagelink|rail-signal|Rail signal}} | {{imagelink|lamp|Lamp}} | {{imagelink|offshore-pump|Offshore Pump}} | {{imagelink|small-pump|Small pump}} | {{imagelink|decider-combinator|Decider Combinator}} | {{imagelink|power-switch|Power switch}} |-
|}
|}
It works similar than "Everything", but the condition is true if the condition for at least one input signal is true (logical OR).
It works similar as "Everything", but the condition is true if the condition for at least one input signal is true (logical OR).
=== Each ===
=== Each ===
; As input
; As input

Revision as of 10:02, 20 January 2017

There are three types of logic signals

Virtual signals can used as signals in Circuit networks. If a circuit network contains virtual signals, they act like a normal item signal, so you can perform comparisons and arithmetical operations.

Containing signals

Currently Factorio has 45 virtual signals:

  • numbers 0-9
  • letters A-Z
  • colors (red, green, blue, yellow, magenta, cyan, white, gray, black)

Each signal has:

  • a name (for example "N") and
  • a value (for example "19").

Logic signals

There are also some logic signals in Factorio which are accessible by clicking certain signal slots on devices. They have special functions to control information with multiple signals. These three signals are:

  • Everything (red)
  • Anything (green)
  • Each (yellow)

Everything

As input
Transport belts | Inserters |
Gate.png
Gate | Rail signal |
Lamp.png
Lamp | Offshore Pump | Small pump | Decider Combinator | Power switch |-

The "Everything" signal works like a logical AND. It can only be used as the left term of the circuit condition. The condition will only be true if the condition is true for all signals the device receives. Be careful with signals with amount 0, because these signals will not considered by "Everything".

If the decider combinator output is set as "Input count" and not "Everything", there will be no output even if the condition is true.

As output
Decider Combinator |-

If the condition is true, all input signals are outputted, either with amount 1 or with their input amount.

Anything

As input
Transport belts | Inserters |
Gate.png
Gate | Rail signal |
Lamp.png
Lamp | Offshore Pump | Small pump | Decider Combinator | Power switch |-

It works similar as "Everything", but the condition is true if the condition for at least one input signal is true (logical OR).

Each

As input
Arithmetic Combinator | Decider Combinator |-

The "Each" signal also performs the operation for all input signals, but the condition is not true or false once, but true or false for each input signal individually.

If the output is "1" and not "Each" (decider combinators only), the signal will only be outputted if at least one condition is true. If the output is "Input count" and not "Each", all amounts of input signals whose condition is true or (for arithmetic combinators) the results of mathematical operations for each input signal are summed and outputted.

As output
Arithmetic Combinator | Decider Combinator |-

The "Each" signal can only be set as output if the left input signal is also "Each". A decider combinator outputs only the input signals whose condition is true. An arithmetic combinator ouputs each input signals with an amount that is the result of the operation.