Hi Aram,

Everyone is giving you good advice.

I wouldn't worry too much about this "new problem"
because it sounds like more of the same old problem.
Also, EMC2 does not need a percent sign at the end of
the file like some other controls, just the M2.
Same with that stuff at the beginning (%),
a program name (number) in another control, perhaps?

I would like to help clarify your problem.
Can you tell us more about what you are doing,
and what steps you are taking?

If I understand you correctly, the steps
you are following are:

1) Generating some g-code using a Windows-
based CAM system which puts out an .nc file.

2) Making some edits to the .nc file in Windows
using Notepad.

3) Transferring the .nc file from Windows to
Ubuntu.  (How are you doing this?  Flash drive?
Ethernet?  Floppy?  Another method?  We can help
you better if we know.)

4) (I'm going to insert a blank Step 4 here for
later.  This is where you should be converting the
line-ending characters, but probably are not.)

5) Making more edits to the .nc file in Ubuntu
using gedit (Ubuntu's "Text Editor").

6) Finding some g-code problems with EMC2.

According to the EMC2 manual here,
http://www.linuxcnc.org/docview/html//gcode_overview.html#r1_1
EMC2 g-code lines end with:
"4. an end of line marker (carriage return or line feed or both)."
But I agree with everyone else here, take no chances.

When you have the .nc file in Ubuntu, *don't* edit it, instead
create a new file with Unix line endings by opening a terminal
(command line) and saying:

dos2unix -n /Media/Flash1/filename.nc ~/emc/nc_files/filename.ngc

I may have the paths wrong, I'm not near an EMC2 system.
And I'm assuming here that you transferred the file with
some kind of flash drive.  Now you can edit the new .ngc file
with gedit as usual.  This command (or one like it) would be the
missing "step 4" above, that everyone has recommended to you.

You can post some of your files if you want us to
check the line endings for you.  If I have guessed wrong
about the above steps you are following, please correct me.

I hope this helps.

Kim


[email protected] wrote:
> hi
> i have another problem with loading program.
> this is new fresh file from another drive.
> in middle of loading error!
> NEAR LINE 27726 of
> /............................/
> File ending with no percent sign.
> OK
> Click on OK and it load ok.
> when i open this file and add % sign and load again
> error say bad character '%" used.
> 
> mybe editor corrapted and need reload Ubunty?
> 
> 
> thanks
> aram
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>>Aram,
>>
>>
>>>File generated with CAD/CAM system.
>>>0-4.5CAM11.nc  extention is "nc"
>>>Type:NC File.
>>>When open file it looks like 0-4.5CAM11.nc-Notepad
>>
>>I assume from the extension that you have edited the file with Notepad
>>under Windows.
>>Then the problem is likely caused by a 'carriage-return / newline'
>>at the end of the line (as Frank has suggested).
>>
>>
>>>Maybe i need to change extention to .txt and than take to UBUNTY -EMC2?
>>
>>The file extension is of no importance here.
>>
>>
>>>In EMC2 I open text editor and use copy past.
>>>
>>>How i can detect problem?
>>
>>To see the invisible characters in the file, use the commands suggested
>>by Rob and myself in earlier replies.  You can post the output of this
>>command.
>>
>>
>>You can get rid of the carriage return characters (cr = \r) with the
>>command
>>
>> tr -d '\r' < bad-file.txt > good-file.txt
>>
>>In which 'bad-file.txt' is the bad file,
>>and 'good-file.txt' is a corrected copy.
>>Watch the ',' and '>' tokens in the command above.
>>
>>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

Reply via email to