I have a little probleme with my program. I need to convert value which are save in an array to string. I have made a little FB who convert the array to a string but there is a "bug" and i have the correct string and the end of the string is not empty it's the begining of my string.
For example i have value 1731 2498 14567 ... 2456
my string is : 1731;2498;14567;...;2456;$0D$L1731;2498
if someone have on idea it will be great.
Thanks !
PS this my conversion code:
gvl.tabsamples1[0]:=37111;//POS
gvl.tabsamples1[1]:=37111;//%IW4;//C1
gvl.tabsamples1[2]:=37111;//%IW5;//C2
gvl.tabsamples1[3]:=37111;//%IW6;//C3
gvl.tabsamples1[4]:=37111;//%IW7;//C4
gvl.tabsamples1[5]:=37111;//%IW9;//C5
gvl.tabsamples1[6]:=37111;//%IW10;//C6
gvl.tabsamples1[7]:=37111;//%IW11;//C7
gvl.tabsamples1[8]:=37111;//%IW12;//C8
gvl.tabsamples1[9]:=37111;//%IW14;//C9
gvl.tabsamples1[10]:=37111;//%IW15;//C10
gvl.tabsamples1[11]:=37111;//%IW16;//C11
gvl.tabsamples1[12]:=37111;//%IW17;//C12
gvl.tabsamples1[13]:=37111;//%IW19;//C13
FOR i:=0 TO 13 BY 1 DO
str:=CONCAT(str,WORD_TO_STRING(GVL.tabsamples1[i]));
str:=CONCAT(str,';');
END_FOR
str:=CONCAT(str,'$0D$L');
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
it seems that you write the string cyclic. In that way you will add at the second call the values again.
If you have to call it cyclical just add the following line athe the beginning of your code:
(* clear string *)str:='';
π
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everybody,
In first sorry for my english but i am french
I have a little probleme with my program. I need to convert value which are save in an array to string. I have made a little FB who convert the array to a string but there is a "bug" and i have the correct string and the end of the string is not empty it's the begining of my string.
For example i have value 1731 2498 14567 ... 2456
my string is : 1731;2498;14567;...;2456;$0D$L1731;2498
if someone have on idea it will be great.
Thanks !
PS this my conversion code:
gvl.tabsamples1[0]:=37111;//POS
gvl.tabsamples1[1]:=37111;//%IW4;//C1
gvl.tabsamples1[2]:=37111;//%IW5;//C2
gvl.tabsamples1[3]:=37111;//%IW6;//C3
gvl.tabsamples1[4]:=37111;//%IW7;//C4
gvl.tabsamples1[5]:=37111;//%IW9;//C5
gvl.tabsamples1[6]:=37111;//%IW10;//C6
gvl.tabsamples1[7]:=37111;//%IW11;//C7
gvl.tabsamples1[8]:=37111;//%IW12;//C8
gvl.tabsamples1[9]:=37111;//%IW14;//C9
gvl.tabsamples1[10]:=37111;//%IW15;//C10
gvl.tabsamples1[11]:=37111;//%IW16;//C11
gvl.tabsamples1[12]:=37111;//%IW17;//C12
gvl.tabsamples1[13]:=37111;//%IW19;//C13
FOR i:=0 TO 13 BY 1 DO
str:=CONCAT(str,WORD_TO_STRING(GVL.tabsamples1[i]));
str:=CONCAT(str,';');
END_FOR
str:=CONCAT(str,'$0D$L');
Hi,
it seems that you write the string cyclic. In that way you will add at the second call the values again.
If you have to call it cyclical just add the following line athe the beginning of your code:
an answer within 15 minutes and it is correct too.
just empty the string.
Thanks a lot i'll try this
Edit: Ilt's ok thanks again!