DP-V1 communication

C1 Connection (MSAC-C1)

The C1 connection is reserved for the master that cyclically exchanges data with the slave (C1 master). In order for a slave to be able to use the C1 connection, the slave must support DPV1 (this means that the line "DPV1_Slave = 1" and the key word "C1_Max_Data_Len" with an appropriate length must be in the GSD file). If it is also generally necessary to activate the C1 functionality by setting bit 7 in the PrmData byte 0 (see the slave's PROFIBUS tab) for the corresponding slave (this is done automatically for those Beckhoff devices that support DPV1).

MSAC-C1-Read is mapped on ADS-Readind, MSAC-C1-Write on ADS-Writeinc:

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.

Settings in the System Manager

In order to transport the DP-V1 services into the PLC this function must be activated by specifying the port.
DP-V1 communication 1:

Port 0 deactivated, 802 PLC runtime 1, task 1

 

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)

0x1000+slave address

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)

0x1000+slave address

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: DP-V1 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)

0x1000+slave address

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)

0x1000+slave address

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: DP-V1 error codes.

Length (LENGTH)

Length of the data that has been read