Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

DMG Probing Help


slyym
 Share

Recommended Posts

I'm wondering if someone could help me write a probing macro. I'm new to probing and am still learning. I've got a pretty big order of parts to run and am using just an edge finder right now and its a pain. Heres what I'm doing. This is on a DMG DMF 260 with a seimens 840d control. I,ve got a part that has an off center boss. Its offsett .500 and the part is mounted in a 4th axis with that boss sticking out. I need to set my A0.0 with that boss located at 270 deg. I would like to be able to postition my probe in the y+ direction and rotate my A to touch the probe, then position my probe in the y- direction and rotate my A in the oppisite direction and touch the probe again. Then split the difference and have that set to my a0.0. That is basically what I am doing with my edge finder right now and it just takes a little while to do.

Link to comment
Share on other sites

after a little research I'm wondering if this is even possible.

 

I´m about to see a prismatic feature that can´t be inspected by a probe. The code to get there however can turn into something extremely elaborated, but doable.

 

How familiar you are with trigonometry and parametric (Macro B and such) programming? Sinumerik is IMHO the most powerful and flexible CNC control ever made, but as my friend James Meyette use to say, with power comes complexity.

Link to comment
Share on other sites

Sorry thinking out loud this morning. :welcome:

 

Well there might be a C axis probing routine already made for them, but the ones I have seen move the 4th axis for the probe hit they move the other axis to establish a base line. You could make a basic routine to do this. You need to look at the process and then come up with the method for how you want to handle the whole thing. By working with some knowns you can then work to the unknowns. You already have the method down thing how you will take that and turn it into a macro. The idea behind any macro is to take unknowns turn them into known to then give you a desired results. That is all any math problem is. Here you have to do some trig as part of the problem but basic stuff not some deep algorithm. I say basic, but I remember doing sin calculations in my head for years with dealing with a 5” and 10” sin block. Take your process it is to capture data then use that data to get an answer. Take finding something basic like a X or Y position. You need to get a base position from somewhere. Then you need to take that base position and capture it once the probe tells you where it is. From there you need to do some math. The math needs to take the radius of the probe into account and then subtract that from the base position and the give the result that can then be plugged into the control for that fixture location. When you start looking at a 4th axis and radial intersections and tangency calculations it gets a little more dicey. If you keep the process simple then it will not be too hard to accomplish this task. You need to think what gives you a repeatable process? Touching the same depth at the same diameter will be the best possible choice. Now if you start thinking about shoulders on say key slot then it would still be the same process. Diameter or slot would not matter the math would still be the same. It would really be a lot easier since it will be just really a basic equation. Capture point 1 and then capture point 2. Take the length divide it by 2 and then add it to the 1st position collected or subtract it from the 2nd position collected. This will all be relative to where home is and how you are working on the 4th axis. Now tis will find the center of the 4th axis and you could go from there. Now to thinking about where it gets more difficult is where you want to move the 4th axis and have it know what to do. To find the center is easy, but that was not what you asked, but it is important part of the equation we need to know the center of rotation to establish a base line. Without the base line how do we come up with a correct reference to where our slot or other feature needs to be in relation to that? The simple way would be just to know what that is store that value on the control is a parameter and be done with it. Then as part fo the equation use that are a comparison from the results of math on one point and then results of match on the second point and go from there. Again back to the simple method would be suing known diameters and know depths. What if they are unknown? Hum this is where the center of rotation comes back into play. Now would we need to make the problem take more of those factors into account? Instead of a basic subtraction or addition problem we would need to trig out the position of contact in relationship to the center then do the X,Y and Z calculations Take the current placement of the 4th axis into account and then make our angle adjustments using what the trig tells is the deviation from point one to the center to point 2 is to the center then our difference is a formula that we can then see as an error. That error would need to be divided by 2 and then the 4th axis moved. We would then rerun the test to make sure our error was at a desirable result and then tell the machine the formula passed our test and then run said program. This is where an understanding of WHILE/DO loops and IF and THEN statements in Macros comes into play.

 

