CNCMill Mint

From rlab.org.uk
Jump to: navigation, search
IMG 20131023 194305.jpg
IMG 20131023 230144.jpg

The Mills firmware is based on Baldor's Mint. This runs a Basic programs on the controller which have access to communication and motion libraries. The Mill is preloaded with a Denford specific program `VRMilling5/Old Machine Files/MicroMill 2000.mnt` which handles communication with VRMilling on the host PC and converts a sequence of coordinates into movements.

The is a G-Code based host implementation here: https://zi.is/p/browser/gcode2mint

As you can hear we (and PyCAM) havn't yet implemented proper arcs:

Contents

Communication

serial

Baud Rate: 19200

The communication is split into packets:

Host -> Device

  • Each packet starts with \x04
  • Followed by a two-ASCII capital letter message
  • An ASCII Number. For general commands this is '6', for axis specific commands it is the number of the axis.
  • A character specifying for type of parameters (& ' or % or nothing)
  • An ASCII number for the sub-message.
  • Then optionally a comma and some parameters (again values are transferred in ASCII)
  • Some packets end \x05 asking for a reply, others end \x03 followed by the XOR checksum of every other byte in the packet

Device -> Host

  • Each packet starts with \x02
  • Followed by a two-ASCII lowercase letter message
  • An ASCII Number. For general commands this is '6', for axis specific commands it is the number of the axis.
  • A character specifying for type of parameters (& ' or % or nothing)
  • An ASCII number for the sub-message.
  • Then optionally a comma and some parameters (again values are transferred in ASCII)
  • \x03 followed by the XOR checksum of every other byte in the packet NOT INCLUDING THE \x02

Known commands

Version

VN6 {\x05}

Should always get back:

vn2.01.b6/S/B19-JD5 {checksum}  #Version of MINT
MB631 {\x05}

Should always get back:

mb214 {checksum}         #Version of the Basic file
MB632 {\x05}

Should always get back:

mb4 {checksum}         #Version of the Mill

Init

This uses messages starting MB6:
M312                     #Seems to set the correct axis orientation
{MB6} 7 {x05}            #Read last tool
{MB6} 19 {x05}           #Set Safty
{MB6} 5 {x05}            #Set 100% feed override
{MB6} 6 {x05}            #Set 100% spindle override
{MB6} &20,60 {checksum}  #Set Message buffer to 60
{MB6} &01,20 {checksum}  #Process new message buffer
MB5(15,2800 {checksum}   #Set max speed to 2800
CT6 {checksum}           #?
{MB6} %08,1 {checksum}   #Enable feed override
{MB6} %09,1 {checksum}   #Enable spin override
{MB6} %10,0 {checksum}   #?
{MB6} %34,0 {checksum}   #?
{MB6} 99 {x05}           #?
{MB6} 6 {x05}            #Set 100% spindle override???
{MB6} %38,0 {checksum}   #?
{MB6} '04,150 {checksum} #Set spindle speed to 150
{MB6} %02,0 {checksum}   #Disable 'Auto' Mode'
{MB6} 99 {x05}           #?
{MB6} 6 {x05}            #?

M Codes

These take the general form:

MB6%18,{M-CODE} {checksum}
  • 3, 13 = Spindle Start
  • 5, 30, 0 = Spindle Stop
  • 62,64 turn 'output 12' on and off.
  • 63,65 turn 'output 13' on and off.
  • 66,67 wait for input 10 to be on, wait for it to be off.
  • 68,69 wait for input 11 to be on, wait for it to be off.

The spindle commands need to be followed by a call to action the change:

MB6%18,3 {checksum}     #Spindle Start
MB6&01,18 {checksum}    #Run
MB6%18,5 {checksum}     #Spindle Stop
MB6&01,18 {checksum}    #Run

JOG mode

This works by starting an axis moving, waiting some time, then sending a stop when the destination is reached (i.e. isn't very useful):

MA2'-52598 {checksum}   #Down
MA2"0 {checksum}        #Up
MA0'-71811 {checksum}   #Left
MA0"0 {checksum}        #Right
MA1'-24000 {checksum}   #Back
MA1"0 {checksum}        #Forwards

ST6 {checksum}          #Stop

Read

ZZ6 {\x05}

Returns:

zz6-1024,-1024,-1024,1,1,1,0,0,0,100,0,0,2,0,100,100,-1024,-1024,-1024 {checksum}

I have not fully decoded this, but it is reading the knobs and buttons from the mill.

Move to target

VA6{3 4 or 5}-{x-cord},-{y-cord},-{z-cord} {checksum}

Home

ZZ6 {\x05}
HS6/2100,2100,2100 {checksum}
ZZ6 {\x05}
HM2"2 {checksum}
ZZ6 {\x05}
HS6/2100,2100,2100 {checksum}
ZZ6 {\x05}
HM0"2 {checksum}
ZZ6 {\x05}
HS6/2100,2100,2100 {checksum}
ZZ6 {\x05}
HM1"2 {checksum}

Set Feed Speed

MB6(03,XXXX {checksum}
Where XXXX is a zero-padded integer in the range 0-2800.

Set Spindle Speed

MB6(04,XXXX {checksum}
Where XXXX is a zero-padded integer in the range 0-2800.
Personal tools
Navigation
Toolbox