Hello Guest it is May 21, 2019, 03:35:59 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 - smurph

1
I have no idea where GetXin() comes from.  :(

What is mInst?  Typically the instance is garnered with:

local mInst = mc.GetInstance('my function')

And it is usually going in a function. 

Code: [Select]
function JogAxis(axis, direction)
    local inst = mc.mcGetInstance('My JogAxis Function') -- just a label so that API tracing works. 
    if (direction > mc.MC_JOG_STOP) then
        mcJogVelocityStart(inst, axis, mc.MC_JOG_POS)
    elseif (direction < mc.MC_JOG_STOP) then
        mcJogVelocityStart(inst, axis, mc.MC_JOG_NEG)
    else
        mcJogVelocityStop(inst, axis)
    end
end

And to call that function to jog the Y axis:

Code: [Select]
JogAxis(mc.Y_AXIS, mc.MC_JOG_POS) --Jog positive
...
JogAxis(mc.Y_AXIS, mc.MC_JOG_STOP) -- Stop the positive jog

JogAxis(mc.Y_AXIS, mc.MC_JOG_NEG) --Jog negative
...
JogAxis(mc.Y_AXIS, mc.MC_JOG_STOP) -- Stop the negative jog

Steve

2
You really DON'T want to press a button with a script call.  Why?  M code scripts don't natively have access to the screen.  And the script to press a button paradigm was more of a Mach 3 thing.

What you want to do is DUPLICATE the functionality of the button in script.  You do this with the Mach API.  For example, mcJogVelocityStart/Stop will do what pressing the X jog button does, etc...

Steve

3
Mach4 General Discussion / Re: Loop Counter
« on: May 01, 2019, 12:17:03 PM »
Well...  no.  Other than the way G code already gives you.  This is usually done in the G code with a #var.  Set the var to zero before the M98 L10 call and in the sub increment the #var.

Steve

4
G10 only needs G11 if it is a multi-line or modal G10 operation.  Most G10 calls are on shots. 

Steve

5
Mach4 General Discussion / Re: Loop Counter
« on: April 30, 2019, 10:25:32 PM »
Not at the moment. 

Steve

6
Mach4 General Discussion / Re: plasma thc
« on: April 28, 2019, 06:52:35 PM »
THC only needs to be as fast as the Z motor can accelerate.  :)  The "script based" solution will probably handle > 90% of any THC application in the hobby world. 

Steve

7
Mach4 General Discussion / Re: GALIL 413x M11Px M10Px
« on: April 24, 2019, 01:04:45 AM »
No, the Galil plugin does NOT support M10/M11 in Mach 3. 

M62/M63 in Mach 4 is supported in the Mach4 Galil plugin somewhat.  What I mean by that is that the output fires immediately when received by the plugin.  But the motion attached to it will be executed buffer depth milliseconds later.  This may not make much of a difference to you if say you had a buffer of 50 milliseconds or less.  Because 50 milliseconds is pretty much instantaneous to humans.  And 50 milliseconds probalbly isn't going to make much of a difference in a plasma application either. 

Steve

8
Allan hit the nail on the head.  All of the probes, 31, 31.1, 31.2, and 31.3 will write to those variables.  The 4 probe moves are there so that a tool setting probe can be differentiated from a surface probe, etc...

Steve

9
mc.OSIG_SPINDLEON means the spindle is moving.  And there are also mc.OSIG_SPINDLEFWD and mc.OSIG_SPINDLEREV.

The motor enable is separate.  You don't need to even look at it because the above signals will do what you want. 

Steve

10
Mach4 General Discussion / Re: hold all axis also on jog
« on: April 02, 2019, 10:48:17 PM »
 That string is a marker that is associated with the instance handle.  It is used with API function call tracing in the Mach Log.  It makes it so that you can see what called the API function. 

Steve