MC_AxAdsWriteDecoder_BkPlcMc (from V3.0)
The function block decodes ADS write accesses. The ADS codes are listed in the Knowledge Base.
Inputs
VAR_INPUT
nFirstAxisIndex: INT;
nLastAxisIndex: INT;
bReset: BOOL;
bValid: BOOL;
sNetId: STRING(80);
nPort: UINT;
nInvokeId: UDINT;
nIdxGroup: UDINT;
nIdxOffs: UDINT;
cbWriteLen: UDINT;
pWriteBuff: DWORD;
pAxItf: POINTER TO Axis_Ref_BkPlcMc:=0;
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 | |
bReset | BOOL | The signals are used to co-ordinate the decoder with the ADS server. |
bValid | BOOL | |
sNetId | STRING | These values are required in order to generate the ADS response. They are supplied by an ADS server's ADS indication function block. |
nPort | UINT | |
nInvokeId | UDINT | |
nIdxGroup | UDINT | These values are required in order to decode the access. They are supplied by an ADS server's ADS indication function block. |
nIdxOffs | UDINT | |
cbWriteLen | UDINT | |
pWriteBuff | DWORD |
|
pAxItf | POINTER | Here, the address of a variable or an array of variables of type Axis_Ref_BkPlcMc should be transferred. |
Inputs/outputs
VAR_INOUT
DeadManCount: UDINT;
END_VAR
Name | Type | Description |
---|---|---|
DeadManCount | UDINT |
|
Outputs
VAR_OUTPUT
bClear: BOOL;
bPending: BOOL;
PlcMcManOffline: BOOL;
END_VAR
Name | Type | Description |
---|---|---|
bClear | BOOL | Indicates that an ADS access indicated with bValid should be acknowledged. |
bPending | BOOL | Indicates that an ADS access indicated with bValid is being processed. |
PlcMcManOffline | BOOL |
|
Behavior of the function block
If, when the bValid signal is present, the function block indicates neither bClear nor bPending it has not decoded the combination of nIdxGroup and nIdxOffs, and has not generated a response. In such a case, the ADS server (if there is one) must call another decoder, or must generate a response with the appropriate error code.