Expanded ADS Function Blocks

The expanded ADS function blocks make it possible to create a client-server communication between an ADS device and a PLC task. With the ADS device it can be a case of a Windows application (uses the AdsDLL/AdsOcx) or another PLC run-time system. Communication between the ADS device and the PLC task is processed using the following service primitives:

Communication between an ADS device and a PLC task proceeds as follows: 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) thereupon carries out a corresponding service. The service to be carried out is encoded via the index-group/offset parameter. Next the PLC sends a response to the ADS device. The response is registered as confirmation by the ADS source device.

Only one instance of the indication and response function block can meaningfully 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.

Expanded ADS function blocks

Service

Name

Description

READ

ADSREADIND

ADSREAD-Indication.

ADSREADRES

ADSREAD-Response

WRITE

ADSWRITEIND

ADSWRITE-Indication

ADSWRITERES

ADSWRITE-Response

READ & WRITE

ADSRDWRTIND

ADS-READ & WRITE-Indication

ADSRDWRTRES

ADS-READ & WRITE-Response

 

The ADS devices are addressed via a port address and a network address (NETID). The target address of the PLC task is formed in the following manner:

Port address of the PLC task = port number of the run-time system + task number, which should be addressed.

The current task number can be ascertained with the GETCURTASKINDEX function block.

 

Example:

The first PLC task of the first PLC run-time system on a local computer should be addressed. The port number of the PLC task is shown by:

PORT = 801 + 1 = 802

NETID = ” (empty string)

 

Comments: