I wanted to write a program using the M221 PLC in EcoStructure Machine expert with a Factory Simulation in Factory IO and maybe even use an HMI with it, Factory IO doesn't directly Support Schneider's Software in this Tutorial, I will try to connect both Softwares.
Open Factory IO (preferably as Administrator) and Create a simple Scene
Choose Modbus TCP/IP Client as a way to connect to PLC then configure Drivers
Open Ecostruxure Machine Expert and choose the M221 that has Ethernet Support
Create the program and follow same memory addressing as Factory I/O
First: Open Factory I/O and create a simple Scene project, in this example I created simple Panel with Emergency stop Button, a Start Button and a Digital display that we are going to talk about later
Go to the Drivers page and choose your inputs and outputs
For the I/O Config , we are going to make some simple changes and leave rest as Default
for more info on the configuration check this documentation link :
https://docs.factoryio.com/manual/drivers/modbus-server/#configuration
Next , we go to Ecostruxue Machine Expert, we choose a Controller that as Ethernet support and leave Ethernet config as it is in Default.
Next, Create a simple program and use memory addresses to connect inputs and outputs of Factory I/O to those of Ecostruxure
if it's digital input 0 in factory I/O then it corresponds to digital Memory address 0 in Ecostruxure
For the digital display , I set the Data type to Integer so I can display the numerical value
I know that are so many things that isn't covered in this tutorial, so I will try to update it when I ave something to add, meanwhile:
Contact @fethiOuerdane on Twitter or fethi.ouerdane1@gmail.com if you have any question or anything .