Infosys在阅读器中打开 / AI 翻译

ADS · 0 次阅读

ISumCommand Interface

Interface for SumCommands (Combined commands)


Namespace: TwinCAT.Ads.SumCommand
Assembly: TwinCAT.Ads.Abstractions (in TwinCAT.Ads.Abstractions.dll) Version: 7.0.0+e56d35ccc4675faac24789a4aab60071fc61d470

Syntax

C#

public interface ISumCommand

The ISumCommand type exposes the following members.

Properties

 

Name

Description

ISumCommand Interface 1:

Capabilities

Gets the capabilities.

ISumCommand Interface 2:

Connection

The connection used for communication.

ISumCommand Interface 3:

Count

Gets the number of the overall SubCommands.

ISumCommand Interface 4:

Duration

Last Execution duration of the SumCommand

ISumCommand Interface 5:

ErrorStrategy

Gets the error strategy of the ISumCommand

ISumCommand Interface 6:

Executed

Gets a value indicating whether this ISumCommand was already executed.

ISumCommand Interface 7:

ExecutedAsSum

Gets a value indicating whether the command has executed as SumCommand and not in Discrete mode

ISumCommand Interface 8:

ExecutedDiscrete

Gets a value indicating whether the command has executed as Fallback/Discrete

ISumCommand Interface 9:

Failed

Gets a value indicating whether this ISumCommand failed.

ISumCommand Interface 10:

FailedCount

Gets the count of failed subcommands.

ISumCommand Interface 11:

FallbackMode

Gets the fallback mode.

ISumCommand Interface 12:

IsFallback

Gets a value indicating whether the SumCommand is in Fallback state.

ISumCommand Interface 13:

Result

Gets the AdsErrorCode of the main SumCommandBase ADS Request

ISumCommand Interface 14:

SubResults

Gets the sub results of the single Sub Requests.

ISumCommand Interface 15:

Succeeded

Gets a value indicating whether this ISumCommand is succeeded.

ISumCommand Interface 16:

SucceededCount

Gets the count of succeeded subcommands.

Extension Methods

 

Name

Description

AllFailed

Gets a value indicating, that all SubCommands failed.
(Defined by ISumCommandExtension)

AllSucceeded

Gets a value indicating, that all SubCommands succeeded.
(Defined by ISumCommandExtension)

FirstSubError

Gets the first SubError that is not NoError
(Defined by ISumCommandExtension)

OneFailed

Gets a value indicating, whether the overall Sumcommand failed (checking all subcommand results).
(Defined by ISumCommandExtension)

OneSucceeded

Gets a value indicating, whether the overall SumCommand succeeded (including all subcommands)
(Defined by ISumCommandExtension)

OverallError

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

See Also

Reference

TwinCAT.Ads.SumCommand Namespace

Beckhoff Automation GmbH & Co. KG 2001-2026

Further Information
See also