postprossesor for kuka robot on XYZ coordinate

hello, i try to make a sheetcam post for kuka robot ok XYZ cordinate

now i do not get a comma after the axis

i get now LIN { X 0.000 Y 0.000 Z 0.000}

but i need LIN {X 0.000,Y 0.000, Z 0.000}

can i add anyting to my post to get after the axis numbers an comma?

post.Text (" LIN {“)
post.ModalNumber (” X", endX * scale, “0.0000”)
post.ModalNumber (" Y", endY * scale, “0.0000”)
post.ModalNumber (" Z", endZ * scale, “0.0000”)
post.ModalText (“}\n”)

I got your email but I’ll reply here in case anyone else has a similar question.
The built-in ModalNumber function won’t do what you want but this code may work:

   local needComma = false;
   post.Text (" LIN {")
   if(endX < 1e17) then
      post.Text(" X")
      post.Number(endX * scale,  "0.0000")
      needComma = true
   end
   if(endY < 1e17) then
      if(needComma) then post.Text(",") end         
      post.Text(" Y")
      post.Number(endX * scale,  "0.0000")
      needComma = true
   end
   if(endZ < 1e17) then
      if(needComma) then post.Text(",") end         
      post.Text(" Z")
      post.Number(endZ * scale,  "0.0000")
   end
   post.Text ("}\n")

When the post processor starts it has no idea where the tool is. If a coordinate value is unknown it is set to the magic number 1e17, which is why you have to check for it.
Note: If you do this don’t use ModalText on any of the coordinates anywhere else in your code. If you do you could endup with coordinates not being output when they should be.

Oke thank you i will try