Hello Guest it is April 13, 2021, 11:47:51 AM

Author Topic: trouble with mc.mcaxisisstill  (Read 280 times)

0 Members and 1 Guest are viewing this topic.

trouble with mc.mcaxisisstill
« on: January 28, 2019, 12:21:17 PM »
I want to have Mach4 check an output from a clearpath motor every time the axis associated with that motor is moving.  I thought using mc.mcaxisisstill would be the way to do that, but it seems to be returning a positive result whether the axis is moving or not.  Any ideas what I might be doing wrong??
Here's a test code that I was using:

    local inst = mc.mcGetInstance()
    local still
    local rc
    local gcode = ""
    gcode = gcode .. ("g0 x-2\n")
    gcode = gcode .. ("g0 x0\n")
    mc.mcCntlGcodeExecute(inst, gcode)
    still, rc = mc.mcAxisIsStill(inst, 0)
    if rc ~= mc.MERROR_NOERROR then