Hello Guest it is March 29, 2024, 06:13:23 AM

Author Topic: Axis movment indicator LED  (Read 2775 times)

0 Members and 1 Guest are viewing this topic.

Axis movment indicator LED
« 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

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Axis movment indicator LED
« Reply #1 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

anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Axis movment indicator LED
« Reply #2 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. ;)

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Axis movment indicator LED
« Reply #3 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.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.