In other languages: Čeština Deutsch Français Italiano 日本語 Polski Português, Brasil Русский Українська 简体中文

Circuit network: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
No edit summary
(Cleanup, added some more info, history)
Line 1: Line 1:
{{Languages}}
{{Languages}}
'''Circuit networks''' are built using red or green wire, and enable the control of [[Automatic control/Devices#Receiver|receiver devices]], based upon information broadcast onto the network by connected [[Automatic control/Devices#Sender|sender devices]].  Most senders are storage devices, and broadcast their information onto a specific channel, based on the item or liquid the storage device contains.  Each circuit network contains a channel for every kind of item, as well as 45 extra [[Automatic control/Virtual signals|Virtual signals]] which act as user-definable channels.
'''Circuit networks''' are built using red or green wire, and enable the control of [[Automatic control/Devices#Receiver|receiver devices]], based upon information broadcast onto the network by connected [[Automatic control/Devices#Sender|sender devices]].  Most senders are storage devices, and broadcast their information onto a specific channel, based on the item or liquid the storage device contains.  Each circuit network contains a channel for every kind of item, as well as 45 extra [[Automatic control/Virtual signals|Virtual signals]] which act as user-definable channels. 'Everything' and 'Anything' are also available wildcards.


[[File:InnerOfGreenCable.jpg|right|400px]]
[[File:InnerOfGreenCable.jpg|right|thumb|400px|A player drawn visualization of the interior of a circuit cable.]]


== Circuit Network Tutorials Redirect ==
== Circuit Network Tutorials Redirect ==
'''[[Circuit-network Cookbook|Circuit Network Cookbook]]''' - ''Heavy example tutorials; for beginners who want to use the benefits of the Circuit Network.''<br />
'''[[Circuit-network Cookbook|Circuit Network Cookbook]]''' - ''Example heavy tutorials; for beginners who want to use the benefits of the Circuit Network.''
'''[[Combinator Tutorial]]''' - ''Mainly textual and detailed tutorials; for amaeturs who can sometimes refer to this.''<br />
 
''[http://www.reddit.com Reddit], if you'd like to ask any questions about circuitry in Factorio.''
'''[[Combinator Tutorial]]''' - ''Mainly textual and detailed tutorials; for amateurs who can sometimes refer to this.''
 
''[http://www.reddit.com/r/factorio The official Factorio Reddit], if you'd like to ask any questions about circuitry in Factorio.''


== Physical network structure ==
== Physical network structure ==
A circuit network consists only of those devices connected together with the same color wire.  Wire can be strung directly from device to device, or across any intervening power poles.
A circuit network consists only of those devices connected together with the same color wire.  Wire can be strung directly from device to device, or across any intervening power poles. Wire length is limited by it's previous connection.


Note that each connected set of wires forms a separate network.  For example, it's entirely possible to have four red-wire networks and three green-wire networks.  Red and green networks will remain separate and do not link up if red and green wires happen to touch the same power pole or device.
Note that each connected set of wires forms a separate network.  For example, it's entirely possible to have four red-wire networks and three green-wire networks.  Red and green networks will remain separate and do not link up if red and green wires happen to touch the same power pole or device. However, two red cables or green cables will link if they touch. Keep networks in close proximity separate by using different colored cables.


* To connect wires or cables to a power pole, drag the wire to the base of the pole.
* To connect wires or cables to a power pole, simply click on one entity, then on the base of the power pole.
* To erase a wire or cable connection, drag the same color wire over an existing connection. You don't get the wire/cable back.
* To erase a wire or cable connection, place the same color wire over an existing connection. You don't get the wire/cable back.
* To remove '''all''' connections from a power pole, shift-click on the pole.  The first shift-click will remove all electrical connections, and the second will remove all red and green wires. You don't get the wires back.
* To remove '''all''' connections from a power pole, shift-click on the pole.  The first shift-click will remove all electrical connections, and the second will remove all red and green wires. You don't get the wires back.
* When connecting to a [[Arithmetic Combinator]] or [[Decider Combinator]], take care to drag the wire to the correct input or output side. Use ALT-Key-Mode to see direction of combinator.
* When connecting to a [[Arithmetic Combinator]] or [[Decider Combinator]], take care to connect the wire to the correct input or output side. Use ALT-Key-Mode to see direction of combinator.
* Hovering the mouse cursor over an item will highlight all wires which form the network of the item.
* Hovering the mouse cursor over an item will highlight all wires which form the network of the item.
* Hovering the mouse cursor over a power pole which is part of a network will display the signals on its network. Some items like combinators will also display their input and output signals when hovered over.
* Hovering the mouse cursor over a power pole which is part of a network will display the signals on its network. Some items like combinators will also display their input and output signals when hovered over.
Line 24: Line 26:
[[Automatic control/Devices#Sender|Sending devices]] broadcast the amount of [[Items]] or [[Liquids system|Fluids]] they contain or other data definable by the player. Each amount is broadcast as a numeric value on a 'channel' corresponding to the item they contain.  For example, a Storage Tank containing 1000 Crude Oil will broadcast 1000 on the Crude Oil channel.
[[Automatic control/Devices#Sender|Sending devices]] broadcast the amount of [[Items]] or [[Liquids system|Fluids]] they contain or other data definable by the player. Each amount is broadcast as a numeric value on a 'channel' corresponding to the item they contain.  For example, a Storage Tank containing 1000 Crude Oil will broadcast 1000 on the Crude Oil channel.


Multiple broadcasts of the same item or fluid are additive: if there are two connected Storage Tanks with 1000 Crude Oil each, the value of the Crude Oil channel will be 2000.
Multiple broadcasts of the same item or fluid are additive: if there are two connected Storage Tanks with 1000 Crude Oil each, the value of the Crude Oil channel within the network will be 2000.


Wires which are connected together by a junction will pass their signals to the other wires of the same color.  For example, if two red wires are connected to the same combinator input, each wire receives the content from the other.  This can result in feedback if care is not taken; see Feedback (under Arithmetic Combinator, below) for discussion.
Wires which are connected together by a junction will pass their signals to the other wires of the same color.  For example, if two red wires are connected to the same combinator input, each wire receives the content from the other.  This can result in feedback if care is not taken; see Feedback (under Arithmetic Combinator, below) for discussion.
Line 32: Line 34:
[[Automatic control/Devices#Receiver|Receiving devices]] can use broadcast information, in most cases to enable/disable the device.
[[Automatic control/Devices#Receiver|Receiving devices]] can use broadcast information, in most cases to enable/disable the device.


They can either compare results between different channels, or compare a channel to a specific value. The pictured inserter works if the count of [[Iron plate|Iron plates]] is lower than the count of [[Steel plate|Steel plates]].
They can either compare results between different channels, or compare a channel to a specific value. The pictured inserter works if the count of [[Iron plate|Iron plates]] is lower than the count of [[Steel plate|Steel plates]].


Receiving devices sum all signals from each wire connected to them, even red and green wires. For example, if an inserter is connected to a red wire carrying a signal for 20 iron plates, a green wire with 10 copper plates and another green wire with 5 iron plates, the input signal set for that receiver will be 25 iron plates and 10 copper plates.
Receiving devices sum all signals from each wire connected to them, even red and green wires. For example, if an inserter is connected to a red wire carrying a signal for 20 iron plates, a green wire with 10 copper plates and another green wire with 5 iron plates, the input signal set for that receiver will be 25 iron plates and 10 copper plates.
Line 39: Line 41:
[[File:circuit-network-example-1.png|thumb|256px|A basic circuit network usable to fill a chest with a defined amount of items.]]
[[File:circuit-network-example-1.png|thumb|256px|A basic circuit network usable to fill a chest with a defined amount of items.]]


The simplest network is to connect an inserter with a chest next to it, to control the limit amount of items the inserter will put into the chest. <br>
The simplest network is to connect an inserter with a chest next to it, to control the limit amount of items the inserter will put into the chest. (Note that you do not have to connect them using a power pole as the picture shows; you can connect them directly.)
(Note that you do not have to connect them using a power pole as the picture shows; you can connect them directly.)


Similar methods are possible for gating fluid by connecting a [[storage tank]] to a [[small pump]], or gating electricity by connecting [[accumulators]] to a [[power switch]] to the respective network.
Similar methods are possible for gating fluid by connecting a [[storage tank]] to a [[small pump]], or gating electricity by connecting [[accumulator]]s to a [[power switch]] to the respective network.


== Combinators ==
== Combinators ==
Combinators can function as both receiving and sending devices and allow more advanced functions to be used on a circuit network.
Combinators can function as both receiving and sending devices and allow more advanced functions to be used on a circuit network.


*The [[Constant Combinator]] broadcasts up to 15 values on any of the channels for whatever networks it is connected to.  (You cannot currently specify whether a value should be red or green; if you need different values, use two combinators, one for each color wire.)  You can use any item channel or any of the [[Automatic control/Virtual signals|virtual signal]] channels.
*The [[Constant Combinator]] broadcasts up to 15 values on any of the channels for whatever networks it is connected to.  (You cannot currently specify whether a value should be on the red or green channel; if you need different values, use two combinators, one for each color wire.)  You can use any item channel or any of the [[Automatic control/Virtual signals|virtual signal]] channels.
**Note that using two of the 15 slots to broadcast values on the '''same''' channel is the same as broadcasting the sum of the two values from one slot.
**Note that using two of the 15 slots to broadcast values on the '''same''' channel is the same as broadcasting the sum of the two values from one slot.


*The [[Arithmetic Combinator]] performs arithmetic operations on input values and broadcasts the result to the specified output channel.  The input and output channels can be any item channel or any of the virtual signal channels.
*The [[Arithmetic Combinator]] performs arithmetic operations on input values and broadcasts the result to the specified output channel.  The input and output channels can be any item channel or any of the virtual signal channels.
** Connecting: The Arithmetic Combinator connects to a red or green network on its '''input''' side (the terminals are set into the main body and look like spark plugs) and performs an arithmetic calculation which is broadcast into the specified channel on its '''output''' side (the output wires appear to stretch out a bit from the body of the device).  
** Connecting: The Arithmetic Combinator connects to a red or green network on its '''input''' side (the terminals are set into the main body and look like spark plugs) and performs an arithmetic calculation which is broadcast into the specified channel on its '''output''' side (the output wires appear to stretch out a bit from the body of the device).  
** Feedback: Note that the input network and the output network '''are not the same network'''.  Connecting the output network back to the input network will result in a feedback loop.  For example, adding 1 to the value for Copper Plates and broadcasting it as Copper Plates is an action that results in an infinite loop if output is connected back to input.  The value for Copper Plates will rapidly (but not instantly) shoot upward.  This technique can be combined with Decider Combinator logic to make electronic clocks, gates, and other systems; see [[Combinator Tutorial]] for advanced techniques.
** Feedback: Note that the input network and the output network '''are not the same network'''.  Connecting the output network back to the input network will result in a feedback loop.  For example, adding 1 to the value for Copper Plates and broadcasting it as Copper Plates is an action that results in an infinite loop if output is connected back to input.  The value for Copper Plates will rapidly (but not instantly) shoot upward. (Fun fact: The rate at which it climbs is the current tick rate) This technique can be combined with Decider Combinator logic to make electronic clocks, gates, and other systems; see [[Combinator Tutorial]] for advanced techniques.
** Each:  This combinator can use the 'Each' signal for both input and output, in which case '''all''' non-zero input channels will have the combinator's operation performed and broadcast on the output side.  Having Each signals for input and output and using a non-changing operation (like adding zero) is equivalent to having a 'one-way' wire; all the information from the input network is copied to the output network, but the reverse is not true.
** Each:  This combinator can use the 'Each' signal for both input and output, in which case '''all''' non-zero input channels will have the combinator's operation performed and broadcast on the output side.  Having Each signals for input and output and using a non-changing operation (like adding zero) is equivalent to having a 'one-way' wire; all the information from the input network is copied to the output network, but the reverse is not true.
**Multi-network: The Arithmetic Combinator can be joined to both red and green networks on the input side and will sum their inputs.
**Multi-network: The Arithmetic Combinator can be joined to both red and green networks on the input side and will sum their inputs.


*The [[Decider Combinator]] functions much like an Arithmetic Combinator, but is designed to compare values. In terms of Connecting, Feedback, and the Each signal it functions as specified above.  In addition, it can handle the Everything and Anything signals, and performs more complex functions than summing when attached to multiple networks.  See the [[Decider Combinator]] page for more details on how to use this.
*The [[Decider Combinator]] functions much like an Arithmetic Combinator, but is designed to compare values. Essentially, it is a conditional. In terms of Connecting, Feedback, and the Each signal it functions as specified above.  In addition, it can handle the Everything and Anything signals, and performs more complex functions than summing when attached to multiple networks.  See the [[Decider Combinator]] page for more details on how to use this.


== Logistic Network ==
== Logistic Network ==
Line 63: Line 64:
Some devices can also be connected to the logistic network. If a device has conditions set for circuit and for logistic network, it will become activated if both conditions are true.
Some devices can also be connected to the logistic network. If a device has conditions set for circuit and for logistic network, it will become activated if both conditions are true.


See [[Logistic network]] for more information.
See [[Logistic network]] and [[Roboport]] for more information.


== [[Automatic_control/Devices|Items/Devices]] ==
== [[Automatic_control/Devices|Items/Devices]] ==
In v0.13 the factorio developers made many devices connectable to the circuit network, so there are many possibilities to control and program your factory based on conditions.
In v0.13 the Factorio developers made many devices connectible to the circuit network, so there are many possibilities to control and program your factory based on conditions.


=== Examples (0.14.x) ===
=== Examples (Version 0.14.x and higher) ===
[[Circuit-network_Cookbook|Circuit Network Cookbook]]
[[Circuit-network_Cookbook|Circuit Network Cookbook]]


=== Examples (''outdated'') ===
=== Examples (''outdated, but basic concept still applies'') ===
* [http://www.factorioforums.com/forum/viewtopic.php?f=5&t=3149 Forum article about the basic usage]
* [http://www.factorioforums.com/forum/viewtopic.php?f=5&t=3149 Forum article about the basic usage]
* [http://www.factorioforums.com/forum/viewtopic.php?f=9&t=696&p=24183#p24183 About comparison of the circuit wires with examples from the real world]* [http://www.factorioforums.com/forum/viewtopic.php?f=8&t=348 Logic Gates, Edge Detector]
* [http://www.factorioforums.com/forum/viewtopic.php?f=9&t=696&p=24183#p24183 About comparison of the circuit wires with examples from the real world]* [http://www.factorioforums.com/forum/viewtopic.php?f=8&t=348 Logic Gates, Edge Detector]
Line 78: Line 79:
* [http://www.factorioforums.com/forum/viewtopic.php?f=8&t=298 Material splitters]
* [http://www.factorioforums.com/forum/viewtopic.php?f=8&t=298 Material splitters]
* [http://www.factorioforums.com/forum/viewtopic.php?f=8&t=6839 Logic gates using side inserter mod]
* [http://www.factorioforums.com/forum/viewtopic.php?f=8&t=6839 Logic gates using side inserter mod]
== History ==
{{history|0.13.0|
* Many machines are now connectible to the circuit network.
* Wire disconnecting is incorporated into the latency hiding.
* Wires are now highlighted on entity mouseover.
* Reduced memory usage of circuit network.}}
{{history|0.12.33|
* Fluid values are rounded to the closest value instead of rounding down when transmitted to circuit network.}}
{{history|0.12.1|
* One can copy paste circuit network conditions between the [[Inserter]], [[Lamp]], [[Small pump]] and [[Offshore pump]]. }}
{{history|0.12.0|
* Improvements to circuit network connection, one can connect multiple wires of the same color to the same entity.
* The [[Lamp]], [[Storage tank]], [[Small pump]] and [[Offshore pump]] can be connected to the circuit network.
}}
{{history|0.10.0|
* [[Blueprint]]s copy circuit network connections.}}
{{history|0.8.3|
* Circuit network contents info has colored slots to specify the network it represents.}}
{{history|0.1.0|
* Introduced}}


== See also ==
== See also ==
Line 85: Line 114:
* [[Automatic control/Virtual signals]]
* [[Automatic control/Virtual signals]]


[[Category: Networks]] [[Category: Circuit network]] [[Category: Transport network]]
[[Category: Networks]] [[Category: Circuit network]]

Revision as of 18:57, 22 December 2016

Circuit networks are built using red or green wire, and enable the control of receiver devices, based upon information broadcast onto the network by connected sender devices. Most senders are storage devices, and broadcast their information onto a specific channel, based on the item or liquid the storage device contains. Each circuit network contains a channel for every kind of item, as well as 45 extra Virtual signals which act as user-definable channels. 'Everything' and 'Anything' are also available wildcards.

A player drawn visualization of the interior of a circuit cable.

Circuit Network Tutorials Redirect

Circuit Network Cookbook - Example heavy tutorials; for beginners who want to use the benefits of the Circuit Network.

Combinator Tutorial - Mainly textual and detailed tutorials; for amateurs who can sometimes refer to this.

The official Factorio Reddit, if you'd like to ask any questions about circuitry in Factorio.

Physical network structure

A circuit network consists only of those devices connected together with the same color wire. Wire can be strung directly from device to device, or across any intervening power poles. Wire length is limited by it's previous connection.

Note that each connected set of wires forms a separate network. For example, it's entirely possible to have four red-wire networks and three green-wire networks. Red and green networks will remain separate and do not link up if red and green wires happen to touch the same power pole or device. However, two red cables or green cables will link if they touch. Keep networks in close proximity separate by using different colored cables.

  • To connect wires or cables to a power pole, simply click on one entity, then on the base of the power pole.
  • To erase a wire or cable connection, place the same color wire over an existing connection. You don't get the wire/cable back.
  • To remove all connections from a power pole, shift-click on the pole. The first shift-click will remove all electrical connections, and the second will remove all red and green wires. You don't get the wires back.
  • When connecting to a Arithmetic Combinator or Decider Combinator, take care to connect the wire to the correct input or output side. Use ALT-Key-Mode to see direction of combinator.
  • Hovering the mouse cursor over an item will highlight all wires which form the network of the item.
  • Hovering the mouse cursor over a power pole which is part of a network will display the signals on its network. Some items like combinators will also display their input and output signals when hovered over.

Broadcast Information

Sending devices broadcast the amount of Items or Fluids they contain or other data definable by the player. Each amount is broadcast as a numeric value on a 'channel' corresponding to the item they contain. For example, a Storage Tank containing 1000 Crude Oil will broadcast 1000 on the Crude Oil channel.

Multiple broadcasts of the same item or fluid are additive: if there are two connected Storage Tanks with 1000 Crude Oil each, the value of the Crude Oil channel within the network will be 2000.

Wires which are connected together by a junction will pass their signals to the other wires of the same color. For example, if two red wires are connected to the same combinator input, each wire receives the content from the other. This can result in feedback if care is not taken; see Feedback (under Arithmetic Combinator, below) for discussion.

Use of Information

Example condition: "Work only if the count of Iron plates is lower than the count of Steel plates." Remember to set the filter as well.

Receiving devices can use broadcast information, in most cases to enable/disable the device.

They can either compare results between different channels, or compare a channel to a specific value. The pictured inserter works if the count of Iron plates is lower than the count of Steel plates.

Receiving devices sum all signals from each wire connected to them, even red and green wires. For example, if an inserter is connected to a red wire carrying a signal for 20 iron plates, a green wire with 10 copper plates and another green wire with 5 iron plates, the input signal set for that receiver will be 25 iron plates and 10 copper plates.

Basic

File:Circuit-network-example-1.png
A basic circuit network usable to fill a chest with a defined amount of items.

The simplest network is to connect an inserter with a chest next to it, to control the limit amount of items the inserter will put into the chest. (Note that you do not have to connect them using a power pole as the picture shows; you can connect them directly.)

Similar methods are possible for gating fluid by connecting a storage tank to a small pump, or gating electricity by connecting accumulators to a power switch to the respective network.

Combinators

Combinators can function as both receiving and sending devices and allow more advanced functions to be used on a circuit network.

  • The Constant Combinator broadcasts up to 15 values on any of the channels for whatever networks it is connected to. (You cannot currently specify whether a value should be on the red or green channel; if you need different values, use two combinators, one for each color wire.) You can use any item channel or any of the virtual signal channels.
    • Note that using two of the 15 slots to broadcast values on the same channel is the same as broadcasting the sum of the two values from one slot.
  • The Arithmetic Combinator performs arithmetic operations on input values and broadcasts the result to the specified output channel. The input and output channels can be any item channel or any of the virtual signal channels.
    • Connecting: The Arithmetic Combinator connects to a red or green network on its input side (the terminals are set into the main body and look like spark plugs) and performs an arithmetic calculation which is broadcast into the specified channel on its output side (the output wires appear to stretch out a bit from the body of the device).
    • Feedback: Note that the input network and the output network are not the same network. Connecting the output network back to the input network will result in a feedback loop. For example, adding 1 to the value for Copper Plates and broadcasting it as Copper Plates is an action that results in an infinite loop if output is connected back to input. The value for Copper Plates will rapidly (but not instantly) shoot upward. (Fun fact: The rate at which it climbs is the current tick rate) This technique can be combined with Decider Combinator logic to make electronic clocks, gates, and other systems; see Combinator Tutorial for advanced techniques.
    • Each: This combinator can use the 'Each' signal for both input and output, in which case all non-zero input channels will have the combinator's operation performed and broadcast on the output side. Having Each signals for input and output and using a non-changing operation (like adding zero) is equivalent to having a 'one-way' wire; all the information from the input network is copied to the output network, but the reverse is not true.
    • Multi-network: The Arithmetic Combinator can be joined to both red and green networks on the input side and will sum their inputs.
  • The Decider Combinator functions much like an Arithmetic Combinator, but is designed to compare values. Essentially, it is a conditional. In terms of Connecting, Feedback, and the Each signal it functions as specified above. In addition, it can handle the Everything and Anything signals, and performs more complex functions than summing when attached to multiple networks. See the Decider Combinator page for more details on how to use this.

Logistic Network

The Logistic network used by Logistic Robots is essentially a third network (a wireless one), along with the green and red wired network. The Logistic Network is based on proximity to a central Roboport.

Some devices can also be connected to the logistic network. If a device has conditions set for circuit and for logistic network, it will become activated if both conditions are true.

See Logistic network and Roboport for more information.

Items/Devices

In v0.13 the Factorio developers made many devices connectible to the circuit network, so there are many possibilities to control and program your factory based on conditions.

Examples (Version 0.14.x and higher)

Circuit Network Cookbook

Examples (outdated, but basic concept still applies)

History

  • 0.13.0:
    • Many machines are now connectible to the circuit network.
    • Wire disconnecting is incorporated into the latency hiding.
    • Wires are now highlighted on entity mouseover.
    • Reduced memory usage of circuit network.
  • 0.12.33:
    • Fluid values are rounded to the closest value instead of rounding down when transmitted to circuit network.
  • 0.8.3:
    • Circuit network contents info has colored slots to specify the network it represents.

See also