Hello Guest it is July 18, 2019, 07:49:19 AM

Author Topic: New - First Question - X - Y - Z - Touch Off Plate - Screen and Script Request  (Read 9389 times)

0 Members and 1 Guest are viewing this topic.

Offline jimpinder

*
  •  1,233 1,233
  • Wakefield, West Yorks, UK
    • View Profile
You must not learn by numbers - take a step back.

What the machine MUST know is - Where Am I ???

Once it knows that, it is happy - and a happy machine works well.

What you are trying to do, therefore, is tell the machine where it is.

I don't know what you are doing with the touch plates, but I assume you are putting them somewhere near the workpiece and trying to say to the machine - That is where you are !! - AND - That point is here in my program - Now do the program.

The point can be anywhere. In my machine I have home switches fitted. It is a lathe and millng machine combined - so it is not likely I can have one set of switches that will suit both functions. What happens, therefore is  -
1. I home the machine. This sets the MACHINE co-ordinates to 0,0.
2. I then move to program co-ordinates and apply an offset (G54 - G59). This changes the DRO's to show a start position that is suitable for machining - in relation to the homing position (which is not).
3. I move the machine to its new position 0,0.
4. If my offset is correct - then the new 0,0 the machine is at should co-incide with the 0,0 of the program.

I your case - you must decide where you are putting your touch plates - i.e. what is that position in relation to your program. We will assume all you are doing is drilling a 1/2 inch hole in the middle of a 2 ins square of material. You program is fairly simple. It can start anywhere providing it goes to
G0 X1Y1
G1 Z-0.5
G0 Z1
G0 X0Y0.
There might be some other code - for tool changes, Z height and other minor things - but the meat of the program is in those four lines.
Move to 1,1, drill the hole, lift the tool to a safe height and go back to 0,0. You will see from the program that we are assuming (when writing the program) that 0,0 is at the bottom left hand corner of the workpiece.

Your problem is telling the machine where it is (not necessarily telling it where 0,0 is).

