Converting string to number


#1

I have a camera attached to my DOBOT CR5 that gives position and sizes of my objects via DobotVisionStudio sending out data via comma separated strings over TCP.
In DobotStuduiPro2.7.1 I get the position correction string that I implement into move commands.


This (only showing X corrections) works great and the string seems to be converted into a number and added to current point.
However when I get a similar string from a measurement sent from the vision camera I get an error that I “attempt to compare string with number”.

It seams not to convert the string to a number array inside an if statement.
Example strings from position looks like this:
-0.536724,0.288480,-2.212562
From my measurements like this:
498.744049,3.834553