Skip to content

DIGI2-FEUP/FESTO-MPS-Configuration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

32 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏭 FESTO Modular Production System (MPS) - Setup Guide

This guide explains how to set up and configure the FESTO MPS system.

πŸ“Œ System Overview

🏭 FESTO MPS

 ⬇️ Cable Connection

πŸ“Ÿ PLC

 ⬇️ Modbus Protocol

πŸ“ Raspberry Pi (CODESYS)

 ⬇️ OPC UA Protocol

πŸ–₯️ Dinasore (4DIAC-IDE)


⚑ Quick Start: Automatic Operation

  • If everything is functioning correctly, no configuration is required! Simply connect the factory system to power, and everything should run automatically.

  • However, if there is an issue with the PLC or Raspberry Pi, check the configuration steps below.


βš™οΈ PLC Configuration

πŸ”² Model:

  • Schneider

πŸ” Access

  • The communication is established via a blue interface cable with a DIN plug. This cable contains an FTDI chip which requires the CH340 Driver (USB to Serial). For any assistance, contact Daniel from I004.

  • Communication with the PLC is handled through the UNITELWAY Driver.

πŸ–₯️ Setup and Programming

  • To configure the PLC, you'll need to use PL7 Pro (an older Schneider IDE for Telemecanique PLCs).
  1. Identify the Comm Port number (COMXX) in the device manager.

  2. Open PL7 Pro and navigate to:

    • PLC -> Define PLC Address -> Options -> Configuration of the driver -> UNITELWAY Driver -> Configuration

    • Change the port to match the Comm Port number from the device manager.

  3. Once connected, you can modify the settings or upload the project .stx file to the PLC. The project file is available here.

🌐 Communication

  • The physical IN/OUTPUTS from FESTO MPS to PLC mapping is available in this Excel.

  • The PLC is configured to run on 192.168.0.10

  • It hosts a MODBUS TCP/IP server (port 502) which maps all inputs and outputs to IB/QB.

  • This mapping is available in the CODESYS Project at: Device -> Ethernet -> Modbus_TCP_Master -> Modbus_TCP_Slave -> ModbusTCPSlave I/O Mapping

πŸ“ Note: If the PCL needs to be changed, both the PL7 Pro program and the .stx project must be substituted, as they are specific to the currently installed PLC.


πŸ“ Raspberry Pi Configuration

πŸ”² Model:

  • Raspberry Pi 4

πŸ” Access

  • IP: 192.168.0.100

    πŸ“ Note: this IP must be 192.168.0.100 due to PLC configuration, which whitelists MODBUS communication for this address.

  • Alternative IP: 10.227.17.233 or mpscontroller.local

  • Username: pi

  • Password: raspberry

  • You can SSH into the Raspberry Pi using the following command:

    ssh pi@mpscontroller.local

πŸ–₯️ Programming

  • The Raspberry Pi must be running CODESYS RUNTIME and should be configured as in the following image:

image

  • The Raspberry Pi is configured with a CODESYS project. The project can be found here.

πŸ“ Note: CODESYS only works for one hour, after which time the system needs to be reset (remove the white plug and reconnect).

  • CODESYS Login:
    • Device name: mpscontroller.local
    • Username: admin
    • Password: raspberry

πŸ“ Note: CODESYS version: 3.5 SP19

🌐 Communication

  • Protocol: OPC UA

  • Port: 4840

  • CODESYS Mapping: Device -> PLC Logic -> Application -> Symbol Configuration

  • Useful tool: Prosys OPC UA Browser

    • Login: opc.tcp://mpscontroller.local:4840

    • Variables: Objects -> DeviceSet -> CODESYS Control for Raspberry PI 64 SL -> Resources -> Application -> GlobalVars -> GVL

    • The NodeId variable attribute value corresponds to the name to use in 4DICA-IDE

  • Variables: add a new OPC UA variable in CODESYS:

    • Declare variable: Device -> PLC Logic -> Application -> GVL

    • Map variable to OPC UA: Device -> PLC Logic -> Application -> Symbol Configuration


πŸ¦– Dinasore

πŸš€ Run Dinasore

Add Function Blocks

  • Copy your function blocks (.fbt and .py files) to the Dinasore resources directory dinasore-2.0/resources/function_blocks/

Navigate to the Dinasore Directory

  • Open your terminal or command prompt and change to the Dinasore directory:
cd /path/to/dinasore-2.0

Execute Dinasore

  • Start the Dinasore application by running:
python3 core/main.py

βš™οΈ Configure 4DIAC-IDE 1.11.0

Launch Workspace

  • Open 4DIAC-IDE and click Launch to launch the default workspace

Create a New System

  • Chose Create New System option, then enter the <workspace_name> and click Finish

Create the System Configuration

  • Copy the function blocks (.fbt and .py files) to the 4DIAC workspace 4diac-ide-1.11/4diac-ide/workspace/<workspace_name>/<fb_folder_name>/

πŸ“ Note: You may need to restart the 4DIAC-IDE in order to the new function blocks appear in the Pallete.

Create the System Configuration

  • Open the System Configuration tab and build the following schematic using the components in the Pallete:

system_conf

Create the Main Application using the Function Blocks

  • Open the <workspace_name>App tab and build your main aplication using the components added before to the Pallete, as in the following example:

4diac_app

πŸ“ Note: don't forget to correctly set all the needed function blocks inputs

  • After building the application, the function blocks need to be mapped, for this: right-click on the block -> Map to ... -> RaspberryPI -> EMB_RES

πŸ“ Note: The system variables state can be seen in real time by clicking in Debug -> Debug System -> <workspace_name> and then right-clicking a function block -> πŸ” Watch

Deploy the System

  • Deploy the system by right-clicking the <workspace_name> in the left tab and then click Deploy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages