MC_AxAdsCommServer_BkPlcMc (from V3.0)

MC_AxAdsCommServer_BkPlcMc (from V3.0) 1:

The function block gives the application the capacity to function as an ADS server. Calls function blocks of type MC_AxAdsReadDecoder_BkPlcMc and MC_AxAdsWriteDecoder_BkPlcMc as required. The ADS codes are listed in the Knowledge Base.

MC_AxAdsCommServer_BkPlcMc (from V3.0) 2: Inputs

VAR_INPUT
    nFirstAxisIndex:    INT;
    nLastAxisIndex:     INT;
END_VAR

Name

Type

Description

nFirstAxisIndex

INT

This parameter is used to specify the dimensioning of the Axis_Ref_BkPlcMc array.

An incorrect specification at this point excludes some of the axes from the communication or results in a crash of the PLC application by triggering serious runtime errors (Page Fault Exception).

nLastAxisIndex

INT

MC_AxAdsCommServer_BkPlcMc (from V3.0) 3: Inputs/outputs

VAR_INOUT
    pAxItf:             POINTER TO Axis_Ref_BkPlcMc;
END_VAR

Name

Type

Description

pAxItf

POINTER

Here, the address of a variable or an array of variables of type Axis_Ref_BkPlcMc should be transferred.

MC_AxAdsCommServer_BkPlcMc (from V3.0) 4: Outputs

VAR_OUTPUT
    PlcMcManOffline:    BOOL;
END_VAR

Name

Type

Description

PlcMcManOffline

BOOL

This parameter corresponds to the parameter of the same name of the MC_AxAdsCommServer_BkPlcMc function block.

Behavior of the function block

Through cyclic calling of this function block in the PLC application, the application assumes the character of an ADS server and responds to ADS read and ADS write-access like any other ADS server. This includes the decoding of IdxGroup/IdxOffset addressing. Function blocks of type MC_AxAdsReadDecoder_BkPlcMc and MC_AxAdsWriteDecoder_BkPlcMc are called as required.

MC_AxAdsCommServer_BkPlcMc (from V3.0) 5:

This function block must not be used if the PLC application already is an ADS server.

In this case the function blocks of type MC_AxAdsReadDecoder_BkPlcMc and MC_AxAdsWriteDecoder_BkPlcMc should be called from the existing ADS server function block of the application.