Hello Guest it is February 28, 2021, 01:50:48 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 - zmajmr

Pages: 1
1
Hi community, I have little problem / question.

I will give you real example , that will be G code for drilling process

N20 G21 G18 G64 G80 G90 M48 G90.1 G40 G49
N30 M08
; TOOL definition
N50 T0909
N60 G00 X0.0 Z10.0
N70 G49
N80 ( End Mill  12mm Dia )
N90 T0202
N100 G00 X0.0 Z5.0
N110 G97 S1000
N120 M04 G94 F40.0
N130 G00 Z1.0
N140 G01 Z-24.633
N150 G00 Z1.0
N160 Z-23.633
N170 G01 Z-49.267
N180 G00 Z1.0
N190 Z-48.267
N200 G01 Z-73.9
N210 G00 Z1.0
N220 M05 M09
N230 M30

Lets imagine spindle "feels" to much load at line N140 and Stop file is triggered /pressed, at line N120 there is command that sets feed at 40 mm/ min and when I resume with executing G code machine will continue with feed 40 mm/ minute (after I clean chips, press M4 manually and press Cycle start).

Now thing is when my endmill completed job of drilling hole I want to be retracted @ 300 RPM and Feed 300mm/min so I made little change in G code

N20 G21 G18 G64 G80 G90 M48 G90.1 G40 G49
N30 M08
; TOOL definition
N50 T0909
N60 G00 X0.0 Z10.0
N70 G49
N80 ( End Mill  12mm Dia )
N90 T0202
N100 G00 X0.0 Z5.0
N110 G97 S1000
N120 M04 G94 F40.0
N130 G00 Z1.0
N140 G01 Z-24.633
N150 G00 Z1.0
N160 Z-23.633
N170 G01 Z-49.267
N180 G00 Z1.0
N190 Z-48.267
N200 G01 Z-73.9
N205 S300 F300
N210 G01 Z1.0
N220 M05 M09
N230 M30

notice line N205 and N210

Now , if I activate Stop file button at line N140 as in example above and I clean chips, press manually M4 , Cycle start it is logical to me that Mach3 resume/ continue from where it stopped with executing G code with feedrate @ everything was stopped, BUT it will resume with Feed 300 mm/min.

Now I would like to know why, and is it possible to change something in order to that not be like that (edit some function, or do I write my Gcode wrong, it can be very dangerous and I become aware of that before few days ago even I use my CNC lathe for some time and I saw that something strange is going on but never succeed to define what is going on because all my programs are created with CAM and are much longer then this simple example.

I even made 10 minute video where I described what is going.

It came to my mind to try to edit post processor to generate with every G01 command Feed value , so will have redundancy , did not succeed yet with that idea so I am wondering do I do something wrong, and what is usual thing to do.

I can after every Stop of executing Gcode press Rewind button and start G code from line zero (start) but that is waste of time because usually 90 % of job is done already and I would cut air  90% of time.

Here is video

https://youtu.be/eYbE-kntcss

Thank you in advance for any help or idea, suggestions or something else  :)


2
General Mach Discussion / Spindle button and M3 and M4
« on: September 15, 2016, 03:22:44 AM »
Hi guys,

I have CNC lathe , was running some G code yesterday, then wanted to pause spindle and feed in order to remove chips from tool safely, so I pressed feed hold button and spindle button.

When I wanted to proceed with execution of my G code program I pressed spindle button and cycle start button and thing is that I found out that spindle starts to rotate in M3 or CW mode/ direction ,
thing is that in program before stop it was command to use M4 or CCW , so it never crossed my mind that if I stop spindle that it will continue to execute g code program but with wrong RPM direction.

Today I went to find what is behind spindle button and it is function for spindle CW and reset THC height.

Now question is how to make that when I want to stop execution of g code and want to remove chips in safe way to proceed with g code but with spindle rotation which is programed by G code, did not tried yet but probably I can make same button below existing one that will give command to rotate spindel in CCW dirction,

Is it possible to make that by pressing only one button, somehow to program continue with correct RPM direction?

Yesterday was wondering how from some point my boring bar was producing chips like it was to aggressive cut, and was really surprised when I figured out that stopping spindle in the middle of program was thing that made problems , not depth of cut, luckily tool was not destroyed.
Hope somebody have some example how to solve this or what is normal procedure.

This is my machine and tool whit which I had problems (I thought that cuts to deep , first it was removing 0.1 mm of material then changed to 0.05 mm and after that I was, there is something wrong here LOL)
https://www.youtube.com/watch?v=8iJwtRoWx3o

