Hello Guest it is August 13, 2022, 06:16:18 AM

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 - Peter Knell

Pages: « 1 2 3 4 5 6 7
This is the problem i am having. Mach 4 seems to be really good but i think the amount of learning into LUA you need to do just for basic functions is a mistake.
Have you tryed going to "Screen Load" and then loading the wx4.set screen? Apparently this is the most up to date screen set and has the probing screen included and working.
Also you will need to edit you "A" axis out of the "Go to Zero" button if you only have 3 Axis as it will try to command A Axis to move and error out.

Mach4 General Discussion / Re: XHC Mach4 USB motion board warning and info
« on: November 22, 2017, 05:43:38 PM »
Yeah i can understand not running through a router.
I think im keen for the Pokeys at this stage but im in no hurry so will keep researching.
Thank you

Mach4 General Discussion / Re: XHC Mach4 USB motion board warning and info
« on: November 22, 2017, 03:58:54 PM »
Im using an All in One type touch screen computer so i cannot add another card. The reason i did this is the touch screens are so much better when they are designed for the computer they are on.
Of course this does mean i cant upgrade cards etc. Ive been reading about the Pokeys57cnc board which looks really good. It can even be used through your router or network switch which could be an option.
Thanks for your input. Lots of learning haha.

Mach4 General Discussion / Re: XHC Mach4 USB motion board warning and info
« on: November 22, 2017, 02:10:52 PM »
Im not 100 on this but i think XHC do make and develop the board. They do have a large range and also i have noticed they are incrementally updating there versions etc and providing downloads on there site here which is a start! Some manufacturers dont even provide download links.

I have been wondering wether i should just go with an Ethernet setup and maybe put in another wireless access point in my workshop so i can use the wireless for internet.
Thanks for your recommendation. All information helps :)

Mach4 General Discussion / Re: XHC Mach4 USB motion board warning and info
« on: November 22, 2017, 01:04:18 PM »
My pleasure.
I just think its unfair on the customer when they say it works with Mach 4 when most of the features are unusable. It will most likely be a very nice board once it has been developed more but this looks like it will come at the early customers expense.
Im wondering which board i will move to. The only thing with the ESS is i only have the one Ethernet port on my computer so unless i use a network switch for internet ill have to swap the cable over to the computer every time i want to go on the internet. My computer has wireless but the signal is very poor in the workshop.
 Im really not sure which board i should change to now.

Mach4 General Discussion / XHC Mach4 USB motion board warning and info
« on: November 22, 2017, 04:04:53 AM »
This post is for informing others about the XHC USB Mach4 USB motion control board.
I bought a 1325 machine from China (Blue Elephant CNC - really pleased with it!).
I didnt want Mach3 as its old and who wants old software with a brand new machine?
They offered the XHC Mach4 board as there only option for supply with Mach4.
Yes it was a risk and i knew this (being a new board and also Mach4 being new too).
The XHC board is a nice layout with 24vdc ins and outs etc. It is advertised to be working with Mach4.
The catch is the board and its supplied plugins will ONLY run and work with the wxMach.exe Mach4 program and NOT the Mach4GUI.exe.
Under the Mach4GUI.exe Mach4 wont connect to the card and this means all your assigned inputs are on including e-stop. Nothing works.
As you all probably know this means you cant use this board and also edit your Mach4 screens to make Auto Tool Zero and Go to Zero etc work (can only edit screens under Mach4GUI.exe).
I have spoken to XHC and they keep saying the same thing. (Copy paste shortcut to wxmach.exe to desktop). This obviously doesnt fix the problem.
For reference this is the MK3-M4 Version: 5.10 usb board from XHC.
Apparently Artsoft have offered to give support for this range of USB card provided XHC provide some samples for the team to go over and test but unfortunately it doesnt look like XHC are willing to do this.
Anyway this is just some info for others who might have bought one or considering buying.
Admittedly the card actually works well for motion and running programs it just means you cant have a heap of functions that Mach4 offers such as the Auto Tool Zero by button.
If anyone has any info on things i could try or mod to get this working with Mach4GUI.exe it would be awesome.
I have used a heap of chinese parts in the past and have never been disappointed so i thought id give this card a go. I suppose the good times had to come to an end eventaully haha.
If i cant find an updated plugin or hack to get this working ill have to bin it and go for the PMDX usb maybe? Any recommendations for your fav boards?
Anyway hope this helps someone.

Mach4 General Discussion / Re: Setting Auto Zero button help
« on: November 12, 2017, 06:41:52 PM »
I did find this script on the forum. I have been reading as much as poss but all this programming does click with me i dodnt think haha.
If i add this to the Left up Script it should work as long as ive set up the Variables and my probe input yes?
Thanks so much for helping.

Author: GB Ward, Create! 2015
Rev: 0.1
Date: 4/25/15
Mach4 4.0.1, Build 2336

Public Domain

Mach4 Core API Version 1.01 (C:\Mach4Hobby\Docs\Mach4CoreAPI.chm)

Mach4 CNC Controller Lua Scripting Guide
Newfangled Solutions 2014

"Motion plugin probing procedure." (C:\Mach4Hobby\Docs\probing.txt)

