ToUpper

TwinCAT TIA
Tools String functions

ns=2;s=DEPRAG Smart/Utilities/StringOperations/ToUpper

Converts all lowercase letters of the specified text to uppercase.

Parameters:

Returns:

    ToUpper
    A structure variable of type OpcMethodReturnValueString. The Result property contains the command-specific return values.
      Result
      The StringToUpper parameter in uppercase.

Examples:

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

Beckhoff parameter:

    bStringToUpper
    A boolean variable that can be used to trigger the execution of the ToUpper command.
    OutputDataStringToUpper
    An instance of the "ST_StringOutputData" structure into which the return value of the ToUpper method is written.
    hrStringToUpper
    This can be used to monitor the execution of the command. Error codes have the type "HRESULT".
    fbStringOperations
    An instance of the "FB_StringOperations" function block supplied with the DEPRAG Smart library.
    Value
    The string to convert of type "STRING(80)".
    ValueLength
    The length of the string to convert.
    ConnectionHandle
    "ConnectionHandle" received when establishing a connection between DEPRAG Smart Server and your OPC UA client.


VAR
    bStringToUpper   : BOOL;
    OutputDataStringToUpper : ST_StringOutputData;
    hrStringToUpper   : HRESULT;

    fbStringOperations : FB_StringOperations;
END_VAR

hrStringToUpper := fbStringOperations.StringToUpper(
      bExecute     := bStringToUpper, 
      ConnectionHandle  := depragSmartConnection.ConnectionHandle,
      Value     := 'Ich bin ein String',
      ValueLength    := SIZEOF('Ich bin ein String'), 
      OutputData    => OutputDataStringToUpper);
IF hrStringToUpper <> S_FALSE THEN 
      bStringToUpper := 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".