ADSWRITERES
The ADSWRITERES 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 ADSWRITEIND function block. An error code can be returned to the ADS source device via the RESULT parameter.
Inputs
VAR_INPUT
NETID : T_AmsNetId;
PORT : T_AmsPort;
INVOKEID : UDINT;
RESULT : UDINT;
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. |
RESPOND | BOOL | The function block is activated by a positive edge at this input. |
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) |