ST editor syntax colors

Syntax coloring makes it easier to read code elements. You can set the color and the font style of each syntax item under Extras > Options > Program options > Fonts and colors.

Color settings for syntax coloring:

Element

Modifies color settings of

Text

Text elements

Global variable

Variables which are declared in the global variable list

Local variable

Variables which are declared in the header of the POU

System variable

System variables, e.g. sys_bPulse1s, sys_iRingCounter_2ms5

Special flags and addresses, e.g. R901C, DT90019

Global function block instance variable

Function block instance variables which are declared in the global variable list

Local function block instance variable

Function block instance variables which are declared in the header of the POU

Function

Functions, e.g. ABS, COS

Parameter placeholder

Placeholder for function and function block parameters. The placeholders are marked with the ? character, e.g. SEL(G := ?BOOL?, IN0 := ?ANY?, IN1 := ?ANY?)

Operator

Operators, e.g. ( ) , :=<>

Keyword

Keywords, e.g. FOR, IF, THEN

Number, constant variable

Numbers, e.g. 123, 16#123, TOD#15:36:55

PLC type constants, e.g. SYS_FP7

System constants, e.g. SYS_PI

Variables of class VAR_CONSTANT, VAR_GLOBAL_CONSTANT

String, constant string variable

String literals, e.g. 'abc'

Comment(* abc *)

Multi-line comments enclosed by round bracket and asterisk

Comment/* abc */

Multi-line comments enclosed by slash and asterisk

Comment//abc

Single-line comments introduced by two slashes

Address

Addresses, e.g. R0, DT0, %IX0.0.0

Monitoring

Online monitoring values

Forced variable

Forced Boolean variables and bit addresses

Modified on: 2023-10-06Feedback on this pagePanasonic hotline