A GCode parser written in C# for the netduino platform. G-code (http://en.wikipedia.org/wiki/G-code) is a standard language used in automation (CNC, numerical control) to instruct machines the movements they need to perform in other to build a shape designed in a CAD program. That CAD model is then converted to GCode by some CAM software and that GCode is parsed by this software to generate machine movements.
The software is divided in several components:
It is also possible to connect to the netduino directly via telnet and paste the gcode over that connection. By default, it is listening on port 82.
The project is a VS2010 express solution, that requires the netduino SDK to be present.
There are several build configurations available. They build the netduino application or the PC software. Both applications share the same gcode parser code so that the viewer draws what the netduino will do (at least what refers to GCode, mechanically that's a different story).
To build the netduino app, select the configuration "Netduino debug" and build. The app is the project StepperBasic/NetduinoDevice2.
To build the Windows app, select the configuration "Debug" and build. The app is the project "gcodeviewer".
Output pins and other parameters of the device are configured in the StepperBasic/CncDevice.cs class. Changing those parameters requires recompiling and redeploying for now.
It is possible to calibrate the number of steps per mm without recompiling using a D92 command like this:
D92 X320 Y320 Z160
This means that the X axis needs 320 pulses to advance one mm, same for Y and Z needs half (160).
So far the parser is able to handle successfuly all the toolpaths generated by VCarve Pro v6.
Create a configuration file named "gcodeviewer.ini" that will hold some configuration parameters. It has the format on a .INI file. At least, you need to add an entry with the address of netduino:
cnc.address=ip address of netduino.
you can also specify the port:
cnc.port=82
To open a GCode file, click on the top yellow bar. An open file dialog will pop up letting you choose the GCode file. No error checking is performed, if you feed any other type of file, the app may crash.
Review the toolpaths in the 3D viewer:
If happy, connect to the netduino with the "Connect" button.
The "Offline" label should become "Online".
Now click "Begin" to start machining. Note that clicking "Cancel" may not stop inmediately and may complete the current Gcode line.
This code is licensed under the MIT license.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。