0203-03 Built-in functions

Example Projects > 0203 Function Blocks REXLANG > 0203-03 Built-in functions

Using built-in functions within the REXLANG function block

This project demonstrates the use of built-in functions within the REXLANG user-programmable function block of REXYGEN.

The algorithm processes both numeric and string inputs and parameters. Results are published via output signals. The algorithm itself is located in the functions_rexlang.c file.

Feel free to modify the algorithm to perform your own operations, there are 16 inputs, 16 parameters and 16 outputs available.

Read the complete description of the REXLANG function block for more details.


  • REXYGEN Runtime Core must be installed and running on the target device.

Running the example

  • The *exec.mdl file is the project main file.
  • Open it with REXYGEN Studio, compile and download it to the target device.
  • Switch to Watch mode and observe the algorithm in action.
  • Change the constants and parameters and see the displayed values.

Timing of the project

The algorithm runs each 100 milliseconds (0.1 s). See the EXEC function block,
tick x ntick0 = 0.05 x 2 = 0.1


Additional information

  • See also the examples 0501-NN to 0504-NN on generic communication with external devices for additional inspiration on using the REXLANG function block.
  • Visit the REXYGEN webpage for more information about the example projects and developing advanced automation and control solutions using REXYGEN.