Entering an expression for an input/output for a function or function block

By default, when you are inserting functions or function blocks into the ladder diagram, the EN-input and the ENO-output of the function or function block is connected by a link element. For the other in-/outputs of the function or function block, you are able to enter →variables or →literals This is how you enter such an expression:

  1. Position the mouse pointer onto the function or function block.
    Result: Texts are displayed beside the in-/output.

  2. Double-click one of the texts.
    Result: An input field is opened. This input field is a content assist list.

  3. Recommended: Delete the proposed text (e.g. IN1) so that the content assist list displays all available v ariables .
    images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg The icon in front of the name for the variable informs about the type for the variable (see "Instance-related and PLC-related information and actions within Instances view" for the meaning of the icons). The data type of the variable is displayed behind the name for the variable.
    If you want to close the input field without selecting a variable, click the primary mouse button outside the input field or press the ESC-key.

  4. Perform the following steps – depending on the requested entry:

    Requested entry

    Steps

    An existing variable

    1. Enter one or more letters. This displays a list with all elements fitting your input.
      Example: Enter Var . The list provides all variables containing the text Var .

    2. Click an element in the list or select it (by using the mouse or the cursor movement keys) and press the Enter-key .

    A new variable

    Declare a new variable according to the syntax that is described under "Creating variables when assigning one to contact or coil (by using the content assist)".

    A literal

    1. Enter the literal, e.g. INT#5 or 5.

    2. Press the Enter-key.

    Result: The expression is displayed beside the in-/output of the function or function block.