Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: jevs on August 22, 2019, 10:40:23 PM

Title: How to make an input do an incremental jog?
Post by: jevs 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...
Title: Re: How to make an input do an incremental jog?
Post by: jevs on August 22, 2019, 10:53:33 PM
I guess never mind. I exited out of Mach4 and came back in, now it works.....