Vijolica555
Level-1
- Beiträge
- 23
- Reaktionspunkte
- 0
-> Hier kostenlos registrieren
TwinCAT 3 SPLIT STRING
Hello guys,
I am new at forum. My German knowledge is so so, I will ask my question in English and I hope smb will be willing to help
I am using TwinCAT 3.
I am having string: 'OK;FFT;1.0;8.0$NX;0.0001;0.375;0.0053;3.5$NY;0.0001;0.375;0.0053;3.5$NZ;0.0001;0.375;0.0053;3.5$NV;0.0003;1.125;0.0161;3.5($R' and I would like to split it at 5 string, after every $N.
Example:
I tried some things but did not succeed. Does anybody have any suggestion maybe? Is there any Fb or function in TwinCAT that I did not found?
(Later I would like to read every data in string separately but I assume I can delate $N and $R and wrote it to the Array, or?).
Thank you.
Hello guys,
I am new at forum. My German knowledge is so so, I will ask my question in English and I hope smb will be willing to help

I am using TwinCAT 3.
I am having string: 'OK;FFT;1.0;8.0$NX;0.0001;0.375;0.0053;3.5$NY;0.0001;0.375;0.0053;3.5$NZ;0.0001;0.375;0.0053;3.5$NV;0.0003;1.125;0.0161;3.5($R' and I would like to split it at 5 string, after every $N.
Example:
'OK;FFT;1.0;8.0$N
X;0.0001;0.375;0.0053;3.5$N
Y;0.0001;0.375;0.0053;3.5$N
Z;0.0001;0.375;0.0053;3.5$N
V;0.0003;1.125;0.0161;3.5($R'
X;0.0001;0.375;0.0053;3.5$N
Y;0.0001;0.375;0.0053;3.5$N
Z;0.0001;0.375;0.0053;3.5$N
V;0.0003;1.125;0.0161;3.5($R'
I tried some things but did not succeed. Does anybody have any suggestion maybe? Is there any Fb or function in TwinCAT that I did not found?
(Later I would like to read every data in string separately but I assume I can delate $N and $R and wrote it to the Array, or?).
Thank you.
Zuletzt bearbeitet: