An HMI button label stores printable characters only, so a carriage return has no code the panel can print and Enter is dropped. Get the two-line caption by width wrapping when any split will do, or by two label objects aligned with snap-to-grid off when the split must stay fixed.
Pressing Enter in a button's label text does nothing, and no ALT code fixes it. The label stores printable characters only: the panel prints ASCII codes 32 through 126, space to tilde, and a carriage return is code 13, a control character with no printed shape and no slot in the string. The editor drops the keystroke and the caption stays on one line. The split you want is still easy to get. When any break will do, narrow the button or enlarge the text until the caption wraps. When the split must fall in one place, put each line in its own label object and align the pair with snap-to-grid off. First, though, try the modified Enter keys, because some editors do accept a break in the text property.
Why Enter is refused
Button and label text on the panel is stored as a string of printable ASCII characters, and the set is listed in the editor's help files. Capitals occupy codes 65 to 90, digits 48 to 57 and lowercase letters 97 to 122. A carriage return sits below the whole window: it is a formatting instruction, not a character with a shape, so a text property built on printable characters has nowhere to write it.
When you press Enter while typing a label, the editor reads the keystroke as finished typing and closes the field with the text as it stands. Nothing is corrupt and nothing is hidden; there is simply no code to store. That is also why resizing behaves differently from typing. A narrower button or a larger text size changes how the renderer breaks the line, which needs no extra character, while a return would need one.
Try Shift+Enter and Ctrl+Enter first
Before building a workaround, type the first line and try the modified Enter keys in the text property. Editor families differ here: one documents Shift+Enter for button text from a named software version on, and another documents Ctrl+Enter in its screen editor. If the split shows in the property, compile and download as usual; if the panel shows two lines, the break is stored in the project like any other text and you are done.
If neither combination does anything, the property takes printable text only and the fixes below apply. The editor's help page for the button text or label property names the exact combination and the software version that introduced it, and it lists the character set the panel prints.
Symptoms and what each points to
- Enter does nothing in the label property. The field takes printable text only, so there is no character to insert for a return.
- A strange glyph appears where you typed ALT+0126. That keystroke wrote character 126, the tilde, which is printable, so the panel printed it. It was never a break command.
- The caption runs past the edge of the button on one line. The label box is still wide enough for the whole text, so wrapping has not started.
- The wrap splits the caption in the wrong place. A renderer breaks after the last word that fits the width, so wording, font size or button width decides the split, and any of the three moving changes it.
- A label drags anywhere but the button snaps back to the grid. Free placement belongs to label objects; touch cells must stay grid-aligned, so the cell cannot be nudged or split the same way.
Two label objects for a fixed split
Use this method when the split must stay between TEMPERATURE and SET POINT regardless of later edits:
- Place a label object on the screen and type TEMPERATURE on one line.
- Place a second label object and type SET POINT.
- Turn off snap-to-grid.
- Drag the second label directly beneath the first and line up the left edges. Zoom in and check that the vertical gap between the two lines matches the spacing of the other text on the screen.
- Compile and download to the panel, then read the screen from the operator's normal position.
This works for standalone label items. A touch cell is a different object: it must stay aligned to the grid, so the same free placement cannot go inside it. Keep the cell's own text short and place the two-line caption in labels beside the cell.
Worked example: TEMPERATURE SET POINT on two lines
Inputs. The caption is Temperature Set Point, wanted as TEMPERATURE on the first line and SET POINT on the second; the wording and the split come from the job. The phrase measures 21 characters including two spaces. The printable window is codes 32 to 126, from the panel's documented character set. The line capacity in characters, set by the label box width and font size, is the value you choose.
Rule. A label prints only characters whose codes fall inside that window. A wrapped line breaks after the last whole word that fits the capacity.
Arithmetic. TEMPERATURE is 11 capitals, and capitals run from code 65 to 90, inside the window, so every one prints. SET POINT is 8 capitals plus a space at code 32, the bottom of the window, so it prints too. The substitution fails on the same arithmetic: ALT+0126 writes the character at code 126, the tilde, which sits inside the window and therefore prints as a glyph, while the wanted return is code 13, below the window and unprintable. For the wrap route, TEMPERATURE plus its following space spans 12 characters and TEMPERATURE SET spans 15, so a capacity of 11 to 14 characters leaves TEMPERATURE as the last word that fits line 1. At 15 to 20 the first line becomes TEMPERATURE SET, and at 21 or more the whole phrase holds on one line.
Result. With capacity between 11 and 14 characters, or with two label objects, the panel shows TEMPERATURE on line 1 and SET POINT on line 2, and every printed character has a code the panel can render.
Decision. The two-object method gives the split and keeps it under any later edit, so it is the fix when the split is fixed. The wrap gives the same split only while the capacity stays between 11 and 14 characters for this caption, so use it only when you pin the box width and font size, or when any split will do.
When width wrapping is enough
When any split point is acceptable, skip the arithmetic: make the button narrower or the text larger until the caption breaks onto two lines, then read the result on the panel. The split will sit at a space, and the renderer chooses which one. Two checks follow from this. Re-read the caption after any wording or font change, because the break moves with them. And if you shrank the button, operate it afterwards to confirm the smaller touch target still works first press.
Checks on the panel before you sign off
- Read the compiled screen on the panel, not only in the editor preview. The preview draws with the PC's fonts; the panel draws with its own set.
- Confirm the order and the alignment: TEMPERATURE above SET POINT, left edges flush, and no stray glyph anywhere on the button or the labels.
- Look at the objects around the pair after the download to confirm nothing shifted while the project transferred.
- If you changed a button's size, press it through its normal action and confirm it fires once per press. A button that now fires twice is a separate fault; see why an HMI touch button bounces after release.
- Keep live values out of the caption. Text that changes at runtime, such as a stored batch name, belongs in a dynamic text object; see show a saved name on an HMI screen when buttons are static.
The decision
Recommendation: For a fixed split such as TEMPERATURE over SET POINT, place two label objects and align them with snap-to-grid off; the split then survives every later edit. Use width wrapping only when any split point is acceptable, or when you can pin the label capacity at 11 to 14 characters for this caption and re-check on the panel after each change. Try Shift+Enter and Ctrl+Enter in the text property first, because where the editor accepts them, that is the supported break and no workaround is needed.
A caption that reports status to the floor, and not a button caption, is a different build: it belongs on a shop-floor screens category display beside the machine, where the text is laid out freely and no touch cell constrains it.
Questions
Why did ALT+0126 print a strange character instead of a break?
ALT codes type a character by its decimal code, and 0126 is the tilde, code 126, the last printable character in the set. The panel prints everything it can display, so the tilde shows up as a glyph inside your label. A break needs code 13, which sits outside the printable window, and no ALT code can write a control character into a label that stores printable text only.
Can I line up the second line with leading spaces?
Where the editor refuses a space at the start of a line, padding cannot align anything. Where it accepts one, the padding still moves as soon as a word on the line above changes length, because the spacing is tied to the text, not to a position. Align with object positions instead: two label objects, snap-to-grid off, left edges matched, and the pair keeps its shape through later edits.
How do I get two lines inside the touch cell itself?
The cell stays aligned to the grid like every touch cell on the screen, so the free-placed label pair cannot go inside it. Use the modified Enter in the cell's text property if your editor supports one there. Otherwise keep the cell text to the shortest word that identifies the control and place the two-line caption in label objects beside the cell.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.