The problem is with the invisible characters in the text file that indicate the end of a line.
In unix, there is only one character, a newline, or decimal value 11, or represented as \n In dos, the end of a line is usually represented by a carriage return character (decimal 13, or \r), and a new line character. EMC must be sensitive about which characters are at the end of the line in you file. If I list the contents of a sample file using the unix command "cat" I get... fra...@workshoppc:~/emc2/nc_files$ cat t.ngc F10 M6T1 G0 z0 x0 G0 z5 x-2 G0 z0 x0 G0 z5 x-2 M6T2 G0 z0 x0 G0 z5 x-2 G0 z0 x0 G0 z5 x-2 G0 z0 x0 G0 z5 x-2 G0 z0 x0 G0 z5 x-2 G0 z0 x0 G0 z5 x-2 G0 z0 x0 G0 z5 x-2 G0 z0 x0 G0 z5 x-2 G0 z0 x0 G0 z5 x-2 G0 z0 x0 G0 z5 x-2 G0 z0 x0 G0 z5 x-2 M6T0 M2 If you run od -a yourfile.txt it will show the contents of the file as special characters. fra...@workshoppc:~/emc2/nc_files$ od -a t.ngc 0000000 F 1 0 nl M 6 T 1 nl G 0 sp z 0 sp x 0000020 0 nl G 0 sp z 5 sp x - 2 nl G 0 sp z 0000040 0 sp x 0 nl G 0 sp z 5 sp x - 2 nl M 0000060 6 T 2 nl G 0 sp z 0 sp x 0 nl G 0 sp 0000100 z 5 sp x - 2 nl G 0 sp z 0 sp x 0 nl 0000120 G 0 sp z 5 sp x - 2 nl G 0 sp z 0 sp 0000140 x 0 nl G 0 sp z 5 sp x - 2 nl G 0 sp 0000160 z 0 sp x 0 nl G 0 sp z 5 sp x - 2 nl 0000200 G 0 sp z 0 sp x 0 nl G 0 sp z 5 sp x 0000220 - 2 nl G 0 sp z 0 sp x 0 nl G 0 sp z 0000240 5 sp x - 2 nl G 0 sp z 0 sp x 0 nl G 0000260 0 sp z 5 sp x - 2 nl G 0 sp z 0 sp x 0000300 0 nl G 0 sp z 5 sp x - 2 nl G 0 sp z 0000320 0 sp x 0 nl G 0 sp z 5 sp x - 2 nl G 0000340 0 sp z 0 sp x 0 nl G 0 sp z 5 sp x - 0000360 2 nl M 6 T 0 nl M 2 nl nl 0000373 So, looking at the first line of output... 0000000 - is the position in the file (in octal) of the start of this line. F - is the first character 1 - is the second character 0 - you guessed it, the third character nl - this is the 4th character, BUT, it is a special character, the new line character (that's just the way the unic program 'od' prints it out). You'll also notice 'sp' in the file - the space character. You need to do this to your file, and see what is at the end of the lines that are being joined together. > -----Original Message----- > From: [email protected] [mailto:[email protected]] > Sent: Tuesday, 30 June 2009 11:50 AM > To: Enhanced Machine Controller (EMC) > Subject: Re: [Emc-users] Error with new program. > > > Hi, > > > >> i use text edditor. and file has extention .txt > > > > Tell us which editor you have used. > > Was it on a Linux system? > > > >> in file everything cleare and problem. i save file. when load into > >> EMC2 lines 6 and 7 joint to line 5. > >> > >>> It sounds like there isn't a proper line termination character at > >>> the end of the lines. I'm not sure what emc needs, probably a > >>> linefeed, and you probably have a carriage return. > >> what that mean? in file text looks ok. > > > > May be this can help as background information: > > http://en.wikipedia.org/wiki/Newline#Common_problems > > i am using text editor from Applications-Accessories- Edit Text File. > > i copy text from note pad to this Edit Text File. > edited file and save it. > > i am not linux pro so what should i do to use command: > > od -a <yourfile.txt>? > > od -a < > G17G40G49G80 > G91G01G55 X0 Y0 Z0 f13 > G90G1Z0.2000 f10 > > G0Z0.25001 > G1X17.41802 Y37.36987 f10 > Z0.12328 F7.3 > > Z-0.14828 F2.7 > > X17.24044 Y36.61335 F3.7 > > X17.09375 Y35.1536 > > X17.08518 Y36.73141 > > X17.09105 Y44.51604 > > X17.11664 Y44.22957 > > X17.22931 Y43.38324 > M0 > > % > > ?? > here is the same problem. in same text editor text looks > good but when i copy past from there to this window you can > see same problem. > > > > > > > > > > > > > To see all the printable and non-printable characters in your file, > > you can use the command: > > od -a <yourfile.txt> > > > > > >> An editor like "vi" should show this. > >>> If not post the file as an attachment so we can see it. > > > > Indeed, that would help. > > > > > > Luc > > > > > > > ---------------------------------------------------------------------- > > -------- _______________________________________________ > > Emc-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/emc-users > > > > > > -------------------------------------------------------------- > ---------------- > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users > ------------------------------------------------------------------------------ _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
