EL6731-0010 - PROFIBUS slave terminal

The EL6731-0010 supports the PROFIBUS DP and PROFIBUS DPV1 protocols.

PROFIBUS DP

In order to configure the slave for cyclic DP operation, proceed as follows in the TwinCAT system manager:

Configure DP slave

It is first necessary to configure a "Profibus Slave EL6731, EtherCAT" I/O device (selecting "I/O devices" with the right hand mouse button, and then selecting "Insert device"). The device and a box are added (to this end the GSD file "EL31095F.GSD" must be in directory "TwinCAT\Io\Profibus"):

EL6731-0010 - PROFIBUS slave terminal 1:
Adding a „Profibus Slave EL6731, EtherCAT“ in the TwinCAT tree

Find the corresponding channel on the tab "EL6731-0010" of the device ("Search" button), adjust the station address and the baud rate.

Add modules

Modules are to be added to the box corresponding to the data that is to be transferred cyclically. This is done by clicking with the right mouse button on the box, and then selecting "Add modules":

EL6731-0010 - PROFIBUS slave terminal 2:
Append modules

Configuring the Master

The file "EL31095F.GSE" is to be taken out of the "TwinCAT\Io\Profibus" directory to configure the master. The modules must be inserted in the master configuration in the same sequence as they are in the configuration of the slave in the System Manager.

PROFIBUS DPV1

The DP slave supports a DPV1-MSAC_C1 server connection that is established along with the cyclic connection. This can be used so that larger quantities of acyclic data can be transferred alongside the cyclic data. A DPV1 read telegram received by the master is reported to the PLC as an ADS read indication, while a DPV1 write telegram is reported to the PLC as an ADS write indication. The PLC program is then responsible for the read or write response. To do this, the ADS read response or ADS write response functions are to be called.

MSAC-C1 Read

A DPV1-MSAC_C1 read indication is represented in an ADS read indication as follows:

ADS read indication parameter

Meaning

Source-Net-ID (NETID)

Net-ID of the slave (see the device’s ADS tab)

Source-Port (PORT)

0x200

Invoke-ID (INVOKEID)

A unique number that must reappear in the response

IndexGroup (IDXGRP)

Slot number (DPV1 parameter)

IndexOffset (IDXOFFS)

Index (DPV1 parameter)

Length (LENGTH)

Length of the data that is to be read

An ADS read response is represented in a DPV1-MSAC_C1 read response as follows:

ADS read response parameter

Meaning

Destination-Net-ID (NETID)

Net-ID of the slave (see the device’s ADS tab)

Destination-Port (PORT)

0x200

Invoke-ID (INVOKEID)

A unique number, as under indication

Result (RESULT)

Result of the read: 0 = no error, otherwise: bits 0-15 = standard ADS error codes, bits 16-23 = Error_Code_1, bits 24-31 = Error_Code_2, see description of the DPV1 error codes

Length (LENGTH)

Length of the data that has been read

Data (DATAADDR)

read data

MSAC-C1 Write

A DPV1-MSAC_C1 write indication is represented in an ADS write indication as follows:

ADS write indication parameter

Meaning

Source-Net-ID (NETID)

Net-ID of the slave (see the device’s ADS tab)

Source-Port (PORT)

0x200

Invoke-ID (INVOKEID)

A unique number that must reappear in the response

IndexGroup (IDXGRP)

Slot number (DPV1 parameter)

IndexOffset (IDXOFFS)

Index (DPV1 parameter)

Length (LENGTH)

Length of the data that is to be written

Data (DATAADDR)

data that is to be written

An ADS read response is represented in a DPV1-MSAC_C1 read response as follows:

ADS read response parameter

Meaning

Destination-Net-ID (NETID)

Net-ID of the slave (see the device’s ADS tab)

Destination-Port (PORT)

0x200

Invoke-ID (INVOKEID)

A unique number, as under indication

Result (RESULT)

Result of the read: 0 = no error, otherwise: bits 0-15 = standard ADS error code, bits 16-23 = Error_Code_1, bits 24-31 = Error_Code_2, see description of the DPV1 error codes

Length (LENGTH)

Length of the data that has been read

ADS Interface

Communication can also take place via ADS in TwinCAT systems. The functionality is extremely similar to that of an ADS connection between two PCs over Ethernet, although transmission takes place over PROFIBUS, with the exception that the requester that initiates the ADS job is always the DP master PC. An EL6731 DP master is then linked to an EL6731-DP slave.

In the DP master, the ADS Interface should be activated on the "ADS" tab of the box, and the Net-ID of the DP slave PC is to be entered:

EL6731-0010 - PROFIBUS slave terminal 3:
DP master, ADS tab: Activating the ADS interface and entering the Net ID

At the DP slave the Net-ID of the DP master PC is to be added under Add. NetIds on the device's "ADS" tab:

EL6731-0010 - PROFIBUS slave terminal 4:
DP slave, ADS tab: Entering the DP master Net ID with “Add. Net IDs”