Hello Guest it is April 15, 2021, 12:39:13 AM

Author Topic: mcX360 Plugin for Lua  (Read 27937 times)

0 Members and 1 Guest are viewing this topic.

Re: mcX360 Plugin for Lua
« Reply #90 on: May 30, 2020, 11:29:21 PM »
Thanks.  I will review this tomorrow and see if I can get it to work.
Re: mcX360 Plugin for Lua
« Reply #91 on: August 03, 2020, 11:09:14 AM »
As a new Mach4 user I manged to get the x360 up and running. But there one little odd thing. My x360 controller is rumbeling (the force feedback motor) every second for a blink of an eye. Over and over again. This starts when the Mach4 is starting and the plugins are loading. I happens even without any LUA script installed. What can be wrong here?

Mike
Re: mcX360 Plugin for Lua
« Reply #92 on: October 08, 2020, 12:58:59 PM »
scr.SetProperty("sliderJogRate", "Value","00.1")

Hi On the mach4 jogging tab there is a slider to adjust the jog rate and a value box that you can enter the jog rate.
I can enter .1 in the Value box and it works however if i set this value with
scr.SetProperty("droJogRate", .1) its set the value box to 0.0 and jogging stops working as expected
I have change the properties on both the slider and value box but it still will not accept 0.1
any ideas how I can implement very slow jog rates.
Cheers!
 
 
Re: mcX360 Plugin for Lua
« Reply #93 on: February 22, 2021, 10:37:47 PM »
What changed in the plugin? Release notes? :P

Im just finishing up my script, now everything is done except probing (waiting for andy @ warp9)

Re: mcX360 Plugin for Lua
« Reply #94 on: February 22, 2021, 10:39:36 PM »
I have got my xbox running and only thing i would like to add is probing, at least z probing. do you know if there is a way to access
the functionality that is already there in the 'Touch' panel? It looks like you're the only one who was interested in implementing it?
Re: mcX360 Plugin for Lua
« Reply #95 on: February 24, 2021, 08:39:54 AM »
Theres a new "official" plugin now with the latest mach4 version, maybe you can select probing there ?

Offline DazTheGas

*
  •  753 753
  • DazTheGas
    • View Profile
Re: mcX360 Plugin for Lua
« Reply #96 on: February 24, 2021, 09:55:32 AM »
There is a couple of ways to do this, if using the lua version you can assign a standard gcode probe ie G91 G31 Z-5 F30 to a button. if using the same way as i used to then you can use something like

Code: [Select]

if GetXin("Btn_X") == 1 and X_Btn == false then
    mc.mcCntlGcodeExecuteWait(inst,'G91 G31 Z-5 F30')
    X_Btn = true
end

If you are using the new plugin that is bundled with mach 4 then you can assign a button to 1 of 6 GCodes.

Example: if you want to assign  button x to gcode1 and want this to probe z then from the xbox config screen assign x to gcode1, then open your profile/machine.ini and edit the section XBOX_0 and add Gcode1=G91 G31 Z-5 F30

Hope this helps

DazTheGas
Theres always time for a choccy biccy
Re: mcX360 Plugin for Lua
« Reply #97 on: February 24, 2021, 11:41:51 AM »
Thanks for the quick reply, i will try it tonight. If i want to run a larger script (thinking of implementing something like your example on ess probing with safeguards, but i will write it for z,y,x corner for setting work origin would it work the same way or maybe put it in a module?  I'm still trying to get the big picture of how mach4 works internally.