Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: RossF on January 04, 2010, 11:12:34 PM

Title: Misplaced Table Display
Post by: RossF on January 04, 2010, 11:12:34 PM
Hi,
I am still in the process of retrofitting an Extron milling machine and have it up and running with Mach3 and a Kanalog/Kflop board.
It's working well but I am having difficulties with the table display.
I have watched the video tutorials, numerous times, and my table display is a dotted outline, rather than the solid brown of the video, and the crosshairs are magenta instead of yellow. Is this an upgrade to Mach3 since the video was done or a problem with my setup?

The machine Homes with the table running left, in the X axis, and away from the column in the Y axis, and up in the Z axis.
These are all in the positive direction.
So, by my reckoning, the Home position is the back righthand corner of my table. But that is not how the video tutorial shows it.

To back out of the Home position I have to press the lefthand (-) arrow, on the Jog control screen.

But the table display, when I load G-code, appears in the upper right section of the screen with the drawing in the lower left.
The table is 965mm in the X axis and 460 in the Y axis.
Using a clockface as an analogy, loading the Roadrunner file puts it as a speck down at about 8 o'clock with the table display up in the 12 - 3 o'clock sector.

I need some help to reduce my confusion here :)

Any suggestions??
Title: Re: Misplaced Table Display
Post by: Hood on January 05, 2010, 03:16:25 AM
Dotted and colour changes are nothing to worry about as you probably suspected.

Table running left, forward and up will mean that the cutter is fully positive in all directions, so on Homing and limits page you will need to have a Home Off value set for X and Y axis. The value of that will be the amount of travel you have.
You will then set X and Y min as Zero
X and Y Max as whatever your travel is
Z Min as the amount of Z travel but as a negative
Z Max as zero.


Doing that should make things work for you, what will happen is when you home the machine coords will be set to your Home Off values on X and Y and Zero on Z, this will let Mach know that you are at full extent of travel in the positive direction.
You will also need to set up a slow zone for each axis, this will be dependant on your axis speed and acceleration so you will just have to mess around to find what works for you. How to do that is set a slow zone of say 20mm or 0.75 inch (depending if you are metric or imperial setup) Make sure you have softlimits turned on  then jog away and then back at full rapid and see if the axis slows and stops just before it hits the limits, if it does then fine, if its too fa away when it starts to slow then reduce the slow zone, if it hits the limits increase the slow zone.

Hood
Title: Re: Misplaced Table Display
Post by: RossF on January 06, 2010, 04:48:30 AM
Thanks for that Hood. You covered the problem well and your reply was excellent and I followed it without any difficulty, or so I thought.
But the problem is still there and I must be missing something.
I have duplicated it on my home computer, with Mach3 without being connected to anything, and I still get the table in the wrong quarter.
With the machine it doesn't actually effect the execution of the g-code and I could run the mill okay but it really does bug me that it doesn't appear correctly on the screen.
I didn't need to set up the slow zone as the Homing is handled by the Kanalog board and it works well. It runs into the Home switches and then backs of gently until they go high again.
I would post a screenshot of my homing/limits settings but I have not yet figured how to do that in this forum.
Title: Re: Misplaced Table Display
Post by: Hood on January 06, 2010, 04:53:27 AM
Use the additional options to attach images.
Hood
Title: Re: Misplaced Table Display
Post by: RossF on January 06, 2010, 12:46:03 PM
Thanks Hood. I have included the screenshot of the Home/Limits setup and a view of the table display.
You will note that I have the DRO reading showing Machine Coords to indicate where the centre of the job is in relation to the table.
Ross
Title: Re: Misplaced Table Display
Post by: Hood on January 06, 2010, 01:54:55 PM
Ok but if you jog to the centre of the table and then zero the X Y  coords, regen the toolpath is it still way off?
Hood
Title: Re: Misplaced Table Display
Post by: RossF on January 06, 2010, 04:26:59 PM
Still way off.
To get it to show up on the table, in the display, I would have to jog in a positive direction and that would run the table out through the wall :)
I have decided, at this stage, to treat it like an ashtray in the back seat of a car, where you don't use the back seat, and you don't smoke, so the ashtray is of no use to you, but as it's there it would be nice to have it working properly.
I am just going to turn table display off.

Ross
Title: Re: Misplaced Table Display
Post by: Hood on January 06, 2010, 04:30:15 PM
Can you attach the code and your xml and I will see if I can work out where the problem is. It is really a benefit to get this working as it will allow you to set the softlimits and will mean that you have an added safety feature and will leave the real limits as just a secondary failsafe.
Hood
Title: Re: Misplaced Table Display
Post by: RossF on January 06, 2010, 06:29:50 PM
I must admit that a "Machine out of Limits for Soft Limit activation" error does come up if I press the Soft Limits button.
Title: Re: Misplaced Table Display
Post by: Hood on January 06, 2010, 06:39:03 PM
Think thats the wrong xml as there are no motor set up in it.
What do the DROs read in machine coords when you home?
Hood
Title: Re: Misplaced Table Display
Post by: Hood on January 06, 2010, 06:42:29 PM
I have just checked here on my own xml and even though you have a Home Off value you still need to have the Auto Zero checked in the homing and limits page and I just noticed you dont have that done in the screenshot. That is likely your problem.
Hood
Title: Re: Misplaced Table Display
Post by: RossF on January 06, 2010, 07:30:33 PM
I have just set the Auto Zero and that made no difference.

