Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 11:14:16 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  VB in Mach3 version 3.043.036?
Pages: 1   Go Down
Print
Author Topic: VB in Mach3 version 3.043.036?  (Read 687 times)
0 Members and 2 Guests are viewing this topic.
Tony Bullard
Active Member

Offline Offline

Posts: 83


View Profile
« on: June 12, 2011, 03:04:03 PM »

In the Change Log (May 2-2011) a lot of VB script changes were made. "Lots opf VB tools added for managing scripts (Check VB doc for added calls)". Is the VB doc in reference the "VBScript Command Reference" file in the Download Documents? Is Poppa Bear's doc "UPDATE to Mach Specific VB routines:" completely compatible with this change? I can't seem to get his "CodeSingle()" to work.

Thanks for any help.
Tony
Logged
DaveCVI
V4 Screen Contributor

Offline Offline

Posts: 532



View Profile WWW
« Reply #1 on: June 13, 2011, 02:02:05 AM »

Tony,
Alas, the mach release notes tend to be a bit "minimal"  Sad
the entry for 3.43.36 on may/2 just says "lots of VB tools added"... this single entry attempts to cover close to a years development and dev release time. I happen to know this as I tracked the releases and the development of the "lots of VB tools" while developing MachStdMill during that period. The programmers ref manual is the best source of info re the "new" calls (almost all of which were added to the mach 3.43.xx series). As they were added, I included them in the programmers ref manual - the newer features will say "first added in mach version xx.yy.zz".

The latest programmer ref manual is pretty good wrt to being up to date on the available calls - it covers thru 3.43.37. A couple of things for turn were just added in 3.43.38 that I have not put into the doc yet.  Why am I updating the doc? 
Well, I ship the ref doc with MachStdMill (with ArtSoft's permission) and I strongly believe in proving good docs... also I do it because I can, and no one else seems to want to. I try to keep it up to date and send revisions to Brian as they are made - the idea is that he can post the updated pdf on the machsupport site.

I just looked and noticed that the doc on machsupport site doc is out of date - so attached is the latest rev I have.

Re your specific questions:
1) the PoppBear list was crossed checked against the ref manual about a month ago and I think that all the things on that list (which really work) are in the ref manual. If anyone knows of a discrepancy we can fix it.

2) CodeSingle never got implemented.
Assume that when you hand gcode to mach that it gets inserted into the gcode queue - and then mach returns to you before the code is done executing (IMHO a PITA, but mach is what it is).

To handle this I use the utility routines below -

Code:

Sub CodeQ(ByVal CodeString As String)
' QUEUE Up Code for Execution
  ' this function takes the passed g-code string and give it to Mach to be put
' into the Gcode queue for execution
'
'This routine does NOT wait for the code to be executed before returning to the caller

Code(CodeString)
Exit Sub
End Sub

Sub CodeQW(ByVal CodeString As String)
' QUEUE Up Code AND Wait for Execution to Complete
  ' this function takes the passed g-code string and give it to Mach to be put
' into the Gcode queue for execution
'
'This routine WAITS for all motion to stop before returning to the caller
Code(CodeString)
MotionWait(100)
Exit Sub
End Sub

Sub MotionWait(ByVal SVal)
' Wait for movement to complete
While IsMoving()
Sleep SVal
Wend
Exit Function
End Sub

Dave

* Mach3 V3 Programmer Reference.pdf (655.11 KB - downloaded 128 times.)
Logged

Author of the MachStdMill Extensions for Mach3
www.CalypsoVentures.com
Tony Bullard
Active Member

Offline Offline

Posts: 83


View Profile
« Reply #2 on: June 13, 2011, 06:48:03 AM »

Thanks Dave, I'm impressed with how well you answered my questions. You've done a great job with the Programmer's Reference too. The old one I had was from 8-22-2010. I've copied you sub to handle the "wait" problem. pretty clever.

Keep up the good work.

Tony
Logged
DaveCVI
V4 Screen Contributor

Offline Offline

Posts: 532



View Profile WWW
« Reply #3 on: June 13, 2011, 09:32:37 AM »

Tony,
thanks for the kind words, but I can't take all the credit for the manual. Ray Livingston did the first version of the new manual, I just added the newer calls as they came along.
Dave
Logged

Author of the MachStdMill Extensions for Mach3
www.CalypsoVentures.com
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!