Hello Guest it is April 26, 2024, 11:31:35 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.


Topics - Zuxztah

Pages: 1
1
Hello! I´ve found a guide online about how to use a Pendant in mach 4 by Shane | Engineer, added the code in screen load script and restarted mach4, has not plugged in and tested since I do not have an MPG / Pendant yet. but will build one soon.

The problem is that it removes on screen jog functions and Ref all home button? They get grayed out? or loose i´ts clickability and I still want to keep those features even if a pendant is installed? maybe if there is a Enable button for the pendant that deactivates jog on screen? or if the pendant only works when a axis is selected and then it deactivates the jog on screen features?

so if the pendant is not enabled the jog functions in mach 4 must be usable, and I don't care if the jog on-screen functions never get disabled, as long as both pendant and jog on screen works?

The Code below is added to the bottom of the screen load script:


--------------------------------------
-- MPG Code --
--------------------------------------
SigLib = {
    [mc.ISIG_INPUT10] = function (state)
        RunPendant()
    end,
    [mc.ISIG_INPUT11] = function (state)
        RunPendant()
    end,
    [mc.ISIG_INPUT12] = function (state)
        RunPendant()
    end,
    [mc.ISIG_INPUT13] = function (state)
        RunPendant()
    end,
    [mc.ISIG_INPUT14] = function (state)
        RunPendant()
    end,
    [mc.ISIG_INPUT15] = function (state)
        RunPendant()
    end,
    [mc.ISIG_INPUT16] = function (state)
        RunPendant()
    end,
    [mc.ISIG_INPUT17] = function (state)
        RunPendant()
    end
}
---------------------------------------------------------------
-- Pendant function.
---------------------------------------------------------------
function RunPendant()
    local hSig, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT10) -- Is mapped to Port 2 Pin 4 *X Selection
    local XSelection, rc = mc.mcSignalGetState(hSig)
    local hSig, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT11) -- Is mapped to Port 2 Pin 5 *Y Selection
    local YSelection, rc = mc.mcSignalGetState(hSig)
    local hSig, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT12) -- Is mapped to Port 2 Pin 6 *Z Selection
    local ZSelection, rc = mc.mcSignalGetState(hSig)
    local hSig, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT13) -- Is mapped to Port 2 Pin 7 *A Selection
    local ASelection, rc = mc.mcSignalGetState(hSig)
    local hSig, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT14) -- Is mapped to Port 2 Pin 8 *.001 Selection
    local Step001, rc = mc.mcSignalGetState(hSig)
    local hSig, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT15) -- Is mapped to Port 2 Pin 9 *.010 Selection
    local Step010, rc = mc.mcSignalGetState(hSig)
    local hSig, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT16) -- Is mapped to Port 2 Pin 10 *.100 Selection
    local Step100, rc = mc.mcSignalGetState(hSig)
    local hSig, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT17) -- Is mapped to Port 2 Pin 15 *Estop
    local PenStop, rc = mc.mcSignalGetState(hSig)
    local PenJogOn, rc = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT10)-- Is mapped to Port 2 Pin 1 *Jog on LED

    if XSelection == 1 then
        mc.mcMpgSetAxis(inst, 0, 0) --X Axis
        mc.mcCntlSetLastError(inst, "X Selected")
        mc.mcSignalSetState(PenJogOn, 1)
    elseif YSelection == 1 then
        mc.mcMpgSetAxis(inst, 0, 1) --Y Axis
        mc.mcCntlSetLastError(inst, "Y Selected")
        mc.mcSignalSetState(PenJogOn, 1)
    elseif ZSelection == 1 then
        mc.mcMpgSetAxis(inst, 0, 2) --Z Axis
        mc.mcCntlSetLastError(inst, "Z Selected")
        mc.mcSignalSetState(PenJogOn, 1)
    elseif ASelection == 1 then
        mc.mcMpgSetAxis(inst, 0, 3) --A Axis
        mc.mcCntlSetLastError(inst, "A Selected")
        mc.mcSignalSetState(PenJogOn, 1)
    else
        mc.mcMpgSetAxis(inst, 0, -1) --No Axis
        mc.mcCntlSetLastError(inst, "No Axis Selected")
        mc.mcSignalSetState(PenJogOn, 0)
    end

    if Step001 == 1 then
        mc.mcMpgSetInc(inst, 0, .001)
    elseif Step010 == 1 then
        mc.mcMpgSetInc(inst, 0, .010)
    elseif Step100 == 1 then
        mc.mcMpgSetInc(inst, 0, .100)
    end

    if PenStop == 1 then
        mc.mcCntlEStop(inst)
    end
end

2
Hey! have managed to get a problem with my mach4. The program stops in the middle of the cycle, sometimes a few minutes in and sometimes closer to the end of the cycle, and I can not figure out why it does that!
ive tried to start logging to see what it says, but i dont understand the message,
The problem is shown by that line and beyond from that line:
2018-08-26 14: 45: 02,798 - Controller :: RunCanonBuffer called AddStopReportRequest () RunCanon.cpp: 76
It has worked perfectly before? the problem have started just now?

have been thinking about EMI, or if the computer is too slow, I have tried to mount lots of Ferrite cores, but without any results .. any ideas?

