I know, it has been done before, but this is my take on a signal multiplexer over Green wire.
It allows to send multiple independent signals in different channels over a single green wire by multiplexing.
The blueprint book contains all components to set up a multiplexer: https://factorioprints.com/view/-OCKqMhwx74AwrsuqRQl
The template blueprints allow setting up the channels initially and they can be adjuster later on the fly.
Instead of using Radar buildings, one can connect the clock with senders and receivers directly with a green wire over power poles.
Clock
In the clock blueprint you set the number of available channels "S" and it loops through every one of them to provide senders and receivers with indicators when to send and receive. Valid channel numbers are 0, 1, ..., S-1.
Single sender
Specify a single channel on which to send data and provide signals of what to send.
The only restriction is, that the signal "Green wire" can't be used as data, since it is reserved for the channel index.
Extendable sender
Extendable setup of multiple senders
Each row of combinators can send on a different channel independently from each other.
The only restriction is, that the signal "Green wire" can't be used as data, since it is reserved for the channel index.
Event receiver
Specify a single channel on which to receive signals. Outputs the received input just in the frame, where the signal is received.
Continuous receiver
Specify a single channel on which to receive signals. Outputs the received input continuously and update it whenever the value of the sender changes.
Extendable receiver
Extendable setup of multiple receivers
Each row of combinators receives on a different channel independently from each other.
The upper three rows receive events and output them in the frame, they receive them. (Event receiver)
The lower three rows output the signals continuously and update them on changes. (Continuous receiver)
Signal Multiplexer
Signal Multiplexer
Last edited by gaddhi on Wed Nov 27, 2024 6:14 pm, edited 3 times in total.
Re: Signal Multiplexer
I hadn't even thought about the multiplexer when I developed my EPC. It allows you to transfer even more data. I don't think I'll need it, but it looks interesting.
May I ask what you are using it for? I just want to make sure that I haven't overlooked an application and that my solution has unexpected limits
May I ask what you are using it for? I just want to make sure that I haven't overlooked an application and that my solution has unexpected limits
English is my second language and I am not good at languages
My Creations:
EPC - Encodes Planetary Control
Circulet Examples:
Signal Encoding & Decoding
Signal Filtering
My Creations:
EPC - Encodes Planetary Control
Circulet Examples:
Signal Encoding & Decoding
Signal Filtering
Re: Signal Multiplexer
Thanks, currently I use it for global available item statistics and a simplistic LTN-like train-pull-system (single train for a group of products on a single channel). In my previous modded Space Exploration play-through I used this multiplexer to trigger item requests (with priorities) from other surfaces.
Re: Signal Multiplexer
This is really cool.
When you were designing this, why did you go with -2 as the magic number for your combinators? Did -1 not work because it caused some technical issue with the circuits, or did you choose -2 for some more abstract reason?
When you were designing this, why did you go with -2 as the magic number for your combinators? Did -1 not work because it caused some technical issue with the circuits, or did you choose -2 for some more abstract reason?
Re: Signal Multiplexer
That is really cool great work.
Re: Signal Multiplexer
This has technical reasons.pfr wrote: Tue Nov 26, 2024 2:46 pm This is really cool.
When you were designing this, why did you go with -2 as the magic number for your combinators? Did -1 not work because it caused some technical issue with the circuits, or did you choose -2 for some more abstract reason?
-2 is the magic number for the combinators on the receiver side.
0 is the magic number for the combinators on the sender side.
This was done to take into account the delay of two ticks between sending the data and receiving the data.
On the sender side, it was necessary to separate the channel-index from the data on the green main cable. This was done by an Arithmetic combinator, that extracts the channel-number and it causes a 1-tick delay.
The second 1-tick delay comes from the "channel number=0" decider combinator on the sender side, that emits the data again one tick later.
This 2-tick delay is also accounted for in the clock-blueprint, which increments the channel number S by 2. So in order to have 10 data channels, the clock needs to loop through 12 channels, so that every channel can account for the 2-tick delay.
This also means, that the data of channel 0 (1, 2, 3, ...) is on the green cable, when the channel number on the green cable is -2 (-3, -4, -5, ...).
Thank you for your comment. Revisiting the design made me realize, that I can remove several arithmetic combinators in the extendable sender and I have updated the blueprint and screenshots.
EDIT: Oh my. I have just found a way to reduce the delay from 2 ticks to 1 tick using V2.0-features to split off the channel-index from data on the sender side, allowing me to remove the Arithmetic combinator. I have updated the blueprints again. And now -1 is the new -2.
Re: Signal Multiplexer
Ah, makes sense. Thank you for the explanation. Happy to hear my question led you to find more improvements to make.gaddhi wrote: Tue Nov 26, 2024 11:01 pmThis has technical reasons.pfr wrote: Tue Nov 26, 2024 2:46 pm This is really cool.
When you were designing this, why did you go with -2 as the magic number for your combinators? Did -1 not work because it caused some technical issue with the circuits, or did you choose -2 for some more abstract reason?
[...]