Hello Guest it is May 17, 2021, 06:56:58 PM

Author Topic: How to make an input do an incremental jog?  (Read 260 times)

0 Members and 1 Guest are viewing this topic.

Offline jevs

*
  •  315 315
    • View Profile
How to make an input do an incremental jog?
« on: August 22, 2019, 10:40:23 PM »
I cannot get a physical button to do an incremental jog. All the code I try does nothing.

Putting this kind of stuff in the screen script
Code: [Select]
[mc.ISIG_INPUT51] = function (state)
    if( state == 1) then
--rc = mc.mcJogSetType(inst,0,MC_JOG_TYPE_INC)
--rc = mc.mcJogSetInc(inst,0,.01)
rc = mc.mcJogIncStart(inst,0,.01)
--else
--rc = mc.mcJogIncStop(inst,0)
end
end,

I tried different versions of this and nothing seems to work. I know some stuff is commented out here, but I was trying different things and had to give up for the night.
I did get constant move to work kinda, but not incremental. I just need to get this to work, then I have to figure out how to make it work for all the different jog settings somehow. I also need to figure out how to do a function when two input signals are active and not just one...

Offline jevs

*
  •  315 315
    • View Profile
Re: How to make an input do an incremental jog?
« Reply #1 on: August 22, 2019, 10:53:33 PM »
I guess never mind. I exited out of Mach4 and came back in, now it works.....