Results 1 to 12 of 12
  1. #1
    Join Date
    Apr 2009
    Location
    Kingswood
    Posts
    930

    Default Linux CNC Fail to Load File

    I run Linux Lubuntu in the house and Debian Wheezy with LinuxCNC 2.7.14 in the workshop on a turret mill.
    CAD is LibreCAD and CAM is CamBam.

    I have done multiple jobs where I do the design in CAD, then generate the GCode, then load on the CNC.
    No problems.

    The latest job is my 'first paid job'.
    A drawing by a friend that I got as a dxf.
    Loaded into LibreCAD no problems, a few minor changes, then through the process.
    But, LinuxCNC does not even recognize the file on the Debian machine.

    Debian sees the file, and allows editing using a text editor.
    What gives ?
    Any suggestions ?

    Don't you just love computers.
    Keep well,
    John

  2. #2
    Join Date
    Sep 2012
    Location
    York, North Yorkshire UK
    Posts
    6,438

    Default

    Hi John,

    I'm not sure what the problem could be ! However there has been a lot of updates for Debian based systems lately. Actually there were ten or more this morning. It might be worth checking that an update has not upset anything.
    Best Regards:
    Baron J.

  3. #3
    Join Date
    Oct 2015
    Location
    melbourne
    Posts
    473

    Default

    Warning : I know nothing about libre cad or li uxcnc. But first thing I'd try is another file. Try to determine if it is linuxcnc not behaving, or the file itself.

    Presumably librecad exported as whatever cnc format you wanted, correct extension etc? I don't think debian hides extensions like Windows likes to, but maybe there is an extra '.' Or something...

  4. #4
    Join Date
    Nov 2017
    Location
    Geelong, Australia
    Age
    57
    Posts
    2,651

    Default

    When you say LinuxCNC doesn’t recognize the file do you mean it doesn’t see it at all or can’t open it?
    Does it see other files in the same directory?
    You haven’t still got it open in the text editor by chance?

    Steve

  5. #5
    Join Date
    Apr 2009
    Location
    Kingswood
    Posts
    930

    Default

    Thanks for the suggestions.

    Debian is running on an isolated machine, so updates not possible.
    But in addition, my Debian is several versions old and so not easily upgraded - but it works (normally !).
    Planning to make a new system using a Raspberry Pi.

    Debian File Manager sees the file and opens it as a text file, allows editing and saving.
    LinuxCNC sees other similar files in that folder but does not show the subject file.

    I currently use NCViewer on the net as the simulator running on Lubuntu, and it opens and correctly displays the required GCode.

    One operational quirk I have to deal with is the file name.
    Although Linux is blind to file type, LinuxCNC demands '.ngc' extension, whereas CamBam produces a '.nc' extension.
    I always just change the extension when I transfer the GCode file between machines using a USB flashdrive.
    (I know - LAN will occur sometime)

    I believe there is some sort of header content in the dxf I received from my friend that offends LinuxCNC.
    And my editing in LibreCAD does not remove the extra.
    It is a simple drawing, so I plan to make a new drawing from scratch, copying the details by keyboard and mouse.

    This issue prompts me to search for a Linux hexadecimal editor.
    These tools proved quite useful back in the day of CP/M through to Windows XP, but not common since.

    Keep well,
    John.

  6. #6
    Join Date
    Jul 2016
    Location
    Melbourne
    Age
    35
    Posts
    1,522

    Default

    Might pay to do an ls -lah in terminal in that directory, make sure the permissions and ownership are all the same?

    Sent from my SM-G973F using Tapatalk

  7. #7
    Join Date
    Nov 2017
    Location
    Geelong, Australia
    Age
    57
    Posts
    2,651

    Default

    The code file should be just plain text AFAIK, so any header in the original DXF shouldn’t be relevant.

    Was your friends file produced on Windows by chance?
    Wondering if it’s a case of the intermediate software seeing a windows format file and outputting the same in terms of line termination. Online viewers would probably handle it automatically.
    Should be obvious if you open the guide file in a command line text editor like vi, but easy just to run a dos2unix on it which will sort it out.

    Steve

  8. #8
    Join Date
    Jul 2016
    Location
    Melbourne
    Age
    35
    Posts
    1,522

    Default

    Could also be a text encoding issue, utf8 vs ascii?

    Sent from my SM-G973F using Tapatalk

  9. #9
    Join Date
    Sep 2012
    Location
    York, North Yorkshire UK
    Posts
    6,438

    Default

    Hi caskwarrior,

    Debian is running on an isolated machine, so updates not possible.
    But in addition, my Debian is several versions old and so not easily upgraded - but it works (normally !).
    Some of the older versions of Linux didn't like spaces in a file name ! Debian among others was one of them. If that's the case just rename the file.

    Try "wxHexEditor" to edit your files, it will show any code hidden in a file !
    Best Regards:
    Baron J.

  10. #10
    Join Date
    Apr 2009
    Location
    Kingswood
    Posts
    930

    Default

    Thanks guys, I was aware of the line termination issue from years ago, but failed to recognize it as the cause this time.

    Used vi, and found "CTRL M" as line terminators.
    dos2unix was not installed on my Lubuntu box, checked several locations dealing with using it, and installed it.
    Converted the original file successfully to remove the 'CTRL M', and LibreCAD opens it for editing.

    Will revise the drawing with some changes, and try loading into the CNC later today.

    Thanks for the reference to wxHexEditor.
    My system has wxhexeditor available for installation, as well as several others that all sound useful.
    But typical Linux, too many.
    How do you choose ?

    Keep well,
    John.

  11. #11
    Join Date
    Nov 2017
    Location
    Geelong, Australia
    Age
    57
    Posts
    2,651

    Default

    Good to hear you've got it sorted !

    All my linux work is CLI stuff on servers (mostly Redhat/Centos base systems but some Ubuntu) so I can't help with recommending GUI applications, but in general I find it better to choose an app that works in a similar way to others I use.
    I usually have a search online for "best (or top) tool for blah blah", pick the first couple and have a quick play.
    Unless its something that I'm expecting to have a learning curve for - if it doesn't like its going to be easy to do what I want in the first couple of minutes I put it aside and try the next one.

    Steve

  12. #12
    Join Date
    Sep 2012
    Location
    York, North Yorkshire UK
    Posts
    6,438

    Default

    Quote Originally Posted by electrosteam View Post
    Thanks guys, I was aware of the line termination issue from years ago, but failed to recognize it as the cause this time.

    Used vi, and found "CTRL M" as line terminators.
    dos2unix was not installed on my Lubuntu box, checked several locations dealing with using it, and installed it.
    Converted the original file successfully to remove the 'CTRL M', and LibreCAD opens it for editing.

    Will revise the drawing with some changes, and try loading into the CNC later today.

    Thanks for the reference to wxHexEditor.
    My system has wxhexeditor available for installation, as well as several others that all sound useful.
    But typical Linux, too many.
    How do you choose ?

    Keep well,
    John.
    Hi Guys,

    I'm getting lazy nowadays, most of the command line stuff I've forgotten. Using "Trinity" desktop and graphical applications tends to cause this. Nowadays the menus have an item for dos to unix conversion !

    As far as wxHexEditor is concerned, just try them all and see which one you like. I only use it occasionally because its already there. Anyway my days of editing code are long over...
    Did I say I hate programming.
    Best Regards:
    Baron J.

Similar Threads

  1. Thread fail
    By phaser in forum FORUMS INFO, HELP, DISCUSSION & FEEDBACK
    Replies: 6
    Last Post: 3rd Nov 2018, 06:47 PM
  2. Why video uploads fail?
    By .RC. in forum FORUMS INFO, HELP, DISCUSSION & FEEDBACK
    Replies: 5
    Last Post: 2nd Jan 2016, 01:34 AM
  3. Electric Motor fail
    By DSEL74 in forum METALWORK GENERAL
    Replies: 23
    Last Post: 24th Oct 2014, 06:03 PM
  4. Dovetail Cutter - Fail..
    By mahgnia in forum METALWORK GENERAL
    Replies: 13
    Last Post: 24th Sep 2013, 12:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •