Machsupport Forum

Mach Discussion => Mach Screens => CVI MachStdMill (MSM) => Topic started by: kcib on September 07, 2010, 12:29:51 PM

Title: Touch off
Post by: kcib on September 07, 2010, 12:29:51 PM
Hi Dave
I am experiencing two problems at the moment , the first one does relate to touching off every time I try to use the Set Z zero on the touch off screen I get the message ( Can't set Z0 in master mode w/o master tool ) now I do have a master tool set up so I have tried all ways that I can think of to overcome this problem without any luck , tried without master tool , turning master mode off /on does not seem to make any difference , if I use my probe it works every time , the other problem that I am getting may be down to Mach itself not sure so I am sure you will point me in the correct direction , everything seems to be running fine including the auto tool changer but every now and again when I am on the RUN screen you have the DRO's on the left of screen on the "X" axis DRO just below the Zero DRO button there is a small DRO which I think is the scale reading it should read +1.0000 but every now and again it changes to -1.0000 which causes the yellow LED to come on , I did think it may be caused by noise but have eliminated that , have tried changing over stepper drives , stepper motors and wiring etc but I still get the same problem and it only happens on the "X" axis , now I never had this problem with Mach version 40 so again not sure where to look , I am at the moment using version 19 of Mach and beta 9 of MSM , thanks
in advance for any help
Alan
Title: Re: Touch off
Post by: DaveCVI on September 07, 2010, 11:01:26 PM
Hi Alan,
Sorry if this seems a bit rushed, I'm traveling the rest of this week.

Issue 1 (MT touch off):
From my tired brain's memory, if you have MT mode on, then the only tool that can be used to set Z zero is the MT. The T# of the MT is set on the tooling page, master tool mode options. The message "Can't set Z0 in master mode w/o master tool" tells me MT mode is on, but the MT T# is not mounted at the time the button is clicked.
I did modify the code in beta 9 for touch plates - perhaps something happened....
please make the problem happen and then get the probing log file and email it to me to look at.
(C:\mach3\MachStdMill\Logs\MSMProbingDebugLog.txt)

Issue 2 (scaling DROs):
The DROs i think you are you referring to are the scale factor DROs for each axis. The LED next to them turns on whenever the scale factor is not equal 1 (i.e. the axis is being scaled).
If an axis DRO value is -1, that indicates that the axis is being reversed + for -
I can't think of any way MSM could change those DRO values on it's own. They are just Mach's DROs.

Electrical noise seems an unlikely candidate to change a DRO value. A input signal bit yes, but not a DRO value.

When the scale is -1, is the axis motion in fact reversed from "normal" for your machine?
Do you have any G-Ccode doing G51? That is how scaling factors get set via G-Code.

Dave

 
Title: Re: Touch off
Post by: kcib on September 08, 2010, 06:26:32 AM
Hi Dave
Issue 1 (MT touch off)
Done exactly what you said but still get the same message ( "Can't set Z0 in master mode w/o master tool" ) I started from the beginning remeasured PTL of Master tool etc touched off and got my reading of Zero then went straight over to the touch off screen and clicked on the "Z"0 arrow and got the same message .
Issue 2
(Scaling DRO's)
This problem sometimes happens when I am just pressing buttons ie: I could be homing machine or just pressing the Mach3 ready/not ready button , it just happens for no reason , I will check over machine again and see if I can find anything else which might be causing this problem
Thanks
Alan
Title: Re: Touch off
Post by: DaveCVI on September 09, 2010, 09:00:44 PM
Alan,
I inquired about this issue with the guys at Newfangled - they asked that I have you contact them directly.
Please email Scott (scottn@machsupport.com), tell him that you are the fellow I talked to them about re the axis scaling flipping.

Dave
Title: Re: Touch off
Post by: kcib on September 10, 2010, 03:54:16 AM
Hi Dave
will contact Scott and see if he can help me , have you got any idea's on the problem with the Master tool and touch off problem ??
Thanks
Alan
Title: Re: Touch off
Post by: DaveCVI on September 10, 2010, 10:57:17 PM
Alan,
I'm traveling and can't do any hands on testing as I'm away from the shop.

In MT mode, the master tool has to be the tool used to touch and set Z Zero.

Looking at the code, I'm thinking that the issue is that the Master Tool is not mounted when the WC Offset page, Touch tab, Set Z zero button is clicked.

Here is the relevant code from the "Set Z Zero" button:
Code: [Select]
'
Code "G92.2"

If Not (GetUserDRO(MasterToolModeLED) = 1 ) Then
' we are not in Master tool mode
Call SetOEMDRO(MachMultiModeZAxisWCOEMDRO , Abs(GetUserDRO(TLOGageBlockHeightDRO )))
Else
' we are in master tool mode
' do we have the master tool mounted?
If GetCurrentTool() = GetUserDRO(MasterToolNumberDRO) Then
' we have the master tool

<<< here is where the MT Set Z Zero action is done - you don't get here>

Else

<<<< here is the message you are seeing >>>>>>

' can't do it - need master tool, tell user
MsgBox "Can't set Z0 in master tool mode w/o master tool",0,"Master Tool Mode"
End If
End If


What is the # of the master tool set to on the Tooling page?
(TC and master tool mode options panel)

What is the value of the Current Tool DRO when you click the Set Z zero button?

You will get the message when they are not the same number - i.e. when the currently mounted tool is not the master tool.

Dave
Title: Re: Touch off
Post by: kcib on September 11, 2010, 06:30:18 AM
Hi Dave
I have attached a new probe log for you to take a look at , Tool #1 is the master tool , on the Tooling screen it is shown as the current tool and when I go to the WC Touch off screen it shows tool#1 and that it is set as the master tool , I cannot see what else there is every thing is done as you have advised but I still get the same message as before  ( "Can't set Z0 in master mode w/o master tool" ) , I appreciate that you are away this matter is not a case of life and death , see if you can see anything when you return
Thanks
Alan
Title: Re: Touch off
Post by: DaveCVI on September 12, 2010, 02:43:48 PM
Alan,
I think I found the problem: the GetCurrentTool() API for scripts is broken.
When the script calls it to get the current tool number an incorrect value is being returned.
The bad value is compared to the MT # and things fail rapidly from there.

This is a Mach bug - I'll have to get Brian to look at it.

Dave
 
Title: Re: Touch off
Post by: kcib on September 12, 2010, 03:40:57 PM
Hi Dave
thanks for the info , spent hours trying different ways of doing things and kept getting the same message but I am pleased that you have been able to track down the problem , Brian is now also trying to sort out my problem with the scaling , anyway thanks again for all your help will wait for the next Mach update
Cheers
Alan
Title: Re: Touch off
Post by: DaveCVI on September 12, 2010, 03:53:16 PM
Alan,
I'll put a code "work around" into MSM for the GetCurrentTool() API bug until the API is fixed in Mach.
It will be in the next MSM release (Beta 10).

Dave
Title: Re: Touch off
Post by: kcib on September 12, 2010, 06:12:13 PM
Hi Dave
have just downloaded and installed latest MSM , there still seems to be a problem trying to touch off using the master tool , the message ( "Can't set Z0 in master mode w/o master tool" ) has now gone but when I click on the arrow Set Z Zero nothing happens so not sure if you have tried to fix this bug or not ,
Thanks
Alan 
Title: Re: Touch off
Post by: DaveCVI on September 12, 2010, 08:33:14 PM
Alan,

... when I click on the arrow Set Z Zero nothing happens ....

That's not what I'm seeing - Let's walk thru an example to see where what you see differs from what I'm experiencing.

The example I'll construct can be done in sim mode - that way I don't have to worry about imperial / metric units or what the working envelope of your machine is.

1) fire up mach 3.43.22 with MSM 0.3.14 (Beta 10), get it ready (out of estop)
go to the reference page - the MSM Verizon shown is "Version 0.3.13 (Beta 10)" - correct?
Menu - help - about - mach version = "Version R3.043.022" - correct?

set up the gage block height
2) go to settings-common page.
3) set Gage/Plate Height DRO = 0.5