WHILE and DO say what? IF and THEN for who? Well in all reality if you broke these down into what they are as the meaning you then get how to use them. Most books give all the great Macros, but do they really explain in everyday talk what they do? I think some do an okay job, but a programming book from Fanuc or anyone else for that matter leave me scratching my head most times going how do I use this? What does it do and how can I put this into use for my job? Well a WHILE call is just what it is. WHILE this activity is going on I want you to wait. So it is like going to the store with your wife WHILE she buys clothes. What do you do? You can go DO something ELSE WHILE she shops, but if you know what is good for you hang out and wait till she is done. Now this seems like a basic thing, but a good WHILE DO loop gives the control something it needs to finish and once it is finished it can then END that process and allow what needs to be done next to be accomplished. You had things you wanted to do and the last thing you wanted to do was go shopping for clothes with the wife. You could have been doing 100 different things, but she had her to DO thing and if you did her to DO then things seem to go better. The WHILE DO loop we needs has to work in such a way that WHILE you are running this routine it is looking for an answer. That answer will be an acceptable tolerance in which the machine comes to for the ending of the A axis to run the part. That tolerance can be anything and if it were 1.000” and the part was first probed and everything checked out within 1.000” you make the WHILE DO happy and it comes on its merry way. However if we set it to .0001” when will our WHILE DO be happy? If could never be happy and that is where we need to set a realistic idea of what we are trying to accomplish. Make the process, then you make the macro once you prove out the macro and put all the controls in place for it to solve the solution then you have a good method. Things are that thought that process takes time. That time takes money and some people a whole lot smarted than me have already made a bunch of this stuff to use. The question is do you want to spend the money to save the time? So many people think they can do it real quick, but everyone’s time is worth something. Question is what is your time worth? Right now the edge finder is getting the job done. The Probe will get it done faster and unattended and does that ability make you money by saving time? The more a machine can run without the person having to touch it the more time you are saving. That makes a company money and some projects have a quicker ROI(Return on Investment) and some are slower on the ROI. You have the right thoughts and now once you get the right process you will then full embrace the technology to use it.

Link to comment
Share on other sites

Hi..

i just get into subject of probing after getting DMG Morri eco1035 milling machine...so i 'd like to share some info ...

 

i beleive that you have to use G31 "skip signal" ..what i would do after dealing with the probe as a regular tool as following..

 

G0 G90 Y+

G0Z0.0

G31A+F200.

#100=#5064 "System variable for fourth axis, i beleive"

G0G91A-

G0G90Z5.0 " whatever save plane would be"

G0Y-

G0Z0.0

G31A-F200.

#101=#5064

G0G91A+

#103=[#101+#102]/2

#104=#101-#103

#2801=#2801-#104 " update fourth-axis coordinate for G54 work coordinate system"

 

i might make some mistakes here and there in the above code, but you go from there....

 

please feed me back with how you solved the problem, i like to learn as well......

 

thanks

Link to comment
Share on other sites

I think you're making this harder than it needs to be to be honest.

 

Just probe either side of the boss at the A0 position (the left hand picture on your screenshot) along the X axis at the same Y and Z positions.

These 2 X-axis values should be equal if the boss was situated in the right place, so just halve the difference and use that to trig out the angular adjustment required using a macro.

 

Hope that helps.

Link to comment
Share on other sites

I assume Z0 & X0 are on part center

X0 I don't know where it is that's why I create a local variable for it "X_POS"

Just change the value as desired.

I also assume we R working with G54

We aiming to have the small boss dia 1.7 positioned at Y0 Z-0.35 when your A=0

As U see i create a sub called "PROBING.SPF" (U create the file and paste the data in there)

wich can be called from your main program. Put the "PROBING.SPF" file in same directory like your main

asuming U have your main in workpieced dir. If your main is in program dir put the sub in subrutine dir.

If I remember on those machines U should have a comands for bringing the probe in/out. PROBEIN/PROBEOUT

If it so, your main program shoul look like that:

 

.

.

.

PROBEIN

M01

 

PROBING ;U must load the subrutine

;or

EXTCALL "PROBING" ;U don't load the sub

 

PROBEOUT

M01

.

.

.

About loading or not the sub I preffer the non/loading option because I can alter the sub from the network.

Remember also to ensure your probe is calibrated.

 

;your "sub" start from here:

PROC PROBING

DEF INT COUNTER, PROBING_NR

DEF REAL X_POS, Y_BOSS, Z_BOSS, A_POS, A_INCR, A_ORIG

 

X_POS=3 ;change X probing position here.

PROBING_NR=2 ;number of time U want to probe the boss 4 more aquracy

 

;----display options:

_CHBIT[10]=1 ;Display of measured result screen 0=HIDE 1=SHOW

_CHBIT[11]=1 ;Acknowledgment with NC start 0=NO Acknowledge 1= Acknowledge

_CHBIT[18]=0 ;1==> Measurement result screen retained until next time..

;..measuring cycle is called on measuring cycles version 0==>No effect

DATUM: G54 D1

COUNTER=0

LOOP1: REPEATB DATUM

G90 G0 X=X_POS Y0 A0

Z=(3.55/2+1)

 

_MVAR=104 _SETVAL=1.7 _ID=-(3.55/2+1) _MA=2 _KNUM=0 _PRNUM=1 _FA=5 _TSA=300 _VMS=0 _NMSP=1

CYCLE977

Y_BOSS=_OVR[6]

 

G90 G0 X=X_POS Y=Y_BOSS

Z=(3.55/2+1)

 

