Hello Guest it is March 28, 2024, 02:19:58 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

161
Mach4 Plugins / Re: mcX360 Plugin for Lua
« on: November 11, 2017, 10:49:36 PM »
go into the diagnostic menu and open the the regfile diagnostic window, you will get a full list from the tree and see live data being populated on the tree.

DazTheGas

162
Mach4 General Discussion / Re: werid script debug problems
« on: November 11, 2017, 08:57:17 AM »
Perhaps post the code so it can be checked...

DazTheGas

163
Mach4 Plugins / Re: mcX360 Plugin for Lua
« on: November 11, 2017, 08:38:32 AM »
It should already be there as Btn_LTH and Btn_RTH but anyway heres a version compiled with latest sdk

DazTheGas

164
Mach4 General Discussion / Re: Check if Enabled
« on: November 10, 2017, 04:38:03 PM »
This is a small snippet from one of my scripts if it helps

Code: [Select]
if mc.mcSignalGetState (mc.mcSignalGetHandle (mInst, mc.OSIG_MACHINE_ENABLED)) == 1 then

DazTheGas

165
Mach4 Plugins / Re: mcX360 Plugin for Lua
« on: November 07, 2017, 04:42:05 PM »
Good spot on the   
Code: [Select]
if GetXin("Btn_A") == "1" then
When I first posted some code the GetXin function returned a string

Code: [Select]
function GetX360(xinput)
    local hreg = mc.mcRegGetHandle(inst, string.format("mcX360_LUA/%s", xinput))
    return mc.mcRegGetValueString(hreg)
end

Then after a while it was more beneficial to return an int, so the function was changed to

Code: [Select]
function GetXin(xinput)
    local hreg = mc.mcRegGetHandle(mInst, string.format("mcX360_LUA/%s", xinput))
    return mc.mcRegGetValueLong(hreg)
end

DazTheGas

166
Mach4 Plugins / Re: mcX360 Plugin for Lua
« on: November 06, 2017, 05:34:10 PM »
One thing I would suggest is to start with the most minimum script to test first

Code: [Select]
local inst = mc.mcGetInstance()

local X360_PNL = mcLuaPanelParent;


    function GetXin(xinput)
    local hreg = mc.mcRegGetHandle(inst, string.format("mcX360_LUA/%s", xinput))
    return mc.mcRegGetValueString(hreg)
    end


X360_timer = wx.wxTimer(X360_PNL)

    X360_PNL:Connect(wx.wxEVT_TIMER,   function (event)

    if GetXin("Btn_A") == "1" then
     -- do something after button A is pressed
    end
   
    if GetXin("Btn_B") == "1" then
     -- do something after button B is pressed
    end
 
    end)

    X360_timer:Start(100)

DazTheGas

167
Mach4 General Discussion / Re: M03 yes, but no M05
« on: November 04, 2017, 03:20:15 PM »
It would be helpfull if you posted your m3 and m5 macros.

DazTheGas

168
Mach4 General Discussion / Re: Pokeys 57cnc touch probe issue
« on: October 30, 2017, 04:12:42 PM »
All probeing is done via a G31 call for which is controlled by the motion controller which then reports to the core that it has succefully completed and the coordinates of the axis are sent to the core. Since this is happening in more than one script I would use the logging from the diagnostic menu and check if the plugin is issuing commands such as mcMotionSetProbePos() or  mcMotionSetProbeComplete(). perhaps run the probe with logging and then save the log of a completed probe, you can then compare this log with a failed probe to see what didnt happen.

NeoTO from the Pokeys section may be more helpfull if you post here  http://www.machsupport.com/forum/index.php?board=79.0

DazTheGas

169
Mach4 General Discussion / Re: Jogging while doing a tool change?
« on: October 29, 2017, 04:46:11 AM »
Glad you got it sorted :-)

DazTheGas

170
You have posted in the mach4 forum, you will get a quicker answer form the mach3 general forum http://www.machsupport.com/forum/index.php/board,1.0.html

DazTheGas