Thanks in advance :)

3
Hi folks, I was thinking how to ask this question,  as English is not my mother language , maybe like in subject of topic.

I made macro that is being triggered after RESET button is presses and it runs all the time , have while 1 (loop) and it serves me to count how many impulses z axis balscrew manage to make in order to know when to activate oil pump (every 20 meters need to be turned on for 8 seconds).
So while I am in manual mode macro runs pretty good, it counts impulses, but before few days I discovered while I spent quite amount of time in auto mode running g code, I went to check how many pulses macro/scrip did count, and after some time I realized that number of pulses did not changed from time when I was in manual mode.

So I concluded when I came in auto mode and pressed Cycle start, macro is being stopped, I did not know that will happen, I thought that macro will continue to work . So my observations that when you enter in auto mode all macros are being stopped and you are prepared for execution of g code. Got idea to try to activate macro when  spindle starts, so I went and rearrange brain that controls triggering of macro to be triggered when spindle is started and after when RESET is  pressed. My machine started to move and when it came to part of g code where spindle is turned on movement stops and time is running on in auto mode.

So I came to conclusion that I can not have situation that Mach3 executes g code parallel while my macro for controlling oil pump works also.

Maybe it looks like I confirmed how Mach3 works but I would love to confirm did I conclude good or I am not aware of all possibilities.

Before I made macro, I had plan to use Siemens LOGO PLC for counting impulses but discovered inputs are to slow, so instead to  buy PLC with fast inputs I decide to make it over Mach3 but now as it seams I will need to buy PLC with fast inputs .

Hope someone can clarify me am I concluded good how Mach3 works.

Here is macro for oil pump, I had topic where I described how I all made but if that macro can not work parallel while g code is running then all was for nothing  ;D

Sub main ()  ' logic for auto oil pump

Dim oldp,newp,n,error_m As Integer
Dim Msg

While 1

If Not IsActive(Index) Then
n=0
Else
n=1
End If

Sleep 10 ' sample input f = 100Hz

If  IsActive(Index) And n=0 Then '  before 10 ms Index was zero , count only rising edges
Open "C:\Mach3\oilpump.txt" For Input As #2
Line Input #2, oldp
newp=oldp+1
Close #2
If newp=4000 Then ' for testing purposes newp is 10 in reality it needs to be 4000 for 20 m of travel with 5 mm pitch ballscrew
ActivateSignal(Output8) 'oil pump is on output 8
error_m=1

Sleep 1000 'turn on pump for period of 8 seconds , 8 x 1000

If IsActive (Timing) Then
error_m=0
End If

Sleep 1000

If IsActive (Timing) Then
error_m=0
End If

Sleep 1000

If IsActive (Timing) Then
error_m=0
End If

Sleep 1000

If IsActive (Timing) Then
error_m=0
End If

Sleep 1000

If IsActive (Timing) Then
error_m=0
End If

Sleep 1000

If IsActive (Timing) Then
error_m=0
End If

Sleep 1000

If IsActive (Timing) Then
error_m=0
End If

Sleep 1000

If IsActive (Timing) Then
error_m=0
End If

DeActivateSignal(Output8)
newp=0

If error_m=1 Then

Msg = "Oil pump error --> check oil level "
MsgBox Msg

Else

Msg = "Lubrication was sucessful after 20 m of travel "
MsgBox Msg

End If


End If
Open "C:\Mach3\oilpump.txt" For Output As #1
Print #1,newp
Close #1

End If

Wend

End Sub                        
    

4
Hi folks, I never used brains in Mach3.

So to describe what I want to do.

I made macro that count impulses from z axis and when counted number is 4000 output need to be acitivated for 8 seconds, on output is connected relay that turns on oil pump for lubrication of bedways.

I tested macro in way that I added custom button on Mach3 screen and gave name Auto Lube. When I press Auto Lube button macro is being triggerd and inside is while 1 loop that counts rising pulses from z axis , everyting works correct (max frquency of counting impulses is 10 Hz), problem that I have is when RESET or E- stop i spressed my macro is stopped also and I need to press Auto Lube again to contine counting impulses from z axis, so it is not real Auto Lube when I need to press after every RESET start counting.

I tired to solve problem by implementing little changed code (with out while 1 loop) in     macropump    and after testing I conclude that when code for counting is used in macropump result is wrong, I save number of counted impulses in file named oilpump.txt with macro automaticaly, so if I produce 10 pulses I count 1 or 0, in conclusion it counts something but too slow so result is wrong.

