EnableTool

TwinCAT TIA
Devices Multi-vendor devices Open Protocol devices OpenProtocolDevices One device

ns=2;s=DEPRAG Smart/Devices/General/OpenProtocol/OpenProtocolDevices/0/EnableTool

This message can be used to set the start enable. Screwdriving runs can be started, the controller is ready for screwdriving.

Returns:

    EnableTool
    A variable of the OpcMethodReturnValueVoid type. The method has no command-specific return values.

Examples:

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

Beckhoff parameter:

    bOpenProtocolEnableTool
    A boolean variable that can be used to trigger the execution of the EnableTool command.
    OutputDataOpenProtocolEnableTool
    An instance of the "ST_VoidOutputData" structure into which the return value of the EnableTool method is written.
    hrOpenProtocolEnableTool
    This can be used to monitor the execution of the command. Error codes have the type "HRESULT".
    fbOpenProtocol
    An instance of the "FB_OpenProtocol" function block supplied with the DEPRAG Smart library.
    sDeviceId
    A DINT value that identifies the device in the list of devices registered with the DEPRAG Smart OPC UA Server.
    ConnectionHandle
    "ConnectionHandle" received when establishing a connection between DEPRAG Smart Server and your OPC UA client.


VAR
       bOpenProtocolEnableTool    : BOOL;
       OutputDataOpenProtocolEnableTool : ST_VoidOutputData;
       hrOpenProtocolEnableTool   : HRESULT;

       fbOpenProtocol   : FB_OpenProtocol;
END_VAR

hrOpenProtocolEnableTool := fbOpenProtocol.EnableTool(
       bExecute    := bOpenProtocolEnableTool,
       ConnectionHandle := depragSmartConnection.ConnectionHandle,
       sDeviceId   := '0',
       OutputData   => OutputDataOpenProtocolEnableTool);
IF hrOpenProtocolEnableTool <> S_FALSE THEN 
       bOpenProtocolEnableTool := 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".