Hello Guest it is October 03, 2023, 04:30:02 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 - rhtuttle

Tangent Corner / Re: Tight on space.
« on: April 24, 2018, 10:48:57 AM »
Reminds me of a friend of mine who loved his wife 'pumpkin' very much but every time he would look for a tool and couldn't find it he would blame pumpkin.  I asked him how it could be her fault and he replied, 'if she wasn't around everything would be on the dining room table where I could find it.'


Mach4 General Discussion / Zero Brane - bryannab
« on: April 24, 2018, 10:42:37 AM »

How about a video on how to use Zero Brane to debug macros, screen scripts and modules?  Breakpoints, debug servers...



any lua/dll module/library that is located in the 'modules' directory that conforms to lua 5.2 can be loaded at run load time, see the screen load script:

--Master module
package.loaded.MasterModule = nil
mm = require "mcMasterModule"
--Probing module
package.loaded.Probing = nil
prb = require "mcProbing"
--mc.mcCntlSetLastError(inst, "Probe Version " .. prb.Version());

If the module extension is different than .lua then change your load path to search for that as well.

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

LuaJIT is a compiler.  Mach4 runs it's own compiler to compile all lua, mcs files at each load and I don't believe you can just include the compiled module in the modules directory, but then again I haven't tried.  Good question though.

I'm not sure if the sci modules are 5.2 compatible.



Mach4 General Discussion / Re: mcCntrlGcodeExecuteWait fail
« on: April 23, 2018, 12:31:51 PM »
When I first started coding with Mach4 I put everything in the button mouse up script.  I generated a line of gCode and then ran mcCntlGcodeExecuteWait for each line.  I was told that was wrong that I needed to generate a string consisting of lines of gcode separated by newline characters.  Which I did.  I then started getting a huge amount of code included in the screen button scripts so I created a module to reduce the amount within the screens.  I then thought I should just write macros that called the module's functions and create the string.  That's when I ran into this 'new' limitation that nobody seems to know the answer to (lua defaults to 4096 characters for a string which this example doesn't exceed).  No one knows if this is due to a look ahead problem or a line limit with mcCntlGcodeExecuteWait.

So I thought that I would just run the macro to generate and save it as gcode file, load and run it.  No can do.  Can't load a gcode file while running a macro (error: not now).

So I am back to button scripts that generate the gcode file, save, load and start it.


Mach4 General Discussion / Re: mcCntrlGcodeExecuteWait fail
« on: April 09, 2018, 10:18:18 PM »
All of them have a \n

Mach4 General Discussion / mcCntrlGcodeExecuteWait fail
« on: April 09, 2018, 01:19:25 PM »
I have a macro that generates a string of gcode listed below.  If I pass that string to mc.mcCntlGcodeExecuteWait(inst,s) it executes to the x1.320 then skips the rest of the gcode in the string and executes the remaining macro code after the mc.mcCntlGcodeExecuteWait(inst,s). Is there a limitation as to how many characters/commands that can be included and executed in a string with executeWait?  This code executes as a gcode file so I know it is not the code.

Code: [Select]
m3 s1400
g1 x1.5800 f1.000
g1 z0.0000 f12.000
g1 x1.5600 f1.000
g1 z0.2000 f12.000
g1 x1.5400 f1.000
g1 z0.0000 f12.000
g1 x1.5200 f1.000
g1 z0.2000 f12.000
g1 x1.5000 f1.000
g1 z0.0000 f12.000
g1 x1.4800 f1.000
g1 z0.2000 f12.000
g1 x1.4600 f1.000
g1 z0.0000 f12.000
g1 x1.4400 f1.000
g1 z0.2000 f12.000
g1 x1.4200 f1.000
g1 z0.0000 f12.000
g1 x1.4000 f1.000
g1 z0.2000 f12.000
g1 x1.3800 f1.000
g1 z0.0000 f12.000
g1 x1.3600 f1.000
g1 z0.2000 f12.000
g1 x1.3400 f1.000
g1 z0.0000 f12.000
g1 x1.3200 f1.000  (executes up to and including this line)
g1 z0.2000 f12.000
g1 x1.3000 f1.000
g1 z0.0000 f12.000
g1 x1.2800 f1.000
g1 z0.2000 f12.000
g1 x1.2600 f1.000
g1 z0.0000 f12.000
g1 x1.2400 f1.000
g1 z0.2000 f12.000
g1 x1.2200 f1.000
g1 z0.0000 f12.000
g1 x1.2000 f1.000
g1 z0.2000 f12.000



While manual editing of the output works you can eliminate this by selecting the in-feed option every time.  While the GUI shows something as being selected, like 'Flank In-Feed, Constant Depth', it will always output a k=0 value unless you re-select an option each time.

Just one of many flaws in the turn cycles wizard.

I think this may be time to open a ticket with NFS to determine if it Mach or motion control related.  sorry I can't help more.



Mach4 Plugins / Re: unPlugin V1.0.0
« on: April 09, 2018, 10:53:31 AM »
mc.mcRegGethandle(inst, "unPlugin/GuiCommand")

mc.mcRegGetHandle(inst, "unPlugin/GuiCommand")

I'm surprised that the threading code ran at all.  the N0085 G76 contains a k value of zero which is not valid.  Are you running hobby or industrial?

G-Code, CAD, and CAM discussions / Re: Conditional programming
« on: March 20, 2018, 10:37:28 PM »
M98 calls a subroutine not a tap/gcode file.  The subroutine is defined after.the main gcode(m30) and starts with the letter o followed by the same numbers that follow the p parameter in the m98 call.