If you put your touch plate on the left hand side of the workpiece (the 2" plate) - then that position is X0 - so if you now touch it, coming from the left and set the DRO at 0 you have done X. This would be correct if the touch tool was 0 inches diameter The touch tool - whatever it might be - has a diameter - therefore  the centre of your chuck didn't get to X0 - it only got to X0 plus the radius of the tool. Therefore you must add the tool radius to your Xposition DRO. The machine now knows where the X axis is - and , providing you do not touch the DROs again, or miss steps, or make some other foul up, it will keep that information.

The argument is exactly the same for the Y axis - if you place the touchplate at the side nearest you  - that is Y0. Touch the plate coming towards you and the argument is exactly the same.

You therefore tell the machine that it is at (say with a 1/4 inch diameter tool in) X0.125 Y0.125. in relation to the program. You might not have been to that position with both axis simultaneously - but that is what you have done. The machine is  happy at that and, when required, will move to where it thinks X1 Y1 is and drill your hole. In the meantime, you can jog around, change the tool, have a cup of tea etc. then press the start button and the machine will oblige.

You need not use the X0 Y0 edges of the work piece - in this example you could use the edges furthest away from you. - but, given the same tool, the chuck centre would only be at 1.875 1.875 - not at 2,2 - and this must be reflected in the DRO.s

As far as the Z axis is concerned - it is normal when writing GCode to consider the top of the workpiece at Z0. Therefore all you need do is bring the tool down to touch the top of the work - and this is Z0. Again - if you are drilling wood or plastic, and you have used a touchplate, then the thickness of the plate must be added to the Z DRO.

For a milling machine you can change the tool - and the X and Y positions (once set) will not be altered - the Z position must be altered to reflect the different lengths of tool. This is where your tool table comes in becasue different diameters alter the offsets for cutting etc - but they have no part in setting the position of the machine other than whatever tool you use as a probe the radius must be taken into account. Many machinists use a piece of ground bar - accurately ground to a specific diameter - as their touch tool. Other professional touch tools have a specific diameter of ball at the end to take into account.

I have the page done for the touch tool - running from macros - but I cannot find how to link this to push buttons on the Mach3 screens.
Everything else is fine. ( See my post asking for some help - with the new version of Screen4)






 













« Last Edit: May 05, 2008, 03:44:13 AM by jimpinder »
Not me driving the engine - I'm better looking.
Thanks,

I will take a look at the post. If you have a newer version of Mach3 you will find a very neat tool that will add the script to your button.

Go to the "Operator" tab then select "Edit Button Script" the the cursor changes to a hand then Left click on the desired button and a edit script window will open where you can add or edit a script.

I will work with touching off some more today and let you know if I get my issues cleared up.

By the way, if you go to "operator" and do not find the "Edit Button Script" which is a very nice option, you need to downlad the newest version of Mach. I am using Ver. 2.63.

Thank You for your efforts on my behalf.
Bill Jenkins
Progress!

I now can select "Go To Z" after doing the touch off routine and the tool bit moves to exactly where it should be. (cool)hA!

The method I used was. (Not very automated but it works)
1. Touch the plate.
2. Make the corrections for tool radius and plate thickness in the DRO window.
3. Do this for both X and Y
4. Touch off Z
5. Then select "Go To Z"

Mach Glitch: If you need to select a negative number in the DRO window it initally reads + instead of -. When you select enter, the number then changes to -.   (Version 2.63)

Now it would be very nice to automate this touch off routine by adding a window that would allow you to input the diameter or radius of the tool and some how have the individual X+, Y+, X-, Y- arrow buttons make the correction for tool radius automatically.

It would also be neat to have a separate window for the input of touch plate thickness for X and Y. On my Blue Screen modification, there is a window for touch plate thickness for Z.

Can this be done? I know I would really like that but the more manual way does work.

Thanks,
Bill

Offline jimpinder

*
  •  1,233 1,233
  • Wakefield, West Yorks, UK
    • View Profile
Yes I have it - I am just putting the finishing touches to it. It is an extra page on the Mach Mill. You can fill in the thickness of plate on the X Y and Z axis, you can select the current tool, which brings up the tool diameter from the tool table, and then press a button to touch X left or right, Y forward or back, and Z downward.

The macro then sets the DRO automatically to the correct value. A couple of days should see it done - unfortunately I work each weekend - my wife and I run a miniature railway - and today is a Bank Holiday in UK - so we have been busy.

Thanks for the tip about "Edit Button Script" someone else told me about that as well - it is working, and I have one axis done. The rest should be relatively easy.
Not me driving the engine - I'm better looking.
Wow!

That sounds really nice. A friend who helped me said that he thought a separate page would allow users to keep all the other options available and that is what you decided on. COOL!

I do feel confident with the touch off system now and another friend explained a minor difference in his techinque but it is basically the same.

There is one area that you mentioned that does bring up a question in my mind. I do like the thought of using the Tool Window to input a specific tool from the tool table but what worries me is the following. Again, please correct me because I am probably wrong on this but it is my understanding that if a tool is selected from the tool table, offsets will be applied.
Are offsets applied when selecting a tool from the tool table? The reason I ask is because my tool path drawings already have the correct offsets compensated for. I do not want Mach to make any offsets to my drawings. If offsets are applied, I can see that after completing the touch off routine, that it might be possible to go back and change the tool number to 0. (not sure)

Thanks!
Bill J.

Offline jimpinder

*
  •  1,233 1,233
  • Wakefield, West Yorks, UK
    • View Profile
Tool Offsets only apply if you ask them to with the appropriate GCode.

I have finished the screen set and you can try it. I think it will work - I have tested it on my office computer - but as I said earlier - my lathe/mill if getting fitted with a homing laser, so I can't mess about with it at the moment.

I based the thing on the Mach Blue screen set - although the man who did the blue set is an artist, with all the whirls and round edges etc. I couldn't compete with that. I have used the AutoTool Zero button to access a new screen - but before selecting the new screen - make sure the rest button is not flashing, or the axis will not move.

Access the new screen - it has down the left DRO's for you gauge plate thickness, down the centre are the tool and offsets. Down the right are the positional DRO's which are repeats of the others on the main pages.

You must decide what you are doing - as I said in my last post - where are you putting your gauge plate and what is it meant to represent. If you are touching to zero (on any axis) then put 0.0 in the Touch Location. You must then choose what offsets will come into play. The tool diameter will - and you can either enter the Tool Number - which will automatically display the diameter, or you can just enter the diameter in the Tool Diameter. If when doing the Z axis, the tool length comes into it then you can enter that as well.

You must then decide where you are putting your plates and if the thickness comes into play. If the plate is on the "outside" of your workpiece and the thickness does not matter, then MAKE SURE that 0 is entered in the plate thickness.

The same rules apply to both axis.

So - if your are going to touch left, on a plate of the outside of the workpiece at position 0, then the plate thickness should be 0 (it does not affect the position of the touch) and Touch Location should be 0. Enter the Tool Diameter (or Tool number). Jogg your touch tool to within 1 inch of the plate and then press "Touch X - Left". The tool will slowly move left and touch the plate. The DRO position will change to zero + offsets, and then the tool will move away to it's new 1 inch away from target position.

Similarly for Touching towards you with the Y axis.

If you are touching right, or away from you, you have to decide what the touching position will be - it depends, I suppose, on the size of your table/workpiece etc. but whatever it is enter the position you are expecting to touch in the Touch Position DRO. Enter plate thickness (if it is relevant). Tool Diameter - jog to within an inch of the plate and press "Touch X - right". The tool will move slowly right, touch the plate set the DRO to it's new position minus offsets, and the tool will then retire 1 inch from the plate. Similarly with "Touch Y - away"

Z is simpler - it is always down. If you are merely touching the top of the workpiece, then the Tool length is 0, plate thickness is 0 and the touch location is 0. Press "Z - down" and the tool will go down and touch the work, set the DRO to 0, and then move back up 1 inch. If you have to put a touchplate on the work, then the thickness should go in plate thickness. If for some reason you are setting a height other than zero, then put it in the Touch Location. I can't think why you should need the Tool Length - but I put it in anyway (it was simpler than taking it out)

If you have your machine all set up, then please try it, and let me know if anything is wrong with it - I might have added when I should have subtracted - it might even be all the wrong way round - but it shouldn't be too bad.

Attached below. I assume the relevant scripts are with it.

I have just thought of something else - unfortunately you may not be able to jog whilst you are on the new page (I have not put any jog on/off buttons), If this is the case, let me know and I will put some on. (You can just go to the front page, jog, and then return to the new page )




« Last Edit: May 05, 2008, 04:51:47 PM by jimpinder »
Not me driving the engine - I'm better looking.
Hello Jim,

I have tried out the system and unfortunately there are a lot of issues at the moment.

When I select any of your buttons, the machine does move but the stepper motors sound weird.

If I select Touch Z,  I get a Y- movement.
If I touch X right I get a Y- movement.
If I touch Y away, I get a Y- movement.
If I touch Y Toward, I get a Y- movement.
If I touch X Left, I get a Y- movement followed by an abrupt reverse movement that causes a reset situation.

Also, On the Front Page or Run Program page, there is now an extra window beside the plate thickness window and the plate thickness window is out of position to the left by about 1/4 inch.

I think that you will probably need to check this on your machine to understand all of the above. I understand it is not available at the moment but I think you will need to check these issues when your machine modification is complete.

I'm too new, maybe a more experienced type will try. I'm afraid I would just cause confusion. I will continue to check back to see if others are successful with their test.

Thanks!
Bill
« Last Edit: May 05, 2008, 06:35:19 PM by BJenkins »

Offline jimpinder

*
  •  1,233 1,233
  • Wakefield, West Yorks, UK
    • View Profile
I have had a look at the scripts associated with the buttons - and they seem OK.
Don't forget, this is a new screen set - which has been used elsewhere.

Mach 3 can be set up in different ways - I have two different screen sets running, one when using my machine as a lathe and another using my machine as a mill. Two completely different programs, both accessing the same motors and switches - but on different configurations - e.g. on a lathe the axis letters are different.

All you need to do to make sense of it is, open the BlueScreenTouch set on your machine, but then check Config/Ports and Pins and make sure the pins are allocated AS THEY ARE ON YOUR MACHINE, and also check Config/Motor Tuning to see if the motors are correctly set up for Steps per Unit, and the speed and acceleration figure. You will probably find that, at the moment, they are set up as for someone elses machine (probably the chap who wrote the bluescreen set.

It doesn't matter on my office computer, because I am not fastened to a machine.

You will only need to set it up once - it is not a long job - copy the Port and Pins etc. from a screen set that you know is correct and working. Once you save it, thats it.

Not me driving the engine - I'm better looking.