Could someone please identify which sensors are used in the Production line scene?
Factory I/O is a simulation software to learn PLC programming.
You can use OpenPLC to connect with the Modbus protocol to Factory I/O.
This code is written to run the "production line" one of the Factory I/O scene's.
Is used the OpenPLC Runtime on Windows for this project and the language is FBD.
The line exist out of two CNC machine centers and some conveyers. The CNC centers look difficult but it is a lot easier then it seems.
I made a small video (3:20min) to give you an idea what the code does.
https://www.youtube.com/watch?v=20qy7CKbF7E? Explanation program First I started with some good RTFM (Read The F***ng manual) about the machine center:
https://docs.factoryio.com/manual/parts/stations/ Then I opened the scene's and changed all the variables.
I use a variable name based if it is an Input or Output, The location, The object and the function.
I_ = Input
Q_ = Output
Z = Zone
MC = Machine Center
Sens = Sensor
Pb = Pushbutton
BC = Band Conveyer
RC = Roller Conveyer
So for example: I_Z01BC01ArrivedSens
is an input in Zone 1 and is the arrived sensor of Band Conveyer 01.
I added the adjusted Scene to the ZIP file.
Object oriented programming
You have a few objects in the program like the belt conveyers but there is not a lot of control for those in the scene (no manual switch not a lot of sensors) so I did not bother to write a Function block for that. I did made a function block for the Machine center.

So both Machine centers use the same function block.
This code can be improved upon to make it easier to spot mechanical or electrical failures but it is just for training and learning so I will put my time in solving the next scene's.
How to run the code?Factory I/O set-upFirst of all you need Factory I/O (There is a free trail for 30 days without credit card) => Factoryio.com.
Then you unzip the file added to this post and you copy the scene "Production_Line_renamed_var.factoryIO" to the default location of the Factory I/O scene's.
Documents\Factory IO\MyScenes
You open Factory I/O and open the scene and go to "drivers" (key "F4").
The mapping should be already made but some options should be checked/changed.
- Write down the IP address (to be entered in the settings for OpenPLC Runtime slave settings).
Check the configuration (IP address and Network adaptor can be different).
OpenPLC Runtime settings
- Run Open PLC runtime and add a slave.

- Change the IP address to the same address as in Factory I/O settings.
Make sure the addresses look like this:
- Upload the OpenPLC runtime project "MachineCenter.st" (file from ZIP file).
- Set the OpenPLC in Run
- Set Factory I/O in the play setting.
In the Zip file there is also the OpenPLC editor file for you to change and take a look at.
Let me know what you think if you downloaded it.
If you are stuck on setting up Factory I/O with OpenPLC you can also find a video on how to do it on my YouTube Channel.
Could someone please identify which sensors are used in the Production line scene?