the machine uses twisted pairs with shielding grounded to machine chassie (and only in the machine end)
the computer is moved far away from the machine,
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2018-08-26 14:40:47.721 - Loggging Enabled.
2018-08-26 14:40:53.298 - Spindle speed capped by current range!
2018-08-26 14:40:53.299 - Spindle speed capped by current range!
2018-08-26 14:40:53.328 - API: mcToolPathGenerate() called.
2018-08-26 14:41:00.066 - API: mcCntlRewindFile() called.
2018-08-26 14:41:06.362 - API: mcCntlCycleStart() called.
2018-08-26 14:41:06.464 - Attempt transition from "Idle" on event "Cycle Start" MachAPI.cpp:2603
2018-08-26 14:41:06.464 - Signal id 1127, (Jog Enabled), changed from HIGH to LOW.
2018-08-26 14:41:06.465 - S_IDLE_on_exit
2018-08-26 14:41:06.465 - ACTION_start_cycle
2018-08-26 14:41:06.466 - S_FILE_RUNNING_on_entry
2018-08-26 14:41:06.466 - S_FILE_RUNNING2_on_entry
2018-08-26 14:41:06.466 - Signal id 1114, (Gcode Running), changed from LOW to HIGH.
2018-08-26 14:41:06.489 - API: mcSpindleSetDirection(inst = 0, dir = 0) called.
2018-08-26 14:41:06.530 - Signal id 1121, (Tool Change), changed from LOW to HIGH.
2018-08-26 14:41:06.532 - Signal id 1121, (Tool Change), changed from HIGH to LOW.
2018-08-26 14:41:06.535 - API: mcSpindleSetDirection(inst = 0, dir = 1) called.
2018-08-26 14:41:06.535 - Signal id 1142, (Spindle Fwd), changed from LOW to HIGH.
2018-08-26 14:41:06.536 - Signal id 1141, (Spindle On), changed from LOW to HIGH.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2018-08-26 14:45:02.798 - Controller::RunCanonBuffer called AddStopReportRequest() RunCanon.cpp:76
2018-08-26 14:45:02.798 - Requesting a stopped report for axis 0 motors.
2018-08-26 14:45:02.798 - Requesting a stopped report for motor 0.
2018-08-26 14:45:02.798 - Requesting a stopped report for axis 1 motors.
2018-08-26 14:45:02.798 - ESS: Mach requested MSG_REPORT_MOTOR_STOP Motor 0
2018-08-26 14:45:02.799 - Requesting a stopped report for motor 1.
2018-08-26 14:45:02.799 - Requesting a stopped report for axis 2 motors.
2018-08-26 14:45:02.799 - ESS: Mach requested MSG_REPORT_MOTOR_STOP Motor 1
2018-08-26 14:45:02.799 - Requesting a stopped report for motor 2.
2018-08-26 14:45:02.799 - ESS: Mach requested MSG_REPORT_MOTOR_STOP Motor 2
2018-08-26 14:45:02.799 - Waiting on SetStill...
2018-08-26 14:45:02.974 - ESS: Motor 2 Still
2018-08-26 14:45:02.999 - ESS: Motor 0 Still
2018-08-26 14:45:02.999 - ESS: Motor 1 Still
2018-08-26 14:45:02.999 - All motors marked as still.
2018-08-26 14:45:02.999 - Waiting on SetStill is Done!
2018-08-26 14:45:03.001 - Signal id 1142, (Spindle Fwd), changed from HIGH to LOW.
2018-08-26 14:45:03.001 - Signal id 1141, (Spindle On), changed from HIGH to LOW.
2018-08-26 14:45:03.002 - Waiting 1.500000 seconds for spindle to stop... Spindle.cpp:351
2018-08-26 14:45:04.488 - Done. Spindle.cpp:356
2018-08-26 14:45:04.488 - Waiting for motions to complete: MC_CANON_REWIND. GcodeExec.cpp:745
2018-08-26 14:45:04.499 - Attempt transition from "File Running" on event "Stop" GcodeExec.cpp:765
2018-08-26 14:45:04.499 - S_FILE_RUNNING2_on_exit
2018-08-26 14:45:04.499 - Signal id 1114, (Gcode Running), changed from HIGH to LOW.
2018-08-26 14:45:04.499 - S_FILE_RUNNING_on_exit
2018-08-26 14:45:04.500 - ACTION_stop
2018-08-26 14:45:04.523 - S_IDLE_on_entry



3
Mach4 General Discussion / Mach 4 Touch button problems
« on: February 10, 2017, 01:58:20 PM »
Hello!

The other day I started my computer and fired up my cnc to do a simple job.
I did as I always do, reference the machine and then jog it manually to the place on my table where the part/material is and then manually zero X and Y where I want it to be zeroed, and then I use the tool hight function (Touch button) but it wouldn't do a thing when i press the button? No response at all? No window?

Restarted Mach 4 but when I closed Mach? A error window pops up? tframe something something... something about the lua script?

I tired to create a new VxRouter profile and copy all the lua code from that profile in to my existing configured profile to see if it helped but without any success? I haven't done any major changes to anything in the lua script other than adding some lines to get the vfd (modbus) configuration working? With some help of a nice guy on this forum? I don't think this has anything to do with those changes? It worked after all those modifications?

Any ideas ?

https://s24.postimg.org/3k100ev79/IMG_0338.jpg

4
Mach4 General Discussion / Mach 4 Machtric 2.2kw VFD Modbus
« on: January 14, 2017, 09:03:39 AM »
Hello guys I'm totally lost..
 
As I've decided to switch from Mach3 to Mach4,
to get rid of the old dying parallel port, A new problem have showed up, probably not just one,

I have very little experience with modbus, very very basic knowledge and nothing more and I really need some help to either understand, or to get it working,

I got the numbers hex/Deci,s registers and so on, but I don't know what to do with them?

There is no test modbus feature in Mach 4 that could help me determine the functionality of the settings,

And how to bind them to the spindle start/stop/freq buttons in the software?

Lua script/plc editor? Way out of my comfort zone,

I want to learn but..  I don't often find moments to research and learn,

And my English isn't the best as you guys probably have noticed.

Thanks.

Pages: 1