Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
Hallo,
ich würde gerne eine String-Variable in eine Integer-Variable konvertieren.
Ich arbeite sonst mit Codesys 3x aber wie löse ich diese Problem mit Codesys 2.3 bzw Grips_cp? Dort steht mir diese Funktion anscheinend nicht zur Verfügung!?
Grüße und schon mal danke im voraus.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ich konnte jetzt die Funktion STRING_TO_DINT einbinden.
(*Variablen*)Input:STRING(40);strj:STRING;pj:POINTERTOBYTE;dnj:DINT;j:INT;(*Programm*)strj:=MID(Input,2,1);pj:=ADR(strj);dnj:= STRING_TO_DINT(pj);j  :=DINT_TO_INT(dnj);
Leider liefert bereits STRING_TO_DINT nur 0
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hallo,
ich würde gerne eine String-Variable in eine Integer-Variable konvertieren.
Ich arbeite sonst mit Codesys 3x aber wie löse ich diese Problem mit Codesys 2.3 bzw Grips_cp? Dort steht mir diese Funktion anscheinend nicht zur Verfügung!?
Grüße und schon mal danke im voraus.
Ich konnte jetzt die Funktion STRING_TO_DINT einbinden.
Leider liefert bereits STRING_TO_DINT nur 0
Moin
Gruß Erik
Also dieses hier:
iTest := STRING_TO_INT('1234');
funktioniert tadellos