_MVAR=100 _SETVAL=(1.7/2) _PRNUM=1 _MA=3 _KNUM=0 _FA=10 _TSA=300 _VMS=0 _NMSP=1 _EVNUM=0

CYCLE978

Z_BOSS=_OVR[16]

 

IF Z_BOSS>0

A_INCR=1

ELSE

A_INCR=-1

ENDIF

A_POS=ACOS(Y_BOSS/0.35)

A_POS=(A_POS*A_INCR)+90

A_ORIG=$P_UIFR[1,A,TR]

$P_UIFR[1,A,TR]=A_ORIG+A_POS

COUNTER=COUNTER+1

STOPRE

IF (COUNTER<PROBING_NR) GOTOB LOOP1

REPEATB DATUM

G90 G0 Z=(3.55/2+1) A0

 

M17

;..ends here

 

...GOOD LUCK

Let me know how it goes

Link to comment
Share on other sites

Thank you Griveous74 but I know absolutly nothing about writing macro programs. This will actually be the first one that I will be doing. Some of what you said made sence but I'm a little confused on what I actually put into the machine.

So this is the main program That goes into the main directory;

 

PROBEIN

M01

 

PROBING ;U must load the subrutine

;or

EXTCALL "PROBING" ;U don't load the sub

 

PROBEOUT

M01

.

And this is the sub program that goes in the sub directory;

 

PROC PROBING

DEF INT COUNTER, PROBING_NR

DEF REAL X_POS, Y_BOSS, Z_BOSS, A_POS, A_INCR, A_ORIG

 

X_POS=3 ;change X probing position here.

PROBING_NR=2 ;number of time U want to probe the boss 4 more aquracy

 

;----display options:

_CHBIT[10]=1 ;Display of measured result screen 0=HIDE 1=SHOW

_CHBIT[11]=1 ;Acknowledgment with NC start 0=NO Acknowledge 1= Acknowledge

_CHBIT[18]=0 ;1==> Measurement result screen retained until next time..

;..measuring cycle is called on measuring cycles version 0==>No effect

DATUM: G54 D1

COUNTER=0

LOOP1: REPEATB DATUM

G90 G0 X=X_POS Y0 A0

Z=(3.55/2+1)

 

_MVAR=104 _SETVAL=1.7 _ID=-(3.55/2+1) _MA=2 _KNUM=0 _PRNUM=1 _FA=5 _TSA=300 _VMS=0 _NMSP=1

CYCLE977

Y_BOSS=_OVR[6]

 

G90 G0 X=X_POS Y=Y_BOSS

Z=(3.55/2+1)

 

_MVAR=100 _SETVAL=(1.7/2) _PRNUM=1 _MA=3 _KNUM=0 _FA=10 _TSA=300 _VMS=0 _NMSP=1 _EVNUM=0

CYCLE978

Z_BOSS=_OVR[16]

 

IF Z_BOSS>0

A_INCR=1

ELSE

A_INCR=-1

ENDIF

A_POS=ACOS(Y_BOSS/0.35)

A_POS=(APOS*A_INCR)+90

A_ORIG=$P_UIFR[1,A,TR]

$P_UIFR[1,A,TR]=A_ORIG+A_POS

COUNTER=COUNTER+1

STOPRE

IF (COUNTER<PROBING_NR) GOTOB LOOP1

REPEATB DATUM

G90 G0 Z=(3.55/2+1) A0

 

M17

;..ends here

Link to comment
Share on other sites

Ok..

I assume U have a machining program for the part, so the idea is to ad in the beginning of your program a new tool=>tool sensor.

How you do it is your responsibility. I was just suggesting to use those commands but may not work on your machine.

I'm not there and I don't know what cycles U got on the controller.

Then the actual codes for the probing are inside a subroutine which must be located in the same directory like your main program.

Please familiarize yourself firs with the controller, how the subroutines work on Sinumerik. Read an operating/programming manuals.

I made the subroutine for U in a zip file because for some reason i cannot attach on this forum files with extension *.spf (maybe an admin can fix that).

See attachment.

Cheers

PROBING.zip

Link to comment
Share on other sites

Hey Grievous74! Still havent really had time to see if this works for me yet. It will prolly be next week before I get a chance

Ok..

I assume U have a machining program for the part, so the idea is to ad in the beginning of your program a new tool=>tool sensor.

How you do it is your responsibility. I was just suggesting to use those commands but may not work on your machine.

I'm not there and I don't know what cycles U got on the controller.

Then the actual codes for the probing are inside a subroutine which must be located in the same directory like your main program.

Please familiarize yourself firs with the controller, how the subroutines work on Sinumerik. Read an operating/programming manuals.

I made the subroutine for U in a zip file because for some reason i cannot attach on this forum files with extension *.spf (maybe an admin can fix that).

See attachment.

Cheers

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...