Hello Guest it is March 28, 2024, 06:25:42 AM

Author Topic: Second probe?  (Read 20955 times)

0 Members and 1 Guest are viewing this topic.

Re: Second probe?
« Reply #30 on: July 18, 2009, 01:52:47 AM »
Thanks Vmax, I think ya hit it on the knogin there, it is exactly what I'm doing I'll just exit and yes it but what about the other file ? will it get updated too ? or matter ?
TOOL=GetCurrentTool()      'current tool
REM Context 10001
If IsSuchSignal (22) Then
code"G0G90Z" &16      'safe height
code"G0G90X" &24.02 &"Y" &1.985
code"G31G90Z0F60      'first probing
While IsMoving()
Wend
code "G1G91Z.1F60"   'clear probe
code "G31G90Z0F5"      'fine probe
While IsMoving()
Wend
MachineZ=(GetVar(2002)-2.0104)   'calc
code"G10L1P"&TOOL&"Z"&MachineZ   'post
code "G4P.1"            'dwell
code "G43H" &Tool         'offset to on
code "G0G90Z16"
code "G0G90X13Y10"
end if                 
This is my master copy I use from my flash drive so I can go from shop to house, pretty sure it is as is in machine !
CRUISER
  Don

vmax549

*
Re: Second probe?
« Reply #31 on: July 18, 2009, 01:56:17 AM »
What it does is saves the file to the Macro directory instead of the screenset file(;-)

I tested your basic code here and it works fine, updates the tool data(;-)

(;-0 TP
Re: Second probe?
« Reply #32 on: July 18, 2009, 02:49:36 AM »
That explains a lot then as I had been trying to save it to three places so it would be safe and I didn't know where it belongs so etc ! In the morning I will simply open file and veryfy its still intact and do a close then click yes when it asks and all should be good. Right ? Geez there is a lot of stuff to learn and proceedure to get exact. It is tough to do when the information is either difficult to find or even identify if it is the right info or it comes from who knows where. I am certainly Glad you are available and willing to help !  Again Thanks for the help and I will post in A.M. if no, when ! it all works like it should !
CRUISER
  Don
Re: Second probe?
« Reply #33 on: July 18, 2009, 10:51:38 AM »
It didn't work ! But the error message changed to reflect the acceptance of the new code edits. "Pvalue out of range with G10L1" At least I can feel a bit joyous this time that I am seeing changes in my favor and learning more needed information. After I've increased my caffeine saturation levels to a sufficient level I will go out and See if I missed something.
CRUISER
  Don

vmax549

*
Re: Second probe?
« Reply #34 on: July 18, 2009, 11:06:00 AM »
OK lets looks at this. What have you got loaded as far as tool#?  It may error on a tool #0 as well(;-) Tool#s  range from 1-255

Here I loaded t22 with a M6 T22 call at the MDI. "THen" I ran the macro code.

 THis gives the macro something to work with other than 0

You may want to consider apiece of code for error checking the T# values to make sure the value = >0 and <256 if it is in error then send a message to the screen and then end. Then you can correct the problem and rerun the macro.

Don't give up, (;-) TP
« Last Edit: July 18, 2009, 11:12:42 AM by vmax549 »
Re: Second probe?
« Reply #35 on: July 18, 2009, 01:06:09 PM »
Good point ! I think !  I used a tool #25 which is just a solid probe quicky. It was active but I didn't MDI a m6 call. could that be the issue ? The tool shows up in all the screens as active tho, I thought that this should sufice.
adding the error checking might be a good issue to take into veriable within operation for sure. I have been pondering also adding something to insure a G53 or G54 which I deliberately always leave zero'd and rarely ever use it except for machine postition needs. And also a tool offset cancel might be appropriate too.
I'll try the m6t# in mdi and test it again, but feel it redundant if tool shows as active.
If I made a copy with another name for an M call like 666 or something and tried running it in mdi ? How can I insure not using a conflicting name ?
How about some testing angles I can try to prove what is or isn't happening ? I am out of my league and open for sugestions.
CRUISER
  Don
Re: Second probe?
« Reply #36 on: July 18, 2009, 03:29:20 PM »
I checked macro this morning, edited my notes, saved per above, ran, saw error per "L2", check'd macro again, it says L1, ran again, L2 error, rebooted several times in between just in case and checked smore ! I am missing something important here ! Can G vs g or L vs l make a differance ? also, can I use G53 in moves with the G90 or will G53 supercede or cancel a G91 ? thought is in case of another offset messing with cycle later on down the road.
Thanks again and still hoping to solve this mystery (;>}=
CRUISER
  Don

vmax549

*
Re: Second probe?
« Reply #37 on: July 18, 2009, 08:43:55 PM »
I did some more testing for you today. The DRO on the screens will display the current tool# BUT they will not update the currentTool#. THe only way it happens is through the M6 t# call.

So if you want to use the value in those dros you will have to call the value from the dro instead of the parameter.

Or just use what you have. I real life you only sett the tool length AFTER you call and load the tool with the M6T# call.

I think the error of the L2 instead of L1 is a snaffoo in the error mesage used.

(;-) TP

(;-) TP
Re: Second probe?
« Reply #38 on: July 18, 2009, 11:09:19 PM »
Your right on ! The errror is gone ! It works and updates ! I just have to remember to make the call in mdi before running it, Now I am happier and ready to move on to another project.
Thanks VMAX
CRUISER
  Don

vmax549

*
Re: Second probe?
« Reply #39 on: July 18, 2009, 11:14:43 PM »
You may be able to include the M6T# call in your code. You can also use a Question box to ASK for the tool # (;-)

I KNOW one step at a time,  Glad you got it working GOOD JOB, (;-) TP