M6 (semi auto toll change) help needed

This is where you talk about Macros, show examples of your macro scripting and SHARE handy segments of script code as examples.

M6 (semi auto toll change) help needed

Postby TadasM » Wed Mar 13, 2019 9:58 am

Hi All,

from UCCNC version that accommodated probing routines, I've been using the original UCCNC screen. Currently, I have tried to modify M6 macro from Gerry screen and other in the forum, but I'm having difficulties - I have messed up the M6 codes and don't know how to achieve the result that would be the same tool change routine as per Gerry's screen.
Does anyone have the M6 code that would use all fields from probe screen menu (like tool change position, stationary probe position, feeds, probe thickness and etc)? the routine looks simple, but I can't figure how to write the code :(
TadasM
 
Posts: 46
Joined: Thu Oct 27, 2016 10:00 am

Re: M6 (semi auto toll change) help needed

Postby ger21 » Wed Mar 13, 2019 11:39 am

I can post my M6 macro for you later today to give you an idea of what's involved.
You'll need a fixed plate or touch off somewhere, and you'll need another macro to save it's position relative to where you set Z zero.
Gerry
UCCNC 2017 Screenset - http://www.thecncwoodworker.com/2017.html
ger21
 
Posts: 1510
Joined: Sat Sep 03, 2016 2:17 am

Re: M6 (semi auto toll change) help needed

Postby TadasM » Wed Mar 13, 2019 4:20 pm

Gerry, I would appreciate your share a lot :)

I do have a fixed touch plate (probe) and movable touch plate for a touch of (zero) the surface of the material. I'm keen to try the macros :)
TadasM
 
Posts: 46
Joined: Thu Oct 27, 2016 10:00 am

Re: M6 (semi auto toll change) help needed

Postby ger21 » Thu Mar 14, 2019 2:11 am

Sorry for the delay.
Here's the file(s).
These are for reference only, as they won't work without the 2017 Screenset without a lot of editing to add values normally taken from the screenset.

M20522 must be run first to establish the fixed plate location.
Attachments
M20522.txt
(15.43 KiB) Downloaded 29 times
M6.txt
(14.79 KiB) Downloaded 25 times
Gerry
UCCNC 2017 Screenset - http://www.thecncwoodworker.com/2017.html
ger21
 
Posts: 1510
Joined: Sat Sep 03, 2016 2:17 am

Re: M6 (semi auto toll change) help needed

Postby TadasM » Thu Mar 14, 2019 6:48 am

ger21 wrote:Sorry for the delay.
Here's the file(s).
These are for reference only, as they won't work without the 2017 Screenset without a lot of editing to add values normally taken from the screenset.

M20522 must be run first to establish the fixed plate location.



Are these the same that comes with your screenset ? As I have purchased your screen some time ago, I have these, but I have trouble to get this functionality on default UCCNC screenset (using the new probing screens).
TadasM
 
Posts: 46
Joined: Thu Oct 27, 2016 10:00 am

Re: M6 (semi auto toll change) help needed

Postby ger21 » Thu Mar 14, 2019 10:38 am

Yes, they are. I forgot that you already had them.

Unfortunately, to get these to work with the new probing screen will require a lot of modifications to these macros. I thought you just needed an idea of how they work.
You need to code in all the values that are taken from the 2017 screenset, change some fieldd numbers, and possibly make some changes to the screen?

Not sure exactly, but I would think it would be a few hours of work, maybe more. You'd need to be pretty familiar with the new probing screen as well.
Gerry
UCCNC 2017 Screenset - http://www.thecncwoodworker.com/2017.html
ger21
 
Posts: 1510
Joined: Sat Sep 03, 2016 2:17 am

Re: M6 (semi auto toll change) help needed

Postby TadasM » Thu Mar 14, 2019 4:14 pm

Gerry, thanks for your reply.
Yeap, I tied to figure it by myself, but I lack programming experience to get any (good) working results. I guess It will be easier to update spindle with ATC :D (or keep using your screenset)
TadasM
 
Posts: 46
Joined: Thu Oct 27, 2016 10:00 am

Re: M6 (semi auto toll change) help needed

Postby dezsoe » Thu Mar 14, 2019 9:18 pm

Could you explain in details what exactly do you want the M6 to do? The probe screen does not have tool change position fields (at the moment), so where would you like change the tool?
dezsoe
 
Posts: 782
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: M6 (semi auto toll change) help needed

Postby TadasM » Fri Mar 15, 2019 11:41 am

With good findings by BigAl, in thread viewtopic.php?f=2&t=1763 ,I was able to perform what I needed.

He posted little instruction:
1. Chose "Mobile Probe"
2. Set the probe to the work piece and select "Reference Probe As Workpiece". (Or set the current height with "Reference Current as Workpiece")
-> The probe measure (or take) the current height with the probe.
-> The machine moves to the fixed probe place
-> The height will be measures
-> The machine moves back to the original position
3. After the tool has changed I just press "Start probing"
-> The machine moves to the fixed probe place
-> The height will be measured
-> The machine moves back to the original position
-> The tip of the new tool has now the same Z-zero as the original tool: Great :-)


But I wish it would be automated by M6 :) :)

It was a bit confusing name "mobile probe", I assumed that I need to use the fixed probe for such tool change routine.

What I did:
1. Set to ignore M6 code in the settings menu (or delete the line from G code);
2. Choose "Mobile probe";
3. Movie X and Y axis to fixed probe location;
4. Press "Set as mobile probe pos" and press "Start probing" (no axis are moved, just saved machine coords as probe position);
5. Go to probe settings mark "save mobile probe pos. on exit";
(steps 1-5 is set only once);
6. Place the handheld touch plate on top of material (or where is your zero in CAM);
7. Move X and Y axis to touch plate location;
8. Click "Reference probe as workpiece" (it will start probe immediately at current location)
9. After initial probing is done at current location click on "Start Probing" (the machine will go to saved X and Y location and will start probing. After probing is done, a machine will move to initial probing location);
10. When tool change comes (in my setup it stops the spindle, and goes to tool change location) after a tool is changed click on "PROBE POS" (be sure that mobile probe is still selected)
11. Press "Start probing"
12. After tool length is measured (probed), press cycle start to continue.

I also made a short video how it works. I would appreciate if such sequence could be written as M6 code so no need to go to probe page, press PROBE POS and etc. Just popping op the window "Press OK after a tool is changed" and it should continue all else by itself :)

p.s. It would be great if Z axis would be moved first instead of X and Y. If tool were longer - it would crash to fixed probe.

TadasM
 
Posts: 46
Joined: Thu Oct 27, 2016 10:00 am

Re: M6 (semi auto toll change) help needed

Postby dezsoe » Sat Mar 16, 2019 2:38 pm

OK, I see. The Z moves first to Safe Z position, but only if needed. On the setup page you have to set a Safe Z height in machine coords. If the Z is lower than the Safe Z then it will first move in Z. You can also activate any function from the probe screen with exec.Callbutton(); calls. The button numbers are in the Buttons_by_number.htm file. After you change the tool, you don't need to press goto probe pos., pressing the start probing will first move the axes to the probe.

You don't need to switch to the probe screen, you can just call the buttons to do their jobs. E.g.:

Code: Select all
exec.Callbutton(801); // select tool probe mode
exec.Callbutton(841); // select mobile tool probe mode
exec.Callbutton(821); // start probing

(The first two lines ensure that no other probe mode is selected.)
dezsoe
 
Posts: 782
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Next

Return to Macros

Who is online

Users browsing this forum: Bing [Bot] and 3 guests

cron