Machsupport Forum

Mach Discussion => Mach4 General Discussion => Mach4 Toolbox => Topic started by: soruud on June 28, 2017, 03:23:18 PM

Title: Axis movment indicator LED
Post by: soruud on June 28, 2017, 03:23:18 PM
Hi. I would like to make LED's on my panel to light up to indicate movment on each axis. So when my x-axis moves in positive direction I want 1 output to be activated, both if
axis are started by an G-code or by me hitting X+ jog button or using my jog wheel... Same for each axis and direction.
I really tryed to do this, but no luck so far.

Can some one help me with this one ?


SOR
Title: Re: Axis movment indicator LED
Post by: TPS on June 29, 2017, 03:28:25 PM
Hi,
you will Need a litle Piece of VB script in macropump to do this

i just write the code down, not tested or anything else, just to give you the idea.


If GetOEMDro(800) <> GetOEMDro(2500) Then //read an compare X DRO with stored Value
    Output ON // X axis is moving
else
    Output OFF // X axis is not moving
End If
SetOEMDro(2500) = GetOEMDro(800) //store X DRO for compare

Regards Thomas

Title: Re: Axis movment indicator LED
Post by: soruud on July 02, 2017, 07:55:12 AM
Hi. Thank you for taking your time. But I just found out I didnt define what Mach version I use :) I use Mach4, so I guess I will need to do it
another way. If I am not wrong your solution  is for Mach3 right? I dont think Mach4 use VB.


SOR. ;)
Title: Re: Axis movment indicator LED
Post by: TPS on July 02, 2017, 10:47:28 AM
my fault,

did not notice that it was posted under Mach4 General Discussion.

but i think something simular under LUA should work.

i have no idea from LUA.

Sorry.