I made this video for one of my colleagues at school to demonstrate how one of our Actual Lab Training Conveyors can be Simulated using Factoryio. This Simulation uses both Part Present Sensors and a Pulse Counter as an Encoder to determine where the box is as it is transported along the conveyor. The chosen conveyor speed minimizes the affect the processing and communication delays, however, a second video will be posted with a faster, and therefore more difficult to control, conveyor.
Here are my files for Rockwell PLC. I’ve also included a PDF of the program in case you do not use Rockwell so you can convert to another platform. The program provided is a bit improved from the one I show in the video. Rejects have been accounted for, conveyor speed adjustment has a finer increment and bins will accumulate up to 5 parts before the remover is turned on allowing students time to observe the results.
Sort by Color - PLC.zip (1.7 MB)
Here are my files for Control IO. Again, I have also include the PDF (one and two page version) of the code. I may add notes and repost since Control IO is a bit more difficult to follow than the PLC version.
Sort by Color - Control IO.zip (1.2 MB)
Note: for the Control IO to work correctly, go to Control IO settings and uncheck the option “Sync Factory I/O”. The code must be running when the Factory is not so the proper reset can occur.