FB_RAIDFindCntlr

FB_RAIDFindCntlr 1:

This function block returns the RAID controller count and the corresponding controller IDs.

FB_RAIDFindCntlr 2:

Calling this function block only once in PLC program fulfills the need. System performance can be dramatically affected due to cyclic call of this function block.

VAR_INPUT 

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

sNETID: Is a string containing the AMS network identifier of the target device to which the ADS command is directed.

bWrtRd: The ADS command is triggered by a rising edge at this input.

tTimeOut: States the time before the function is cancelled.

VAR_OUTPUT

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

stRAIDCntlrFound: includes the count of RAID controller found and corresponding RAID controller IDs.

nBytesRead: Number of succesfully returned data bytes.

bBusy: This output remains TRUE until the block has executed a command, but at the longest for the duration supplied to the ‘Timeout’ input. While Busy = TRUE, no new command will be accepted at the inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.

bError: This output is switched to TRUE if an error occurs during the execution of a command. The command-specific error code is contained in ‘nErrorId’. If the block has a timeout error, ‘bError’ is TRUE and ‘nErrorId’ is 1861 (hexadecimal 0x745). Is reset to FALSE by the execution of a command at the inputs.

nErrorID: Contains the command-specific error code of the most recently executed command. Is reset to 0 by the execution of a command at the inputs.