ADSWRITEIND

ADSWRITEIND 1:

The function block registers ADSWRITE-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 reported as processed via a positive edge at the CLEAR input. A falling edge at the CLEAR input releases the function block for processing further indications. After an indication has been processed a response must be sent to the source device via the ADSWRITERESBC function block. The PORT and NETID parameters can be used to address the source device for this purpose. The INVOKEID parameter is used by the source device to assign the responses to the requests and is also sent back to the source device as a parameter.

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 ADSWRITEIND function block are reset ( DATAADDR = 0, LENGTH = 0 !). 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;
    LENGTH      : 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 positive edge at the CLEAR input.

NETID : is a string containing the AMS network ID of the source device to which the ADS command is directed. 

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.

LENGTH : contains the length of the written data in bytes.

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

 

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v2.7.0 Build > 517

TwinCAT v2.8.0 Build > 729

BC9xxx (165) firmware version >= 0xB7

TcAdsBC.Lb6