ISumCommand Interface
Interface for SumCommands (Combined commands)
Namespace: TwinCAT.Ads.SumCommand
Assembly: TwinCAT.Ads.Abstractions (in
TwinCAT.Ads.Abstractions.dll) Version: 6.0.328+39e3229
Syntax
C#
public interface ISumCommand
The ISumCommand type exposes the following members.
Properties
|
Name |
Description |
---|---|---|
|
The connection used for communication. | |
|
Gets the error strategy of the ISumCommand | |
|
Gets a value indicating whether this ISumCommand was already executed. | |
|
Gets a value indicating whether this ISumCommand failed. | |
|
Gets the count of failed subcommands. | |
|
Gets the AdsErrorCode of the main SumCommandBase ADS Request | |
|
Gets the sub results of the single Sub Requests. | |
|
Gets a value indicating whether this ISumCommand is succeeded. | |
|
Gets the count of succeeded subcommands. |
Extension Methods
|
Name |
Description |
---|---|---|
|
Gets a value indicating, that all SubCommands failed. (Defined by ISumCommandExtension.) | |
|
Gets a value indicating, that all SubCommands succeeded. (Defined by ISumCommandExtension.) | |
|
Gets the first SubError that is not NoError (Defined by ISumCommandExtension.) | |
|
Gets a value indicating, whether the overall Sumcommand failed (checking all subcommand results). (Defined by ISumCommandExtension.) | |
|
Gets a value indicating, whether the overall SumCommand succeeded (including all subcommands) (Defined by ISumCommandExtension.) | |
|
Gets the Overall (combined error) from SumCommand AND SubCommands. (Defined by ISumCommandExtension.) |
Remarks
ADS offers powerful and fast communication to exchange any kind of information. It's possible to read single variables or complete arrays and structures with each one single ADS-API call. The ADS Sum Command command offers to read with one singale ADS call multiple variables which are not structured within a linear memory. As a result the ADS caller application (like scada Systems etc.) can extremly speed up cyclic polling : Sample :
- Until now : Polling 4000 single variables which are not in a linear area (like array / structure / fixed PLC address ) would cause 4000 single Ads-ReadReq with each 1-2 ms protocol time. As a result the scanning of these variables take 4000ms-8000ms.
- New Ads-Command allows to read multiple variables with one single ADS-ReadReq : 4000 single variables are handled with e.g. 8 single Ads-ReadReq (each call requesting 500 variables) with each 1-2 ms protocol time. As a result the scanning of these variables take just few 10ms.
REQUIREMENTS AND IMPORTANT LIMITATIONS: Note that ADS is just a transport layer, but there could be important side effects. So read this requirements and take care on limitations:
- Version of target ADS Device - - ADS itself is just the transport layer, but the requested ADS device has to support the ADS-Command.
- Bytes length of requested data - - Requesting a large list of values from variables is fine, but the requested data of the Ads-response (the data-byte-length) have to pass the AMS Router (size by default a 2048kb) So the caller has to limit the requested variables based on calculation of requested data-byte-length.
- Number of Sub-ADS calls : Highly recommended to max. 500 ! - - If the PLC is processing one ADS request, it will completely work on this single ADS request BEFORE starting neyt PLC cycle. As a result one single ADS request with 200.000 sub-Ads-requests would cause that PLC would collect and copy 200.000 variables into one single ADS response, before starting next PLC. So this large number of ads-sub-commands will jitter the PLC execution ! We highly recommend to not request more than 500 Ads-Sub commands