I have a need to convert text to code. I can do it with Excel, but I can only do one line at at time.
I am using a kinematics program to produce six axis joint angles for a robot arm. The information represents a point to point move and is usually around 50 lines of text as follows:
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
-0.000000 7.819982 14.789516 0.000002 6.969540 0.000003
0.000000 16.114470 30.837702 -0.000001 14.723211 -0.000001
0.000000 23.386688 45.481628 -0.000000 22.094950 -0.000000
-0.000000 29.612301 59.122925 0.000000 29.510695 -0.000001
-0.000000 33.830772 70.922791 0.000001 37.153328 -0.000000
-0.000000 33.830772 70.999458 0.000001 37.168625 -0.000000
I can copy and paste one line at a time into excel, then copy and paste the result into another text file for use as g code. I am using Excel to round down to four places, add the axis letter and recalculate axis z,b,c:
X 0.0000 Y 7.8200 Z 22.6095 A 0.0000 B 6.9695 C 0.1882
X 0.0000 Y 16.1145 Z 46.9522 A 0.0000 B 14.7232 C 0.3975
X 0.0000 Y 23.3867 Z 68.8683 A 0.0000 B 22.0950 C 0.5966
X 0.0000 Y 29.6123 Z 88.7352 A 0.0000 B 29.5107 C 0.7968
X 0.0000 Y 33.8308 Z 104.7536 A 0.0000 B 37.1533 C 1.0031
X 0.0000 Y 33.8308 Z 104.8303 A 0.0000 B 37.1686 C 1.0036
Very slow moving one line at a time. I don't know what terms to google. I would like a more automated method of converting blocks of space delimited text.
Any clues?
Thanks