Hello Guest it is March 29, 2024, 08:59:28 AM

Author Topic: trouble with mc.mcaxisisstill  (Read 609 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)
    wx.wxMilliSleep(400)
    still, rc = mc.mcAxisIsStill(inst, 0)
    wx.wxMessageBox(tostring(still))
    if rc ~= mc.MERROR_NOERROR then
        wx.wxMessageBox("error")
    end