FREE USB Gcode Interpreter Software

12/03/2006 Ver1.7 Released.
This Version must be used with Version 3.1 Firmware for Processor or V1.2 for USB-Parallel Interface.

 

Find some details below on our new USB Gcode Interpreter Application.
This will allow you to run your machine via the USB port using either the processor board or the  USB-Parallel Port Interface.

Please note: This software is still in development and BETA stages, so please give us as much feedback as you can. If it misses steps or is not accurate in anyway, then let us know as that way we can only improve it!.
 

Please Click Here to Download V1.7


CNCDuDeZ Gcode USB Test BetaV1.7 2006

Release Date 12/03/2006
http://www.cncdudez.com
info@cncdudez.com

Bug Fixes in this version.
Jog was updating position display incorrectly, now fixed.
Load compile and simulate looses original position , now fixed.
Fixed Inverse check boxes bug, they now only change motor direction and not display.
Added some smoothing routines.

 

Introduction
This is a Beta release of the USB Gcode Interpreter that has been written to work in conjunction with the processor board that we sell at www.cncdudez.com. The processor board can control any 3-Axis Controller out there that uses the normal Step and Direction pulse method. Some popular ones at the time of writing this are the Xylotex, Geckos and our own 3-Axis controller board that we hope to release soon.

We use this Processor Board in our CNCDuDeZ Controller box which means the motors on our CNC machine can be driven not only with the usual Parallel port, but also via the Serial or USB port.

The main aim of this software is demonstrate how to control your CNC machine via the USB port.

Important Points

Firmware

You must be Running Firmware Version 3.1 on your Processor Board for this software to work and will find the latest version of Firmware in the same directory where you installed this software FILENAME: LOADER-cncusb4550V30-1.hex
Please check out the Firmware link at www.cncdudez.com for the correct way to upload the firmware.

The Firmware will still support the old Version 1.0 Protocol as well as this new one. You will find both protocols on the site.

Firmware to use this application with the new USB-Parallel Port Interface can be found at the site.

Gcode Support

On this first release we have only placed support of G00 and G01 codes, all other M or G codes will be ignored when loading the file.
We plan on adding the other codes in newer releases of the software.

If you have Arcs in your Artwork that produce G02 codes when a toolpath is created, then simply spline these to vector points in your Cad software before creating your toolpath and you should get the desired G01 codes instead.

Maximum workpiece

The maximum work piece for the moment is based on our machine which is 235mm X-Travel, 235mm Y-Travel and 75mm Z-Travel.
I know this can be a bit annoying to people using the Processor board on a bigger bed; we will increase the size in the future releases.

Zero start position

The software presumes that your start position of X-Zero and Y-Zero is the bottom left hand corner of the workpiece.

This restriction is only for the plot window and should not effect the running of the code if your preferred method is to have the X-Zero and Y-Zero in the center of the workpiece. If using this method to center your work then you know why the plot window does not display the workpiece correctly. We plan to update the plot routines in future versions.

Software Stop Button Latency

Because we are using the USB port you must be aware of the latency or delay that can occur when you wish to stop the software in an emergency.

If you click the STOP button within the software it will stop when it has finished processing the movement of the current Gcode command.

This does NOT affect the manual Emergency Stop button or the limit switches. If these are triggered then the software will halt immediately.

Setting up and using the software

Place your Processor Board into USB Mode.
You can do this by holding in the Mode button until the LCD Display shows USB.
Now launch this software and you are ready to go.

Overview

Plot Window Frame

This frame contains a small picture of your CNC machine bed and is sized to 235MM * 235MM.
When you load your Gcode this window will compile and plot the outline of the design you are about to cut.
If you choose the "scale to fit box" option then the design will be zoomed and fitted to its extents.

When running the travel movements will be shown in Blue the cutting will been shown in Black and Red depending on the depth being cut.

Gcode Frame

When you load your Gcode it will be loaded into this frame and formatted for the software.
When in run mode each line of the Gcode will be displayed with a Red background to show status of progress.

Status Frame

When the workpiece is loaded the software calculates the extents of the X and Y positions and displays them here.
Lines loaded is the amount of Gcode lines that are in memory and ready to be ran.
Processing Line shows progress of each Gcode command that is being executed.

The USB Packet Out shows each packet being sent out to the USB Port. There are a total of 11bytes per move sent out and this information is more for people wishing to write their own applications. Please check the development link at www.cncdudez.com for more information on this.

The Help button displays this help document.

Position Frame

In this frame you have the coordinates of each Axis or rather where the software thinks your Axis's are.
These coordinates will change as you jog or run the Gcode loaded.
You can Zero individual coordinates by pressing the button for the Axis needed.

The Goto button when pressed will read the X, Y and Z values that are entered in the boxes to the left of it and will move the machine to the desired position. The travelling speed will be whatever is set under the Feed Rates frame.

Run Control Frame

The Load button will allow you to browse and load up a Gcode file of your choice.

If the Scale to Fit box is checked with a tick in it, then the design once loaded, will be zoomed and fitted to its extents within the plot window.
Clicking on run will start the loading of the code and execution of each line of Gcode loaded, this will then be sent out to the USB port and move your machine.
By putting a tick in the Simulate box, the software will run the same as before but will not send the commands out to the USB port. This feature will allow you to do a trial run on your design first to make sure the software has compiled it correctly and also to check you have no mistakes in your design.

