ADSRDWRTRES

ADSRDWRTRES 1:

The ADSRDWRTRES function block is used to acknowledge indications of a PLC task. A response is sent to the ADS source device via a rising edge on the RESPOND input. The source device is addressed via the PORT and NETID parameters. The INVOKEID parameter sorts the responses to the requests for the source device and is adopted by the output of the ADSRDWRTIND function block. An error code can be returned to the ADS source device via the RESULT parameter.

VAR_INPUT

VAR_INPUT
    NETID       : T_AmsNetId;
    PORT        : T_AmsPort;
    INVOKEID    : UDINT;
    RESULT      : UDINT;
    LEN         : UDINT;
    DATAADDR    : DWORD;
    RESPOND     : BOOL;
END_VAR

NETID : Is a string, which contains the AMS network identifier of the source device, to which the ADS command should be sent. 

PORT : Contains the port number of the ADS source device, to which the ADS command should be 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.

RESULT : Contains the error code, which should be sent to the source device.

LEN : Length, in bytes, of the read data.

DATAADDR : Address of the data buffer, in which the read data is located.

RESPOND : The function block is activated by a positive edge at this input.

VAR_OUTPUT

(*none*)

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