ADSRDWRTIND

ADSRDWRTIND 1:

The function block registers ADSRDWRT-Requests to a PLC task as indications and allows them to be processed. The queuing of an indication is reported at the VALID output port by means of a rising edge. The indication is shown to have been processed by a rising edge at the CLEAR in put. A falling edge releases the function block for the processing of further indications. After an indication has been processed a response must be sent to the source device via the ADSRDWRTRES function block. The PORT and NETID parameters can be used to address the source device for this purpose. The INVOKEID parameter sorts the responses to the requests for the source device and is also sent back as parameter to the source device.

VAR_INPUT

VAR_INPUT
    CLEAR       : BOOL;
END_VAR

CLEAR : With a rising edge at this input an indication is reported as processed and the outputs of the ADSRDWRTIND function block are reset. A falling edge releases the function block for the processing of further indications.

VAR_OUTPUT

VAR_OUTPUT
    VALID       : BOOL;
    NETID       : T_AmsNetId;
    PORT        : T_AmsPort;
    INVOKEID    : UDINT;
    IDXGRP      : UDINT;
    IDXOFFS     : UDINT;
    RDLENGTH    : UDINT;
    WRTLENGTH   : UDINT;
    DATAADDR    : DWORD;
END_VAR

VALID : The output is set if an indication was registered from the function block and remains set until the latter was reported as processed by a raising edge at the CLEAR input.

NETID : Is a string, which contains the AMS network identifier of the source device, from which the ADS command was sent.

PORT : Contains the port number of the ADS source device, from which the ADS command was sent.

INVOKEID : Contains a handle of the command, which was sent. The InvokeId is specified from the source device and serves to identify the commands.

IDXGRP : Contains the index group number (32 bit, unsigned) of the requested ADS service.

IDXOFFS : Contains the index offset number (32 bit, unsigned) of the requested ADS service.

RDLENGTH : Contains the length, in bytes, of the data to be read.

WRTLENGTH : Contains the length, in bytes, of the data to be written.

DATAADDR : Contains the address of the data buffer, in which the data written is located.

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v2.7.0

PC or CX (x86)

PLCSystem.Lib

TwinCAT v2.8.0

PC or CX (x86)

TcSystem.Lib

TwinCAT v2.10.0 Build >= 1301

CX (ARM)

TcSystem.Lib