Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: zeeschuim on February 24, 2016, 01:06:28 PM
-
I am busy with a wizzard.
I have a code what add some values to find a Y position.
If GetUserLED(1071) Then
Code"G00 Z"& SafeZ &"X0 Y" & een + ZgD + twee + ZgD + drie + ZgD + vier + ZgD + vijf + ZgD + zes + ZgD + zeven + ZgD + acht
I want to make a messagebox what will tell me when the sum off the values exceed the machine boundry in the Y axe.
Is this possible and how?
-
This will ONLY work if you have properly referenced your machine so it know exactly where it is. AND you have properly setup Softlimits as the Max table distances it can Move +/-.
GetOemDro(151) will retreive teh Y softMax distance of the table. So then you simply compare the calculated Move value that you have to the Ysoftmax value. If teh move exceeds the YsoftMax Value then it is an Error.
(;-0 TP
-
So it will be something like this?
If GetOemDro(151)<1750 Then
Code "(MSG,te groot voor de tafel!)"
End If
-
I don't have any idea what teh message said but you need to develop a stop mechanism IF the answer said it failed.
If GetOemDro(151)<1750 Then
MsgBox ("MSG,te groot voor de tafel!")
Dobutton(3) ' Cancel the Gcode program if loaded
End ' End the script
ELSE
Do what ever
End If