ADSREADIND
The function block registers ADSREAD Requests at 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 negative 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 ADSREADRES 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.
Inputs
VAR_INPUT
CLEAR : BOOL;
END_VAR
Name | Type | Description |
---|---|---|
CLEAR | BOOL | With a rising edge at this input an Indication is reported as processed and the outputs of the ADSREADIND function block are reset. A falling edge releases the function block for the processing of further indications. |
Outputs
VAR_OUTPUT
VALID : BOOL;
NETID : T_AmsNetId;
PORT : T_AmsPort;
INVOKEID : UDINT;
IDXGRP : UDINT;
IDXOFFS : UDINT;
LENGTH : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
VALID | BOOL | 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 | T_AmsNetId | String containing the AMS network ID of the source device, from which the ADS command was sent (type: T_AmsNetId). |
PORT | T_AmsPort | Contains the port number of the ADS source device, from which the ADS command was 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. |
IDXGRP | UDINT | Index group number (32-bit, unsigned) of the requested ADS service. |
IDXOFFS | UDINT | Index offset number (32-bit, unsigned) of the requested ADS service. |
LENGTH | UDINT | Number of data to be read in bytes. |
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) |