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.

ADSRDWRTRES 2: Inputs

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

Name

Type

Description

NETID

T_AmsNetId

String containing the AMS network ID of the source device, to which the ADS command is to be sent (type: T_AmsNetId).

PORT

T_AmsPort

Port number of the ADS source device to which the ADS command is to be sent (type: T_AmsPort).

INVOKEID

UDINT

Handle of the command, which was sent. The InvokeID is specified from the source device and serves to identify the commands.

RESULT

UDINT

ADS error code or command-specific error code to be sent to the source device.

LEN

UDINT

Length, in bytes, of the read data.

DATAADDR

PVOID

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

RESPOND

BOOL

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

ADSRDWRTRES 3: Outputs

VAR_OUTPUT
(*none*)
END_VAR

Requirements

Development environment

Target system type

PLC libraries to include (Category group)

TwinCAT v3.1.0

PC or CX (x86, x64, ARM)

Tc2_System (System)