Hello Guest it is April 25, 2024, 05:18: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.


Topics - GTFreeFlyer

Pages: 1
1
VB and the development of wizards / Ref All Axes - All at same time?
« on: October 17, 2014, 02:46:30 PM »
When I turn my machine on, the first thing I do is reference all the axes as I'm sure most people do.  Is it possible to modify the code so all axis move at same time, rather than z, y, then x?  I always move my spindle to a position that won't cause a crash before I hit the Ref All button.  Anything to save time!  I'm not sure if its possible to have all 3 axes operate simultaneously while monitoring the limit switches.

Example:  After hitting the Ref All button, all three axes start moving towards the limit switches.  As soon as one hits, it backs off the switch as usual, but the other two axes keep on moving and independently monitoring their limit positions.  Maybe it would be easier to have each axis stop as soon as it hits the switch, while the others keep on moving until all three are at their limits, and then each could back off independently (or at same time)?  I like the first option the best, but am just not too good at writing code, unless it is g-code :)  

I would further modify it to do a 2nd touch and a much slower feed rate for a little better accuracy.   Right now my machine coordinate (0,0,0) position slightly changes each time I do a Ref All.  I'm aware this is because of the poor quality and repeatability of my limit switches, but still this is extremely annoying because it forces me to complete a whole job in one session on the machine for fear of losing my WCS origin.  I think I'll get better results with a 2nd touch of the limit switches at a slower feed rate.

Thanks in advance for the help!

2
VB and the development of wizards / Scripter compile error in
« on: January 15, 2014, 07:06:39 PM »
I'm making my own wizard with Machscreen and have run into the following problem.

When clicking on the "POST CODE" button, nothing happens, and then when clicking on the "EXIT" button, I get back into Mach 3 (the latest version) and I get the message "Scripter compiler error: In"

The VB code assigned to my "POST CODE" button is very simple and I get no syntax errors.  It starts and ends just like all the other wizards...
Sub Main()
DoOEMButton (169)
OpenTeachFile "example.tap"
...
...
...
CloseTeachFile
call LoadTeachFile()
End Sub
Main

All the lines in between are mostly:  Code "example yada yada yada"

There are a few if/then statements which decide which "code" line to print to the file, but that's pretty much it.  All of the calculations are done in the g-code itself using #*********x variables, rather than in the VBscript. This makes for easy tweaking of the gcode file without redoing the wizard.

Why the compile error?

Pages: 1