Upper Case (UPPER)
The UPPER instruction converts the alphabetical characters in a string to upper case characters.
The UPPER instruction converts all the letters in the Source to upper case, and places the result in the Destination.
- ASCII characters are case-sensitive. Upper case A ($41) is not equal to lower case a ($61).
- If operators directly enter ASCII characters, convert the characters to all upper case or lower case before you compare them.
Any characters in the Source string that are not letters remain unchanged. See ASCII character support in FactoryTalk Design Studio for more information.
Available Languages
Ladder Diagram
_v1.png/_jcr_content/renditions/original)
FactoryTalk Design Studio
DSL - Ladder Diagram and
Structured TextUPPER(Source,Dest);
Operands
Ladder Diagram and Structured Text
Operand | Type | Format | Description |
|---|---|---|---|
Source | String | tag | Tag that contains the characters you want to convert to upper case |
Destination | String | tag | Tag to store the characters in upper case |
See Structured Text syntax Structured Text Syntax for more
information on the syntax of expressions within structured text.
Affects Math Status Flags
No
Major/Minor Faults
Type | Code | Cause | Recovery Method |
|---|---|---|---|
4 | 51 | The LEN value of the string tag is greater than the DATA size of the string tag. | Check that no instruction is writing to the LEN member of the string type tag. In the LEN value, enter the number of characters that the string contains. |
4 | 52 | The output string is larger than the destination | Create a new string type that is large enough for the output string. Use the new string type as the data type for the destination. |
Execution
Ladder Diagram
Condition/State | Action Taken |
|---|---|
Prescan | N/A |
Rung-condition-in is false (Ladder Diagram only) | N/A |
Rung-condition-in is true | The instruction executes. |
Postscan | N/A |
Example
To find information about a specific item, an operator enters the catalog number of the
item into an ASCII terminal. After the controller reads the input from a terminal
(terminal_read is set), the UPPER instruction converts the characters in catalog_number to
all upper case characters and stores the result in catalog_number_upper_case.
Ladder Diagram

Structured Text
IF terminal_read THEN UPPER(catalog_number,catalog_number_upper case); terminal_read :=0; END_IF;
Provide Feedback