587,568 active members*
3,157 visitors online*
Register for free
Login
Page 10 of 19 89101112
Results 181 to 200 of 371
  1. #181
    Join Date
    Oct 2012
    Posts
    393

    Re: Emco Turn 220 P

    I found video in which guy is talking about offsets

    https://youtu.be/Xyjg6k-NWaQ?t=11m8s

    So there is difference between cnc lathe and cnc mill wise g code commands

    Manage to re edit my macro for tool changer, now when I enter T0909 is has same effect as G49 (I activate coordinate system of master tool or in other words coordinate system with no offsets), problem was to make that turret does not rotate on T0909 and that for upcoming tool command I can get same tool in reality as in mach3. So in mach3 turn tool table tool 9 have zero as value for x and z offset , same as my tool 1 which is master tool.

    Also found new errors in post processor and after few days of analyzing existing post processors for other controllers (Siemens ...) I mange to found on which place I need to make changes to post processor outputs g code according to options chosen in CAM interface.

    So , about macro for my tool changer, after lot of experimenting I conclude that only possibility is to save permanently information that I get about tool number, is to save them in file, off course that was idea but I did not know how to do that, so luckily I mange to find site on which I found example with using file , how to create it and how to read from it Mach3_VB

    Now how macro for tool changer is written I need first to initialize it with executing this part of g code (I assigned it to button in mach as initialize ATC):

    CurrentFeedrate = GetOemDRO(818)
    Code"G90 G94"

    Code "G91G01 Y1.251 F200"
    While IsMoving()
    sleep(50)
    Wend
    Code "G91G01 Y-0.201 F20"
    While IsMoving()
    sleep(50)
    Wend

    Code " G90 "
    Code "F" & CurrentFeedrate

    And after that I need to select tool number 1 , probably it looks complicated but I can live with that for know




    And this is m6start macro:
    Sub main ()
    Dim OldTool,NewTool,a,b As Integer


    CurrentFeedrate = GetOemDRO(818)
    Code"G90 G94"

    Message "OldTool NewTool " &GetCurrentTool () &GetSelectedTool ()



    OldTool=GetCurrentTool()
    NewTool=GetSelectedTool()
    SetCurrentTool(NewTool)



    If NewTool=9 Then
    a=0
    Open "C:\Mach3\myFile.txt" For Output As #1
    b=OldTool
    Print #1, b
    Close #1
    End If

    If NewTool <9 And OldTool =0 Then
    a=0
    End If

    If NewTool <9 And OldTool <9 And OldTool >0 Then
    a=NewTool - OldTool
    End If

    If NewTool <9 And OldTool =9 Then
    Open "C:\Mach3\myFile.txt" For Input As #2
    Line Input #2, b
    a=NewTool-b
    End If

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

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

    If (a =3) Or (a = -5) Then
    Code "G91G01 Y3.351 F200"
    While IsMoving()
    sleep(50)
    Wend
    Code "G91G01 Y -0.201 F20"
    While IsMoving()
    sleep(50)
    Wend
    End If

    If (a =4) Or (a = -4) Then
    Code "G91G01 Y4.401 F200"
    While IsMoving()
    sleep(50)
    Wend
    Code "G91G01 Y -0.201 F20"
    While IsMoving()
    sleep(50)
    Wend
    End If

    If (a =5) Or (a = -3) Then
    Code "G91G01 Y5.451 F200"
    While IsMoving()
    sleep(50)
    Wend
    Code "G91G01 Y -0.201 F20"
    While IsMoving()
    sleep(50)
    Wend
    End If

    If (a =6) Or (a = -2) Then
    Code "G91G01 Y6.501 F200"
    While IsMoving()
    sleep(50)
    Wend
    Code "G91G01 Y -0.201 F20"
    While IsMoving()
    sleep(50)
    Wend
    End If

    If (a =7) Or (a = -1) Then
    Code "G91G01 Y7.551 F200"
    While IsMoving()
    sleep(50)
    Wend
    Code "G91G01 Y -0.201 F20"
    While IsMoving()
    sleep(50)
    Wend
    End If

    Code " G90 "
    Code "F" & CurrentFeedrate
    End Sub

  2. #182
    Join Date
    Oct 2012
    Posts
    393

  3. #183
    Join Date
    Oct 2012
    Posts
    393

    Re: Emco Turn 220 P

    Here is update and question in case somebody knows.

    I have Vogel lubrication pump (for pumping oil under pressure under sliding parts of machine,) in manual it say every 20 m of travel pump is activated for 8 seconds. Now question is connected with this, on pump is mounted pressure switch (when pressure of oil have same defined value inside that "object" contacts in "pressure switch" are closed and :

    A) pump should stop with pumping even it did not pass 8 seconds (it passed let say 6 seconds) ???

    B) pump should pump after pressure switch changed contacts from open to close and from that moment it should pump 8 seconds ???

    By experimenting I came to conclusion that pressure switch change contacts from open to close approximately after 6 to 7 seconds after I manually apply power to motor of Vogel pump.

    And update, I had plane to use Siemens LOGO 24 RCL (bought it before year ago) and yesterday realized that counter can count signals on input with max 5 Hz frequency, and as I set machine to have rapid speed same as it was from factory , 3 m/ min that means because pitch of ball screws is 5 mm (one rotation of ball screw spindle moves carriage for 5 mm and when I made little calculation I came to conclusion that to be able to count impulses @ 3m/min I would need frequency of sampling 10 Hz at least.

    3 m/ min = 3 * (1000 mm)/60 s= 50mm/s

    And with sampling frequency 5Hz that means that I could detect 5 revolution of ballscrew spindle in second or in other words (5 * 5 mm gives 25 mm/s, which means I need at least 10 Hz input for counter in PLC). And why I even need PLC, because I have In Mach3 only 4 inputs, 2 are already spent for tail stock (at the begging I used 3 but changed one input for z-- limit, in case that part in chuck is not securely gripped, sensor connected on z-- , and which is connected with furthest tail stock out position will activate reset, and 2 other inputs I need for foot control of power chuck and tail stock.

    So conclusion is if you need to buy PLC first check with which frequency it can read inputs.

    Next, as I use CS Lab equipment, not parallel port I tried before OEM Trig#1 (inputs) to use Timing and Index as additional inputs because I do not need that for cutting threads.

    I have some feeling from what I meanage to found on net that OEM Trig#1 to OEM Trigi#15 can not be used as inputs for example , if I assign OEM Trig#1 to be connected on some sensor and in macro I write command IsActive (OEM Trig#1) , I got message script error or something like that, for Timing or Index instead OEM Trig#_ _ I do not get those messages and I can read values of sensors that are connected on them. So if someone know is it possible to use OEM Trig as input or not ???

    So I am using for now Index as additional input and want to use Timing , on which I need to connect pressure switch but as I described I am not sure how to use it, to stop pumping or to activate pumping after switch is active.

    Here Is macro in case somebody want to use it for his machine, made by me and probably will change it again as I change everything as I found something new ,but it works:

    Sub main ()
    Dim oldp,newp, n As Integer
    oldp=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 ' 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
    Sleep 8000 'turn on pump for period of 8 seconds
    DeActivateSignal(Output8)
    newp=0
    End If

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

    :cheers:

  4. #184
    Join Date
    Jun 2013
    Posts
    15

    Re: Emco Turn 220 P

    One option is to use a binary counter to divide the frequency of the signal you want to count with the PLC.

    With a 74HCT4060 you can divide by a factor of 16 to 16384.

    I recommend to count the pulses applied to your motor drivers, or the ones coming out from the position encoders.
    Assuming you have 400 steps per revolution on your motors, the max rate for step signal will be 4000 Hz.
    With a 74HCT4060, you can decrease this rate in a range from 4000/16=250 Hz down to 4000/16384 = 0.244 Hz.
    If you choose Q12 on the 74HCT4060, the factor will be 4096 and the max frequency will be around 1 Hz.
    20m = 20000/5*400/4096 = 390 pulses

    Frederic.
    http://cnc.f1oat.org/

  5. #185
    Join Date
    Oct 2012
    Posts
    393

    Re: Emco Turn 220 P

    Quote Originally Posted by f1oat View Post
    One option is to use a binary counter to divide the frequency of the signal you want to count with the PLC.

    With a 74HCT4060 you can divide by a factor of 16 to 16384.

    I recommend to count the pulses applied to your motor drivers, or the ones coming out from the position encoders.
    Assuming you have 400 steps per revolution on your motors, the max rate for step signal will be 4000 Hz.
    With a 74HCT4060, you can decrease this rate in a range from 4000/16=250 Hz down to 4000/16384 = 0.244 Hz.
    If you choose Q12 on the 74HCT4060, the factor will be 4096 and the max frequency will be around 1 Hz.
    20m = 20000/5*400/4096 = 390 pulses

    Frederic.
    Hi Frederic,

    I will use Mach3 for counting impulses, I have doubt about this:

    A) pump should stop with pumping even it did not pass 8 seconds (it passed let say 6 seconds) ???

    B) pump should pump after pressure switch changed contacts from open to close and from that moment it should pump 8 seconds ???

  6. #186
    Join Date
    Jun 2013
    Posts
    15

    Re: Emco Turn 220 P

    Assuming oil pressure will take some time to establish after a long pause, I will say pump for 8 seconds after proper pressure is detected.
    But you have to add a timeout for the first phase to detect missing oil, display alarm, and may be ESTOP the machine.
    The timeout should be defined by doing some trial and measure how long the oil pressure ramp up is taken.
    http://cnc.f1oat.org/

  7. #187
    Join Date
    Oct 2012
    Posts
    393

    Re: Emco Turn 220 P


  8. #188
    Join Date
    Oct 2012
    Posts
    393

    Re: Emco Turn 220 P

    Here is update about pressure switch, I asked guy that works for Emco company and he said :

    "Oil pump turns ON according to parameter of machine (so after 20 m of travel) no matter what is state of pressure switch.
    Pressure switch only serves to give information to controller of machine is expected pressure reached in oil lubrication system.
    If in period of 8 seconds is NOT detected rise of pressure in system by pressure switch, controller will trigger information about error.
    So basically pressure switch only checks is there any oil in system and does pump works but it does not have influence on turning ON pump."

    I translated to English so that is it, third theory. It agrees with my observations, when I turned ON pump, pressure switche changed contact state inside period of 8 seconds.

    Myth busted (group)

  9. #189
    Join Date
    Oct 2012
    Posts
    393

    Re: Emco Turn 220 P

    Here is update, manage to solve problem of oilpump to work automatically , by myself (that is important, just kidding).

    Here is in video what I did

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

    So to recapitulate what all I tried before I came to this solution.

    First I made macro that controls oil pump and it is activated/triggered over button that I add in mach3 screen by program machscreen editor (it is free), and in my case I connected input that counts impulses on input Index and pressure switch from oil pump (that serves for detection is there any oil and is pump in working condition ) on Timing input, as I use CSMIO/IP-S as I concluded I can treat those inputs(Index and Timing ) as regular inputs (Input 1 to 4) and I used them because I I thought I have only those 4 inputs.

    So macro for for controlling oil pump works correct when is executed over button (I named it Auto lube) and everything work OK until E-stop is activated , I made macro for oil pump to save how many impulses is counted in file named oilpump.txt so I can have exact number of counted impulses even if I close Mach3 and open it again (for that I need to delete from code part that initializes counter of impulses on zero every time I press Auto Lube button).

    So next I thought that problem that I have by stopping macro by Estop can be easily solved by inserting code in macropump (like Hood said it is macro but it executes cyclic after you turn on mach3, you do not need to press any buttons or switches , you just need to adjust in general config that you want to use it, just check box where it say macropump and that is it, escape mach3 and come back and it should work, and inside of macropump you can put what ever you want that need checks to be executed cyclic (from my experience, I put inside logic that checks do I want to open or close power chuck, and now will need to put same logic for tailstock, and most important thing that I discovered you need to put inside of macropump SetOEMTrigger(xxx) function).

    So as I wanted to cyclic run code that will count impulses in order to control oil pump I put code inside of macropump, and I thought, OK it will work same as in macro triggered by button (Auto lube), but it does not work , why, probably because of code that is necessary for macro for counting impulses, it needs to detect is it rising edge present (otherwise if sensor is active , macro will count presence of sensor same as timing pulley made one revolution which is not good , because of that it needs to count changes not presence , and other thing is that data is saved in file (and file needs to be open and closed), anyway probably that goes from some reason slow in macropump and because of that it misses to count impulses (it counts but not accurate).

    And only solution till now that I can use is to use code over macro triggered by Auto lube button, but in that way macro counts correct but it is stopped when Estop is activated, I have nothing against stopping because I will not get wrong data but I need to manually press activate pump and I can easily forget to press button, so after reading forums I discovered that there exist brains in mach3, only problem I never used them and have no clue what that should be, it sounds complicated "brain" haha. It is similar to ladder diagram for programing PLC, so you can activate output by input and you can between insert some logic and as I read they are faster then macros.

    So I had simple idea, when Estop is acknowledged (I need to press RESET) if I want to start macro for oilpump (I named it m555.m1s) , so if Estop is triggered I must press RESET if I want to continue to work, I can not forget to press it.

    And after experimenting with bits that I tested before (some OEM cods) I gradually came to solution to choose brain and make some logic, I guess.

    So when Estop (LED with code 800) is not turned on , it needs to activate OEMTrigger1 which triggers macro (m555.m1s), Estop and OEMTrigger1 are connected over (no operation inverted), and as I described in macropump needs to be SetOEMTrigger(555) .

    How that works, macropump is cyclic running and inside of it is SetOEMTrigger(555) and it waits for OEMTrigger1 to be activated (in System HotKeys Setup under Triggerer#1 is selected code 301, and that means when OEM Trigger#1 input is activated it will trigger my macro m555.m1s , and that will happen when I press on button RESET (for that need to be no operation inverted).

    Hope you can follow idea and what I did, in that way I do not need to worry about oil pump at all because it will automatically be under control of macro555 (it is script because I do not made button for it, script/macro all the same to me) and information about how many impulses is counted is in file oilpump.txt, I just need to worry is there enough oil in reservoir

  10. #190
    Join Date
    Oct 2012
    Posts
    393

  11. #191
    Join Date
    Oct 2012
    Posts
    393

    Re: Emco Turn 220 P

    My screen and macros that I use :cheers:

  12. #192
    Join Date
    Oct 2012
    Posts
    393

    Re: Emco Turn 220 P


  13. #193
    Join Date
    Oct 2012
    Posts
    393

  14. #194
    Join Date
    Oct 2012
    Posts
    393

  15. #195
    Join Date
    Oct 2012
    Posts
    393

  16. #196
    Join Date
    Apr 2003
    Posts
    354

    Re: Emco Turn 220 P

    Hiya Marko, lookin' good! You need to go into spindle setup on the ports & pins config page & add enough delay to let that jet engine spindle spool up before the cutting starts. Doesn't hurt too much with plastic but it'll cause problems with aluminum or steel.

    Feels good when it works, eh?:cheers:

  17. #197
    Join Date
    Oct 2012
    Posts
    393

    Re: Emco Turn 220 P

    Quote Originally Posted by DICKEYBIRD View Post
    Hiya Marko, lookin' good! You need to go into spindle setup on the ports & pins config page & add enough delay to let that jet engine spindle spool up before the cutting starts. Doesn't hurt too much with plastic but it'll cause problems with aluminum or steel.

    Feels good when it works, eh?:cheers:
    Hi, just got similar observation about that over youtube comment, yes you are totally right , spindle need to accomplish given RPM before tool tip touch material, have lot of things to do and did not have time to investigate how to accomplish that but now will try what you wrote. Yes feels good, it will be even better when I paint enclosure and will have coolant (# sisyphus job ), will try to set rapids on 4000 mm/ min and increase spindle RPM to 4000 , till then I roll like this because I do not want may wooden table fall apart , thx on advice :cheers:

  18. #198
    Join Date
    Jan 2008
    Posts
    1543

    Re: Emco Turn 220 P

    Consider removing the spindle stop command for tool changes in your post processor. If the spindle keeps spinning, just changes RPM the required amount, it will be at speed quicker.
    7xCNC.com - CNC info for the minilathe (7x10, 7x12, 7x14, 7x16)

  19. #199
    Join Date
    Apr 2003
    Posts
    354

    Re: Emco Turn 220 P

    Quote Originally Posted by pippin88 View Post
    Consider removing the spindle stop command for tool changes in your post processor.
    If memory serves, there's a setting on the General Config tab where you select "Ignore Tool Change" and the spindle keeps running if you don't want to spend more quality time fooling around with you post-processor.
    Milton in Tennessee ya'll!

  20. #200
    Join Date
    Oct 2012
    Posts
    393

Page 10 of 19 89101112

Similar Threads

  1. emco turn 120p with emco tronic ti control
    By rcjacob in forum Vertical Mill, Lathe Project Log
    Replies: 0
    Last Post: 03-26-2014, 05:01 PM
  2. EMCO PC Turn 50
    By bluepgt in forum EMCO Lathe
    Replies: 2
    Last Post: 02-02-2012, 10:27 PM
  3. Emco PC turn 120
    By spankyky in forum EMCO CNC Machines
    Replies: 1
    Last Post: 06-26-2010, 02:09 AM
  4. Emco Turn 320
    By J_Copeland in forum Want To Buy...Need help!
    Replies: 0
    Last Post: 10-21-2008, 05:26 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •