Netduino home hardware projects downloads community

Jump to content


Photo

My Netduino CNC Machine


  • Please log in to reply
188 replies to this topic

#181 BernardG

BernardG

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 17 June 2014 - 08:07 AM

Ps to previous reply:

I forgot to say that if I send positions manually (Working positions X, Y, Z, button Goto), it works perfectly, so the problem is not communication between DazCamUI and DazCam in the Netduino.



#182 BernardG

BernardG

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 17 June 2014 - 10:02 AM

Here is a little video of my first experiments

 

 

 



#183 BernardG

BernardG

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 29 June 2014 - 08:37 PM

Hi Darrin,

if you are around, I sent you a private message. 

thanks in advance,

Bernard



#184 BernardG

BernardG

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 13 July 2014 - 03:04 PM

Hi All,

Here are the last news. As I said earlier, I had a problem with executing a GCode file. Being new to CNC, GCode, everything, I was quite lost, so it took me a while to figure out what was going on.

 

Part of the problem might be due to .Net 4.5 being a little less tolerant in some cases.

 

Anyway, the root of the problem was that, on CamUI side, in GCodeBlock.cs, the line 

 if (!double.TryParse(wordValue, out value)) value = 0;

was systematically returning 0 (ZERO)! So, quite obviously, if thre was nothing to do; commands were not sent to the Netduino.

 

Changing this line to be 

if (!double.TryParse(wordValue,NumberStyles.AllowDecimalPoint,CultureInfo.InvariantCulture, out value))
 value = 0;

made almost all the difference, as now I was actually getting values instead of zeroes.

 

Maybe this does not affect you if you are in the US, but in other parts of the world, where decimals symbols are commas, tryparse returns an error, as it take by default the current culture.

 

Another modification I needed to make, as the method parsing file lines into Gcode blocks relay on spaces separating coordinates, and they not always there in a Gcode file line, was to start by parsing the line to ADD a space in front of each letter, so that the line would be parsed properly.

// Seems I have a problem here as there is not always a space to separate coordinates after a G (or other code).
            // I need to find as way to add a space, otherwise I can't count on this being reliable
            char[] allWords = blockLine.ToCharArray();           
            var newBlocks = new List<GCodeBlock>();
            var newBlock = new GCodeBlock();         
            string tempString = "";
            //add a space in front of each letter
            foreach (char letter in allWords)
            {
                if (Char.IsLetter(letter))
                {                   
                    tempString = tempString + " " + letter.ToString(CultureInfo.InvariantCulture);
                }
                else
                {                    
                    tempString += letter.ToString(CultureInfo.InvariantCulture);
                }
            }

            tempString = tempString.Trim();
            var words = tempString.ToUpper().Split(' ');

i hope this can be useful to some others using Darin's code.

I am not done, yet (far from it), but I feel today was a good step.



#185 JLodge

JLodge

    New Member

  • Members
  • Pip
  • 2 posts

Posted 15 July 2014 - 05:59 PM

Awesome project!

 

very cool that you built it yourself! You should consider putting this project up on kickstarter... who knows - it may turn into something. 

 

Again, I applaud your ingenuity and perseverance in completing this project



#186 Darrin

Darrin

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 17 July 2014 - 10:14 PM

Great job Bernard, I never thought about making the program internationally safe. So I'm glad you found the trouble.



#187 Darrin

Darrin

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 17 July 2014 - 10:15 PM

Awesome project!

 

very cool that you built it yourself! You should consider putting this project up on kickstarter... who knows - it may turn into something. 

 

Again, I applaud your ingenuity and perseverance in completing this project

 

 

Thanks JLodge, I'm getting ready to go use my CNC machine right now. I've used it for a couple of years now and have had a lot of fun with it.

 

Not sure I'll do a kickstarter, there are so many thousands of others out there that I'd be lost in the crowd with nothing unique to offer. But anyone who wants to use my code for their own learning is more than welcome!



#188 BernardG

BernardG

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 18 July 2014 - 10:21 AM

Great job Bernard, I never thought about making the program internationally safe. So I'm glad you found the trouble.

Make sense, Darrin, no worries! It's just that this kind of difficulty is far from being obvious!

I will also need to look at inches versus millimeters; I saw there is a GCode command to switch between the 2, which is good, but I have to make it do "something", which is another story.... :-)

 

Anyway, thanks for your code and support, it's a fantastic help to get into Netduino CNC.



#189 francoisVis

francoisVis

    New Member

  • Members
  • Pip
  • 1 posts

Posted 22 November 2016 - 09:18 AM

Hey Every one,

 

Thank you for all the post this is very helpful. I am in the process of Building a cnc and without everyones work on the Software i would have been writing a Gcode parser for months. I am reworking the DaZCam Software to Run on Serial Communication as my netduino does not have a network socket on it. Initial tests seems to work Really well (Ping and Status requests). Will connect it up to the Breadboard tonight and see if the Steppers respond.

 

Will post some pics when i have something to show.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.