Hello Guest it is March 29, 2024, 06:48:04 AM

Author Topic: new to OB axes  (Read 476 times)

0 Members and 1 Guest are viewing this topic.

new to OB axes
« on: February 05, 2021, 04:39:04 PM »
Hi,
I am trying to control a spool motor and the best way to do it is by using step and direction. It needs to operate independently during the g code runs of the main program so I am thinking I need to operate it as OB1.
The problem is, that the spool needs to change velocity during (and independently of) the running of the g code so I can't just turn it on like a spindle.
I am thinking that I probably would not be able to run the spool program as a macro because (I assume) it would just wait until the jog commands for the spool were done before starting the g code. I am not sure where to implement it though.

At this point I am stuck at square one, because I can't seem to get the jog function to work at all.

I am running the following program in a macro with a copy of Mach4 only on the computer, not hooked up to the ESS. I get no movement from any axis, and the message says -18.0.

function jogtest()
   local inst = mc.mcGetInstance()
   local rc
   rc = mc.mcJogIncStart(inst, 0, 1.0)
   if rc ~= mc.MERROR_NOERROR then
      wx.wxMessageBox(tostring(rc))
   end
end

Thanks for any help!