The status is going to report the extra axes, so I assume it will break a few senders. The PSoC has plenty, but keep in mind every time you change the axis count, you will need to reset the EEPROM because the locations will get shuffled and the restore from EEPROM will not work the first time you start under the new axis count. The storage of the steps/mm, speed, and acceleration will increase the amount of EEPROM required. The homing switches work in a similar fashion. The mask is still applied, but the mask is hard coded. To make the PSoC port easier to maintain as Grbl changes, I did not change the Grbl method to much. Here I have defined all 6 bits on the Control Register, but have only connected the I/O pins I am using. There are several advantages to this, but the main ones in this context are, you don’t need to map them to the same I/O port and you only have to connect the ones you want to use. These registers can be ‘wired’ directly to I/O pins. My port to PSoC uses Control Registers to output the step and direction signals and Status Registers to read the limits switches. This is a very efficient way of doing it, but it forces you to put all axes on one I/O port for each of the step direction and limit switch functions. Those bytes are used with a mask (to say with bits are actually used) and applied directly to an I/O port. Grbl uses 1 byte byte each for axis step, direction and limits switches. #Ecut 6 grbl codeThis code I found was especially helpful. Adds some #define statements to make it easier to configure between the axis counts.Īs I was working on this I stumbled upon a few other people working on this.Add additional $$ settings for steps/mm, speed and acceleration for the A, B, and C axes.It will do virtually all of the major code work. I found it used over 80 places in my port. While simply changing N_AXIS does not suddenly make the extra axes work, it does do a lot of the work. #Ecut 6 grbl upgradeHere is an example of a 5 axis upgrade for a 3 axis machine. Things get more complicated when you add more axes. Typically the axes after X,Y, and Z are labeled A,B, and C and are often rotary axes. I decide to try this with my PSoC port of Grbl. With a little work though, it is not too hard to add those extra axes to Grbl. It would be so easy to just change that to 4 or 6 and have some fun, right? No, unfortunately it is not that easy. If you have done any extensive poking around the Grbl source code you will eventually come across this line in nut_bolts.h.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |