Indusol#PROmesh P10+_Part06_Let’s use the RSTP function!

This is the sixth episode of Indusol’s network equipment article to be developed.In this installment, we assemble a WAGO 750-8215 and RSTP network to create a simple Ethernet/IP duplex network.

Come on, let’s enjoy FA.

Reference Link

http://soup01.com/en/category/indusol_en/

RSTP

RSTP (Rapid Spanning Tree Protocol) is an extended version of the Spanning Tree Protocol (STP) used in networks to prevent loops and manage redundant paths in Ethernet networks, standardized as IEEE802.1w,designed to provide rapid convergence of network topologies.

In addition, RSTP recovers from link failures very quickly, typically achieving convergence in less than one second.This rapid response significantly reduces network downtime compared to traditional STP!

Port States

RSTP defines several port states: (1)

  • Discarding: Port is not forwarding packets and is not learning MAC addresses.
  • Learning: Port is learning MAC addresses but not forwarding packets.
  • Forwarding: Port is forwarding packets and joining the network
  • Backup: Redundant port available for backup in case the primary port fails.

Port Roles

Root Port

A port that receives Bridge Protocol Data Units (BPDUs) for the Root Bridge, messages exchanged between switches on the network.

From https://www.cisco.com/c/en/us/support/docs/lan-switching/spanning-tree-protocol/24062-146.html

Designated Port

The port selected for each local area network (LAN) segment has the lowest route path cost.The higher the link speed, the lower the cost value.

From https://www.cisco.com/c/en/us/support/docs/lan-switching/spanning-tree-protocol/24062-146.html

Alternate Port

If a port is not used as a Designated Port, it becomes an Alternate Port.This is a backup for the Root Port in the event of a failure and is blocked during normal operation of the Root Port.

From https://www.cisco.com/c/en/us/support/docs/lan-switching/spanning-tree-protocol/24062-146.html

Backup Port

This is a backup of the designated port.If the root port fails, the backup port becomes the new designated port; the backup port is normally blocked while the Designated Port is operating normally.

From https://www.cisco.com/c/en/us/support/docs/lan-switching/spanning-tree-protocol/24062-146.html

Edge Ports

Edge ports are ports that connect directly to end devices and are treated differently in RSTP.They can transition to the forwarding state immediately, allowing for faster communication.

Ports that are well configured as EDGE PORT receive special treatment in the spanning tree algorithm.Specifically, because it is connected to an end device, it is considered to be in no danger of this causing a loop and can immediately transition to the Forwarding state.This reduces the required firewall and network switching time and ensures rapid communication.

While a normal port must go through the Blocking state (where traffic is not forwarded) or other transition states due to spanning tree, the EDGE PORT goes directly to the Forwarding state, thus providing a quick connection between the switch and the end device.

BPDU

RSTP uses Bridge Protocol Data Units (BPDUs) to exchange information between bridges.This ensures that network devices know each other’s state and overall topology.

Compatibility

RSTP maintains backward compatibility with legacy STP, allowing both protocols to coexist on the same network.

How It Works?

The operation of RSTP can be briefly summarized as follows

  1. Root Bridge Selection

RSTP begins by selecting the root bridge based on bridge priority and MAC address; the bridge with the lowest ID becomes the root.

  1. Link Monitoring

RSTP actively monitors link status to quickly detect failures.When a link goes down, RSTP recalculates the topology using the remaining links.

  1. metastasis

Unlike conventional STP, RSTP allows ports to transition directly from discard to forwarding without going through the listening or learning state.

UR20-FBC-EIP-ECO?

The UR20-FBC-EIP-ECO fieldbus coupler is an EtherNet/IP™ participant developed according to IEC 61158.The coupler is the head module of the u-remote system bus and can connect up to 16 active u-remote modules.

The EtherNet/IP coupler also has two Ethernet ports and an integrated switch in a line network structure.

The UR20-FBC-EIP-ECO fieldbus coupler can be accessed from a web server application via Ethernet.Thus, all information such as diagnostics, status values, and parameters can be read and all connected modules can be simulated or forced to operate.

The station’s main power supply is also built into the coupler.Power is supplied through a 4-pole connector.

Connection Options

These are the specifications for the number of Ethernet/IP connections for UR20-FBC-EIP-ECO.

Status word

This is the Mapping of the diagnostic Status word for UR20-FBC-EIP-ECO.

Implementation

First establish communication between WAGO’s PFC200 and Weidmuller’s Ethernet/IP Coupler.

Weidmuller Side

The first step is to set up from the Weidmuller side.

Webserver

UR20-FBC-EIP-ECO is mounted on the Web Server, so access the Web Server.

IP

There are two default settings for IP address assignment: DHCP and Static. Initially it will attempt to obtain an address via DHCP, but if no address is received via DHCP after 30 seconds, the IP address 192.168.0.222 will be used for Static and it will continue to request an address via DHCP.Next, go to the web server and change the IP address with Parameter.

Fieldbus Properties

Next, open the Fieldbus Properties Menu and check the Ethernet/IP related settings.

You can check the number of Bytes of input/output for each Instance in this Menu.

Module Offset