All axes zero correctly at Home.
The Kanalog plugin is configured to do the Homing sequence.
I have emailed Tom Kerekes to see if he can shed some light on the problem.
Title: Re: Misplaced Table Display
Post by: Hood on January 06, 2010, 07:34:47 PM
All axes zero correctly at Home.

Not sure if you actually meant that but if you did looks like the problem is the plugin as your axis should NOT zero when homed, the X and Y should be at your Home Off value when homed and looking at Machine Coords.
Hood
Title: Re: Misplaced Table Display
Post by: Hood on January 06, 2010, 07:44:40 PM
Just thought I would mention the way homing is done on my Lathe and Mill because it is similar to your in that it does the homing externally from Mach. My servo drives do the homing and Mach knows nothing about it until the drives send a signal to tell it.
 The way I do that is I have the VB in my Ref All button send a signal out to my first axis (Z) and the drive will home and then once there will send a signal back to Mach to tell Mach to press the Home button for the Z axis, the same then happens for Y and X axis. There are no Home switches set up in Mach so as soon as the Home button for any axis is activated the Machine Coords are set to the Home position or Home Off value.
Heres the code I use in the Ref All button on the Lathe.

DoOemButton (240)                     'De-Reference All axis
 Sleep(10)
 If GetOemLED (809) Then               'Check that Ref Z LED is RED
  Do
   Call SetModOutput (21,1)             'Activate ModOutPut 20
    If GetInput(19) Then Exit Do       'Loop until ModInPut 18 is seen
    Sleep (10)
    Loop
    End If
    Call SetModOutPut (21,0)            'DeActivate ModOutPut 20
    DoOemButton(1024)                    'Set Z axis Home   
   
 If GetOemLED (807) Then
  Do
   Call SetModOutPut (20,1)
    If GetInput(18) Then Exit Do
    Sleep (10)
    Loop
    End If
    Call SetModOutPut (20,0)
    DoOemButton (1022)




Hood
Title: Re: Misplaced Table Display
Post by: RossF on January 06, 2010, 11:02:54 PM
The Homing is in C code, which is a foreign language that I can almost recognise. VB is off the planet for me but I do understand what you mean.
My Homing code tells it to reset to Zero and you are saying that it should be setting the table limit figure.
I am working on that.
But it does seem to beg the question - why won't Mach3 let me set the Home Zero in any corner of the table that I please?
It really only appears to want it in the front left corner.
That may sound a little titchy :) - but I have had another eight hours of frustration out of it today :(
But I will persevere - later!
Ross
Title: Re: Misplaced Table Display
Post by: ger21 on January 06, 2010, 11:20:07 PM
But it does seem to beg the question - why won't Mach3 let me set the Home Zero in any corner of the table that I please?
It really only appears to want it in the front left corner.


It does let you set it anywhere you want.

I think your problem may lie with the KFlop plugin. I asked them about homing on a different forum last week, and got the impression that the homing is handled by their plugin.
Title: Re: Misplaced Table Display
Post by: RossF on January 07, 2010, 02:15:44 AM
You are correct Gerry. It is handled by the plugin board - Kanalog/Kflop, but once it is Homed the DROs all zero.
The only way I have been able to get the table display to appear with the job inside it is to set the table limits as negative figures.
The problem with that is that the drawing is then upside down.
The machine still cuts it the correct way up - it's just the drawing that ain't right - any way I set it.
I will wait and see if Tom Kerekes, of Dynomotion, has a solution with the Homing code.
Ross
Title: Re: Misplaced Table Display
Post by: Hood on January 07, 2010, 02:45:59 AM
Ok, well Mach does allow you to set the home any place, that is what you are doing with the Home Off values.
 The Kflop it seems though is setting the machine coords zero rather than letting Mach enter the Home Off values.
 I know nothing of C++ but seems the Kflop is using SetMachZero kind of call, if it could do the button call instead (DoOemButton(1022) etc) then it would work perfectly.

Hood
Title: Re: Misplaced Table Display
Post by: RossF on January 07, 2010, 03:56:36 AM
I think I am beginning to see the light thanks Hood. I am sure you are correct in what you say.
I just have to figure how to include that call in C.
I will continue with that approach and let you know how I get on.
Ross
Title: Re: Misplaced Table Display
Post by: RossF on January 08, 2010, 02:36:34 AM
You were right Hood.
Tom devised some C code to tell the machine, as soon as it had completed it's Homing sequence, to register that it was at it's maximum positive extents and I have added that to the Homing code and all is well.
Thanks for the help. The mists have cleared on that problem and I can move on to the next milestone, which is getting the spindle operational and cutting something - anything.
I have been doing drawings, with a felt tip pen in the spindle, up until now and now I can actually view them in the display screen - in the correct position on the table :)
I have to add that Tom Kerekes' help has been exceptional. We have had a few hiccups where I couldn't/didn't convey just what the problem was but we have got everything sorted to this point - and there has been quite a lot of sorting to be done.
Next he is going to have to put up with the ordeal of me converting a lathe from it's Fagor system to a Mach3/Kanalog setup.
Title: Re: Misplaced Table Display
Post by: Hood on January 08, 2010, 03:15:03 AM
Great and look forward to hearing about your lathe :)
Hood