set up the MT params
3) I'll use T251 as the MT number for this example
4) go to the Tooling page
5)  master Tool Mode options panel:
    set this option combination:
        TC Auto TCP OFF
        Master T Mode ON
        TC Auto TLO OFF
        RH T-Holders OFF
        Master Tool #: DRO = 251
        Master PTL: 2.0

we'll get the MT mounted (so mach knows it has the MT as the current tool)
6) via MDI: T251M6
7) complete the tool change (don't actually physically mount the MT in the spindle - we will fake a Z touch off rather than actually touching the MT to a surface, no tool mounted gives us the most clearance possible while testing)
8 ) now we have T251 (The MT) mounted - which is the MT
9) Current T# DRO = 251 correct?
10) the TLO for the MT in MT mode is always = 0
The TL Offset DRO value should = +0.0    Correct?

we will set up for a touch operation in MT mode:
11) go to WC offset touch page
12) big Green MasterT Mode LED is on - correct?
13) via MDI: G53 G90 G0 X0 Y0 Z0
14) zero X, Y & Z - ok , now we have MC=WC=0 for X,Y,Z - all DROs for X,Y,Z in the offset panel should be 0
15) MDI: G53 G90 G1 F5 Z-1
16) Z row of offset panel should be:
-1.0 = -1.0 - +0.0 - +0.0 - +0.0

We are set up to do the "Set Z Zero" operation
we have:
    MCZAxis position = -1.0
    ZWCOffset = 0.0
    GBH = 0.5

The offset calculation for button in MT mode is:
WCOzOffset = MCZAxisPos - ZWCOffset - G-Blockheight
                   =     -1.0         -    0.0         -       0.5
                   =  -1.5

17) click Set Z Zero
18) Z row of offset panel will change and it should now be:
+0.5 = -1.0  -  -1.5  -  +0.0  -  +0.0

Dave

Title: Re: Touch off
Post by: kcib on September 13, 2010, 07:00:25 AM
Hi Dave
Yes I am the plonker was not doing it quite correctly , I was expecting the that after pressing the Set Z Zero arrow  that the "Z" axis would move down to touch the touch plate , so to get this right I assume that I manually move the "Z" axis down to touch onto the touch plate and then click onto the Set Z Zero arrow ??
Thanks
Alan
Title: Re: Touch off
Post by: DaveCVI on September 13, 2010, 09:53:04 AM
Alan,
OK, I see where the mis-communication was -
The touch page is for "touching". I.e. manually touch the tool to the surface then click the button.

The probing page is for moving the tool to a surface, and finding it via a touch plate or probe event into Mach.

ON the probing page "Probe Z-" will move the current tool down until a probe event tells mach that the tool has touched the surface (in this case the signal caused by the tool touching the touch plate).
If you are in MT mode, then the same calculation I described before is done when the TP is touched.

1) make sure you have set the height of the TP (settings page) to the thickness of your TP (or the calculation result will be off)
2) make sure the TP is working each time (I life the TP up and touch the tool to see the screen LED go on)
3) make sure the TP is under the tool when you click "probe Z-" (it's not fun to miss the plate)

Dave