The STOP button will halt execution of the next Gcode command, once the one that is already running has completed.

Please read the beginning of this help file the section named Software Stop Button Latency for more information.

Jog Control Frame

The 10 arrows shown in this frame will jog each axis in the direction of the arrow.
Please check that the jog buttons are in moving each Axis in the correct direction before you try to run any Gcode.
If you find the direction is incorrect then simply tick the Inverse box for the Axis you wish to change.

Each click of the jog buttons move the Axis's 0000.010 MM at a time. If you hold down any of the jog buttons then the speed will increase with the movement going upto 0002.00 MM at a time for rapid movement.

You can smooth out the jogging noise by tweaking the Jogging Delay box in the Feed Rates Frame.

 

Feed Rate Frame

The first box is the Jogging speed based on MM per Minute.
The second box is Travelling Speed based on MM Per Minute.
The third box is Cutting Speed based on MM Per Minute.

If your Gcode has feed commands in it then the software will take these values and use them for the speed settings to run your machine.

If there are no Feed commands in the Gcode then the software will use the values entered in the Travelling speed box and the Cutting speed box.

If you wish to override the settings in the Gcode you can tick the Override box and the software will use the feed rates you have set in the Travelling Box and Cutting Box.
G00 is the travelling speed and G01 is the cutting speed in your Gcode.

The simulator speed is the pause between each Gcode command that is being executed. If you increase the pause then the simulator speed will slow down or to increase the simulator speed lower this value.

Setting the Pulses Per MM Travel will depend on your machine.

For the CNCDuDeZ Frame you just need to enter the following values depending what step mode you are using:
Eight Step Mode: 533.333 pulses
Quarter Step Mode: 266.666 pulses
Half Step Mode: 133.333 pulses
Full Step Mode: 66.666 pulses

For people that want a more technical explanation, please read below.

Each machine is different and there are a combination of factors that need to be taken into consideration when working out the correct travel speeds and accuracy.

1.) Motor Pulses.

The first one is your motors and how many pulses make it turn 1 revolution.
The most popular motors are 1.8 Degree that takes 200 pulses to turn them 1 revolution.

2.) Thread.

Next we have the thread pitch size on the Axis's. Our machine has a 3mm Pitch, which means for every full revolution of the motor our machine will move 3MM.
So now we divide this down to suit our motors.

We know it takes 200 pulses sent to our motor to make it turn 3MM so to turn it 1MM we would calculate 200/3 = 66.666 pulses. So every time we send 66.666 pulses our machine will travel 1MM

3.) Micro Stepping.

Most modern controllers now have micro stepping mode, which basically divides the pulses down to give a better resolution and accuracy on your motors.

Our Controller Board we use has Full step, Half Step, Quarter Step and Eighth Step mode. We recommend using Eight Step mode for better smoothness and accuracy.

So breaking this down again for 1MM travel we would need to increase the pulses depending on what Mode we are going to use:

Eight Step Mode: 533.333 pulses= 1MM travel
Quarter Step Mode: 266.666 pulses= 1MM travel
Half Step Mode: 133.333 pulses= 1MM travel for
Full Step Mode: 66.666 pulses= 1MM travel for

4.) Speed.

Speed is the next factor we need to work out and the way we do that using the Processor Board is by placing a pause between each step.

Some examples for travelling 1MM distance at a speed of 1MM a Minute

A 57150 microsecond Pause = 1mm a minute speed with 533.333 pulses 1/8 mode giving 1MM travel
A 114300 microsecond Pause = 1mm a minute speed with 266.666 pulses 1/4 mode giving 1MM travel
A 228600 microsecond Pause = 1mm a minute speed with 133.333 pulses 1/2 mode giving 1MM travel
A 457200 microsecond Pause = 1mm a minute speed with 66.666 pulses 1.0 mode giving 1MM travel

From here you can work out the base numbers needed to calculate the pause for any travel length at any travel speed. First lets take this down to the lowest resolution.

A 58521600 microsecond Pause = 1mm a minute speed with 0.5208330078125 pulses giving 1MM travel

5.) Putting it all together

So we now have all the factors needed to calculate what needs to be sent to the processor.
And best way is to show an example, we have set our pulses for 1MM travel to 533.333.

Example1:
So say we want to travel at a speed of 100MM A Minute we would use the following calculation:

Divide the pulses down to the lowest resolution

533.33/0.5208330078125 = 1024

Next get the Pause needed to Travel 1MM at 1MM Per minute Speed

58521600/1024 = 57150

Now Divide this down to get our required speed, so in this case 100MM travel a Minute

57150/100 = 571.50

Result is we would need a Pulse Delay of 571.50

Example 2:
We want to Travel 50MM a Minute 533.333 pulses set for 1mm travel:

533.33/0.5208330078125 = 1024
58521600/1024 = 57150
57150/50 = 1143 Pulse delay needed.

Example 3:
We want to Travel 50MM With 66.666 pulses set for 1mm travel

66.666/0.5208330078125 = 127.99879999924999953124970703107
58521600/127.99879999924999953124970703107 = 457204
457204/50 = 9144 Pulse delay needed.

The notes above are more relevant if you plan on writing your own routines for the processor board.

 


 

 
   

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Hit Counter