Are there any instructions on how to configure UCCNC?

Post anything you want to discuss with others about the software.

Re: Are there any instructions on how to configure UCCNC?

Postby Robertspark » Mon Oct 14, 2019 5:27 pm

Ok, you have a problem with your configuration, but one which is easy so solve.

When you HOME a machine, you are providing a REFERENCE for each of the axis.

The number behind the reference is not important, but the reference is repeatable...... so every time I home my machine, I know that the co-ordinates X0 (left to right), Y0 (toward and away from me) and Z0 (vertically up and down) will ALWAYS be the same position.

because you are sharing you home and limit switches, what you have done is setup your homed position as "0" for all axis {I presume}.

So, when you tell the machine to move G52 Z0.... it trips the limit switch.

The fix is easy.... provide a negative offset for your homing position... and then provide the similar number as your "Homing Backoff Units".

So..... go you your Settings >> Axis Setup >> and Choose the X axis.... on that page, set "Write Offset on Homing" of 0 (i.e. zero)

Whilst you are on that settings page, set "Homing Back Off" to 5 (i.e. 5mm)

Go to your Y and do the same.

For the X axis, set the Homing Backoff as "-5" (i.e. minus 5).... because the machine should move down after homing toward the table "+" (plus) is up and "-" (minus) is down for the Z axis.

if your machine is jogging in the wrong direction you must correct it:
Z + (plus) is uptwards the roof.
Z - (minus) is down towards the floor
X + (plus) is Right
X - (minus) is Left
Y + (plus) is away from you
Y - (minus) is towards you

you can setup something different .... but it can be confusing as those are the standard (common) directions.
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Are there any instructions on how to configure UCCNC?

Postby BillR94 » Mon Oct 14, 2019 5:35 pm

Thank you 3d0g. That clears that up. I see what you mean when I look in "machine Coordinates".
BillR94
 
Posts: 14
Joined: Fri Oct 11, 2019 6:41 pm

Re: Are there any instructions on how to configure UCCNC?

Postby BillR94 » Mon Oct 14, 2019 6:47 pm

Robertspark wrote:For the X axis, set the Homing Backoff as "-5" (i.e. minus 5).... because the machine should move down after homing toward the table "+" (plus) is up and "-" (minus) is down for the Z axis.

if your machine is jogging in the wrong direction you must correct it:
Z + (plus) is uptwards the roof.
Z - (minus) is down towards the floor
X + (plus) is Right
X - (minus) is Left
Y + (plus) is away from you
Y - (minus) is towards you



Yup, I have slightly different numbers but essentially, I am setup just as you described. I am looking forward to the macro. Once I see the edit, I may better understand your explanation.

Thank you again for the time your are taking to help.

Bill
BillR94
 
Posts: 14
Joined: Fri Oct 11, 2019 6:41 pm

Re: Are there any instructions on how to configure UCCNC?

Postby Robertspark » Tue Oct 15, 2019 8:07 am

So, this is the standard / default installed M200.txt macro:

Code: Select all
// Go to Park position 1 macro

double parkZ = 100;
double parkX = 0;
double parkY = 0;

if(!exec.GetLED(56)||!exec.GetLED(57)||!exec.GetLED(58)) // If machine was not homed then it is unsafe to move in machine coordinates, stop here...
{
  MessageBox.Show("The machine was not yet homed, home the machine before run to parking position!");
  exec.Stop();
  return;
}

int originalmodalmode = exec.actualmodal; // remember the modal mode

while(exec.IsMoving()){}

exec.Code("G00 G53 Z"+ parkZ); // Move Z up first to park1 Z position
while(exec.IsMoving()){}

exec.Code("G00 G53 X" + parkX +" Y" + parkY); // Move to XY park1 position
while(exec.IsMoving()){}

exec.Code("G" + originalmodalmode); // Set system back to the original distance mode


all you do is change it to this:

Code: Select all

// Go to Park position 1 macro

double parkZ = 0;
double parkX = 0;
double parkY = 1144;

if(!exec.GetLED(56)||!exec.GetLED(57)||!exec.GetLED(58)) // If machine was not homed then it is unsafe to move in machine coordinates, stop here...
{
  MessageBox.Show("The machine was not yet homed, home the machine before run to parking position!");
  exec.Stop();
  return;
}

int originalmodalmode = exec.actualmodal; // remember the modal mode

while(exec.IsMoving()){}

exec.Code("G00 G53 Z"+ parkZ); // Move Z up first to park1 Z position
while(exec.IsMoving()){}

exec.Code("G00 G53 X" + parkX +" Y" + parkY); // Move to XY park1 position
while(exec.IsMoving()){}

exec.Code("G" + originalmodalmode); // Set system back to the original distance mode


and it should move it to the back of the machine for you.

I use the park macros to move the carriage out of the way to load material, and then another one to move the spindle to a convenient location to carry out a tool change.
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Are there any instructions on how to configure UCCNC?

Postby BillR94 » Tue Oct 15, 2019 3:24 pm

Thank you Rob.
Just to clarify, Will this macro automatically execute at the end of an operation or do I need to press a button to execute this script?

If I would like to make another macro to say positions the spindle for tool change ( like you did), would I just pick another macro and edit it? Does it matter which macro is chosen?

Thank you again Rob
BillR94
 
Posts: 14
Joined: Fri Oct 11, 2019 6:41 pm

Re: Are there any instructions on how to configure UCCNC?

Postby Robertspark » Tue Oct 15, 2019 5:39 pm

No the macro will not automatically execute at the end of a programme, you need to somehow tell the machine to do it at the end of the programme.

Hence you need to insert M200 within the end of your code (before an M30 or another Mcode which will stop machine motion (such as M0, M1 or M60))..... if there is no M30, M0, M1 or M60 on the last line of the gcode then you can add M200 on the end of the gcode file.

This can be automatically done by your post processor if it is setup as such.

____________________________________
You REALLY NEED + MUST read the manual with respect to what each of the G and M codes do! I cannot see how you are going to drive a car, be an electrician, technican etc without reading and learning about it FIRST and beginning to try to understand what the codes do and how they automate processes / tell the machine to do things.
Yes I know I am beginning (or past ) sounding like an arse...... but you have to learn the basic codes and how they work

Also you MUST look at the other files within the C:\UCCNC\Documentation folder as they will provide other information on Macros and screensets etc.
______________________________________

In UCCNC all G-codes are static and you cannot add to or edit them.

In UCCNC some M-Codes are static and you also cannot add to or edit them.

There are also some M-Codes which you can and are encouraged to edit to your needs (eg: the park positions "P1" = M200, "P2" = M201, and "P3" = M202 (no longer on the screenset) ....... and also M6 if you have a toolchanger....... or it could be edited to move the machine to a certain location and tell you that you need to change the tool before touching off and getting back to work after you have carried out the tool change)

There are also some M-Codes which you could edit..... but it is generally discouraged as it may cause other things to happen or not happen as they should as they may have other functions attached to them that operate in the background (such as M3 if you have a plasma cutter with torch height control activated)

You can create Mcodes with any unused codes..... (you can only have ONE M200.txt file in your profile as uccnc would not know which one to use).

You can also create Mcodes with the number range of M20000 to M219999, these can have buttons associated with them on the screenset.... so you added a button to a screenset with the number 20000.... you could have a miscellaneous (M) code with the number M20000.txt and it would run when you pressed the onscreen button.
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Previous

Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 24 guests