How to Enter a Function

Enter the function you want to use

There are two methods to enter a function in the Structured Text program.

  • Method 1: Use the Function/Function Block window. (Use this method if you don’t know the function name yet.)

  • Method 2: Type in the function name directly. (This method is quicker if you already know the function name.)

 

 

Use the function you entered

You may have noticed there was a little difference in the display after the function was entered by Method 1 or Method 2.

Entered by Method 1

Entered by Method 2

If you move the mouse cursor over the function, XG5000 displays the default format of the function as reference as shown below.

When you use a function, you must use the same data type suggested for each input and output.

The output of a function can be assigned to a variable or used in a formula.

Example 1:

The output is assigned to a variable.

Example 2:

The output is a used in a formula.

The ‘IN:=‘ for inputs can be eliminated. The followings are valid expressions.

 

 

 

LP304D-5