TwinCAT PLC Library Hydraulics - Version 1.4 — 4.5.3 MC_AxAdsReadDecoder_BkPlcMc (from V3.0)

PLCopen Motion Control Behaviour 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 [ } 200] and MC_AxAdsWriteDecoder_BkPlcMc [ } 201] are called as required. NOTE! 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 [ } 200] and MC_AxAdsWriteDecoder_BkPlcMc [ } 201] should be called from the existing ADS server function block of the application. A program example [ } 219] #16 is available. 4.5.3 MC_AxAdsReadDecoder_BkPlcMc (from V3.0) The function block decodes ADS read accesses. The ADS codes [ } 242] are listed in the Knowledge Base. VAR_INPUT nFirstAxisIndex: INT; nLastAxisIndex: INT; bReset: BOOL; bValid: BOOL; sNetId: STRING(80); nPort: UINT; nInvokeId: UDINT; nIdxGroup: UDINT; nIdxOffs: UDINT; cbReadLen: UDINT; pAxItf: POINTER TO Axis_Ref_BkPlcMc:=0; END_VAR VAR_INOUT DeadManCount: UDINT; END_VAR VAR_OUTPUT bClear:

BOOL; bPending: BOOL; END_VAR nFirstAxisIndex , nLastAxisIndex : This parameter is used to specify the dimensioning of the Axis_Ref_BkPlcMc [ } 67] array. CAUTION! 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). bReset , bValid : The signals are used to co-ordinate the decoder with the ADS server. sNetId , nPort , nInvokeId : These values are required in order to generate the ADS response. They are supplied by an ADS server's ADS indication function block. PLC Library Hydraulics 200 Version: 1.4