Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: swanner on September 29, 2011, 01:31:06 AM
-
I have my router setup to measure tools from a fixed switch. I'm trying to modify it to where it touches twice, compares the values, and let's me know if it's out more than .002 off, then I want a message box to pop up with the difference in it. I'm getting a syntax error, probably something simple...
-
Not great at VB but think most of the syntax errors are because you have = > where likely it should just be > with no =
Also you have miissed out " at the end of the following
MsgBox("Check switch - " & Zpos - ZposC & "measurement error)
Should be
MsgBox("Check switch - " & Zpos - ZposC & "measurement error")
Then there is the CodeSingle, dont know what that is but Mach is not happy so presume it should just be Code rather than CodeSingle
I think you will likely have to put
While IsMoving()
Wend
after each movement command also.
Hood
-
For "greater than or equal to" the correct syntax is
">="
not
"= >"
-
Also has CodeSingle been released yet?
You also missed a couple of closing " around a statement or two.
(;-) TP
-
Thanks guys! Works great now. The 'CodeSingle'...that's just the way the software came setup. I'm running an Industry Control MCB-1 and it uses a modified version of Mach, under the version it says R4.000.000 Test...anyway, I've attached the finished file with corrections if anyone else is interested in it.
-
YEP that won't run on a standard Mach ver.
(;-) TP