Udp2Av

SUMMARY

AbvSpu-UDP-Communication

CONTENTS

  1. Introduction
  2. Defining the S-7 Connections
  3. Example Definition
  4. Diagnosis for Communication Interface

Introduction

The UDP-Communication is an unsecured connection, i.e. it can’t be guaranteed that all recipients receive a send data package. Therefore a limited number of data packages are kept (Rollback-Puffer) for resending in case of a transmission error. The request for resending a data package must come from the recipient. To facilitate the request for resending the data packages got running numbers; these numbers are checked for gaps on the receiving end.

For the communication between AbvSpu and the VisuNT operator station at least one 1 UDP-Connection of the type <All Multicast Members> must be created. Thereby it is determined that all UDP-Telegrams are send to the reachable members of the Multicast-Group.

Defining the S-7 Connections

For UDP-Communication the user must define 1 to n connections in the S7-Project and load to the target system. These definitions must match the communication parameters made in the AbvSpu. By default (on delivering the AbvSpu) parameters for UDP-Communication are set to the following:

Address Symbol Comment Start Value
DB190.DBW2 wCountConnections Number of Connections 3
DB190.DBW4 wFirstConnection First Connection-ID 1
DB190.DBW34/36 wLAddr[1..2] Log. Assembly Group Address W#16#3FFD, W#16#3FFE
DB190.DBW40 wRollbackSize Size of the Rollback-Puffer (Number of packages) 10

UDP-Connection
The AbvSpu uses for the UDP-Communication to the VisuNT Operator Station the number of UDP-Connections defined in cell DB190.DBW2 (Default = 3). That implies that a maximum of 2 Data Packages with 1024 Bytes data are send per cycle.
If the data throughput, due to permanent process value changes, is to low, the number of connections may be increased. (In theory the limit is 32 connections)
If only one or more than 2 UDP-Connections should be used, respectively other Connection IDs, the following must be taken into account:

First Connection-ID
That cell contains the ID of the first UDP-Connection. This ID is needed as invocation parameter for the FC "AG_LSEND" resp. FC "AG_LRECV".
For further connections consecutive IDs are used.

Log. Assembly Group Address
The 2 parameters define the start address for the Assembly Group of the Ethernet-CPs. The second address is only used in case of redundant communication. The parameters are needed as invocation parameter for the FC "AG_LSEND" resp. FC "AG_LRECV".

Register <common>
Local ID (Hex) Identical to the value from the Connection List. The Local ID may be changed. That is necessary if already existing Communication FCs using the same IDs. The new Local ID is inputted as Hex-Value. The permissible value range is specified by the system automatically.
Name Suggested name plus Suffix Verb. -No.; the name may be modified (24 characters max).
Via CP In case there are more CPs of the same type in a station, connecting to the same subnet, a selection of connections may be made here.

Register <addresses>
In the register ‘Addresses’ below “IP-Address (IP)” a valid Multicast Address for the partner is suggested. Partner in Multicast is always a group of recipients (Multicast Group)
The ports, respectively the port addresses define the access point to the user application within the station / CPU. They must be uniquely defined within the station / CPU!
For IP-Multicast IP-Addresses from 224.0.0.0 to 239.255.255.255 may be used.
IP (DEZ) Local IP-Address of the Ethernet-CP (indication only)
IP (DEZ) Multicast-Group z.B. 239.0.1.0
PORT (DEZ) Local 2000
WARNING
For the first UDP-Connection the port 2000 is mandatory, since all VisuNT Stations send to port 2000.
PORT (DEZ) Multicast-Group 2000
WARNING
The port 2000 must be defined as target port for all UDP-Connections, since VisuNT-Stations only receive on that port.

Example Definition

Connection-ID IP (Local) Port (local) IP (Multicast) Port (Multicast)
1 192.168.0.100 2000 239.0.1.0 2000
2 192.168.0.100 2001 239.0.1.0 2000
3 192.168.0.100 2002 239.0.1.0 2000

Diagnosis for Communication Interface

Status Communication Interface (after start/restart)
Address Symbol Meaning
DB195.DBW186 - 0 = ok
any other = Error

Number of connected Operator Stations(VisuNT-Stations)
Address Symbol Meaning
DB195.DBW162 - Maximum number of communication partners

Send Cycle
Address Symbol Meaning
DB195.DBW190 - Number of cycles after that the collected telegrams about changes are sends to the connected communication partners.

PC Online/Offline-Status
Address Symbol Meaning
DB190.DBD356 - Online-Status der angeschlossenen PC-Kommunikationspartner.Der Online-Status der maximal 32 Kommunikationspartner wird jeweils durch ein Bit mit der Bedeutung 1=online, 0=offline dargestellt.
Die Zuordnung zwischen PC-Nummer und Bit-Nummer verläuft von rechts nach links aufsteigend:
DBX359.0 //PC1
DBX359.1 //PC2
...
DBX359.7 //PC8
...
DBX356.0 //PC25
...
DBX356.7 //PC32

AbvSpu-Watchdog
Address Symbol Meaning
DB190.DBB0 S7_WDOG If initializing the AbvSpu (specially the communication interface) was successfully, that memory cell is incremented by 1 on any OB1-Cycle.

Available UDP-Connections
After a successful start/restart all via "Number Connections" defined UDP-Connections are set to ‘available’ and sending is initiated. In normal operation all available connections are tested for ‘ready’. The status message 0x8183 (definition error) causes the connection to be set to “not available” permanently. Normally all connections should be shown as “available”. The indication of available connections is done via a 32 bit data word, thereby bit value “1” indicates the status “available” and “0” the status “unavailable”.
Address Symbol Meaning
DB190.DBD22 dwConnectionAvailable[1] Connections CP 1
Bit 2^0 //Connection 1
Bit 2^1 //Connection 2
...
Bit 2^15 //Connection 32

Bit = 1 //available
Bit=0 //unavailable
DB190.DBD26 dwConnectionAvailable[2] Connection CP 2

Free Connections
The indication of free connections (means the connection may be used for sending) is dynamically. Usually the connections will be marked as “not free” since they are permanently sending data. The indication of free connections is done via a 32 bit data word, thereby bit value “1” indicates the status “free” and “0” the status “not free”.
Address Symbol Meaning
DB190.DBD6 dwSndInfo_ConnectionFree[1] Connection CP 1
Bit 2^0 //Connection 1
Bit 2^1 //Connection 2
...
Bit 2^15 //Connection 32

Bit = 1 //free
Bit=0 //not free
DB190.DBD10 dwSndInfo_ConnectionFree[2] Connection CP 2

Send Error
Any errors on sending data or live-signs are logged. An occurred error is not reset by sending data successfully afterwards. The indication of send errors is done via a 32 bit data word, thereby bit value “1” indicates the status “error” and “0” the status “no error”.
Address Symbol Meaning
DB190.DBD14 dwSndInfo_Error[1] Connection CP 1
Bit 2^0 //Connection 1
Bit 2^1 //Connection 2
...
Bit 2^15 //Connection 32

Bit = 1 //Error
Bit=0 //no Error
DB190.DBD18 dwSndInfo_Error[2] Connection CP 2

Rollback-Demands
Here the Rollback-Demands of the communication partners since start/restart are logged. That value is a statement about the quality of the communication.
Address Symbol Meaning
DB190.DBW390 wRollbackRequestsFromPC Number of Rollback Requests from the communication partners.