Hello Guest it is April 12, 2021, 05:41:11 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 - McClean

Pages: 1
Hi mkullman,

you told us its not possible to release the driver sources because of an NDA. Would it be possible to release only the parts with the usb/hid code and how to access the mpg (sending coordinates and reading encoder/button events)?



Mach3 works fine with Windows 10 - you just need a Motion Controller. Parallelport is not working



im currently trying to control Mach3 via COM-Interface from a c# application. This works fine but i have a problem.

I need to access elapsed / estimated time (14/15) via GetDRO. The result is always 0. I tried to use GetDROString - but the result is 0.000 too.
Is this a bug in the GetDRO function? What can i do to access this values?

Im using latest Mach3 version



thank you very much! Yes i tried different things to get the mpg working with mach3 again.

Windows: Win10 pro, 64bit
Mach3: Latest Version

- removed MPG from device manager, with "remove driver". The reconnected the USB-stick, windows installes mpg as HID again, but with "not migrated message". Not working in mach3
- used some other usb-ports. Not working
- used zadig, tested different settings. Not working

USB Device (devicemanager) says device redy, but:

Das Gerät USB\VID_10CE&PID_EB70\6&3b560980&0&3 wurde aufgrund einer teilweisen oder mehrdeutigen Übereinstimmung nicht migriert.
ID der letzten Geräteinstanz: USB\VID_0000&PID_0002\6&22bce1d6&0&3
Klassen-GUID: {36FC9E60-C465-11CF-8056-444553540000}
Speicherortpfad: PCIROOT(0)#PCI(1A00)#USBROOT(0)#USB(1)#USB(3)
Migrationsrang: 0xF000FFFFFFFF0103
Vorhanden: false
Status: 0xC0000719

Mach4 General Discussion / Re: mc.mcCntlGcodeExecuteWait problems
« on: November 21, 2017, 07:24:19 PM »
Hi Steve,

thank you very much for your advice. I see this very critical, because its much work and code to do simple scripting in this way. Because the need of adding all functions to plc code this gets a big monolitic thing instead of clean small separated scripts (yes i know, i can separate the functions in different files, but in the end everything is in PLC)


Mach4 General Discussion / Re: mc.mcCntlGcodeExecuteWait problems
« on: November 21, 2017, 11:55:19 AM »

i have the same problem. mcCntlGcodeExecuteWait blocks ui when called from a button script - thats normal (i dont understand how this beavior can be normal, but this is another question). You need to run an coroutine. I cant handle this correctly at the moment, my post is here:


Hope finding a solution...



good work for this driver! I tested it and it works fine. But now i have a problem. Im using mach3 at the moment and i tried to go back to mach3 with the mpg. But it don't works. I uninstalled the driver and then reconnected the usb-stick. Windows installed the normal hid driver. But mach3 didnt work with mpg any more

What can i do? Some ideas?



im testing mach4 and at the moment i implement probing functions. My problem is that script is ending unexpected

Probing starts but the script stops running after this step. "probing.enableTrigger(false)" is never called.
I checked the script without coroutine and this works but freezing the ui

Can someone help me?


Here is the button code:
Code: [Select]
local inst = mc.mcGetInstance()
local profile = mc.mcProfileGetName(inst)
local path = mc.mcCntlGetMachDir(inst)

package.path = path .. "\\Modules\\?.lua;" .. path .. "\\Profiles\\" .. profile .. "\\Modules\\?.lua;"

--Probing module
package.loaded.ProbingModule = nil
probing = require("sthProbing")

function demoprobe()
    probing.do_probing(-5, 25, 5)

co = coroutine.create (demoprobe)

sthProbing.lua code
Code: [Select]
local probing = {}

probing.AXIS_X = "X"
probing.AXIS_Y = "Y"
probing.AXIS_Z = "Z"

function probing.enableTrigger(enable)
local inst = mc.mcGetInstance()
local digitrigger= mc.mcSignalGetHandle(inst, mc.OSIG_DIGTRIGGER)
mc.mcSignalSetState(digitrigger, enable);

function probing.isProbeActive()
local inst = mc.mcGetInstance()
    local probsig = mc.mcSignalGetHandle(inst, mc.ISIG_PROBE)
    return mc.mcSignalGetState(probsig) == 1

function Code(Gcode)
    local inst = mc.mcGetInstance()
rc = mc.mcCntlGcodeExecute(inst, Gcode)

function probing.do_probing(maxoffset, speed, safez)
    local inst = mc.mcGetInstance()
    ------ Get current state ------
    local CurFeed = mc.mcCntlGetPoundVar(inst, 2134)
    local CurFeedMode = mc.mcCntlGetPoundVar(inst, 4001)
    local CurAbsMode = mc.mcCntlGetPoundVar(inst, 4003)

    if probing.isProbeActive() then
        mc.mcCntlSetLastError(inst, "ERROR: Probe is already triggered")

    --mc.mcCntlGcodeExecuteWait(inst, "G01 G91 G21 G31 Z" .. maxoffset .. " F" .. speed)
    Code("G01 G91 G21 G31 Z" .. maxoffset .. " F" .. speed)

    local zProbeStrikePos = mc.mcCntlGetPoundVar(inst, 5063)
    local zAxisCurrentPos = mc.mcAxisGetPos(inst, 2)
    local zGoPos = zProbeStrikePos + safez

    mc.mcCntlSetLastError(inst, "Probe: " .. zProbeStrikePos)
    mc.mcCntlSetLastError(inst, "Probe2: " .. zAxisCurrentPos)
    mc.mcCntlSetLastError(inst, "Go: " .. zGoPos)

    mc.mcCntlGcodeExecuteWait(inst, "G0 G91 G21 Z" .. safez)
    mc.mcAxisSetPos(inst, 2, 0)

    ------ Reset state ------
    mc.mcCntlSetPoundVar(inst, 2134, CurFeed)
    mc.mcCntlSetPoundVar(inst, 4001, CurFeedMode)
    mc.mcCntlSetPoundVar(inst, 4003, CurAbsMode)

return probing

Pages: 1