So my idea how to solve that problem is to  use macro that I used over Auto Lube button but in way that over    brain I activate/trigger macro for controling oilpump.

So when from some reason RESET is presed (E-Stop) my macro will stop with counting but when I acknowledge RESET it would be good that macro for contoling oilpump contiue with counting impulses from z axis.

So that is my idea but as I said I never used brains in mach so I am wondering how to do that or if it is possible at all to do that.

Point is that counting impulses should be automaticaly (macropump does not give good results) and in worst case I can consider that counting is still in auto mode if I press acknowledge RESET.

Also I got tip to ask Machsupport is it possible to extract data from Maintenance Hours info (there exist information about total travel  for all axis, it would be good when I could acess that information, I mange to find one post where one guy is asking same question but before few years ago for same pupose as me but he nevr got puplic anwesr so I think I have slim chances with that option).

Anyway if somebody have some idea what I can try , also one friend told me maybe it is possible to configure Mach3 to count steps , I thought good idea but also did not manage to found how to use that , I connected inductive sensor on z axis and when timing pulley is rotating I can pick up pulses , evry rotation of ballscrew is one pulse, and as pitch is 5 mm evrry 4000 rising edges I can detect 20 m of travel.

Hope I described good enough what is my idea .

Will put macro that works fine so maybe somebody have some better idea or something , I do not know...

I am using Index and Timing inputs because I use CSMIO/IP-S controller and did not noticed problems, I can rung G code and sense pulses on thoes imputs with no problems.

Sub main ()
Dim oldp,newp,n,error_m As Integer
Dim Msg

oldp=0 ' when I press Autolube button on Mach3 screen counter will be set on 0

Open "C:\Mach3\oilpump.txt" For Output As #1
Print #1,oldp
Close #1
While 1

If Not IsActive(Index) Then
n=0
Else
n=1
End If

Sleep 10 ' sample input f = 100Hz

If  IsActive(Index) And n=0 Then '  before 10 ms Index was zero , count only rising edges
Open "C:\Mach3\oilpump.txt" For Input As #2
Line Input #2, oldp
newp=oldp+1
Close #2
If newp=10 Then ' for testing purposes newp is 10 in reality it needs to be 4000 for 20 m of travel with 5 mm pitch ballscrew
ActivateSignal(Output8) 'oil pump is on output 8
error_m=1

Sleep 1000 'turn on pump for period of 8 seconds , 8 x 1000

If IsActive (Timing) Then
error_m=0
End If

Sleep 1000

If IsActive (Timing) Then
error_m=0
End If

Sleep 1000

If IsActive (Timing) Then
error_m=0
End If

Sleep 1000

If IsActive (Timing) Then
error_m=0
End If

Sleep 1000

If IsActive (Timing) Then
error_m=0
End If

Sleep 1000

If IsActive (Timing) Then
error_m=0
End If

Sleep 1000

If IsActive (Timing) Then
error_m=0
End If

Sleep 1000

If IsActive (Timing) Then
error_m=0
End If

DeActivateSignal(Output8)
newp=0

If error_m=1 Then

Msg = "Oil pump error --> check oil level "
MsgBox Msg

Else

Msg = "Lubrication was sucessful after 20 m of travel "
MsgBox Msg

End If


End If
Open "C:\Mach3\oilpump.txt" For Output As #1
Print #1,newp
Close #1

End If

Wend

End Sub              

5
Hi folks.

So I want when I activate physical switch to macro be triggered/activated also, I know how to do it for one OEM Trigger Input, but when I use 2 diffrent OEM Trigger Inputs and when each input need to activate its own macro problems start.

So I embedded in existing macros that I used over Screens  this command ----->  from example that I found in manual

Example:
‘ Assume OEMTRIGGER5 is assigned to OEM code 301
‘ Assign the M1025 macro to OEM Code 301
SetTriggerMacro(1025)
‘ Now, when OEMTRIGGER5 is driven to its active level,
M1025.m1s will be executed

Also read on forum for specific requests how to use brains, macro pumps (never used anything of that , but have feeling I will...)

So is there any solution or procedure what I need to activate,write to be able to use different OEMTrigger inputs (I read thate exist 15) to activate diffrent macros, I found posts from 2009 , I do not know is anything new since then...

So picture is worth 1000 words, I want to control over foot control (just for example) opening and closing part catcher, for that I use two inputs and two macros, it only works situation one input one macro (other input do job of first input what is wrong/duplicate, so I concluded that I need to know something more...)



