Hello Guest it is April 19, 2024, 03:04:39 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 - Xillianto

Pages: 1 2 »
1
Mach4 General Discussion / Re: Mach 4 Machtric 2.2kw VFD Modbus
« on: January 09, 2018, 09:26:22 AM »
I have been checking that reset button, and it doesnt stop my spindle, only lowers RPM to 6000 for some reason.

So i added to the button when clicked


local inst=mc.mcGetInstance();
local hcont=mc.mcRegGetHandle(inst,"modbus0/cntrl");
mc.mcSpindleSetDirection(inst, 0);
mc.mcRegSetValue(hcont,01);

This tells spindel to stop on my VFD, might need to adjust to your VFD's (mactric VFD)

Steppes i have done as to solving Emergency button:

Connected S2 VFD innput to a relay on my controller board (pokeys57cnc)
Set S2 as an emergency swith (P318 - option 17)

Relay is active high and set to react after if mach4 is active or not (If you push emergency button, Mach4 will go inactive)
If it is active, it turns on the relay, and ofc the other way around if not.
so if i turn off my controller, spindle will be locked out in Emergency mode.

2
Mach4 Videos / Re: Creating an M6 Toolchange in Mach4 (Part 3)
« on: August 31, 2017, 03:41:21 PM »
The change i made to avoid Crash on approach did not behave as expected ( NOT WORKING AT ALL ;D)
So fixed now...And Some other stuff :P

I have not done any rigorus testing but tried some stupid stuff and the script still behaves...

New Version:

Code: [Select]
function M6()
    local inst = mc.mcGetInstance();
    local changeToTool = mc.mcToolGetSelected(inst)
    local changeFromTool = mc.mcToolGetCurrent(inst)
    local XPositionBeforeToolChange = mc.mcAxisGetPos(inst,0)
    local YPositionBeforeToolChange = mc.mcAxisGetPos(inst,1)
    local XToolProbePosition = "1"
    local YToolProbePosition = "1"
    local XManualToolChangePosition = "2"
    local YManualToolChangePosition = "2"
    local ColletAtProbeZCoordinate = -105 -- Machine Z-coordinate when collet tip touches TouchPlate (Must be more than ProbeOperationDistance - DefaultToolLength
    local ExtraProbeDistance = 5 -- SafetyMargin
    local ProbeOperationDistance = -30 -- Length of Probemove before giving up
    local ProbePrepSpeed = 100
    local ProbeSpeed = 25
    local DefaultToolLength = 70 -- Used if tool info is not found. (Should be a value slightly longer than the longest tool in the shop :D)
        -- QUICK REFERENCE
        -- G90 - Absolute (Go to coordinate)
        -- G91 - Incremental (Godistance along axis from current position)
        -- G53 - Machine Coordinate Move

    if changeToTool == changeFromTool then
    return
    mc.mcCntlSetLastError(inst, "ToolChange Activated But Not Required")
    else
    mc.mcCntlGcodeExecuteWait(inst,"G90 G53 G0 Z0.0\nM5" )
    RunProbe(inst,changeFromTool,XToolProbePosition,YToolProbePosition,DefaultToolLength,ColletAtProbeZCoordinate,ExtraProbeDistance,ProbePrepSpeed,ProbeSpeed,ProbeOperationDistance)
    local ToolZCoordinate = mc.mcAxisGetPos(inst,2)
    mc.mcCntlGcodeExecuteWait(inst,"G90 G53 G0 Z0.0 \n G90 G53 G0 X"..XManualToolChangePosition.." Y"..YManualToolChangePosition)
    local changeToToolDescription = mc.mcToolGetDesc(inst,changeToTool)
    wx.wxMessageBox("Please change to tool number "..changeToTool.." "..changeToToolDescription.." and press ok to continue")
    RunProbe(inst,changeToTool,XToolProbePosition,YToolProbePosition,DefaultToolLength,ColletAtProbeZCoordinate,ExtraProbeDistance,ProbePrepSpeed,ProbeSpeed,ProbeOperationDistance)
    mc.mcAxisSetPos(inst, 2 , ToolZCoordinate)
    mc.mcCntlGcodeExecuteWait(inst,"G90 G53 G0 Z0.0")
    mc.mcCntlGcodeExecuteWait(inst,"G90 G0 X"..XPositionBeforeToolChange.." Y"..YPositionBeforeToolChange)
    mc.mcToolSetCurrent(inst, changeToTool)
    wx.wxMessageBox("If Toolchange was Sucessful - click ok to continue")
    mc.mcCntlSetLastError(inst, "ToolChange Finished")
    end
end

function RunProbe(finst,ftool,fXToolProbePosition,fYToolProbePosition,fDefaultToolLength,fColletAtProbeZCoordinate,fExtraProbeDistance,fProbePrepSpeed,fProbeSpeed,fProbeOperationDistance)
    mc.mcCntlGcodeExecuteWait(finst, "G90 G53 G0 X"..fXToolProbePosition.." Y"..fYToolProbePosition)
    local toollen = mc.mcToolGetData(finst, mc.MTOOL_MILL_HEIGHT, ftool)
    if toollen == 0 then
        toollen = fDefaultToolLength
        mc.mcCntlSetLastError(finst, "Tool length not found - using Default Length")
    end
    local probestart = fColletAtProbeZCoordinate + fExtraProbeDistance + toollen
    local GCODE = "G91 G31 G0 Z"..probestart.." F"..fProbePrepSpeed
    GCODE = ""..GCODE.." \n G91 G0 Z1 F"..fProbePrepSpeed.." \n G91 G31 Z"..fProbeOperationDistance.." F"..fProbeSpeed
    mc.mcCntlGcodeExecuteWait(finst,GCODE)
end

if (mc.mcInEditor() == 1) then
    M6()
end

Hi, where do i set up manual toolchange position and fixed probe position ? Cant locate it in your script

3
Mach4 General Discussion / Re: Probing after a manual tool change issue
« on: August 14, 2017, 07:08:32 PM »
I think dazthegaz made a script for this that uses the M6 tool changer. Manual tool change but checks lenght of the tool even if it stores the tool number.

https://www.youtube.com/watch?v=m1eMEec0N-E

4
Mach4 General Discussion / Re: "Probe interrupted"
« on: August 14, 2017, 06:14:54 PM »
I had no problem on the signal, After som mail with polabs, i got a software from them that makes logging between mach4 and pokeys, sendt them the logg and it seems like they have never seen my error before. But they sendt me a patch and it has been working since then :)

