Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: XLR84x4 on August 03, 2007, 10:47:36 PM

Title: Z axis design and Mach3 control
Post by: XLR84x4 on August 03, 2007, 10:47:36 PM
Hi all,

 I have searched the forums but have yet to discover the answers. I am using a Grex as the interface also.

My Z axis will be controlled with a pnematic actuator to toggle the Z up and down. On the Z axis will be the A axis for a tangential knife.

My questions is how shall I configure Mach 3 to toggle the Z axis up and down via an output from the Grex. Under settings I can enable tangential control with a lift angle and Z lift. What should be configured in the Z lift to get this output to retract the knife when the angle is reached

I have thought about using either the spindle or coolant control output??

With the A axis for turning the knife  is it as simple as enabling the Motor Output for the axis and let the Tangential button do the rest for turn the axis

Thanks for you input
Jason
Title: Re: Z axis design and Mach3 control
Post by: jimpinder on August 04, 2007, 04:44:24 AM
If you look at the video tutorials, there is a section on scripting, where you can write your own logic and scripts to activate or do various things in response to input buttons being pressed. You do not need to use the coolant or spindle relay outsputs, in fact these are just output pins that have been configured by Mach 3 to be coolant and spindle pins.

As far as I understand the tutorials, you can configure the pins and write your own logic to make any pin do what you want.
Title: Re: Z axis design and Mach3 control
Post by: XLR84x4 on August 05, 2007, 04:24:23 AM
Thanks for the info,

I have watched the tutorial and I am guessing that this is what I will do. Any thoughts on this appreciated.

When generating a tool path in Lazy cam I will setup a tool off set called cutter. My z limits will be -150 and cutter offset of +50. and set my Z raise in tangetial control to raise  +50 if radius +45

I will right a M code macro something like this. I have no VB experience but this is what I'm looking to do.

M50 code
If Z is =<-50 then output 1 set to 0 ( Meaning should +45 radius be exceeded,  Z will be driven -150 + 50 offset +50 generated by tangent control = Z-50 turn off output 1)
If Z is >-50 then output 1 set to 1

Do you think this will cut it? and can I enter this M50 in the Gcode once or will I have to enter it after any change in Z in the Gcode.

I will add this to the VB thread for some feedback

Thanks Jason
Title: Re: Z axis design and Mach3 control
Post by: jimpinder on August 06, 2007, 01:11:28 PM
I have absolutely no idea, becasue I have no idea what you are trying to do.

My own set-up is just a lathe with a milling head for steel, with only 9 inches by 18 inches movement, if that. My milling head only moves up and down about 1 3/4 inches. I have no idea what you mean by a tangential knife.

I am pretty good with logic, once I get the idea what you are trying to do.
Title: Re: Z axis design and Mach3 control
Post by: zarzul on August 09, 2007, 09:46:47 AM
I replied on the other posting you did,  use 2.5D  then output #6 is the up/down for your Z axis. 

Can't help on the tangiental question.

Arnie
Title: Re: Z axis design and Mach3 control
Post by: Whacko on August 10, 2007, 06:20:15 PM
You want to rotate the knife to stay aligned with the axis movement, i. e. 360 degrees functionality. It can be done, but it is advanced programming. You are not garanteed that MACH3 will behave if you run complicated VBScript. I have done this for triple rotating bevel heads in flame cutting, comes to the same function, but I'm getting some really weird behaviour from MACH3 especially if you pause and restart the movement.

Whacko
Title: Re: Z axis design and Mach3 control
Post by: Flipz01 on October 16, 2007, 12:52:06 PM
Did you ever figure this out?

I have a tangential axis and it wants to move within 1 degree as it goes around a circle or square - shoud be 360 degrees.
Title: Re: Z axis design and Mach3 control
Post by: Whacko on October 17, 2007, 12:14:08 AM
I am not sure what you mean, do you want a direction resolver? There has been some confusion on my side with a previous post. What do you mean with "it wants to move within 1 degree ". Do you have a tolerance margin of 1 degree?

Whacko
Title: Re: Z axis design and Mach3 control
Post by: Flipz01 on October 17, 2007, 09:09:42 AM
I mean that instead of moving to 90 degrees, 180 degrees, 270 degrees and then back to 0 degrees as the machine traverses a square pattern - I'm getting 0.25 degrees, 0.5 degrees, 0.75 degrees and then back to zero.

I'm guessing this is either a setting, or a programming glitch.
Title: Re: Z axis design and Mach3 control
Post by: Whacko on October 17, 2007, 01:52:48 PM
How many steps per unit for A axis have you specified? You need to setup the amount of steps relevant to the rotation.

Whacko
Title: Re: Z axis design and Mach3 control
Post by: Flipz01 on October 17, 2007, 02:53:29 PM
Steps per is irrevelant.

I'm talking about the display in the DRO.  It vascillates around between 358.4 or so, and 0.9 degrees.  Around a circle or square it goes fro 0.00 degrees to 0.9 degrees or so.

It should do the full 360 degrees - NO?  How far the motor actually moves is a number setting.  Right now, it is set at 50 SPI or 18000/360.
Title: Re: Z axis design and Mach3 control
Post by: Chaoticone on October 17, 2007, 03:34:13 PM
No, steps per are very important.

Brett
Title: Re: Z axis design and Mach3 control
Post by: Whacko on October 17, 2007, 04:13:23 PM
Can you post a typical gcode file that you use?

Whacko
Title: Re: Z axis design and Mach3 control
Post by: Chaoticone on October 17, 2007, 05:20:25 PM
Also, is the rotary axis set to angular in general config? Also in Genreal config, you can allow for 360 rollover. Do you have soft limits set for the rot. axis?

Brett
Title: Re: Z axis design and Mach3 control
Post by: Flipz01 on October 17, 2007, 05:21:26 PM
It's a simple square with filleted corners and a few holes.

Nothing fancy.