FB_MDP_SW_Read_MdpVersion
The function block enables the MDP version to be queried. This information is located in the module software in the configuration area of the MDP. (General information on the MDP information model)
The MDP version is independent of the PLC library version. The PLC library version is provided by the function F_GetVersionTcMDP.
VAR_INPUT
VAR_INPUT
bExecute :BOOL; (* Function block execution is triggered by a rising edge at this input.*)
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. |
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;
nErrID :UDINT;
sMdpVersion :STRING(23); (* complete MDP version as string [e.g.: '1, 0, 4, 47'] *)
iMajorNbr :UINT; (* major number [e.g.: 1] *)
iMinorNbr :UINT; (* minor number [e.g.: 4] *)
iRevNbr :UINT; (* revision number [e.g.: 47] *)
END_VAR
bBusy | This output is TRUE if 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. |
sMdpVersion | The queried MDP version is output as a string at this output. |
iMajorNbr | The first position of the MDP version is output as a number at this output. |
iMinorNbr | The second position of the MDP version is output as a number at this output. |
iRevNbr | The third position of the MDP version is output as a number at this output. |
Requirements
Development environment | Target platform | PLC libraries to be linked |
---|---|---|
TwinCAT v2.11.0 Build >= 1541 | PC or CX (x86, ARM) | TcMDP.Lib [version 1.2.0 or higher] |