The script is executed line by line and in a cycle like a PLC program. Its syntax is similar to the PLC's Structured Text.
A script is a plain text file (multi-byte text).
The "white space characters" will be ignored and have no influence on the program (space, horizontal tab, new line, vertical tab, and form feed).
Each line with functions or operations must be terminated with a semicolon ";" (but not the comments).
Each line ends with at least the LF (line feed) character (Windows systems usually use CR+LF).
Comments start with the character "#" and terminate at the end of a line.
The script can handle variables. There are two different types of variables available: flags and data registers.
Flags are designed for two status: FALSE and TRUE. Each flag starts with the character "R" and a number in square brackets: e.g. R[1C]. Valid range of flags: 0000–255F. Note that the last right character value is written as a hexadecimal value.
Data registers are designed as 16-bit unsigned integer. Each data register starts with the characters "DT" or “WI” and a decimal number in square brackets: e.g. DT[1]
While DT and R refer to address areas in the PLC, WI refers to the internal memory areas of the FP-I4C unit.
The assignment: :=
Arithmetic operator addition: +
Arithmetic operator subtraction: -
Arithmetic operator multiplication: *
Arithmetic operator division: /
The IF (variable) THEN operation END_IF;
The condition is set in round brackets. Supported conditions: <, >, =, <>
The IF can operate conditionally on one or more operation lines until the END_IF;
The IF will operate when the condition is not 0
The internal fixed functions can be used. A function starts with the characters FPWEB_ and a clear function name followed by parameters in round brackets.
The parameters of the function are divided by commas.
The number of parameters are fixed as specified by each function.
Parameters in "" are static.
Numeric parameters can be dynamic when DT[ ] or R[ ] are used.