User Tools

Site Tools


expr:expr

Expressions

About

Expression is scripting language used in PlanetCNC TNG.

  • Expression is used with scripts, e.g. Expr.txt. Such files contain script code which is evaluated by PlanetCNC TNG expression evaluator.
  • It can be very practical for PLC type applications where periodical evaluation is necessary or for program events.
  • Expr.txt file can contain and use vast array of expression functions, parameters and other commands supported by PlanetCNC TNG.
  • Expr.txt file is located in the profile folder of TNG software.
  • Profile folder can contain multiple Expr.txt files. Specific Expr file naming convention is available for better distinction. e.g.: Expr_Semaphore
  • If multiple expr files use same function, then function will be called first from the first file and only then with the next file.
  • Local variables(e.g. name convention of local variables: red_light, global variables: _red_light ) have scope only within the parent Expr file.
  • Each Expr file contains functions that are marked with symbol #.
  • Each function begins with symbol # and ends with the next # symbol.
  • Each expr file can use built-in functions that are related with program events



expr/expr.txt · Last modified: 2023/01/17 14:08 by 127.0.0.1

Page Tools