FC310x - PCI Cards for PROFIBUS

Slave

As a slave, the PROFIBUS DP and PROFIBUS DPV1 protocols are supported.

 

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 FC310x, PCI" I/O device (right-click on "I/O devices", and then selecting "Append Device"). The device and a box are appended (to this end the GSD file "TCDPSLAV.GSD" must be in directory "TwinCAT\Io\PROFIBUS"):

FC310x appended as slave

Find the corresponding channel on the tab "FC310x" (TwinCAT 2.8 or TwinCAT 2.9) of the device ("Search" button), adjust the station address and the baud rate, if necessary (the default setting is 12 Mbit/s).

 
 

Append modules

Modules are to be appended 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 "Append modules":

 
Append modules
 
 

Configuring the Master

The GSD file "TCDPSLAV.GSD" 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.

 
 

Error Reactions

In the default setting the inputs of the DP slave are set to 0, if the DP slave is not involved in data exchange. It is possible to change this input error reaction to "No changes" under Changes of the Input Data on the "Features" tab for the box:

 
Features
 
 

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 mapped 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 mapped 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 mapped 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 mapped 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 from TwinCAT 2.9

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 FC310x DP master is then linked to an FC310x-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:

 
Enabling the ADS interface on the DP master

For the DP slave, the Net-ID of the DP master PC should be entered under Add. NetIDs in the ADS tab of the device:

 
ADS tab on the DP slave