Hello Guest it is April 24, 2024, 07:27:32 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 - eyalyossef

Pages: 1
1
Hello .
This program should perform testing of the limits of drawing, and record them in a file.
the program works well only from the editor.

Xmax= GetOEMDRO (10)
Ymax= GetOEMDRO (11)
message "X"&Xmax &"Y"&ymax
XYposition="X"&Xmax &"Y"&ymax
sleep (100)
code "g90 G00 "& XYposition
While Ismoving()
Wend
sleep (500)
code "g90 G00x0y0 "
While Ismoving()
Wend

Open "c:\XYposition.txt" For Output As #1
Write #1,XYposition
sleep (100)
Close #1
'End

2
VB and the development of wizards / macro problem
« on: May 03, 2009, 11:52:42 AM »
Hello .
This program was written in vb , I want to run the program on macro from the Gcode.
the mach3 editor ,does not get it .
I really thanked those who could help repair program.






Function FindIntersection(px11 As Single, py11 As Single, px12 As Single, py12 As Single, px21 As Single, py21 As Single, px22 As Single, py22 As Single) As String
Dim dx1 As Single
Dim dy1 As Single
Dim dx2 As Single
Dim dy2 As Single
Dim t1 As Single
Dim t2 As Single
Dim nUl As Single

On Error GoTo err


   
   
    dx1 = px12 - px11                 ' calulates dx,dy for each point
    dy1 = py12 - py11
    dx2 = px22 - px21
    dy2 = py22 - py21

    nUl = (dy1 * dx2 - dx1 * dy2)
    t1 = ((px11 - px21) * dy2 + (py21 - py11) * dx2) / nUl
    t2 = ((px21 - px11) * dy1 + (py11 - py21) * dx1) / -nUl

    nInter_x = px11 + dx1 * t1    'X point
    nInter_y = py11 + dy1 * t1    'Y point
   
 
    FindIntersection = Round(inter_x, 2) & "," & Round(inter_y, 2)
err:
    If err.Number = 11 Then Label1.Caption = "parallel lines"
       
End Function

Pages: 1