ns=2;s=DEPRAG Smart/Local/DriveManagement/GetDriveByIndex
The command returns the properties for the drive with the specified index.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bDriveManagementGetDriveByIndex : BOOL;
OutputDataDriveManagementGetDriveByIndex : ST_GetDriveByIndexOutputData;
hrDriveManagementGetDriveByIndex : HRESULT;
fbDriveManagement : FB_DriveManagement;
END_VAR
hrDriveManagementGetDriveByIndex := fbDriveManagement.GetDriveByIndex(
bExecute := bDriveManagementGetDriveByIndex,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
nIndex := 0,
OutputData => OutputDataDriveManagementGetDriveByIndex);
IF hrDriveManagementGetDriveByIndex <> S_FALSE THEN
bDriveManagementGetDriveByIndex := FALSE;
END_IF
For examples and explanations regarding the calls of nodes via Siemens TIA Portal please refer to the sub-menu "Siemens TIA Portal" in section "Getting Started".