Contribution to the factory io project 138 (Advanced MUTEX algorithm)

Hello:

In post #136, the MUTEX algorithm was programmed in a very basic way—using only two variables (input and output)—so the locking and unlocking mechanism was essentially a simple interlock. Now, we are going to make it more complex: we are using 8 inputs served by 4 directional tables to sort two types of boxes, as shown in the video. Obviously, replicating what is seen in the video is simple; the real programming challenge lies in creating a function that allows at least two boxes to enter whenever possible…

Here is the scene; I hope to see it implemented by a student here soon:

Regards

Hello:

To the creators of FACTORY IO:

When the day comes that you wish to share the beta version of the new FACTORY IO, this project is the base scene I will use to test it. I should mention that running this scene for 40 minutes without the program slowing down or crashing is quite an achievement; I realize you might not fully grasp the significance of this—while the setup is manageable when limited to a maximum of two boxes, doing the same thing with four boxes at once is a completely different story.

Let me demonstrate this: observe where the pallets stop relative to the detector most of the time, versus where they stop at these specific timestamps:

13:16, 14:45, 15:16, 16:32, 17:18, and at 23:00, you can see the pallets are misaligned.

Obviously, such a discrepancy is unacceptable in a real-world scenario, as the required precision would be impossible to achieve…

You see, very few people know this simulator as well as I do; I’ve had to use code to fix many errors in the simulator to make my scenes work. That’s actually an advantage when learning to program—as I’ve mentioned before, the fact that the simulator isn’t perfect is a plus—but there is a difference between that and actual system improvement.

I’m pointing this out to show that it’s not just about making things look better or adding features that are essentially “more of the same.” There are details you simply wouldn’t know about unless testing reveals them—and, obviously, the specific tests I’m running here aren’t something just anyone can perform.

I’ll add that in a real-world setup—using a physical PLC rather than Factory I/O—communication and performance will improve significantly; I guarantee it.

Finally, I connect Factory I/O directly to the Schneider PLC server. If you are using platforms that require additional intermediaries, I recommend moving the detectors further away from the stop; otherwise, the system will fail—believe me.

Regards.

Hello:

If everything went well, the result is this video.

I hope to see it online soon; once the school year starts, if someone is up for it, let them upload it to YouTube and we can discuss it.

Regards.