Beckhoff#Let’s try the EL6731-0010 Profibus Slave Terminal!

In this article, we will use Beckhoff EL6731-0010 to set up Profibus Slave to communicate with Siemens S7-1516F PROFIBUS Master.

Let’s get started!

Reference Link

Beckhoff#Let’s use EL6731 Profibus Terminal

Foreword

Thank you from the bottom of my heart for visiting my technical blog and YouTube channel.

We are currently running the “Takahashi Chris” radio show with Full-san (full@桜 八重 (@fulhause) / X) which I deliver every Wednesday night.

Sharing, not hoarding, technical knowledge

We publish technical information related to factory production technology and control systems for free, through blogs and videos.

With the belief that “knowledge should be accessible to everyone,” we share practical know-how and real-world troubleshooting cases from our own field experience.

The reason we keep it all free is simple: to help reduce the number of people who struggle because they simply didn’t know.

If you’ve ever thought:

  • “Will this PLC and device combination actually work?”
  • “I’m having trouble with EtherCAT communication—can someone test it?”
  • “I want to try this remote I/O, but we don’t have the testing environment in-house…”

Feel free to reach out!If lending equipment or sharing your configuration is possible, we’re happy to verify it and share the results through articles and videos.

(We can keep company/product names anonymous if requested.)

How can you support us?

Currently, our activities are nearly all unpaid, but creating articles and videos takes time and a proper testing environment.If you’d like to support us in continuing and expanding this content, your kind help would mean a lot.

Membership (Support our radio show)

This support plan is designed to enhance radio with Mr Full.

https://note.com/fulhause/membership/join

Amazon Gift List (equipment & books for content production)

Lists equipment and books required for content creation.

https://www.amazon.co.jp/hz/wishlist/ls/H7W3RRD7C5QG?ref_=wl_share

Patreon (Support articles & video creation)

Your small monthly support will help to improve the environment for writing and verifying articles.

https://www.patreon.com/user?u=84249391

Paypal

A little help goes a long way.

https://paypal.me/soup01threes?country.x=JP&locale.x=ja_JP

Just trying to share things that could’ve helped someone—if only they’d known.

Your support helps make knowledge sharing more open and sustainable.

Thank you for being with us.

soup01threes*gmail.com

https://x.com/3threes2

Technical knowledge shouldn’t be kept to ourselves.

EL6731-0010?

The PROFIBUS Slave Terminal EL6731-0010 enables simple data exchange between EtherCAT and PROFIBUS.PROFIBUS network as a slave device.

  • PROFIBUS DP, PROFIBUS DP V1
  • Slave up to 12 MBit/s

state machine

The EL6731-0010 can be configured in several ways:

  1. Configuration of EL6731-0010 with StartUp SDOs [} 168]: StartUp SDOs are calculated by the EtherCAT Configurator and transferred to the EtherCAT master in the same way as TwinCAT System Manager etc.
  2. Configuration and backup parameter storage of the EL6731-0010: Here, the PROFIBUS slave configuration is stored in the Flash memory of the EL6731-0010.

This article is Method 1.

flow

Here is a FLOW of EL6731-0010 operation when using StartUp SDO.

INIT

After power-up, EL6731-0010 is in INIT state and no DP is set; EL6731-0010 is not active on PROFIBUS.

PREOP-DP slave configuration

DP configuration is performed by SDO download in the PREOP state.The objects to be loaded must be sent with complete access or consistency nesting (first SubIndex 0 is set to 0, then SubIndex 1-n is written, then SubIndex 0 is set to n).

Therefore, care should be taken to always start with object 0xF800. DP CfgData is transferred with object 0x8002.Upon receipt of object 0x8000, the EL6731-0010 becomes active on PROFIBUS (FDL only, no DP).The EL6731-0010 supports automatic baud rate lookup, so there is no need to set the baud rate.

PREOP-PDO Mapping

EtherCAT RxPDO (DP slave with DP input (sent to DP master)) and EtherCAT TxPDO (DP slave with DP output (received from DP master)).

The EtherCAT PDO mapping can be automatically calculated and read by the EL6731-0010 after downloading the 0x8yyz object The PDO mapping object can only write values that the EL6731-0010 has calculated itself The PDO mappingThe writing is only for checking the PDO mapping calculated by the EtherCAT configurator and can be omitted.

SAFEOP-PDO Assign

There is actually an EtherCAT PDO that contains further status information.This PDO is selected in the PDO Assign It is important with respect to the order of the PDOs in the PDO Assign to ensure that the index of the assigned EtherCAT PDO increases with each entry in the corresponding PDO Assign object.Assign to StartUp SDOs, PDO 0x1A7F will be assigned to the status.

OP-Cyclic DP communication

During the transition to SAFEOP, the EL6731 checks the lengths set in Sync Manager channels 2 and 3 against the lengths calculated in PDO Mapping and PDO Assign.

The SAFEOP state is adopted only when these lengths match; the DP function of the EL6731-0010 is active in the SAFEOP state; as long as the EL6731-0010 is in the SAFEOP state, the DP input data sent to the DP master is set to 0.

At that point, switching the EL6731-0010 to OP will send the data from the EtherCAT output to the DP master; the EL6731-0010 operates independently of the EtherCAT cycle.

