StartDetectingMouseClick

TwinCAT TIA
Local Mouse functions

ns=2;s=DEPRAG Smart/Local/MouseFunctions/StartDetectingMouseClick

Starts monitoring the position of the mouse when a mouse button is pressed.

Returns:

Examples:

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

Beckhoff parameter:

    bMouseFunctionsStartDetectingMouseClick
    A boolean variable that can be used to trigger the execution of the StartDetectingMouseClick command.
    OutputDataMouseFunctionsStartDetectingMouseClick
    An instance of "ST_VoidOutputData" in which the return value of the StartDetectingMouseClick method is written.
    hrMouseFunctionsStartDetectingMouseClick
    This can be used to monitor the execution of the command. Error codes have the type "HRESULT".
    fbMouseFunctions
    An instance of the "FB_MouseFunctions" 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
      bMouseFunctionsStartDetectingMouseClick    : BOOL;
      OutputDataMouseFunctionsStartDetectingMouseClick : ST_VoidOutputData;
      hrMouseFunctionsStartDetectingMouseClick   : HRESULT;
   
      fbMouseFunctions  : FB_MouseFunctions;
END_VAR

hrMouseFunctionsStartDetectingMouseClick := fbMouseFunctions.StartDetectingMouseClick(
             bExecute    := bMouseFunctionsStartDetectingMouseClick,   
             ConnectionHandle := depragSmartConnection.ConnectionHandle, 
             OutputData   => OutputDataMouseFunctionsStartDetectingMouseClick);
IF hrMouseFunctionsStartDetectingMouseClick <> S_FALSE THEN 
      bMouseFunctionsStartDetectingMouseClick := 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".