FB_RAIDFindCntlr

FB_RAIDFindCntlr 1:

This function returns the counter value of the RAID controller and the corresponding controller IDs.

Notice

The function block should only be called once in a PLC program!

The system performance can be dramatically affected by the cyclic calling of this function block.

FB_RAIDFindCntlr 2: Inputs

VAR_INPUT
    sNETID    : T_AmsNetId;
    bWrtRd    : BOOL;
    tTimeOut  : TIME := DEFAULT_ADS_TIMEOUT;
END_VAR

Name

Type

Description

sNETID

T_AmsNetID

Is a string containing the AMS network ID of the target device to which the ADS command is sent.

bWrtRd

BOOL

The ADS command is triggered by the rising edge of this input.

tTimeOut

TIME

Specifies the time-out period that must not be exceeded when the command is executed.

FB_RAIDFindCntlr 3: Outputs

VAR_OUTPUT
    stRAIDCntlrFound : ST_RAIDCntlrFound;
    nBytesRead       : UDINT;
    bBusy            : BOOL;
    bError           : BOOL;
    nErrorID         : UDINT;
END_VAR

Name

Type

Description

stRAIDCntlrFound

ST_RAIDCntlrFound

Contains the number of RAID controllers found and their RAID controller IDs.

nBytesRead

UDINT

Number of successfully returned data bytes.

bBusy

BOOL

This output remains TRUE until the function block has executed a command, but no longer than the time present at the ‘Timeout’ input. No new command will be accepted at the inputs as long as bBusy = TRUE. Please note that it is not the execution of the service, but the time during which it be may executed that is monitored here.

bError

BOOL

This output is set to TRUE if an error occurs during the execution of a command. The command-specific error code is in 'nErrorId'. If the function block has an timeout error, ‘bError’ is set to TRUE and ‘nErrorId’ is 1861 (hexadecimal 0x745). It is set to FALSE if a command is executed at the inputs.

nErrorID

UDINT

Contains the command-specific error code of the last executed commands, is reset to 0 by a command at the inputs.

Requirements

Development environment

Target platform

PLC libraries to be integrated (category group)

TwinCAT v3.1.0

PC or CX (x86, x64, ARM)

Tc2_IoFunctions (IO)