ns=2;s=DEPRAG Smart/Local/DriveManagement/GetDrivesCount
The command returns the number of available drives.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bDriveManagementGetDrivesCount : BOOL;
OutputDataDriveManagementGetDrivesCount : ST_Int32OutputData;
hrDriveManagementGetDrivesCount : HRESULT;
fbDriveManagement : FB_DriveManagement;
END_VAR
hrDriveManagementGetDrivesCount := fbDriveManagement.GetDrivesCount(
bExecute := bDriveManagementGetDrivesCount,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
OutputData => OutputDataDriveManagementGetDrivesCount);
IF hrDriveManagementGetDrivesCount <> S_FALSE THEN
bDriveManagementGetDrivesCount := 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".