Overview
The expanded ADS function blocks make it possible to create a client-server communication between an ADS device and a PLC task. The ADS device can be, for example, a Windows application (uses the AdsDLL/AdsOcx) or another PLC runtime system. Communication between the ADS device and the PLC task is processed using the following service primitives:
- Request
- Indication
- Response
- Confirmation
The communication between an ADS device and a PLC task has the following sequence: an ADS device sends a request to the target device (PLC task). This request is registered in the target device by an indication. The target device (PLC task) then carries out a corresponding service. The service to be carried out is encrypted via the index-group/offset parameter. Next the PLC task sends a response to the ADS device. The response is registered as confirmation by the ADS source device.
The ADS devices are addressed via a port address and a network address (NETID). (Port address of the PLC task = _TaskInfo.AdsPort)
In order for a request to be routed to the PLC task, the most significant bit (e.g. 0x80000001) must be entered in the index group parameter when the request is made.
Communication via IndexGroup 0x80000000 - 0x80FFFFFF
Only one instance of the indication and response function block can be used per PLC task (one instance of ADSREADIND, ADSREADRES, ADSWRITEIND, ADSWRITERES, ADSRDWRTIND and ADSRDWRTRES). Corresponding with the available ADS services: READ, WRITE and READ & WRITE there is an appropriate indication or response function block for each service.
Service | Name | Description |
---|---|---|
READ | ADSREAD Indication | |
ADSREAD Response | ||
WRITE | ADSWRITE Indication | |
ADSWRITE Response | ||
READ & WRITE | ADS-READ & WRITE Indication | |
ADS-READ & WRITE Response |
FiFos Each PLC task has 3 FIFOS in which the incoming requests (indications) are first stored. This means that there is an ADSREADIND FIFO, an ADSWRITEIND FIFO and an ADSRDWRTIND FIFO. |
Communication via IndexGroup 0x8n000000 - 0x8nFFFFFF
To realize more than one client-server communication per PLC task, the following Indication function blocks are required. These are extended by the possibility to specify a desired range of the IndexGroup.
This way, requests are filtered and only desired areas are responded to.
There are 16 freely selectable ranges available:
0x80000000 - 0x80FFFFFF
0x81000000 - 0x81FFFFFF
…
0x8E000000 – 0x8EFFFFFF
0x8F000000 – 0x8FFFFFFF
To specify such a range of the index group at an Indication function block, the index group value with which the selected range begins is specified at input MINIDXGRP.
Example: With MINIDXGRP:=16#85000000 all requests are filtered and requests with an index group in the range 0x85000000 - 0x85FFFFFF are registered as Indication.
Service | Name | Description |
---|---|---|
READ | ADSREAD Indication with indication of the index group | |
ADSREAD Response | ||
WRITE | ADSWRITE Indication with indication of the index group | |
ADSWRITE Response | ||
READ & WRITE | ADS-READ & WRITE Indication with indication of the index group | |
ADS-READ & WRITE Response |