Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Alchematic on June 09, 2020, 03:12:22 PM

Title: Can Mach 3 output a logic high and low corresponding to Z axis direction?
Post by: Alchematic on June 09, 2020, 03:12:22 PM
I am setting up a new system for an old engraving table. Using Mach3 thru ethernet smooth stepper to leadshine mx3660 and to steppers for x and y axis.

The z axis is a air actuated spindle by New Hermes for fine engraving.

I need to turn on a relay driven air valve solenoid when the z axis starts a plunge or downward motion and off when the z axis retracts. The action of the plunger is fast.

There is of course no z axis stepper motor. I just need a logic signal on an mx3660 output that corresponds to the direction a z axis stepper would move if there was one.

Is there any way to set up an initial line of code that would output this logic.. Logic high when z axis is plunging (down) and Logic low when z axis retracts (up) 

Logic polarity is of no concern. I can set that up with hardware.

I am most likely gong to use Vcarve to generate gcode but they do not have a solution for this so far.

Thanks

Mark

Title: Re: Can Mach 3 output a logic high and low corresponding to Z axis direction?
Post by: Tweakie.CNC on June 10, 2020, 01:41:09 AM
The Z Axis Direction signal will toggle between the High and Low state dependant on axis direction movement. The signal is persistent and retains it's state until changed.

Tweakie.
Title: Re: Can Mach 3 output a logic high and low corresponding to Z axis direction?
Post by: Alchematic on June 10, 2020, 12:40:47 PM
Hi Tweakie.

Thanks for the reply.

Yes I understand that it is a steady state High and Low dependent on direction.

Researching this more yesterday, I came up with this..

Ethernet Smooth Stepper puts out Z axis Move Pulses on pin 6 and Direction on Pin 7

I want to access that Pin 7 signal.

I thought I might do it in hardware with a DB25 male to female with breakout and jump pin 7 to the Pin 9 which would give me that direction signal on the MX3660 CN7 digital output 4

I might have to break the normal/ circuit trace from the pin 9 of the input DB25 to avoid conflict.

I am checking with Warp9 to make sure that Z Axis Direction pin 7 can feed 2 input without loading. It should.

Then I got to looking at Mach 4 and the ESS setup. There is a new feature where you can assign Output signals to multiple pins.

This is done on the ESS Configuration App and Output Signals tab.

So I am hopefull that I can just send the Z Axis direction to Pin 7 as is normal and to Pin 9 to feed the MX3660 digital out 4

Title: Re: Can Mach 3 output a logic high and low corresponding to Z axis direction?
Post by: Tweakie.CNC on June 11, 2020, 01:43:59 AM
Quote
So I am hopefull that I can just send the Z Axis direction to Pin 7 as is normal and to Pin 9 to feed the MX3660 digital out 4

Looks good.

Tweakie.
Title: Re: Can Mach 3 output a logic high and low corresponding to Z axis direction?
Post by: Tweakie.CNC on June 12, 2020, 03:02:38 AM
For others that follow, there is more information on the Warp9 forum. https://www.warp9td.com/index.php/kunena/7-general-discussion/8448-ess-mapping-outputs-with-mac4#24748

Tweakie.