5
Mach4 General Discussion / Re: Pokeys57CNC and probing
« on: August 12, 2017, 03:30:52 PM »
I have been having some mails with Polabs lately, and we might have found the problem with probing and the fix for it.

Anyone else here getting "Probe interrupted" as the probe doesnt work ?

6
Mach4 General Discussion / Re: Probing g31 question
« on: August 12, 2017, 02:40:36 PM »
One little tip there for the pull up.

Take +5v from one of the axis output pin9 as most of you likely wont use all 8 axis.

I have now done some mails forth and back with Polabs, because of probe failures.. And i got a patch from them today that seems to have fixed the probe problem, they have also innplemented a security that stops motion if probe fails

7
Mach4 General Discussion / "Probe interrupted"
« on: August 11, 2017, 08:14:44 PM »
Hi

As title states i have a probe error, and now i am trying to get this fixed once and for all, tired of not having my probe working.

I am running the famous pokeys57cnc board, and boy how that one performs... i wish.. ohh well, it performs well for motions and working just as i want, except for probing.

Have been checking forums and all, and cant see that anyone else mentions this error.

I have now stripped my board down, disconnected EVERYTHING just to see if i can find the source of my error, So now i only have my pokeys57cnc, power to it from 12v psu, ethernet cable for connection, emergency button and my probe.. thats all, all drivers and limits and so on are disconnected and shut down.

Still i do get this error when testing, works some times, but most of the times i get "Probe interrupted" and then the Z axis doesnt stop on probe hit, it just continues untill it reaches abit then stops on error.

Have checked my lines for noise with osciloscope and cant find any noise even down to the largest resolution i can get.
I just got a new file from polabs to test, same result on that one.


Anyone else getting this error ?

8
Mach4 General Discussion / Raise the Z first / "SafeZ"
« on: June 09, 2017, 10:08:29 AM »
Hi, is it possible to have the Z axis raised first when i am done with a job ?

My code from cam states:

G28 G90 Z0
G28 X0 Y0
M30

And all 3 axis moves at the same time. What i would like it that the Z axis moves to home first, Then X/Y axis combined.


I also would like to know if it is possible to change the G28 location ? As my home location is at the front, And when i use my plexi shield, i dont want the spindle to rush forward and crash into it.

9
Mach4 General Discussion / Re: Pokeys57CNC and probing
« on: June 07, 2017, 02:35:27 AM »
There is still huge problems with probing. So this issue is not fixed

10
Mach4 General Discussion / Re: Mach4 stopping (Licensed and not demo)
« on: June 07, 2017, 02:15:20 AM »
I have found the solution now, and wanted others to know.

As i do run 4 steppers with dual on Y axis, i had enabled motor 0,1,2,3 and set stepper 3 as slave on stepper 1. But as i didnt disable stepper 3 afterwards it was still waiting for the Pokeys57cnc to report a stop on last stepper. I didnt know that mach4 and pokeys communicated at that level as i dont have either servos or closed loop stepper, but log shows that it does.

So disabling motor3 as it was moved as slave on motor 1 fixed the problem and now it runs fine beside probing..

Pages: 1 2 »