Signal Multiplexer

This board is to show, discuss and archive useful combinator- and logic-creations.
Smart triggering, counters and sensors, useful circuitry, switching as an art :), computers.
Please provide if possible always a blueprint of your creation.
gaddhi
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sat Sep 09, 2017 4:36 pm
Contact:

Signal Multiplexer

Post by gaddhi »

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.
multiplexer-screenshot.jpg
multiplexer-screenshot.jpg (169.45 KiB) Viewed 835 times
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.
multiplexer-timer.jpg
multiplexer-timer.jpg (19.06 KiB) Viewed 1147 times
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.
multiplexer-single-sender.jpg
multiplexer-single-sender.jpg (22.16 KiB) Viewed 875 times
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.
multiplexer-extendable-sender.jpg
multiplexer-extendable-sender.jpg (40.32 KiB) Viewed 875 times
Event receiver
Specify a single channel on which to receive signals. Outputs the received input just in the frame, where the signal is received.
multiplexer-event-receiver.jpg
multiplexer-event-receiver.jpg (20.07 KiB) Viewed 1147 times
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.
multiplexer-continuous-receiver.jpg
multiplexer-continuous-receiver.jpg (27.11 KiB) Viewed 1147 times
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)
multiplexer-extendable-receiver.jpg
multiplexer-extendable-receiver.jpg (78.53 KiB) Viewed 1144 times
Last edited by gaddhi on Wed Nov 27, 2024 6:14 pm, edited 3 times in total.
Stin
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Fri Nov 09, 2018 7:16 pm
Contact:

Re: Signal Multiplexer

Post by Stin »

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
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
gaddhi
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sat Sep 09, 2017 4:36 pm
Contact:

Re: Signal Multiplexer

Post by gaddhi »

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.
pfr
Burner Inserter
Burner Inserter
Posts: 8
Joined: Fri Dec 15, 2023 7:26 pm
Contact:

Re: Signal Multiplexer

Post by pfr »

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?
Rusper
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Nov 26, 2024 8:49 pm
Contact:

Re: Signal Multiplexer

Post by Rusper »

That is really cool great work.
gaddhi
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sat Sep 09, 2017 4:36 pm
Contact:

Re: Signal Multiplexer

Post by gaddhi »

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?
This has technical reasons.

-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.
pfr
Burner Inserter
Burner Inserter
Posts: 8
Joined: Fri Dec 15, 2023 7:26 pm
Contact:

Re: Signal Multiplexer

Post by pfr »

gaddhi wrote: Tue Nov 26, 2024 11:01 pm
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?
This has technical reasons.

[...]
Ah, makes sense. Thank you for the explanation. Happy to hear my question led you to find more improvements to make.
Post Reply

Return to “Combinator Creations”