# CODESYS SQRT

Instructions · `SQRT` · verification: source checked

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.

## Specification

| Property | Value |
|---|---|
| Language | structured text |
| Code | SQRT |
| Syntax | q := SQRT(16); |
| Dialect | CODESYS |

## 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.

## Sources

1. [Beckhoff Information System](https://infosys.beckhoff.com/content/1033/tc3_plc_intro/2529101195.html) (accessed 2026-10-26)
2. [CODESYS Group](https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_operator_sqrt.html) (accessed 2026-10-26)

---

Source page: https://machineschema.com/instruction/iec-sqrt  
JSON: https://machineschema.com/instruction/iec-sqrt.json  
License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Cite Machine Schema and the original sources.
