FB_MDP_SiliconDrive_Read

FB_MDP_SiliconDrive_Read 1:

The function block enables querying of the IPC diagnostics module SiliconDrive.

Obsolete functionality

The SiliconDrive hardware was replaced by newer memory card types. The functionality is therefore obsolete. We recommend using the query of the IPC diagnostic module Physical Drive SMARTParameters instead.

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. *)
    iModIdx   : USINT := 0;     (* Index number of chosen MDP module *)
    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.

iModIdx: If several instances of an IPC diagnostics module exist, a selection can be made by means of the input iModIdx (0,...,n).

sAmsNetId: To execute the query on the local device, it is not necessary to specify this input variable. Alternatively, an empty string can be specified. To direct the query to another computer, its AMS Net Id (of type T_AmsNetId) can be specified here.

VAR_OUTPUT

VAR_OUTPUT
    bBusy   : BOOL;
    bError  : BOOL;
    nErrID  : UDINT;
    iErrPos : USINT;
    stMDP_ModuleHeader  : ST_MDP_ModuleHeader;
    stMDP_ModuleContent : ST_MDP_SiliconDrive;
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.

iErrPos: If an error occurred and this refers to an individual element, then this output indicates the position (subindex of the element) at which an error first occurred.

stMDP_ModuleHeader: At this output the header information for the read IPC diagnostics modules is displayed in the form of the structure ST_MDP_ModuleHeader.

stMDP_ModuleContent: The information from TableID 1 of the read IPC diagnostics module is displayed at this output in the form of the structure ST_MDP_SiliconDrive.

Notice

The querying of the IPC-diagnostics Drive module is one of the more time consuming processes. Hence, the Standard ADS Timeout can by all means be exceeded. This can be remedied by increasing the time period tTimeout applied to the input of the function block.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.0

PC or CX (x86, x64, ARM)

Tc2_MDP