Hello Guest it is April 19, 2024, 07:01:11 PM

Author Topic: message if the Y distance is to big  (Read 2414 times)

0 Members and 1 Guest are viewing this topic.

message if the Y distance is to big
« 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.
Code: [Select]
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?

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: message if the Y distance is to big
« Reply #1 on: February 24, 2016, 01:56:46 PM »
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

Re: message if the Y distance is to big
« Reply #2 on: February 25, 2016, 12:46:56 AM »
So it will be something like this?
Code: [Select]
If GetOemDro(151)<1750 Then
Code "(MSG,te groot voor de tafel!)"
End If

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: message if the Y distance is to big
« Reply #3 on: February 25, 2016, 02:14:06 PM »
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