Hello Guest it is April 23, 2024, 02:30:37 AM

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.


Messages - zmajmr

Pages: « 1 2 3 4 5 6 7 8 9
81
will try tomorrow in the morning, hope it will work, thank you :)

82
https://www.youtube.com/watch?v=gMtDIiEhH3g

does anybody have clue what I can try ?

83
OK first it is a BAD idea to call a macro from a macro with Code""  . Bad things can happen. There IS a way to do it check the latest manual for MACRO progamming .

If you need to switch back to Abs mode do it with  Code" G90"  I just tried it it works fine here in a turn macro.

(;-) TP

Hi , I thank you for replying , I tired first without calling macro in macro , but when I run out of ideas I tried to in macro call macro like in picture just so I can verify/determine what is going on, does G90 have any influence.

I made new movie so you can see what is going on
https://www.youtube.com/watch?v=gMtDIiEhH3g

here is code of

m111

Code " G90 "

Code "G91G01 Y9 F40"
While isMoving()
If (IsActive(Input1)) Then
DoOEMButton(1003)
    Code " G90 "          
End If
Wend


I tried like this too

Code " G90 "

Code "G91G01 Y9 F40"
While isMoving()
If (IsActive(Input1)) Then
DoOEMButton(1003)
            
End If
Wend
Code " G90 "


But does not help


And here is code for tool change (I need to solve problem with G91 to G90 switching there too, but I guess if some one help me to solve problem in m111 I will know how to change by myself.


This is M6Start.m1s
Code " G90 "

 Message "Previous tool was " &GetCurrentTool ()
 
 OldTool= GetCurrentTool ()

NewTool = GetSelectedTool ()

SetCurrentTool (NewTool)  

a=GetSelectedTool - OldTool

 If (a = 1) Or (a = -7) Then
 Code "G91G01 Y1.251 F200"
 Code "G91G01 Y-0.201 F10"
  While IsMoving()
  Wend

 End If
 
 If (a = 2)  Or (a = -6) Then
 Code "G91G01 Y2.301 F200"
 Code "G91G01 Y -0.201 F10"
  While IsMoving()
  Wend
 
 End If

 
 If (a =3)  Or (a = -5) Then
 Code "G91G01 Y3.351 F200"
 Code "G91G01 Y -0.201 F10"
  While IsMoving()
  Wend
 
 End If
 
 
If (a =4) Or (a = -4) Then
Code "G91G01 Y4.401 F200"
Code "G91G01 Y -0.201 F10"
 While IsMoving()
 Wend
 
 End If
 
 
 If (a =5)  Or (a = -3) Then
 Code "G91G01 Y5.451 F200"
 Code "G91G01 Y -0.201 F10"
  While IsMoving()
  Wend

84
General Mach Discussion / Problem with G91 and G90 in macro - tool changer
« on: November 06, 2015, 01:06:08 PM »
Hello everybody, my first post on forum.

I have problem, I am using Mach3 Turn for controlling Emco Turn 220 P.

I made macro for operating tool changer (with 8 tools), lathe have x and z axis and my motion controller have y axis also. I am using y axis for operating tool changer. Now problematic part

because of nature of design of turret it can only rotate it in one direction so after surfing on net I decided to operate turret by moving y axis in incremental distance more or G91.

Thing is that I want after positioning of turret is done , to get back in absolute mode or G90, and that I can not accomplish no matter what I try. In macro after turret is rotated for necessary amount I use command for activation of absolute distance mode , why, because I expect that  when I return in "main program" there should be activated G90 but it is not, I need to do it manually by typing in MDI g90, otherwise I can not activate go to home position plus some bad things happened ( I get notification that home position is not possible in incremental mode).

Other interesting thing that surprised me is that when I wrote in macro 2 commands , first for incremental movement and second for absolute movement , will happen that first will be executed part connected with absolute movement and then part with incremental movement.

From my experience till now with writing macros I learned that commands executed from top to bottom, this prove me wrong .





On those 2 pictures is my attempt to diagnose how macros work or why after my command Code "G90" there is not change when macro is executed , I mean it stay in incremental mode in main program / screen in Mach3 Turn.

So when I call m112 first what happens is: execution of movment on Z axis and after that execution m111 where in incremental mode my turret is being rotated until sensor is triggered.

I will even put videos of my work on turret so if somebody is interested he can see what I made

https://www.youtube.com/watch?v=lnsvv0NGVvI

https://www.youtube.com/watch?v=rC6nnl6bApo

So main main problem is what to write in macro where is incremental mode used ( G91) so when I go back to main program I am again in absolute distance mode ( G90).

Hope I described my problem detailed enough, if somebody have any questions will try to help to explain non understandable things.
 :)
 

Pages: « 1 2 3 4 5 6 7 8 9