Hello Guest it is December 21, 2024, 10:56:13 AM

Author Topic: Second probe?  (Read 28190 times)

0 Members and 1 Guest are viewing this topic.

Re: Second probe?
« Reply #20 on: July 10, 2009, 03:37:47 PM »
Thanks guys. I have both probes working now.
Arnie, thanks for the great quality products! I received the probe camera today as well  ;D
Regards,
Ken
Re: Second probe?
« Reply #21 on: July 17, 2009, 11:56:58 AM »
Dag nab it, been looking for this thread for days ! finally got here !
I found a copy of another macro for tool probing and did the mod's for my machine and for the most part it works great ! with the exception of the G10 L2 P line

Tool = GetSelectedTool         'current tool
REM Context 10001
If IsSuchSignal (22) Then
code"G0g90Z" & 16.0
code"G0g90X" & 24.02 & "Y" & 1.985      'moves to above switch
code "g31 z0 f30"
While IsMoving()
Wend
code "g1g91z.1f30"
While IsMoving()
Wend
code "g31g90z0f5"
While IsMoving()
Wend
MachineZ = GetVar(2002)         'switch contact point
MachineZ = MachineZ - 2.0288      'calculates tool length offset
code "G10 L2 P" & Tool &"Z"&MachineZ   'inserts tool table
code "G43H"&Tool         'turns offset to on
code "g0g90z16.0"
end if

I get an error and I don't recall exactly but it refers to the P of the G10 L2 being out of range or something to that effect. I suspect that there is some issue with how it is implemented or worded. I read somewhere that spaces are troublesome in macro's and would also like to know if there is a rule on this and what it might be ? I have ran this and it does exactly what I want to do except it does not post the offset to the tool list and it faults out as mentioned. Any help here would be greatly appreciated.
CRUISER
  Don

vmax549

*
Re: Second probe?
« Reply #22 on: July 17, 2009, 05:38:23 PM »
Change the L2 to a L1

(;-) TP
Re: Second probe?
« Reply #23 on: July 17, 2009, 06:15:12 PM »
Could it really be that simple ? I sure hope it is and THANK YOU VERY MUCH !
CRUISER
  Don
Re: Second probe?
« Reply #24 on: July 17, 2009, 06:53:21 PM »
VMAX,
 I tried the change and still got an error "P value out of range with g10L1"
code "G10L1P" &Tool &"Z" &MachineZ   'inserts tool table
What I question now is the part of the line >&Tool &"Z" &MachineZ< and if it is appropriate or not, I don't know a lot about this, but I get the impression that there is too much there which throws the computation out of range. Or, shouldn't there be some definition of "P" ?
Could you define this for me to some extent ?
Thanks again !
Modify ! L1 above should read L2 ! I just went out and double checked it all ! button macro reads L1 and yet error reads L2 now I know I'm lost ! I need to learn more about these changes and how to properly find and implement them this is getting a bit out of my league (like lots & lots)
« Last Edit: July 17, 2009, 07:07:55 PM by Cruiser »
CRUISER
  Don

vmax549

*
Re: Second probe?
« Reply #25 on: July 17, 2009, 07:21:46 PM »
Ok take out this:


MachineZ = GetVar(2002)         'switch contact point
MachineZ = MachineZ - 2.0288      'calculates tool length offset
code "G10 L2 P" & Tool &"Z"&MachineZ   'inserts tool table


AND ADD this:

MachineZ = (GetVar(2002) - 2.0288)      
code "G10 L1 P" & Tool &"Z"&MachineZ

That part works here

Now as for the P # ofut of range that is saying that what ever you are calling for TOOL the number is greater than 255 (;-)

Change

 Tool = GetSelectedTool         'current tool

to

TOOL= GetSelectedTool()

 (;-) TP
« Last Edit: July 17, 2009, 07:28:35 PM by vmax549 »

vmax549

*
Re: Second probe?
« Reply #26 on: July 17, 2009, 07:55:41 PM »
OK lets cover another base. I don't know the full scope of your approach but here is something to think about.

You are using Getselectedtool() to get your tool #. This MAY NOT be what you think it is(;-) When you call the tools in say T6 mach loads that number into the que waiting to use it. It is not active UNTIL the M6 runs. In the Fanuc way of thinking working with tool changers the T6 can be called way ahead of time so the tool changer can get it ready to load. THen right after the M6 call that loads the tool a new number is called so it can get that tool ready.

T6   ' calls the tool to the que
code
code
code
M6  ' acutually loads the tool # in the system
T7  ' calls the next tool to the que

IF you are wanting the tool# that is currently SHOWING in the dro on the front page then you need to use

GetCurrentTool()

THat is the tool# that the M6 has called to run.


Just a thought, (;-) TP
Re: Second probe?
« Reply #27 on: July 17, 2009, 09:35:00 PM »
Gee thanks VMAX,  I've very carefully edited my txt file and will take it out this evening and incorporate all of it and see what happens. I think I understand what you say about >get current tool< v/s >get selected tool< Altho I think that in the way I'm using it it may work both ways, I like what you say better and will use your sugestion !
Again Thanks very much Your knowlege and experience is greatly appreciated, I'm on new territory here but trying to learn.
CRUISER
  Don
Re: Second probe?
« Reply #28 on: July 17, 2009, 11:53:09 PM »
Well, I'm at a total loss ! as I see it there must be some other file location that I don't know about that is now getting in the way. I made the changes as you described and I check'd dbl check'd triple check'd till I was bloody eyed and then I went over it again to make sure that everything was in order. Meaning, I used button editer, and modified the hiddenscript file that comes up just exactly as I'd done before, and it still comes back with error p value out of g12L2p range ! Why it comes up with L2 is beyond me because as I see it there is NO L2 only L1 !  It must be just messin with me and it is succeeding quite well ! I even tried to run it single step in the editer and it ran fine but still popped up that damned pesky error message again. I don't get it !
CRUISER
  Don

vmax549

*
Re: Second probe?
« Reply #29 on: July 18, 2009, 01:21:59 AM »
WHen you bring up the button editor and mod the code do not use the FILE SAVE just exit out and say yes to save the hiddenfile to the screenset. If you FILEsave it saves it to a file and not the screen code.

It sounds like that is what is happening, that explains why it still give the same error, it is still seeing the same code(;-)

PS: repost your code and extra set of eyes may help.

I'll do some more testing for you, (;-) TP
« Last Edit: July 18, 2009, 01:36:41 AM by vmax549 »