Hello Guest it is March 28, 2024, 09:47:11 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - DazTheGas

22
Mach4 General Discussion / Re: Jog Rate lost each shutdown
« on: August 10, 2021, 04:41:49 PM »
Which version are you using as according to avids site there is a beta version 2.3.1 that is supposed to address this

Release Notes
Version 2.3.1 (8.6.2021)
Update: Revised default soft limit values
Update: Spindle PTC fault warning changed to generic VFD fault warning
Bugfix: Jog rate does not always persist across sessions

DazTheGas

23
Mach4 General Discussion / Re: Keyboard to set Feed Hold
« on: August 10, 2021, 04:35:15 PM »
There is a keyboard plugin that comes with mach4 that will do that for you.

DazTheGas

24
Mach4 General Discussion / Re: Jog Rate lost each shutdown
« on: August 08, 2021, 03:29:42 PM »
Like Craig suggested putting it in the shutdown script is good, but one extra thing is in your screen load script or first run of the PLC script is to use 'mc.mcJogSetRate' as a way of setting the jog rate but you will have to set this for all axis xyz etc.

DazTheGas

25
Try using mc.mcCntlFeedHold(inst) after you have set your error

DazTheGas

26
Mach4 Plugins / Re: mcX360 Plugin for Lua
« 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

27
Try something in your script like

Code: [Select]
local Xval = math.abs(GetXin("LTH_X_Val")) -- to get value of the stick
mc.mcJogSetRate(mInst, mc.X_AXIS, Xval) -- set the jog rate

Here`s a small extract from a script I used a while back but have`nt used it in a while so just for reference

Code: [Select]
function SetJog()
local Xval = math.abs(GetXin("LTH_X_Val"))
local Yval = math.abs(GetXin("LTH_Y_Val"))
local Zval = math.abs(GetXin("LTH_Y_Val"))

if mc.mcJogGetRate(mInst, mc.X_AXIS) ~= Xval then
mc.mcJogSetRate(mInst, mc.X_AXIS, Xval)
end
if mc.mcJogGetRate(mInst, mc.Y_AXIS) ~= Yval then
mc.mcJogSetRate(mInst, mc.Y_AXIS, Yval)
end
if mc.mcJogGetRate(mInst, mc.Z_AXIS) ~= Zval then
mc.mcJogSetRate(mInst, mc.Z_AXIS, Zval)
end
end

LThumb_Panel:Connect(wx.wxEVT_TIMER, function (event)
SetJog()
-- Y++
if GetXin("LTH_Y_Val") > 20 and GetXin("Btn_LS") == 0 and YPJState == false then
mc.mcJogVelocityStart(mInst, mc.Y_AXIS, mc.MC_JOG_POS)
YPJState = true
end
if GetXin("LTH_Y_Val") == 0 and GetXin("Btn_LS") == 0 and YPJState == true then
mc.mcJogVelocityStop(mInst, mc.Y_AXIS)
YPJState = false
end
-- Y--
if GetXin("LTH_Y_Val") < -20 and GetXin("Btn_LS") == 0 and YNJState == false then
mc.mcJogVelocityStart(mInst, mc.Y_AXIS, mc.MC_JOG_NEG)
YNJState = true
end
if GetXin("LTH_Y_Val") == 0 and GetXin("Btn_LS") == 0 and YNJState == true then
mc.mcJogVelocityStop(mInst, mc.Y_AXIS)
YNJState = false
end
-- X++
if GetXin("LTH_X_Val") > 20 and GetXin("Btn_LS") == 0 and XPJState == false then
mc.mcJogVelocityStart(mInst, mc.X_AXIS, mc.MC_JOG_POS)
XPJState = true
end
if GetXin("LTH_X_Val") == 0 and GetXin("Btn_LS") == 0 and XPJState == true then
mc.mcJogVelocityStop(mInst, mc.X_AXIS)
XPJState = false
end
-- X--
if GetXin("LTH_X_Val") < -20 and GetXin("Btn_LS") == 0 and XNJState == false then
mc.mcJogVelocityStart(mInst, mc.X_AXIS, mc.MC_JOG_NEG)
XNJState = true
end
if GetXin("LTH_X_Val") == 0 and GetXin("Btn_LS") == 0 and XNJState == true then
mc.mcJogVelocityStop(mInst, mc.X_AXIS)
XNJState = false
end
-- Z++
if GetXin("LTH_Y_Val") > 20 and GetXin("Btn_LS") == 1 and ZPJState == false then
mc.mcJogVelocityStart(mInst, mc.Z_AXIS, mc.MC_JOG_POS)
ZPJState = true
end
if GetXin("LTH_Y_Val") == 0 and GetXin("Btn_LS") == 1 and ZPJState == true then
mc.mcJogVelocityStop(mInst, mc.Z_AXIS)
ZPJState = false
end
-- Z--
if GetXin("LTH_Y_Val") < -20 and GetXin("Btn_LS") == 1 and ZNJState == false then
mc.mcJogVelocityStart(mInst, mc.Z_AXIS, mc.MC_JOG_NEG)
ZNJState = true
end
if GetXin("LTH_Y_Val") == 0 and GetXin("Btn_LS") == 1 and ZNJState == true then
mc.mcJogVelocityStop(mInst, mc.Z_AXIS)
ZNJState = false
end
end)

DazTheGas
 

28
Mach4 General Discussion / Re: Mouse MPG question
« on: January 01, 2020, 09:16:34 AM »
Go to the wizards folder within your mach4 folder and open MouseMPG.mcs in a text editor, take a look at line 131 this is the default value.

DazTheGas

29
Mach4 General Discussion / Re: Reload the Screen
« on: August 19, 2019, 07:44:05 AM »
When you reload a screen from the menu bar it will restart everything including Lua and any variables etc that you have would be lost so pretty much pointless.

DazTheGas

30
Quote
I am yet to find a single M6 script for an ATC

The whole idea of the m6 video a while back was to try and explain how you go about setting up your "Own" custom m6 step by step, and nearly everyone has a different way of how they want it to work.

A nice way of seeing your values is to open the watch window from the view menu, right click on the variable you want to watch and add it to watch expression, this will save you having to hover over the script.

DazTheGas