Differences
This shows you the differences between two versions of the page.
de:project_s7:str2dec [2020/10/30 21:54] |
de:project_s7:str2dec [2022/04/21 15:01] () |
||
---|---|---|---|
1: | 1: | ||
+ | ====== Convert String to LInt and Real ====== | ||
+ | {{: | ||
+ | **install code:** \\ | ||
+ | - download str2dec.scl (text format) | ||
+ | - file import in TIA Portal: (new data instert) by " | ||
+ | - create block from source | ||
+ | - check the numer of db " | ||
+ | - instert db number (xx) to call " | ||
+ | - call fc " | ||
+ | - use values from " | ||
+ | |||
+ | Parameters of the ** " | ||
+ | |||
+ | **inStr (String):** input String, must contain the number looking for (max. 253 characters) \\ | ||
+ | **dbNr:** input, enter the number of strDB after compilation, | ||
+ | **error:** output until the DB number isn't good, TRUE. \\ | ||
+ | |||
+ | Values of // " | ||
+ | |||
+ | **str (String):** the input string (copy from str2dec)) \\ | ||
+ | **strLenght (Int):** the total length of the string \\ | ||
+ | **firstNumberPos (Int):** the position of the first number in the string \\ | ||
+ | **wholepos (Int):** the number of integer-positions \\ | ||
+ | **fractionpos (Int):** the number of fraction-positions \\ | ||
+ | **realOut (Real):** the REAL output (with sign) \\ | ||
+ | **negativeVal (Bool):** the sign is negative (true) \\ | ||
+ | **intWhole (LInt):** LINT whole without sign \\ | ||
+ | **intFrac (LInt):** LINT fraction without sign \\ | ||
+ | |||
+ | Important! The ** " | ||
+ | |||
+ | //strDB - right klick - properties... - General - Attributes - optimize block access | ||
+ | |||
+ | This feature cannot be enabled. \\ | ||
+ | |||
+ | {{: | ||
+ | |||
+ | **Installations: | ||
+ | - str2dec.scl runterladen (text format) | ||
+ | - Dateiinport in TIA Portal: (neues Daten einfügen) über " | ||
+ | - Bausteine aus Quelle erstellen | ||
+ | - Überprüfen Sie die Nummer von DB " | ||
+ | - Geben Sie die DB-Nummer (xx) ein, um " | ||
+ | - Rufen Sie FC " | ||
+ | - Verwenden Sie Werte aus " | ||
+ | |||
+ | Parameter der Funktion ** " | ||
+ | |||
+ | **inStr (String):** Dieses String muss die gesuchte Nummer enthalten (max. 253 Zeichen) \\ | ||
+ | **dbNr:** Eingabe, geben Sie die Anzahl der strDB nach der Kompilierung ein, z. B. für strDB [DB2]: **2**. \\ | ||
+ | **error:** Ausgabe bis die DB-Nummer NiO, TRUE. \\ | ||
+ | |||
+ | Werte von **" | ||
+ | |||
+ | **str (String):** die Eingabe-String (Kopie von str2dec) \\ | ||
+ | **strLenght (Int):** die Gesamtlänge der Zeichenfolge \\ | ||
+ | **firstNumberPos (Int):** die Position der ersten Zahl in der Zeichenfolge \\ | ||
+ | **wholepos (Int):** die Anzahl der ganzen Zahlen \\ | ||
+ | **fractionpos (Int):** die Anzahl der Bruhzahlen \\ | ||
+ | **realOut (Real):** der REAL-Ausgang (mit Vorzeichen) \\ | ||
+ | **negativeVal (Bool):** das Vorzeichen ist negativ (true) \\ | ||
+ | **intWhole (LInt):** LINT Ganzzahl-Teil ohne Vorzeichen \\ | ||
+ | **intFrac (LInt):** LINT Bruchzahl-Teil ohne Vorzeichen \\ | ||
+ | |||
+ | Wichtig! Die ** " | ||
+ | |||
+ | {{: | ||
+ | |||
+ | **telepítés** \\ | ||
+ | - töltse le az str2dec.scl fájlt (text format) | ||
+ | - file import a TIA Portálban: " | ||
+ | - generálja le a forráskódot | ||
+ | - másolja ki a generált DB " | ||
+ | - illessze be a DB számát (xx) a " | ||
+ | - hívja fel az " | ||
+ | - használhatja az " | ||
+ | |||
+ | Az **" | ||
+ | |||
+ | inStr (String): bementi String, ebben kell lennie a keresett számnak (max. 253 karakter) \\ | ||
+ | dbNr: bemenet, ide kell megadni az strDB számát a lefordítás után, például strDB [DB2] esetén: 2. \\ | ||
+ | error: kimenet, amíg a DB szám nem jó, addig: TRUE. \\ | ||
+ | |||
+ | Az **" | ||
+ | |||
+ | **str (String):** a bemeneti string (másolat az str2dec felől) \\ | ||
+ | **strLenght (Int):** a string teljes hossza \\ | ||
+ | **firstNumberPos (Int):** az első szám pozíciója a stringben \\ | ||
+ | **wholepos (Int):** az egészértékek száma \\ | ||
+ | **fractionpos (Int):** a törtértékek száma \\ | ||
+ | **realOut (Real):** a real kimenet (előjellel) \\ | ||
+ | **negativeVal (Bool):** az előjel negatív (true) \\ | ||
+ | **intWhole (LInt):** LINT egészrész előjel nélkül \\ | ||
+ | **intFrac (LInt):** LINT törtrész előjel nélkül \\ | ||
+ | |||
+ | Fontos! Az **" | ||
+ | |||
+ | ===== TIA-Portal ===== | ||
+ | |{{ : | ||
+ | |Enter dbNr (click to pic)|1st example: Temperature (click to pic)|2nd example: big value (click to pic)| | ||
+ | ===== Download ===== | ||
+ | |||
+ | <WRAP center round download 80%> | ||
+ | **SCL-Programm download : ** {{ : | ||
+ | Inside: **" | ||
+ | </ | ||
+ | |||
+ | From file (from 2020.10.30) **{{dlcounter> | ||
+ | |||
+ | {{page> |