29
« on: April 02, 2014, 08:42:32 PM »
Hello all,
I have been using mach3 to run my lathe for 5 or 6 years now and love it. I use the turn wizards provided and find them excellent.
Recently I decided to learn how to develop my own wizards. I have set up screens in machscreen and all looks good.
I could use a bit of help with the (post GCODE) vb.
I have referenced some of the turn wizard code to learn. I get the OEM DROs, the various math involved, the initial coding to setup the script, etc.
Where I get stuck is a few things,
1.) The Pass_Num. I guess this is "the pass number used for calculating how many passes there would be in an operation?" I see it as Pass_Num = 1 Then see it in the math coding,,,, (Xstart - Xend * Pass_Num) etc.
2.) The "Openteachfile" Can I type any name I want here, or does a file have to exist somewhere for it to reference?
Example of a simple wizard.
I have user input DROs as
ZSTART - start
ZEND - end
ZINC - increment
ZDwell - dwell time between movements
I want the user to be able to enter the ZSTART, ZEND and an increment to move along the way, (ZINC) along with a dwell time between each movement.
ZSTART = 0
ZEND = 1 meter
ZINC = .1 meter
ZDwell = 5 sec
Z would move from zero to 0.1, dwell for 5 sec, then move to 0.2, dwell, etc...
How would I write this simple code?
Thanks all for any help !!
Steve