FB_RAIDGetStatus
This function block returns the RAID set index, RAID type, RAID status, RAID drive count, RAID drive status.
![]() | Please not that system performance can be dramatically affected due to cyclic call of this function block. The fastest recommended factor for this function block is once per second. |
VAR_INPUT
sNETID : T_AmsNetId;
bWrtRd : BOOL;
stRAIDConfigReq : ST_RAIDConfigReq;
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.
stRAIDConfigReq: RAID configuration request parameters are to be stated in this structure. It includes controller ID and RAID set index.
tTimeOut: States the time before the function is cancelled.
VAR_OUTPUT
stRAIDStatusRes : ST_RAIDStatusRes;
nBytesRead : UDINT;
bBusy : BOOL;
bError : BOOL;
nErrorID : UDINT;
stRAIDStatusRes: RAID status response is received in this structure format. It includes RAID set index, RAID type, RAID status, RAID drive count, RAID drive status.
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.