Programmable Controllers

by Thaui

Programmable circuit network controller

Content
3 years ago
0.15 - 0.18
19
Circuit network

g Code Examples

5 years ago

Do you have any basic program examples so we can see how these work?

4 years ago

Yes please, really interested in using. Have no idea where to put what...
Some examples would be appreciated.

4 years ago

Not the author, but after playing it for a while I managed to make something that works:

Put down a power module, a controller module, and a CNI module in a row in order.
Open the GUI of the controller module and set the signals to this in order:

blank, blank, blank, blank, blank, blank,
GET@ 15, SET@ 16, YLD# 30, VAL# 1 SET@ 16, YLD# 30,
JMP# 6, blank, blank, [any signal you want with number 0]

After that turn the controller module on and observe the output from the CNI module. You should see the signal you put on the last slot blinking.

Explanation:
The first 3 slot (slot 0-2) is special to the controller. The first 2 holds the status of the controller, and the 3rd hold the content of the register of the controller.
The slot 3-5 is blank, which will be treated as NOP (no operation).
The slot 6 has GET@ 15, which will copy the content (including the signal type) of slot 15 to register, with is the last slot in the controller.
The slot 7 has SET@ 16, which will copy the content of the register to slot 16, which is the 1st slot of the CNI module.
The slot 8 has YLD# 30, which will make the controller wait for 30 ticks before continue.
The slot 9 has VAL# 1, with will set the number of the content in the register to 1 without changing the signal type.
The slot 10 and 11 is explained above.
The slot 12 has JMP# 6, with will make the execution of the controller jumps back to slot 6, making a loop.

4 years ago

are there any non-programmer friendly wiki/guideline/examples for factorio?

4 years ago

Working on a guide for this mod, stay put.

3 years ago

I will include documentation about the mod and every components inside the mod with the help of informatron, stay put.

New response