FB_MDP_ReadModuleHeader
The function block enables the header of an MDP module to be queried.
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
nDynModuleId : BYTE; (* the dynamic module id for which the module header is requested *)
tTimeout : TIME := DEFAULT_ADS_TIMEOUT; (* States the time before the function is cancelled. *)
sAmsNetId : T_AmsNetId; (* keep empty '' for the local device *)
END_VAR
bExecute | The function block is called by a rising edge on the input bExecute, if the block is not already active. |
stMDP_DynAddr | The MDP addressing belonging to the selected network module is specified at this input. The dynamic Module ID must already be specified with it. |
tTimeout | Specifies a maximum length of time for the execution of the function block. |
sAmsNetId | For local access don't specify this input or allocate an empty string. For remote access to another computer specify its AMS Net Id. |
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL; (* indicates if Read was successfull or not *)
nErrID : UDINT;
stMDP_ModHeader : ST_MDP_ModuleHeader;
END_VAR
bBusy | This output is TRUE as long as the function block is active. |
bError | Becomes TRUE as soon as an error situation occurs. |
nErrID | Returns an error code if the bError output is set. |
stMDP_ModuleHeader | The header information from the read MDP module is displayed at this output in the form of the structure ST_MDP_ModuleHeader. |
Requirements
Development environment | Target platform | PLC libraries to be linked |
---|---|---|
TwinCAT v2.11.0 Build >= 1541 | PC or CX (x86, ARM) | TcMDP.Lib |