Die Funktion berechnet die n-te Wurzel aus dem Aktualwert einer Variablen.
Die Wurzel ist folgendermaßen definiert:
result = \sqrt[root]{value} = value^{\frac{1}{root}}In STEP 7 (TIA Portal) ergibt sich folgende Formel:
result = value ** (1 / root)LGF_NthRoot (FC) | ||||||||
---|---|---|---|---|---|---|---|---|
LReal | value | Ret_Val | LReal | |||||
LReal | root | error | Bool | |||||
status | Word | |||||||
Bezeichner | Datentyp | Beschreibung |
---|---|---|
value | LReal | Wert aus dem die Wurzel berechnet werden soll. |
root | LReal | Wurzel Exponent |
Bezeichner | Datentyp | Beschreibung |
---|---|---|
Ret_Val | LReal | Rückgabe der N-ten Wurzel vom Übergabewert |
error | Bool | FALSE: Kein Fehler TRUE: Während der Ausführung des FB ist ein Fehler aufgetreten |
status | Word | 16#0000-16#7FFF: Status des FB 16#8000-16#FFFF: Fehleridentifikation (siehe folgende Tabelle) |
Code / Wert | Bezeichner / Beschreibung |
---|---|
16#0000 | STATUS_NO_ERROR Abarbeitung ohne Fehler beendet |
16#8200 | ERR_NEG_VAR Error: Neagtive Werte für den Wurzel Exponenten sind nicht definieert (Teil der Komplexen Zahlen) |
Version & Datum | Änderungsbeschreibung | |
---|---|---|
01.00.00 | Siemens Industry Online Support | |
19.08.2015 | First released version | |
01.00.01 | Siemens Industry Online Support | |
02.01.2017 | Upgrade: TIA Portal V14 Update 1 | |
01.00.02 | Siemens Industry Online Support | |
17.08.2018 | Upgrade: TIA V15 Update 2 | |
01.00.03 | Siemens Industry Online Support | |
23.11.2018 | Upgrade: TIA V15.1 | |
01.00.04 | Simatic Systems Support | |
17.01.2019 | Calculation changed | |
01.00.09 | Simatic Systems Support | |
13.11.2019 | Renamed from "LGF_XRoot" to "LGF_NthRoot" Regions, comments and constants are added | |
03.00.00 | Simatic Systems Support | |
23.04.2020 | Set version to V3.0.0, harmonize the version of the whole library | |
03.00.01 | Simatic Systems Support | |
12.11.2020 | Insert documentation |