From the webserver, you can also see its Byte Offset in the input/output data occupied by each Module.

For example, in the UR20-16DI-P 16-point input module shown below, the module itself is the 2nd Byte of data, and the status of each input can be checked as the 0th Bit of the 2nd Byte…

WAGO Side

Now let’s set up the WAGO PFC200 750-8125 side.

WAGO PFC200 750-8125 also has Webserver functionality, so please Login to the Web Server.

Configure IP

Note that IP changes take effect immediately, and changes to the Network Interface may cause the connection to drop; set Static IP to Network>TCP/IP Configuration>IP Socure and set the IP address.

Add EDS File

Register a new EDS File at Tools>Device Repository.

Click Install.

Import the EDS File downloaded earlier.

Done!

Add Etherent

Right click on Device>Add Device to add an Ethernet Driver to the Controller of the WAGO PFC200.

Choose Ethernet Adapter>Ethernet and add an Adapter with Add Device.

IP Configuration

Go to General>Network Interface>Browse and select the appropriate Network Interface.

Set Br0 and proceed with Ok.

Add Ethernet IP Scanner

Next, add the Ethernet IP Scanner.

Add Ethernet/Ip Adapter

Finally, add Weidmueller’s UR20-FBC-EIP-ECO to your Ethernet/IP network.

Done!

IP Configuration

General>Address Settings to match Weidmueller’s Ethernet/IP Coupler.

Connections

Next, go to Connections>Edit Connection to change the connection settings for Exclusive Owner.

This is Codesys’ Ethernet/IP Connection configuration screen.

O–>T Size

O–>T Size should match the number of Bytes in Instance 104 of the Weidmueller Ethernet/IP Coupler.

T‐‐>O Size

T–>O Size should match the number of Bytes in Instance 103 of the Weidmueller Ethernet/IP Coupler.

Done!Codesys also automatically declares variables according to the size set on the Connection Settings screen.Codesys also automatically declares variables according to the size set on the Connection Settings screen.

Mapping

Since the number of Bytes occupied by the Ethernet/IP Coupler is large, set a fixed address in the Address field of the input/output.

Program

The next step is to create a program.

DUT_26ByteArray

This is a 26Bytes array structure.

TYPE DUT_26ByteArray :
STRUCT
_data:ARRAY[0..25]OF BYTE;
END_STRUCT
END_TYPE

DUT_36ByteArray 

This is a 36 Bytes array structure.

TYPE DUT_36ByteArray :
STRUCT
_data:ARRAY[0..35]OF BYTE;
END_STRUCT
END_TYPE

GVL

Let’s create input/output variables using the structure we defined earlier.

The address address after the AT % should match the Mapping setting.

{attribute ‘qualified_only’}
VAR_GLOBAL
InputData AT %IB100:DUT_36ByteArray;
OutputData AT %QB100:DUT_26ByteArray;
InputRegister AT %IW1:WORD;
OutputRegister AT %QW1:WORD;
END_VAR

Login

Download the project to the CPU.

Result

The Ethernet/IP status is “EIPConnected” and “Operational”.

We were able to communicate with WAGO’s PFC200 without error.

Implementation

Next, in addition to Indusol’s PROmesh P10+, we will build a RSTP network.

WAGO Side

First build from WAGO’s PFC200 750-8215.

Configure Bridge

Set Port1 and Port2 as Bridge.

Access the WAGO PFC200 Web Server and go to Configuration>Networking>Ethernet Configuration>Bridge Configuration and set X1 and X2 to the same “Bridge1X1 and X2 should be set to the same “Bridge1”.

Configure RSTP

Next, configure RSTP with PFC200: open the Netwokring>STP/RSTP Menu.

Put the Enabled Checkbox in the Menu under Parameter Settings.

Also, select Bridge1 for Bridge and set Mode to RSTP.

Set Port X1 and PortX2 as Edge Port.

Indusol Side

The next step is to configure the PROmesh P10+ side of Indusol.

Configure RSTP

Go to Indusol’s PROmesh P10+ web server and click on Redundancy>RSTP.

This is the RSTP setting screen.

First, activate the RSTP function.

Next, check the Port to be used in this article and set the Priority.

Result

I was able to confirm that the RSTP function was Enabled from WAGO’s Web Server.

We have confirmed that the RSTP functionality has been enabled from the Web Server of Indusol’s PROmesh P10+.

Normal Status

This is the status of each port when the network is normal.

Port6 CommunicationError

This is the Port status when Port 6 failed.

Port2 CommunicationError

This is the Port status when Port 2 failed.

In this video, you can see the operation of switching the Port1 and Port2 routes of the WAGO PFC200.

https://youtube.com/shorts/cYIDwBiQgVQ

https://youtube.com/shorts/N2HcVIDQcM4

Footer_Basic

Please Support some devices for my blog

Amazon Gift List

Find ME

Twitter:@3threes2
Email:soup01threes*gmail.com (* to @)
YoutubeChannel:https://www.youtube.com/channel/UCQ3CHGAIXZAbeOC_9mjQiWQ

シェアする

  • このエントリーをはてなブックマークに追加

フォローする