Hello Guest it is December 13, 2019, 11:36:04 AM

Author Topic: MPG mode Always On  (Read 1671 times)

0 Members and 1 Guest are viewing this topic.

MPG mode Always On
« on: March 11, 2016, 11:02:37 AM »
I have MACH4 configured with a POKEY pendant.  The selector switches for X,Y,Z,A,B all work and when I rotate the MPG the selected axis moves as expected.

The issue is the MPG always moves the machine, even during Gcode processing if you turn the MPG the motion is impacted.

Inside the Pokey Plugin configuration I do have a dedicated switch assigned to the Deadman feature. When the switch is activated the MPG moves the axis like normal.  If I disable the pendant with the deadman switch the MPG axis selector switches are not recognized as expected, but if you turn the MPG wheel the last axis that was moved moves again with the MPG wheel.

I even has set MPG JOG inside the POKEY plugin to always OFF, saved, exited, restarted MACH4 and the MPG still moves the last axis.

There must be something somewhere to fix this issue.  Any help guys?

Russ
Re: MPG mode Always On
« Reply #1 on: March 15, 2016, 03:39:21 PM »
I have been digging to find out why the MPG is always on using the POKEYS plugin.  Looking at the default Screen Load Script in MACH4 you will find the lines below near the top of the file.  When you toggle the mode button on the screen it selects "Continuous" or "incremental"  If you look at the code closely it also had a case for "MPG", which by default is just a blank between the  quotes like them' ' instead of MPG, which I inserted as a test.  However, after saving the screen the behavior does not change it never lists MPG as a mode.  I must be missing something somewhere.  Getting help on MACH4 has been extremely difficult, it is pretty clear the development team has totally focused on the commercial applications, the DIY guys are on their own.  The few users that actually have things working are the only place you will get support, thank goodness for guys like DazTheGas, Blockhead, poppabear, and a few others.   The code below is clearly operating I can change colors the text of continuous or other labels and they change. 

Any clues guys.. I have been reading all the LUA documents provided with MACH4 as well as many others.   I have coded in C for years and picked up on most of LUA pretty quickly, and understand a good deal now.   I have looked through the entire script and can't see anywhere else this gets set??

Thanks

Russ




[mc.OSIG_JOG_CONT] = function (state)
    if( state == 1) then
       scr.SetProperty('labJogMode', 'Label', 'Continuous');
       scr.SetProperty('txtJogInc', 'Bg Color', '#C0C0C0');--Light Grey
       scr.SetProperty('txtJogInc', 'Fg Color', '#808080');--Dark Grey
    end
end,

[mc.OSIG_JOG_INC] = function (state)
    if( state == 1) then
        scr.SetProperty('labJogMode', 'Label', 'Incremental');
        scr.SetProperty('txtJogInc', 'Bg Color', '#FFFFFF');--White   
        scr.SetProperty('txtJogInc', 'Fg Color', '#000000');--Black
   end
end,

[mc.OSIG_JOG_MPG] = function (state)
    if( state == 1) then
        scr.SetProperty('labJogMode', 'Label', 'MPG');
        scr.SetProperty('txtJogInc', 'Bg Color', '#C0C0C0');--Light Grey
        scr.SetProperty('txtJogInc', 'Fg Color', '#808080');--Dark Grey
        --add the bits to grey jog buttons because buttons can't be MPGs
    end
end,

Offline DazTheGas

*
  •  750 750
  • DazTheGas
    • View Profile
Re: MPG mode Always On
« Reply #2 on: March 16, 2016, 03:08:34 AM »
I have no way of testing as no pokeys but try a combination of using OSIG_JOG_ENABLED or OSIG_JOG_MPG with mcCntlIsInCycle,

so basically disable the mpg or jogging whilst in a cycle

DazTheGas
Theres always time for a choccy biccy
Re: MPG mode Always On
« Reply #3 on: March 16, 2016, 03:34:23 PM »
Daz,

I will run more experiments, but the strange thing is the default code in MACH4 shows how you can cycle through Jog Continuous, Jog Incremental, and Jog MPG.  Jogging using the keyboard works just fine, I was surprised that you can set JOG to MPG on the MACH4 screen even though the code is there.  I understand you can't verify this because you do not have a POKEYS unit.  I can job with the MPG but that is all the time with the POKEY plugin enabled.  It is so strange, you can run gcode and crank the MPG wheel and it accepts that input along with the commands from GCODE, clearly something that should never happen.

I will do some more digging when I get another block of time to experiment.

Russ