Language Editor

Use the language editor is the environment to develop the contents of program organization units (POUs). Develop these POUs using language containers. Language editors hold elements of a given IEC 61131-3 programming language. A POU can only have one language editor. Description windows hold non-semantic information. When building projects, the compiler excludes information from description windows and HMI editors.
From the language editor, edit multiple POUs simultaneously. Individual POUs open in separate workspaces each with a tab indicating the POU name. The tabs enable moving from one POU to another.
When working in the language editor, choose to expand the workspace to a full-screen view.
Edit the contents of POUs in the workspace.
Task
Procedure
Expand the workspace to full-screen view
  • From the
    View
    menu, click
    Full Screen
    .
Select an element
Selected elements are displayed with colored handles. When selecting multiple elements, the handles of the first element are green and subsequent elements are turquoise.
When aligning multiple elements, the reference point depends on the programming language.
  1. To select one element, click the element in the workspace.
  2. To select multiple elements, do one of these:
  • Starting from an empty workspace, drag the pointer over the elements.
  • While pressing
    Shift
    , use the pointer to select elements individually.
Insert an element
  • From the
    Toolbox
    , drag the element into the language editor.
Insert an identifier
When inserting identifiers, insert a constant or variable automatically via the
Variable Selector
.
  1. From the
    Toolbox
    , drag the variable element into the workspace.
  2. From the
    Variable Selector
    , perform one of these, and then click
    OK
    .
  • In the
    Name
    field, type a literal value.
    When inserting literal values that begin with a letter or an underscore, enclose the variable name in single quotes as follows: 'abc'
  • Select the required variable from the lists of variables.
Insert a block
Insert blocks into language editors of graphical programs from the
Toolbox
. Following insertion, specify the type of block, such as operator, function, or function block from the
Block Selector
.
For programs, the available items are operators (OPE), standard functions (SFU), standard function blocks (SFB), user IEC 61131-3 Functions (IFU), user IEC 61131-3 Function Blocks (IFB) and all Functions (CFU) and Function Blocks (CFB) supported by the current target.
  1. From the
    Toolbox
    , drag the block element into the workspace.
  2. In the
    Block Selector
    , in the list of blocks, locate the required block.
  3. To limit the blocks displayed, sort the block list and filter the block list.
  4. From the list of available blocks, select a block, and then click
    OK
    .
Move an element
  1. In the workspace, select one or more elements.
  2. Drag the elements to another position.
Resize an element
Change the dimensions of specific individual elements.
  1. In the language editor, select an element.
  2. Place the cursor over the element handles, then click and drag to the required size.
Delete an element
  • In the language editor, select one or more elements, then press
    Delete
    .
Graphical POUs display an error symbol below elements with errors in the programming logic. Pausing on this symbol displays a description of the error.
mle_eclc.png
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal