GetDrives

TwinCAT
Local Drive management

ns=2;s=DEPRAG Smart/Local/DriveManagement/GetDrives

The command returns a list of all logical drives with their properties.

Returns:

Examples:

In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:

Beckhoff parameter:

    bDriveManagementGetDrives
    A boolean variable that can be used to trigger the execution of the GetDrives command.
    OutputDataDriveManagementGetDrives
    An instance of "ST_GetDrivesOutputData" into which the return value of the GetDrives method is written.
    hrDriveManagementGetDrives
    This can be used to monitor the execution of the command. Error codes have the type "HRESULT".
    fbDriveManagement
    An instance of the "FB_DriveManagement" function block supplied with the DEPRAG Smart library.
    ConnectionHandle
    "ConnectionHandle" received when establishing a connection between DEPRAG Smart Server and your OPC UA client.


VAR
          bDriveManagementGetDrives     : BOOL;
          OutputDataDriveManagementGetDrives    : ST_GetDrivesOutputData;
          hrDriveManagementGetDrives     : HRESULT;

          fbDriveManagement : FB_DriveManagement;
END_VAR

hrDriveManagementGetDrives := fbDriveManagement.GetDrives(
          bExecute    := bDriveManagementGetDrives,   
          ConnectionHandle := depragSmartConnection.ConnectionHandle, 
          OutputData   => OutputDataDriveManagementGetDrives);
IF hrDriveManagementGetDrives <> S_FALSE THEN 
          bDriveManagementGetDrives := 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".