CODESYS SQRT

SQRT is an IEC operator in the CODESYS development system that returns the square root of a number. The input may be any numeric basic data type, while the output must be REAL or LREAL. The document's example computes the square root of 16, giving 4, and shows the call in ST and FBD.

Source checked3/3 values · 2026-10-26

Specification

2 sources
Languagestructured text
CodeSQRT
Syntaxq := SQRT(16);
DialectCODESYS

Study notes

  • Input variables accept any numeric basic data type.
  • Output variables are restricted to REAL and LREAL.
  • The ST example is written q := SQRT(16); with result 4.
  • The operator is also shown in an FBD example.
↑↓ navigate↵ openesc close