Implementation

TwinCAT3 Side

First build the Beckhoff TwinCAT3 side.

Add EtherCAT Master

The last step is to build the EtherCAT network: click on I/O>Devices>Add New Item.

Click on EtherCAT>EtherCAT master and proceed with OK.

Configure Ethernet Adapter

Double-click the EtherCAT master you just added and click the Search button on the Tab of the Adapter.

Select the Ethernet Adapter to be used as EtherCAT Master and proceed with Ok.

Done!

Scanning EtherCAT Slave

Right-click on the EtherCAT Master you just added and go to >Scan to search for EtherCAT slaves in the network.

Done!TwinCAT3 can search for EL6731-0010 PROFIBUS DP Slave Terminal, proceed with Yes.

Output Slot Settings

Next, the TwinCAT3 Insert Module screen appears, where you can directly insert each slot.

First insert a 1 WORD Slave-Out/Master-In Slot. That Slot will mean that the EL6731-0010 will transfer 1 WORD to the PROFIBUS Master.

If you want to add multiple Slots at the same time, enter the number of Slots to be added simultaneously in the Multiple field.In the example below, if you enter 4, 1 WORD Slave-Out/Master-In will add up to 4 SLOTs at once.

Done!

Input slot settings

Now add six 1 WORD Slave-In/Master-Out slots at once.

Done!

Result

This is the EL6731-0010 Slot configuration. This configuration must be matched by the PROFIBUS master.

EL6731-0010 Configuration.

The next step is to set the parameters of the EL6731-0010.

This is the EL6731-0010 parameter setting screen.

Station No.

Station No. is the PROFIBUS address of the EL6731-0010; the PROFIBUS master must match this address.

GVL

The next step is to define the variables to be mapped to Process input/output in the Global Variable List.

{attribute ‘qualified_only’}
VAR_GLOBAL
OutDataToSiemenS71500 AT %Q*:ARRAY[0..3]OF WORD;
InDataFromSiemensS71500 AT %I*:ARRAY[0..5]OF WORD;
inDpState AT %I*:USINT;
inPDOState AT %I*:BOOL;
END_VAR

mapping

Now let’s MAPPING the PROCESS variable defined in the GVL with the inputs and outputs of the EL6731-0010.First we want to MAPPING the output data, so click Outputs>Right click>Change Link.

MAPPING with the output PROCESS variable you have just defined. Then MAPPING to the other outputs with the same operation.

Next, you want to MAPPING the input data of the EL6731-0010, so click Inputs>Right click>Change Link.

MAPPING with the input PROCESS variable you have just defined. Then MAPPING to the other inputs with the same operation.

Active Cofiguration

Click Active Configuration to download the project’s Hard configuration to TwinCAR Runtime.

login

Dowload the programme into TwinCAR Runtime.

Proceed with Yes.

start

Start TwinCAR Runtime.

Siemens side

The next step is to build the Siemens S71500 side.

Download GSD files.

Download the GSD FILE for EL6731-0010 from the Beckhoff website.

https://www.beckhoff.com/ja-jp/products/i-o/ethercat-terminals/el6xxx-communication/el6731-0010.html?

Installation of GSD files

Click Options>Manage general station description File.

次はTIAからEL6731-0010のGSD FILEをインストールしてください。

Select all GSD FILE and proceed with Install.

Done!

Configuring the Profibus network

Next, click on Devices and Network to set up a PROFIBUS network.

Add EL6731-0010

Drop the EL6731-0010 you have just added into the network.

Done!This adds EL6731-0010 to the list.

Profibus network assignment

Click Not Assigned on the EL6731-0010 icon.

Set up in the same PROFIBUS network as the S71516F.

Done!

Setting the Profibus address

To set the PROFIBUS address of the EL6731-0010, click on ICON in the diagram below.

The addresses of all PROFIBUS devices are displayed in the Network View of the TIA.

Change the PROFIBUS address of the EL6731-0010 as shown below.

This address should match the EL6731-0010 set up in TwinCAT3.

Slot settings

This time, double-click on EL6731-0010 to set the SLOT configuration for EL6731-0010.

TIA switched to Device View.

To build a Slot for EL6731-0010, add the required modules to the Catalogue on the right.

Done!

The SLOT settings on the TIA side should match those of TwinCAT3.

tag

Define variables to be exchanged with the EL6731-0010 in PLC Tags.

Program

The next step is to create a Program.

fcSwapFeedback

To exchange data between TwinCAT3 Runtime and Siemens, you need to Byte SWAP. To check the communication this time, create a SWAP function, add the data entered with the parameter wAdd and its parameters and return to EL6731-0010.

This is the Program.

OB1

Call the function you have just created and assign the inputs and outputs of the EL6731-0010.

Download

The last step is to Download the Hardware Configuration and programme to the Siemens PLC.

Result

Both Siemens S71516F and Beckhoff EL6731-0010 are in normal RUN as shown in the diagram below.

There are no communication errors in the PROFIBUS network.

The TwinCAT3 side also shows no errors because inDPState and InPDOState are 0 and False.

The function created earlier also added the input data of the EL6731-0010 and output the data to the EL6731-0010.

シェアする

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

フォローする