'uses byteconverter
'your data in - without last ,""
Dim stringIn() As String = Array As String("G0 X100 Y100 F10", _
"G0 X10 Y210 F1000", _
"G0 X200 Y210 F10", _
"G0 X200 Y200 F1000", _
"G0 X200 Y50 F10", _
"G0 X10 Y10 F1000", _
"G0 X0 Y0 F10", _
"G1 X0 Y240 F1000")
' your results for checking against
Dim stringOut() As String = Array As String("473058313030593130304631300D0A", _
"47305831305932313046313030300D0A", _
"473058323030593231304631300D0A", _
"4730583230305932303046313030300D0A", _
"4730583230305935304631300D0A", _
"473058313059313046313030300D0A", _
"4730583059304631300D0A", _
"473158305932343046313030300D0A")
For p = 0 To stringIn.Length-1
Log(stringIn(p))
' the next line does the conversion
Log(bc.HexFromBytes(stringIn(p).Replace(" ","").GetBytes("utf8"))&"0D0A")
Log(stringOut(p)) ' your result
Log(bc.HexFromBytes(stringIn(p).Replace(" ","").GetBytes("utf8"))&"0D0A" = stringOut(p)) ' check against your results
Log("--------------")
Next