Hello Guest it is November 08, 2024, 08:18:29 PM

Author Topic: Latest Mach Ver .038 tool change  (Read 4693 times)

0 Members and 1 Guest are viewing this topic.

Latest Mach Ver .038 tool change
« on: March 04, 2010, 04:31:13 PM »
Just installed ver .038 and now have tool change problem.

I have manual tool changer so must use Stop Spindle & Wait option in config.

If I have T1 in the spindle and is current tool and read T1M06 how do I get the tool changer to ignore the command to change tool.
I used to check if tool selected = current tool and then issue a DoOEMButton(1000) in the m6start file.
Then it would jump to m6end file and I would issue another DoOEMButton(1000).
Program worked and continued on......

Well now issuing a DoOEMButton(1000) does not work. It starts the cycle timer but nothing happens in the program.

I also tried doing Auto Tool Changer in the config and in the m6start file did a SystemWaitFor(55) or (start) and nothing happens.
So that command doesn't seem to work anymore.

Any Ideas???

The problem seems simple enough....if tool selected = current tool ....do nothing.

Thanks!!

Jim
Re: Latest Mach Ver .038 tool change
« Reply #1 on: March 04, 2010, 06:36:49 PM »
Hi,

I believe that you have found a Mach v3 bug - at least it sounds to me like the same bug I reported a while back.

I don't know what version of mach this bug appeared in - what version were you running before you installed 0.38?
I'd like to narrow down the versions with this bug. I know it happens on 036 also.
I reported this bug to Brian on 1-17-2010.

Here is what I deduced and the work around that I used.

     The problem is that DoOEMButton(1000) is NOT the same as a button that is mach function 0 (cycle start).

     Button function 0 sets the flag that tells mach to continue after a tool change.

     DoOEMButton(1000) does not set the flag and Mach requires an actual function-0 button press after M6end returns before it will continue the gcode.
   

     During a tool change, mach tells the user to "press cycle start after tool change" -
      It appears that mach is being very literal with this message....
       
      If the user presses a button that has mach Function 0 assigned to the button, an internal mach flag is set that tells mach to continue running the Gcode file when M6End returns to mach.
       
      However,  if a button is pressed that does DoOEMButton(1000) - which is the number for the cycle start function, the internal flag is NOT set.
       
      The result is that when M6end returns to mach, mach does NOT continue running the gcode - until a function-0 button is pressed by the user.
       
WORK AROUND: change the code to DoButton(0) instead of DoOEMButton(1000) - now it works correctly.
The down side of the work around is that the DoButton calls are deprecated and will go away in mach v4 - but this gets things running again until the bug is fixed.

Dave


Author of the MachStdMill Extensions for Mach3
www.CalypsoVentures.com
Re: Latest Mach Ver .038 tool change
« Reply #2 on: March 04, 2010, 10:04:56 PM »
Dave,

Thanks for your time and support.

The version I was using before this was 2.xx.xx something.
I have tried to update my versions in the past and something else is always broken so
I have been using that version since it seemed the most stable.

The main problem with that version is the spindle not always starting up and crashing parts.
So I decided it was time to update and hope that is fixed. Then the tool change problem.

I will try the DoButton(0) command. That seems easy enough. Because it is on the old functions list I never tried it.
I did notice that if I did a standard cycle start it worked like it's supposed to. It was just heck having to hit cycle start 2 or 3 times when there should be no tool change.

I am just thinking about how I have been using this in the past.
Step 1  m6start has a check to see if there is a tool change needed. No tool change needed so issue a cycle start.
Step 2  m6end issue a cycle start to get out of the macro and start program.
So during normal run it looks like you hit cycle start call tool and no change needed so continue running.

If there was a tool change needed....
Step 1  m6start has the tool number update and wait for a change.... user changes tool cycle start...
Step 2  m6end still has issue cycle start to end macro and continue running.

I can't remember off hand... if there was nothing in the m6start and m6end does mach require 2 cycle starts to get the program running again?
Also does the programmed cycle start interfere with the manual cycle start in the m6end. Seems like it may be a double cycle start.
I do know double cycle starts have caused serious problems. Especially while in the middle of a macro.
I have seen many times the program takes off running and the macro isn't even done yet and always results in a machine crash.

Do you have any idea about spindles not starting up all the time in previous versions?
I read in the update list about 3 or 4 versions ago something was fixed with regards to spindle not starting up...
That is the main reason I updated to this version.

Thanks again Dave, I will try your idea tomorrow and report back for future references.


Jim



Re: Latest Mach Ver .038 tool change
« Reply #3 on: March 05, 2010, 12:33:42 PM »
To All,

Dave's response was right on......DoButton(0) worked perfectly.

Also I removed the DoButton(0) in the m6end file so now it's empty.
The problem has been solved and works great.

Thanks again Dave!!

Jim