Any help appreciated :)
 

6
Hi,

 so I am newbie with Gcode. Was playing with post processor for Partmaster Lathe V13 and got advise from friend to try to use G49 and G43 to control my tool changer as I want.

So today I went to do some testing how G49 work, before that I surfed on net to see how it is used and what it does, it say:

To use no tool length offset, program: G49 , also found term to cancel tool offset.

So will try to explain what I did, I have tool changer with 8 tools, DIY ATC , it only rotates turret on commands T0x0x (x can be number from 1 to eight), I measured tool offsets according to my master tool and entered them in my Tool table in Mach3 , everything works correct.

Next what I did I choose tool number 1 (my master tool, and set it to show coordinates x=0, Z=0 in DRO), now I wanted to see what will happen when I enter G49 in MDI )manual data input), so I entered G49 and after that T0808, turret rotated to tool number 8 and I expected that when I read data for coordinates on DRO it will say x=0, z=0, but it was for example X=10, Z=20. Tried same experiment with G43 but nothing changed.

In general configuration I checked under Tool Change options, Auto tool changer, I also tried with Ignore tool chane but even with that option I could change tools, I enter T0101 , I get tool number 1 in its coordinate system, enter tool T0808 again I get tool 8 in offset ed coordinate system according to tool 1 (master tool).

So, what I am doing wrong if I am doing wrong and how should look G49 (what I can see on screen so I now it works good) when it is used good. I tried to search  net but I mange to find threads where they use that only for cnc mills so I am not sure why I can not find some example with use for cnc lathe and Mach3 Turn.

Any help will be appreciated,
thx :)

7
Hi folks, I have some question, so I am using Mach3 Turn in radius mode to control Emco Turn 220 P lathe with rear turret tool changer, also I bought Partmaster Lathe V13 from Dolphin USA, I had troubles to get post processor that supports peck drilling (something was wrong in existing post processors), anyway got post processor that supports peck drilling and few days I ago when I manage to make some tools that I can fit in turret (small lathe ,even smaller tools) I went to cut some test parts. So first thing is that I learned how to offsets tools (I measured values and entered them in Mach3 Tool Table and in CAM also where you make definition of your tool, seams very intuitive, I mean how will CAM know how much drill in turret should be backed off if you do not enter offset ). So to me was logical that what I see in CAM will correspond in reality. In CAM setup you can define safe place for tool cahnge operation, I chose z=8, x=30 according to inserted work piece and mounted tools in turret (1 profiling tool (master tool), center drill, drill 7.2 mm and parting off blade). So after some testing I realized that only master tool correspond to what I can see in CAM when I give command for tool change, rest of 3 tools (total tools can be eight) are "randomly" positioned in space, I do not know better word then randomly (there is some logic but I can not follow it so will use word randomly), thing is that for example I see tip of drill in CAM positioned in places (z=8, x=30 , safe place) and in reality it is somewhere out of that place so I can not plan movements where I want each tool to go, what to machine. Also in reality for given profile , machine with those 4 tools part will  machine parts but it is question will I brake some tools or will I damage spindle and chuck because paths that I see in reality can not be seen in CAM.

I also made video where I showed what is happening and described what I am trying to ask, what should I change, should I change or ask Dolphin USA to make changes , anyway in which direction need to go.

My experience with Gcode is almost zero, I manage to make macro for operating tool changer , basically, I jog tool changer some where in working area and I type T0101 , T0202... to T0808 and turret only rotates and I got chosen tool. I thought maybe I need to make in macro some movements but that did not seems logical to me me because , in CAM already exist places where you need to enter x an z offests and it is easier to use and update that information then to adjust macro every time when you machine different part.

Also I entered tool offsets to be same in Mach3 Tool Table  and in CAM because I read on forums that it should be done like that , and when I run out of ideas I tried to delete offests of all tools in CAM , I thought maybe it will work (what I see in reality will be in CAM) but nothing has changed, you can see that in video.

So first video is connected with my question and second video is rewind  so yo can see what happens in reality when you see in CAM one thing and in reality something else.

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

https://youtu.be/0JFMlsJi12I

9


Hi all, my second topic, I have question , how to change toolpath in Mach3 Turn to match toolpath from CAM software, I have Emco Turn 220P with rear turret, I was surfing on net and
can not find topic (I found questions but no one answered to question), I believe it is possible to make just need information how?

Thank you in advance  :)

10
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