Machsupport Forum

Mach Discussion => Brains Development => Topic started by: pjcevallos@gmail.com on July 21, 2022, 06:02:10 AM

Title: Activate a digital output when an axis is activated
Post by: pjcevallos@gmail.com on July 21, 2022, 06:02:10 AM
Hi

Is there any way to enable an output when a specific axis is running?

For example for the X axis

G21 G90 X10 Y10 (output is enable)
G21 G90 Y15 (output is disable)

kind regards

Pablo

Title: Re: Activate a digital output when an axis is activated
Post by: servomac on November 15, 2024, 08:33:21 AM
Hi
this is how I do it.
the last two rungs of the brain attached have an output for +ve moving, the second rung outputs for -ve moves
I know its an old post but I saw no one answered
hope it helps
Title: Re: Activate a digital output when an axis is activated
Post by: servomac on November 15, 2024, 08:37:43 AM
hi again
sorry last three rungs, it writes to a store and compares it later on in scan
regards
Title: Re: Activate a digital output when an axis is activated
Post by: riterdelighted on February 18, 2025, 09:38:14 PM
Hi Pablo,

It depends on the controller you're using, but one common approach is to use M-codes linked to an output signal. Some controllers allow you to assign an output to activate when a specific axis is moving.

If your system supports conditional logic or macros, you might be able to set up a function that enables the output when an X-axis move is commanded and disables it otherwise.

What machine/controller are you working with? That might help narrow down a solution.

Best regards,