Hello Guest it is June 05, 2024, 11:40: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.


Messages - dbt3000files

Pages: « 1 2 3 4 5 6 7 »
41
Mach4 General Discussion / Re: configure menu greyed out!
« on: July 30, 2018, 04:02:49 PM »
Yes!! It worked! Thanks Brianna, and thanks Craig for the suggestions!!

-David

42
Mach4 General Discussion / Re: configure menu greyed out!
« on: July 30, 2018, 12:03:17 PM »
Hey, thanks for the reply. 
Yes, the screensets are in good order. The real problem is that the menu bar is behaving as if Mach4 is enabled when it is not. It seems that the inability to edit the screen is just a result of that problem.

43
Mach4 General Discussion / configure menu greyed out!
« on: July 28, 2018, 01:13:37 PM »
I turned on the computer this morning and the configure menu and the edit screen options in Mach4 are greyed out.  Normally as long as Mach4 is not enabled, I am able to access these. Everything else seems to work fine, but I can't make any changes to anything. It is as if Mach4 thinks that it is enabled when it is not.  I have tried opening it without anything plugged into the computer (ess) and I get the same results.
Anybody have any ideas??!!
Thanks

44
Mach4 General Discussion / Re: Ideas for running conditional programs
« on: June 05, 2018, 11:38:15 AM »
Looks like this is not the hot topic I was hoping for  :)

Just in case this helps anyone, I thought I'd share my solution to the problem.

You can't restart or reload g code through a macro because Mach4 won't let you.  This makes sense, however you can put a macro at the beginning of any g code that either allows it to run or stops it.  This can be based on a counter, such as one you might store in the regfile. Then all you need is a g code program that loops indefinitely. You can loop the whole program by putting it in a subroutine and then calling an m99 at the end. This will loop until your macro stops it.  

Here's where it gets really trashy.  You can call an M99 from within a macro. For example:
local gcode = ""   
gcode = gcode .. ("m99\n")            
mc.mcCntlGcodeExecute(inst, gcode)
This will restart the entire program.  This gives you the ability to decide how many times to run a program, and also call a macro that under a given set of circumstances will start the program from the top. Because you have the macro at the beginning of the program to stop it once the counter has reached its limit, the program can restart itself as many times as necessary without running more times than you intended.

I'm not completely sure why this works. Maybe it has something to do with the g code compiler not being able to look ahead and see the M99 in your macro?

If anyone has any better solutions, or opinions on whether this workaround is really as unwholesome as it seems, I'd love to hear from you!!





45
Mach4 General Discussion / Re: soft limits and the tailstock
« on: May 25, 2018, 02:55:16 PM »
Looks like mcAxisSetSoftlimitMax and mcAxisSetSoftlimitMin will work for what you are trying to do. You can find all of the soft limit functions in the API Help contents in the Lua editor.
Not sure exactly what you are trying to do, but you could create a button with the screen editor that gets whatever info you need and uses it to update the soft limit settings.

Hope that helps!

46
Mach4 General Discussion / Re: Mach4 Function Primer
« on: May 24, 2018, 11:47:02 AM »
Some helpful things for me getting started:
Make sure you are using a registered copy of Mach4 to test your scripts!! I don't know why but weird things happen with an unregistered copy. Maybe someone out there knows why.

Link to wxlua homepage
http://wxlua.sourceforge.net/

using wxmessagebox is an easier way of getting some feedback from your code than running messages through the error box: wx.wxmessagebox("hello world") or wx.wxmessagebox(tostring(some_variable))

hope that helps!

47
Mach4 General Discussion / Ideas for running conditional programs
« on: May 23, 2018, 10:13:08 PM »
Hi everybody. I am working on writing a program for reloading a part in a machine in the case of an error.

I'll just give a little background info so this makes sense. I am making parts with bamboo as the raw material and a pick and place system that loads the bamboo.  Because the bamboo shape and size is extremely variable, it is impossible to avoid the occasional loss of a part from the fixture while it is being machined.

The obvious solution to me is to create a macro that does a quick diagnostic check, loads another piece, and starts the program again.  The tricky part, is that I'd like to control how many pieces are being machined. If there is a loss at 50 out of 100 pieces, the macro will restart the program and I'll end up with 50 more pieces than I intended.
I have thought about doing the entire program inside of a macro, but that doesn't seem like a very elegant solution.

I'd love to hear anyone's advice about this subject and hopefully it will be of some help to others.

David

48
Mach4 General Discussion / Re: editing feed and speed wizard?
« on: May 04, 2018, 05:14:05 PM »
Ok, cool, that makes sense. Thanks for your help with that!

I found a good example of using tabs with LUA using the wxnotebook widget here: https://github.com/LuaDist/wxlua/blob/master/samples/choices.wx.lua

That's basically what I was looking for and hopefully it will be of help to someone.


49
Mach4 General Discussion / editing feed and speed wizard?
« on: April 30, 2018, 03:11:02 PM »
I would like to get into the lua code for the speed and feed wizard so I can see how the tabs and tables are laid out, but when I open it in the Lua editor, all I see is one bit of code:

EscLuaR.

Does anyone know how to see the code for this file?
Thanks,
David

50
Mach4 General Discussion / Re: macro for Reference All Axes
« on: February 08, 2018, 03:20:23 PM »
Thanks Craig for the explanation! That seems to make sense.  If I'm hearing you correctly it seems like trying to automate homing operations with Mach4 is maybe not a good idea in the first place.

Maybe you or someone out there would have some advice for me.  I am using hardstop homing (no limit switches) and I written a routine that homes the machine and then checks to make sure all of the axes have been referenced.  I would like for anyone running the machine to be able to home it without manually hitting the ref all home button. (This way no-one can accidentally hit the button when the machine has not actually been homed.)  Maybe this is just not in the cards for Mach4, but I'd really appreciate any ideas anyone has.
Sorry if I'm beating a dead horse, but it sure would be nice to have something like a g28.1 work for Mach4.

David

Pages: « 1 2 3 4 5 6 7 »