Down and Dirty "mcLua scripting, quick ref guide"
poppabear, Mach4 English Forums, under "Mach4 Toolbox" board.

Pound Var List - poppabear, Mach4 Forums

McLua mc scripting reference - poppabear, Mach4 Forums


    local mInst = 0;                                        --Sets current controller instance to 0, if running multiple controller instances, this will need to change
    local rc = 0;                                           --Clear rc
    local hSig = 0;                                         --Clear hSig
    local inst = mc.mcGetInstance(mInst);                   --Captures current instance of Mach 4

    local probe = mc.ISIG_PROBE;                            --Set input here, mc.<INPUT_NAME>; input needs to be mapped in Mach4
    local strikePlateThickness = 0.060;                     --What is the thickness of the strikeplate, or how much do you want to offset 0?

    --Function to check to see if probe already grounded
    function checkProbe ()

        hSig, rc = mc.mcSignalGetHandle(inst, probe);       --Load hReg with probe state
        state = mc.mcSignalGetState(hSig);                  --Get Signal State
        if (state == 1) then                                --if hReg true ('if probe is activated then')
            return true
            return false
    end  --checkProbe()

    --Get current Feed rate, G90/G91, G0/G1 states to return to later.
    --Mach4 stores these variables as 'Pound Variables'
    --See Mach4 Lua Scripting Manual Page 23
    local CurrFeedRate = mc.mcCntlGetPoundVar(inst, 2134);              --Gets current Feed Rate, #var 2134
    local CurrFeedMode = mc.mcCntlGetPoundVar(inst, 4001);              --Gets current G0/G1 state, #var 4001
    local CurrPositionMode = mc.mcCntlGetPoundVar(inst, 4003);          --Gets current G90/G91 state, #var 4003
    local zProbeStrikePos = 0;                                          --clear variable
    if checkProbe() then                                                --Check probe status
        mc.mcCntlSetLastError(inst, "ERROR: Probe is already triggered.  Cannot continue.");
        do return end                                                   --"do return end" stops program.  Not sure how this works
    end --check if probe is grounded

    mc.mcAxisSetPos(inst, 2, 0);                                        --"Zero Z" (0 is x, 1 y, and so on)
    mc.mcCntlGcodeExecuteWait(inst, 'G01 G90 G31 Z-4 F4');              --G31.  Machine will stop on probe strike or go to Z-4, store in #var 5063
    local zProbeStrikePos = mc.mcCntlGetPoundVar(inst, 5063);           --Get Z strike position
    local zAxisCurrentPos = mc.mcAxisGetPos(inst, 2);                   --Get Current Z position, sometimes the probe will continue past strike point.
    local zAxisDifference = (zProbeStrikePos - ZAxisCurrentPos);        --Gets overshoot, returns positive
    local zAxisNewOffset = strikePlateThickness - zAxisDifference;      --Subracts overshoot from known thickness of strikeplate
    mc.mcAxisSetPos(inst, 2, zAxisNewOffset);                           --Sets DRO to current position
    --mc.mcAxisSetMachinePos(inst, 2, zAxisNewOffset);                  --Sets Machine to offset if anyone finds this necessary
    mc.mcCntlGcodeExecuteWait(inst, 'G00 G91 Z1');                      --Rapid move to 1 inch above current pos

    local isProbeSafe = checkProbe();                                   --Checks to see if probe is safe
    if isProbeSafe == true then
        wx.wxMessageBox("Probe is still activated!  Check to make sure probe is not damaged or still contacting strike plate.");
        mc.mcCntlSetLastError(inst, "Z Axis now referenced.");
    end --if

Mach4 General Discussion / Re: Setting Auto Zero button help
« on: November 12, 2017, 06:23:29 PM »
Thank you for trying to help Daz. After the gcode execute is there something i can add to make it automatically update and zero the z work coordinates?
Thanks again very much appreciated.

Mach4 General Discussion / Setting Auto Zero button help
« on: November 11, 2017, 06:57:49 PM »
Hey guys.
I think ive actually put this in the wrong section can the moderators please move if necessary.

This has probably come up a million times before but I cannot find it in the forum.
Im just setting up Mach 4 on a new machine ive got. This will be just a simple 3 Axis Router with no Tool Changer running the latest Mach4 version.  I would like to use the wxmach.set screen which has the “Auto Tool Zero” button on it. I like this screen because it’s a little more simple than the wx4.set and the others.
I have almost everything set up fine. I have changed my “Go to Zero” button script to work how I would like but im really struggling to understand the following.
In wx4.set I can use the “touch” button to probe down to get my work zero. I would like to add the same script or function to my wxMach.set screen on the “Auto tool zero” button.
As I understand I need to add a script to this like I did in Mach 3. My questions are..
-Does anyone have a script I can use (just a simple drive down wait for probe input, set probe position with plate offset, and drive back up).
-Where in the screen do I need to copy and paste the script into?
The “left up script” or the “screen load script”?
Or does anyone have an easy way of making the “Auto Tool Zero” button work with a macro or something and how do I set it. I have done a lot of reading and im still stuck (maybe I need more sleep)  As I think by default this button has nothing assigned to it in the wxMach.set screen.
My probe input is working fine.
Any help very much appreciated thank you.

Pages: « 1 2 3 4 5 6 7