|
501
|
Mach Discussion / VB and the development of wizards / Re: Tool changer routine with hot swap
|
on: March 21, 2008, 06:39:41 PM
|
|
Your big problem is going to be keeping the values between changes. Remember, every time VB runs a button or a macro it starts a NEW VB process. So anything you stored in an array the last time a tool changed is lost, VB starts a new array.
You could define a series of Mach DROs, one for each tool pocket. Then any time your code runs it looks at each DRO to find the one holding the tool number it wants, then it sets that DRO to the number of the tool its about to put in that pocket.
DROs and LEDs are maintained by mach for each screenset. The macros will see the DROs that belong to the current screen when they run. Watch out for weird things happening if you should run one of those macros from a wizard screen! Also an issue when a macropump is running, it shares its DROs and KEDs with the current screen, so running a wizard or screenset that is not coordinated with the macropump is also risky.
I have been beating on Brian to fix this so there would be one Vb context started up every time a screen loads, then every button call would simply be a subroutine call in that context. He agrees its a worthy change, but it looks like a major change. I will keep pressing him.
ron ginger
|
|
|
|
|
502
|
Mach Discussion / VB and the development of wizards / Re: Reentrant code
|
on: March 03, 2008, 12:43:03 PM
|
|
Dont blame Cypress. The problem is in the way Art linked VBA into mach. I dont know all the details, but I have had several long talks with Brian about it, and he has been studying the Cypress docs and the code and he thinks there is hope we can get a full VBA implementation in mach. He has also looked at using the CYpress option to pre-complie the code, so we can have faster and more reliable operation. Most importantly, we may have a single VB context for each screenset- therefore could use subs across buttons, common declares, etc.
It will be a while before he gets it done, but I know he is very actively looking into how to fix the whole VB interconnection to mach.
|
|
|
|
|
503
|
Mach Discussion / Finished Screens / Re: Quick Threads Wizards
|
on: February 26, 2008, 09:20:20 PM
|
|
I wish I had a buck for every time that problem has appeared here. After you enter a value you must press the ENTER key, if you click into another box mach assume you really didnt mean to change the value.
|
|
|
|
|
504
|
Mach Discussion / VB and the development of wizards / Re: Macro code problems
|
on: February 26, 2008, 04:46:38 PM
|
I haven't surrounded my code with Sub Main...End Sub: Main as I can see no need to unless I want to exit prematurely.
I have seen very strange things happen in VB when you dont make a sub. Some functions fail to execute outside a sub. I now make all button scripts to be a sub, with the last line a call to sub main. It has solved several strange problems. I cannot explain why, I just know it works.
|
|
|
|
|
507
|
Mach Discussion / Screen designer tips and tutorials / G code window
|
on: February 20, 2008, 06:14:23 PM
|
|
What determines the properties of the g code window? I just did a new lathe screen and the code window has some very strange colors- like a deep blue background. There are no choices to set when you create the screen, and the only color choices in the config menu seem to be for the tool path window.
|
|
|
|
|
508
|
Third party software and hardware support forums. / Newfangled Solutions Mach3 Wizards / Re: NFW addition
|
on: February 16, 2008, 10:26:38 PM
|
There are several levels to that answer. Write was done by a user and essentially made public. To incorporate it into a commercial package wouldnt be quite legitimate. Of course a capability like write could be added to the NFW set, but its a big project and to my view the NFW set is already to big. Brian is working on a much improved implementation of VB, and if that pans out then it might be much more practical to do this. Many years ago I wrote a conversational packge, a lot like Acurites MilPower, all done in VB, and it had a neat text function. It would be nice to bring that into Mach. see http://plsntcov.8m.com/CNH.htm
|
|
|
|
|
509
|
Mach Discussion / Works in progress / Re: Screen with soft keys?
|
on: February 16, 2008, 08:43:01 PM
|
|
yeah, I watched many videos, and even talked to Jason on skype. I end up still missing something. Mostly I just havent spent the time to get through it all. Im also trying to use Sothink, since Im to cheap to buy real flash.
|
|
|
|
|
510
|
Mach Discussion / Works in progress / Re: Screen with soft keys?
|
on: February 15, 2008, 08:42:21 PM
|
|
Someday I really want to learn this Flash stuff. For now Ill get this job done with screen4 and VB. DROs do respond to a hot key so if I arrange them so they line up with a button I can give the DRO focus and simply type in numbers.
I think we need to push for a good flash session at the CNC workshop- likely a days worth or more.
|
|
|
|
|
|