Hello Guest it is April 18, 2024, 10:04:54 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

691
Mach4 Toolbox / Load GCode NO TOOLPATH
« on: September 28, 2015, 09:16:29 AM »
If you have gcode you know works, and you dont need to sit and watch the toolpath, then use this and save your processor and memory..

create a new button and in the left up script place.

Code: [Select]
local inst = 0

local fileDialog = wx.wxFileDialog(wx.NULL,
                                           "Open 'GCode File' No ToolPath",
                                           "",
                                           "",
                                           "GCode files (*.tap)|*.tap|All files (*)|*",
                                            wx.wxFD_OPEN + wx.wxFD_FILE_MUST_EXIST)

    if fileDialog:ShowModal() == wx.wxID_OK then
    GCodeFilename = fileDialog:GetPath()
    mc.mcCntlLoadGcodeFile(inst, GCodeFilename)
    --mc.mcToolPathGenerate(inst) -- uncomment to create toolpath
    else
        return -- quit program
    end

DazTheGas

692
Mach4 General Discussion / Re: Screen Set Ideas
« on: September 17, 2015, 10:11:57 AM »
Quote
was not possible till Steve added the API control to set home with a mc.mcMotorSetHomePos call.

Yeah thanks Steve, been busting my head with mc.mcAxisSetMachinePos(inst,0,0.0) but mc.mcMotorSetHomePos(inst,0,0) sorted it.

DazTheGas

693
Mach4 Videos / Mach4 and ESS Homing Offset Script UPDATED
« on: September 17, 2015, 09:54:14 AM »
Heres an update to the homing script I wrote a while back that somewhere during the version updates broke and I never noticed..  Was trying so hard to figure out the mcAxisSetMachinePos  to do this until I saw the post by Ya-Nvr-No in regards to using    mcMotorSetHomePos, which in substitution done the trick.

https://youtu.be/HhcCGt0Lywo

New PLC Script all the restis the same

Code: [Select]
if (x_enable_offset == "true" and y_enable_offset == "true" and z_enable_offset == "true") then
    if (offset_applied == "false") then
        xoffset = mc.mcAxisGetHomeOffset(inst, 0);
        yoffset = mc.mcAxisGetHomeOffset(inst, 1);
        zoffset = mc.mcAxisGetHomeOffset(inst, 2);
        mc.mcAxisSetPos(inst, 0, 0.00);
        mc.mcAxisSetPos(inst, 1, 0.00);
        mc.mcAxisSetPos(inst, 2, 0.00);
        mc.mcCntlGcodeExecuteWait(inst, "G00 X"..xoffset.." Y"..yoffset.." Z"..zoffset);
        mc.mcMotorSetHomePos(inst, 0, xoffset * mc.mcProfileGetDouble(inst, 'Motor0','CountsPerUnit',0)) --X
        mc.mcMotorSetHomePos(inst, 1, yoffset * mc.mcProfileGetDouble(inst, 'Motor1','CountsPerUnit',0)) --Y
        mc.mcMotorSetHomePos(inst, 2, zoffset * mc.mcProfileGetDouble(inst, 'Motor2','CountsPerUnit',0)) --Z
        mc.mcMotorSetHomePos(inst, 3, yoffset * mc.mcProfileGetDouble(inst, 'Motor3','CountsPerUnit',0)) --Y Slave
        mc.mcAxisSetPos(inst, 0, xoffset);
        mc.mcAxisSetPos(inst, 1, yoffset);
        mc.mcAxisSetPos(inst, 2, zoffset);
        offset_applied = "true";
end
end

P.S Does mcAxisSetMachinePos actually work cause I cant do anything with it??

DazTheGas

694
Mach4 General Discussion / Strange runaway after jogging (Fixed)
« on: September 16, 2015, 02:36:51 PM »
Just wanted to share this in case anyone else had come up against this..

https://youtu.be/yAytIqVn6bs

DazTheGas

695
Mach4 General Discussion / Re: Mach 4 licence not instaling
« on: September 08, 2015, 03:45:58 PM »
Quote
I ended up using Mach 4 Ver 2 build 2651 because the Warp9 website claims its the tested one to work with my Ethernet Smooth Stepper (ESS).

The recommended version on the website was there due to an error I overlooked and prob hasnt been updated yet, i am using latest version with ESS and all is working as should be.

DazTheGas

696
Mach4 General Discussion / Re: Homing
« on: September 08, 2015, 03:19:20 PM »
Away at moment but will read posts from begining and see if between us we can get you right.

DazTheGas

697
Mach4 General Discussion / Re: Mach 4 licence not instaling
« on: September 07, 2015, 09:45:43 AM »
Quote
I have loaded mach4 demo onto my main computer win 7 64 this one returns the same pcid on reboot, seems to be just xp home and xp pro the pcid changes

Done a little test today,  I have loaded mach4 twice on same machine in different directories, one for build 2630 and one for 2673. so without rebooting etc between different versions they produce different pc id`s ???

This I would say is down to the mcCntlGetComputerID command being different between the 2 versions of what data it is collecting to make the key..


DazTheGas

698
Mach4 General Discussion / Re: Mach4 New Tabs
« on: September 07, 2015, 04:29:05 AM »
Sorry just realized, if your using any of the stock screens then you need scr.SetProperty('MainTabs', 'Current Tab', '0')  not Screens, as thats what mine are called.

Daz

699
Mach4 General Discussion / Re: Mach4 New Tabs
« on: September 07, 2015, 03:13:56 AM »
Go into edit screen - highlight the screen name in the top left pane and click the thunder bolt in the bottom pane you should now see the screen load script.

DazTheGas

700
Mach4 General Discussion / Mach4 New Tabs
« on: September 06, 2015, 12:30:41 PM »
Finally in 4.2.0.2673 the mach team has found the wxAuiNotebook Class to make the tabs look pretty, I had already coded them into my screen, and the old mach wxnotebook tabs looked dull against them as in first pic, but now look a lot better. (second pic)

But unfortunately mach4 now starts off on the wrong screen and so have I to put scr.SetProperty('Screens', 'Current Tab', '0') in the Screen Load Script.

DazTheGas