sIEMENS s7 STRING cONVERSION
sIEMENS s7 STRING cONVERSION
(OP)
Hi All,
I'm currently busy on a project where i must take a number of char type objects and convert them to a decimal number for comparison reasons.
i tried the standars Step 7 STRNG to INT conversion with no good values.
I understand the string concept like followoing.
Variable type STRING[5]
STRING[ABCDE]
byte 0 Max No of Char
byte 1 Actual amount in String
byte 2 A
byte 3 B
byte 4 C
byte 5 D
byte 6 E
Is there any tip or trick to getting this conversion going
I would really appreciate any help.
If there are any requests i'll post my code on this topic.
Kind Regards
Rheinhardt
I'm currently busy on a project where i must take a number of char type objects and convert them to a decimal number for comparison reasons.
i tried the standars Step 7 STRNG to INT conversion with no good values.
I understand the string concept like followoing.
Variable type STRING[5]
STRING[ABCDE]
byte 0 Max No of Char
byte 1 Actual amount in String
byte 2 A
byte 3 B
byte 4 C
byte 5 D
byte 6 E
Is there any tip or trick to getting this conversion going
I would really appreciate any help.
If there are any requests i'll post my code on this topic.
Kind Regards
Rheinhardt
--Off all the things i've lost , i miss my mind the most--





RE: sIEMENS s7 STRING cONVERSION
For example the string you are receivinge is "1234"
So you would take byte 1 "1" (ASCII 49) - 48 = 1 x 1000
then add byte 2 "2" (ASCII 50) - 48 = 2 x 100
and so forth.
Is this an ST program?