Can I command the unit to go to something like 12.5" X 12.5" X -2.5" from home? Is the only option to continuously jog the unit using the touch panel, or can I type in coordinates somewhere?
youād have to do that by inputting gcode commands in the mdi tab, so if you know gcode, yes!
The short answer is āYupā! Short enough for ya? But how i imagine you would ask. Simpleā¦ if you understand a couple of simple gcode commands. Think of gcode commands as words in a language that convey instructions. Put the correct words together and you have built a set of instructions that the machine can understand and perform.Here are sof of the codes you need to know to build a functional command.
- G20 Inch Mode. All movement is performed in inches
- G21 Metric Mode. All movement is performed in millimeters
- G0 Move Command. Moves a specified axis at rapid speed
- G1 Move Command. Moves a specified axis at a specified feed rate
- G90 Absolute Mode. Puts the machine into absolute movement mode. all movement commands will move the spindle to the specified location regardless of where it is located when the command is issued not a specified distance.
- G91 Incremental Mode. Puts the machine into incremental movement mode. all movement commands will move the spindle a specified distance from itās current location
- F Feed rate command. Sets the speed that the spindle will move from point A to point B
Now lets build the commands to move your spindle to X12.5 Y12.5 and Z -2.5. I will assume it is in Inches. We will also assume that you homed your machine to the front left corner since you said āfrom homeā. So we will make use of the following commands.
G21 For Metric Mode
G90 for absolute mode
G1 Sow we can slow things down some
F to define the actual feed rate
G91 to put the machine back in incremental mode when finished
The first command is simple
**G21 G90 F500**
(Metric Mode, Absolute Mode 500 mm per minute feedrate)
**G1 X12.500 Y12.500**
(Move the X and Y axis to location 12.5,12.5 both at the same time)
**G1 Z-2.500**
(Move the Z axis to location -.2.5)
G91 (Put the machine back in normal jogging mode)
If you put it into a file that you run, it would look like this:
G21 G90 F500
G1 x12.500 Y12.500
G1 Z-2.500
G91
Using a semi-colon ā;ā you can simplify the commands into one line of code that you could put on the MDI line and send it to your machine:
G21 G90 F500; G1 x12.500 Y12.500; G1 Z-2.500; G91
Awesome write upā¦ Note that this retained g21 (metric) so just need to change to g20 but at least it wonāt crash by going much further like flipping them the other way.
I am new to the forum - the OF will be my first CNC. I would like to thank you for taking the time to present this clear and informative set of instructions. Am I correct in assuming that if I wanted to check the accuracy and repeatability of all three axes, I would use similar G Coding for the Z? For example, move the spindle to various locations (X,Y) and heights (Z) to see if it actually goes there and back, as well as the correct mm Z height along the way.
Tom
I made some assumptions which I donāt like to do more than I have to. The last assumption was if you are sending those commands in millimeters then you probably are going to carve in millimeters as well. Not to mention that Metric Mode is the default mode for the OneFinity unless you change it. I might have not even included the G21 if he hadnāt listed Z-2.5 as one of the parameters. Z-2.5 is a fairly bold move but well within the capabilities of the OF machine if it has just been homed. Just playing it save there though.
You can use a command that would move the X Y and Z at the same time so they all 3 reach their destination at the same instant. I shy away from that because that can leave your Z axis getting low to the ground so to speak and if there is anything laying around in its path you could have a collision.
G90 G0 X0 Y0 Z0 (Move all three axis to work position 0 at the same time)
G90 G0 X10 Y10 Z1 (Move all three to 10-10-1)
Replace G0 WITH G1and add a Fxx to the end and you will get the same result at speed xx
G90 G1 X10 Y10 Z1 F100 (Same move as before but now the feed rate is controlled with the G1 and F commands)
Note that F100 can mean either 100 inches per minute or 100 millimeters per minute depending on the mode the controller is in.
Thank you again. I appreciate the warning about adding the Z movement testing. I imagine it is a right of passage to bottom out your spindle and bit at least once when you are learning. It is great having such an active and supportive forum to seek advice on how to do things, but also to go to when things go wrong - which they will.
Itās sorta like learning to fly a radio controlled airplane. Itās not a matter of if you will crash or not. It is a matter of when and what you learn from the experience. History will absolutely repeat if you donāt learn from it. As a radio control aircraft instructor, I have seen it over and over again.
In G-Code files, each line is a single command and is executed one before the next. However, each line can have multiple commands which execute simultaneously such as:
G0 X1 Y1 Z1 (In this line all three axis move at the same time.)
In these two lines, you get the same end result but the Z axis doesnāt move until the X and Y finish moving
G0 X1 Y1
G0 Z1
Iāve done some seriously stupid things with my CNCs and my very first op on my OF didnāt go as expected (totally operator error). I will say, however, at least the OF tries to protect you from some basic mistakes by not accepting obviously erroneous input. I forgot to change my WCS (work coordinate system) yesterday but I changed my stock size, which tried to push the OF to a negative location past zero. It dutifully stop execution and complained to me. The X-Carve would have just crashed into the X stop full speed and chewed up the belts. I would be really great if the SW would identify erroneous input before it starts to execute though - it would have saved me from stopping the program and restarting. Scanning for moving outside the boundaries of the machine would be super simple to do after you upload the program. Itās stressful enough clicking that play button the first couple times - being āassuredā youāre not doing something stupid before playing would be really awesome.
Also, being able to move a specified distance without knowing G-Code (like UGS allows) would be really great too.
#featurerequest
-Tom
Thank you charleyntexasā¦ I have confirmed that this all works as I hoped using the online emulatorā¦
Charlie, could you explain how to enter the gcode into the controller? This is the part that I am not sure about.
And what is the MDI?
If you are only entering one line of gcode at a time then you enter it on the MDI line which is on the Controller main page. Click the play button to send the code. If you have multiple lines of code that you want to send then create a text file with notepad, type out your code and save the file. Donāt worry that it has a .txt extension instead of the normal .ngc extension. The file will still load and run. Send the file to your OneFinity controller using the same method you use to send a carving file. (USB drive or over WIFI/Ethernet). The file should then be on your controller and in the dropdown list with other existing files. Just click on it and then click play to send the code to the machine.
Let me know if you have any more questions.
Thanks, that is very helpful to know. At the moment I am away from my machine, and I donāt remember any line labeled MDI. What does that mean and which line is it?
I believe MDI = Manual Data Input - which makes sense. If the OF controller interface is similar to the Buildbotics, then the MDI is a tab that is located in a row above where the Stop, Play, File,ā¦ buttons are found.
It is directly below the jog buttons labeled MDI, I believe it stands for Machine Data Interphase.
@charleyntexas - pretty sure itās manual data input. But Iām not going to correct the master!
Thanks for the MDI Explanation guys! I will have to check it out when I get back.
I think you are probably correct. I replied after you did without seeing your reply. If I had seen your answer I would have kept my trap shut because you are most likely correct. So here are the words the world is waiting to hear, " I concede!"
I have been looking for how do this manually thank you! After first learning how to fire my laser, I was curious if this was possibleā¦