Hello Guest it is April 19, 2024, 10:45:15 AM

Author Topic: Let Incremental jog finish but still shut off Velocity move if button is let go?  (Read 5249 times)

0 Members and 1 Guest are viewing this topic.

Offline jevs

*
  •  315 315
    • View Profile
This seems to be working perfectly so far! I tested everything out and it seems to be working great!
Thanks a million for doing this. This saved me a ton of time and also showed me some new things to do.

I am going to attempt to move on to the feed rate switch next and then the pendant. What you did here gives a great example. I am sure some others will benefit from this code if they find it in the search.

I think this one is solved if no other questions come up.

Thanks again!
Great!

I've seen your other thread about the feed rate switch.. It should be pretty easy to make it control the jog rate for the incremental moves as we've made it using the registers.
In the signal library for the FRO inputs, i'd just call mc.mcCntlSetFRO() API to set the feed rate, and then set the speed for the incremental moves using the function we made before cpSetJogRate(). If we check that the Jog Type is set to incremental it will prevent the FRO control changing the jog rate when the jog is set to continuous.

If you do this remove the setCpJogRate(100) I added for each of the incremental inputs in the signal library otherwise it will reset to 100 if you change increment value.

So you'd have something like this, I've not tested it but it should work...
Code: [Select]
[mc.ISIG_INPUT18] = function (state) -- Set FRO 100%
    if(state == 1) then
local inst = mc.mcGetInstance()
mc.mcCntlSetFRO(inst, 100) --Set FRO value 100%
local hReg = mc.mcRegGetHandle(inst, "iRegs0/cpJogType")
local jogType = mc.mcRegGetValue(hReg)
if (jogType == mc.MC_JOG_TYPE_INC) then --Check that Jog Type is incremental
setCpJogRate(100) --Set jog rate for incremental to 100%
end
end
end,
« Last Edit: August 27, 2019, 04:18:38 AM by SwiftyJ »

Offline jevs

*
  •  315 315
    • View Profile
I talked with Machmotion this morning. It sounds like there may have been some limitations with Mach3 that may have affected how things were setup back then.
From the conversation we had, it seems like it may be more normal and desired that FRO never affects any manual jogging speeds weather incremental or continuous (at any percentage)?
 
Which means the way I have it now should be good (without trying to tie the FRO switch to step jog position move rates)? They said basically FRO should only affect G01 moves (Which I assume no manual jogging would be included in that)?