Churchill Computurn 290 retrofit (again)

  1. Hood

    Hood Forum Supporter

    Messages:
    8,722
    Location:
    Carnoustie, Scotland
    I thought I would put up a post to document the progress of a planned retrofit of my CNC lathe.
    It is a Churchill Computurn CNC lathe that I got, probably about 2006. It was very little used as it had come from Hull Uni and as far as I can make out was only used in a study for testing carbide and CBN inserts.

    A pic of it on the trailer when I got it, it is a fairly big lathe weighing in about 3 tonne.

    ScreenHunter_502 Jan. 14 08.42.jpg
    And a pic of it in my workshop when it was less cluttered with machines.

    ScreenHunter_503 Jan. 14 08.44.jpg

    I retrofitted it with Mach3, originally via the parallel port but then the USB SmoothStepper and latterly the Ethernet version. It has done me proud and worked well and I have added and adapted many things on it such as making a turret, fitting a hydraulic chuck and chucking cylinder etc.

    The Smoothstepper , I think, has recently been giving me issues, I think it is slowly dying so I decided I needed to upgrade. I was going to be going with a CSMIOIP-A controller like I have on the Chiron FZ12S but for some strange reason I decided to go for a stand alone Chinese controller from SZGH in China, think it may actually be the same as the Newker controllers and it is probably them that make it.

    I have had the controller for quite a few weeks now and have it set up in the work room at home or the junk room as my other half calls it :vsad:
    I made a stand to set it up in so that I could wire things such as limits and generally mess around with it and get used to it.

    ScreenHunter_2373 Jan. 30 18.34.jpg ScreenHunter_2371 Jan. 30 18.32.jpg

    I have also started on making a housing for it on the machine, my painting skills are dire but it will hopefully do the job.

    ScreenHunter_2374 Feb. 01 17.48.jpg

    As I said I have been messing around with the controller and it has quite a nice feature that I think will be handy for doing a first run of new code. You can put it into handwheel mode and run the code from turning the MPG, it means you could use the MPG mode to make sure the tool is going to where it is meant to be and then you can change back to computer control whenever you want. Quick video of it below.



    I have just finished working out the power side of the wiring, pic below.

    ScreenHunter_2396 Feb. 04 21.30.jpg

    The hydraulic pump and oil pump I am going to control from the panel inhibit switch, it will allow me to shut off the noise from these motors when I am not running the machine and with doing it via that switch there is no chance of the machine running and me forgetting to turn them back on. I wasn't sure how I would manage that as the switch only had 2 NO contacts on it but I found out you can get double contact blocks to fit the switch so position 1 will now have 2 NO contacts, one to put the machine into normal run mode and the other going to the PILZ safety relay to energise the servo drive enables and also the Hydraulics and Oil pumps. The middle position has no contacts on it, that puts it into inhibit axis mode which means the axes can't be moved and it will also drop out the PILZ relay and thus the hydraulics and Oil will switch off and the servo drives enables will be taken away. The third position of the switch also stops the spindle from being used but I will probably never have it in that mode anyway.

    Well that is enough for now, not sure when I will actually start on the retrofit as I still have a few things to work out and I will also be busy on a new Cheetah Cat that should be arriving next week and that will take up most of my time.
     
    Last edited: Feb 5, 2019
    Barlidge, Rannsachair, ronan and 12 others like this.
  2. Hood

    Hood Forum Supporter

    Messages:
    8,722
    Location:
    Carnoustie, Scotland
    As I mentioned I have the control at home so that I can mess around with it, find my way around it and generally test it out.
    The toolpath graphics was giving me grief and I eventually worked out that it was if you called a tool number with a tool offset that was different you would get an offset toolpath graphic. Whether the actual tool would go to the right place and it was just the graphic that was screwed I am not 100% sure as it is hard to work things out when it is not actually connected to a lathe. I am fairly certain it would have turned correctly but it was still not great that the toolpath could not be relied on.
    I kind of needed to be able to call tool numbers with different offsets as I have an 8 position turret but it is VDI so I have lots of tools set up ready for swapping into the turret. In Mach I would call, for example, T0101, T0909, T1717, T2525 and the turret would always rotate to position 1. I achieve that by using using the mod function (modulus) in the macro so it worked out which position was required. The SZGH however did not have that function available so I was stuck with using T0101, T0109, T0117, T0125 and due to that, as previously mentioned, the graphics were screwed.

    I am a stubborn kind of bas... oops, person so I kept on messing with things even though my coding skills are on par with my painting skills. Eventually I managed to get things almost working by using the subtraction, division, multiplication and rounding down functions that were available. I could call any tool number and it would rotate to the correct position except for multiples of 8 as the macro always saw that as Tool 0 position. In Mach it was easy as the macro just looked at the toolnumber and if it was zero then it would set it to 8. I just couldn't get the SZGH to do that though so it looked like I had 3 options, only use 8 tool positions with 8 offsets (T0101 to T0808), use all tools but forget about using tool position 8 on my turret or finally just put up with the screwed up graphics and hope the tool went to the correct position.

    I then got talking to @eSCHEn and he offered somehelp, I explained what I wanted and what the problem was and he came back with some modified code that did exactly what I wanted, he also neatened up my code as a bonus.

    So here is the video of me calling tool 6, 7 and finally 8, please excuse the graphic nature of the message when it rotated to tool 8 (probably only Scots will know what it says), my excuse for it is I was ever so slightly overjoyed :D So big thanks go out to @eSCHEn, I owe you one, but no I won't do that :D


     
    Last edited: Feb 7, 2019
    skotl, Pete., MattH and 4 others like this.
  3. eSCHEn

    eSCHEn Bit Wrangler

    Messages:
    5,514
    Location:
    SW Scotland
    Works well but I sure am glad I'm not writing a game in that macro language :)
     
    MattH and Hood like this.
  4. Hood

    Hood Forum Supporter

    Messages:
    8,722
    Location:
    Carnoustie, Scotland
    It s a weird one right enough, seems to have a real home made feel about it :D
     
  5. eSCHEn

    eSCHEn Bit Wrangler

    Messages:
    5,514
    Location:
    SW Scotland
    Yeah very homemade feel but as it can do what you need then perfectly suited to the task :)

    I'll still be writing mine from scratch in another language though :D
     
    Hood likes this.
  6. Hood

    Hood Forum Supporter

    Messages:
    8,722
    Location:
    Carnoustie, Scotland
    The control has a parameter which you can set to disable chuck operation whilst code is running and also stop code from running if the chuck has not been clamped. It also has a parameter to choose which way the clamping is for for the safety feature.
    The problem however is I can't seem to find an option to reverse that for chucking externally without having to go into the parameters every time I need to change it. I often do things such as the hauler plates which I grip inside the bore and the chuck clamps outwards but if I enable the safety feature in the parameters it means the code won't run as it thinks the chuck is open (which it is) and not gripping the work although it is.

    My solution is to use one of the buttons on the panel that is there for the user to utilise as they wish, I have that operating a double pole relay and that relay has the chuck open and close outputs on its common pins and I have the outputs on the NC contacts reversed on the NO contacts. So if I want to chuck externally I press the panel button and that inverts the signal on the relay so that when the control thinks it is clamping inwards it is actually clamping outwards and thus the code/spindle will run and I do not have to disable the safety feature.

     
  7. Hood

    Hood Forum Supporter

    Messages:
    8,722
    Location:
    Carnoustie, Scotland
    I made up a small board to interface the SZGH control with the Turrets Servo drive.
    The control has sinking outputs and sourcing inputs which seems to be the Asian way. The servo drive has the opposite, sinking inputs and sourcing outputs which is the Western way I suppose. That means you can not just directly connect the output from the control to the turrets input and the turrets output to the controls input.
    Pic of the board.

    ScreenHunter_2425 Feb. 10 10.24.jpg

    To test it out I took an output from the CNC, the K2 panel button and from what would be the turrets input side I linked it to the turrets output side. I then took the controls side back into the control as the Y25 input which activates the M1 command which is Optional Stop. It seems to work fine. Here is a video showing it working.
     
  8. Hood

    Hood Forum Supporter

    Messages:
    8,722
    Location:
    Carnoustie, Scotland
    Got the prox switches adjusted properly this morning.

    They are binary so top right is 1, top left is 2, bottom right is 4 and bottom left is 8

    Previously the control (Mach3) got position feedback from the servo motors encoder and it worked well but there was a belt and a coupling between that and the turret plate so if they broke then the turret could clamp in the wrong position and the control would think it correct. In reality the chances of that happening were slim as most likely the Hirth coupling would not mesh and thus the control would see that it hadn't clamped correctly and it would throw up a fault.
    Now with there being a direct link to the turret plate and the prox triggers a problem will definitely be picked up.

     
    indy4x, eSCHEn and pressbrake1 like this.
  9. Hood

    Hood Forum Supporter

    Messages:
    8,722
    Location:
    Carnoustie, Scotland
    Doing a bit more working out of how I will integrate the SZGH controller with my lathe.

    Tonight it is the spindle control.

    The SZGH has an option to use 4 gears and you can set the Max speed in each gear in the parameters.

    My Lathe uses 5 electromagnetic clutches in the gearbox to give 6 speeds but I can only use 4 due to the SZGH only having the 4 gear selections.


    So I am thinking I will choose the clutches that give me the following ranges 355rpm, 500rpm, 710rpm and 1000rpm.

    I very rarely go below 200rpm so the motor should be fine with the VFD controlling it when in the 355rpm gear range as that would be approx 28Hz and I only occasionally go above 1000rpm but even then I could get 1500rpm from 75Hz which again should not be an issue.


    All seemed nice and easy until I discovered that the controller always has one of the 4 outputs for gears enabled and it looks like I can not even call the output via a macro to go inactive, it just won't do it. That is a problem for me as the clutches in the gearbox also act as a brake and disengage the spindle motor from the spindle, so I need to be able to remove all signals to the clutches so that the brake will work.

    I sat down and thought about how I could do that and worked out that there is an M05 (Spindle Stop) output that I can configure to be constant when there are no M3/M4 (Spindle CW/CCW) outputs. So what I decided on was 5 relays, 4 of them double pole.

    Drawing below of how it will work, basically the M5 signal controls whether the relays for speed signal (SP01-SP04) get their coils connected to +24v.

    ScreenHunter_2429 Feb. 12 22.13.jpg


    So I needed to make up a relay board, I looked out some suitable relays and was starting to place them on the vero board ready for soldering when a light bulb moment happened. I have a PLC in the lathe at the moment and I was going to be removing it when I fitted the SZGH control. Why not just keep the PLC as it already has relay outputs and I can configure the Inputs for Sinking or Sourcing so it is easy to interface with the SZGH. Then I thought further, the I/O board I made up the last day to interface the control and the servo drives could also be done away with and I could just use the PLC again, the outputs are also configurable to Sinking or Sourcing so it is easy to set them up to either connect to the control or the servos.

    Here is the first bit of the ladder that basically will do what the 5 relays for controlling the spindle speed will do, much easier just doing a quick ladder in the PLC than soldering a load of relays onto some board and the great thing about the PLC is that the ladder can easily be altered in seconds if I discover I have something wrong or wish to do something differently.


    ScreenHunter_2428 Feb. 12 22.09.jpg
     
    indy4x, eLuSiVeMiTe and eSCHEn like this.
  10. Hood

    Hood Forum Supporter

    Messages:
    8,722
    Location:
    Carnoustie, Scotland

    And as an example of that, I screwed up as it has been a while since I wrote ladders for the PLC. It doesn't allow you to do it as per the previous picture, so simple, just start again and do it right, no wasted solder or vero board, just a few minutes pressing keyboard keys :D

    ScreenHunter_2430 Feb. 12 23.25.jpg
     
    daleyd and eSCHEn like this.
  11. eSCHEn

    eSCHEn Bit Wrangler

    Messages:
    5,514
    Location:
    SW Scotland
    Honestly don't know how you folk who do PLCs work with that ladder stuff. It's an abomination!
     
    WorkshopChris, addjunkie and MattH like this.
  12. Hood

    Hood Forum Supporter

    Messages:
    8,722
    Location:
    Carnoustie, Scotland
    I love it, nice and simple so suits me well :)
     
    eSCHEn likes this.
  13. eSCHEn

    eSCHEn Bit Wrangler

    Messages:
    5,514
    Location:
    SW Scotland
    Do you read it bottom up or top down? And I take it it's the first condition to match yields the answer on the right?
     
  14. Hood

    Hood Forum Supporter

    Messages:
    8,722
    Location:
    Carnoustie, Scotland
    Left is Inputs, right is outputs and it reads top to bottom but it reads the whole ladder in a fraction of a second.
     
  15. eSCHEn

    eSCHEn Bit Wrangler

    Messages:
    5,514
    Location:
    SW Scotland
    So the SP01..04 are the switches on the turret represent the binary flags?

    Yeah I see it now. Visual coding is just weird man! :D
     
    skotl likes this.
  16. Hood

    Hood Forum Supporter

    Messages:
    8,722
    Location:
    Carnoustie, Scotland
    Ha ha I have just seen another problem in the ladder, the last rung above should have SP01-SP04 OR'd as the way it is 10H clutch output would only work if SP01,SP02, SP03 were active and M5 and SP04 were not. It should work if any of SP01-SP03 are active. Well I was tired last night so that is my excuse :D
     
  17. daleyd

    daleyd Member

    Messages:
    5,858
    Location:
    Wrexham, North Wales
    I started off with ladder when i first started working with PLC's, and occasionally use it still (Some PLC's will only work with ladder). If I have a choice though I use Structured Text now for most things.

    What PLC do you have Hood, it's alien to me having X as outputs and Y as inputs, most are the other way round?
     
  18. awemawson Forum Supporter

    Hood does your PLC limit the spindle speed if in wrong gear? My Beaver TC20-s has two gears, and if in the low box limits the speed to a max of 1024 even if I erroneously command 3500.

    :sheep::sheep::sheep:
     
  19. Hood

    Hood Forum Supporter

    Messages:
    8,722
    Location:
    Carnoustie, Scotland
    It is a DL06 from Automation Direct and you are right about the X and Y being A for T, my head was even more up my arris than usual last night.

    Not sure yet but I think so as the parameters have a max spindle speed for each of the 4 gears, so you set that to the max RPM you want for each gear and that will correspond to 10V on the analogue signal.. The original setup was just fixed speed so each gear was X rpm and that was it.
     
    daleyd likes this.
  20. awemawson Forum Supporter

    On the Beaver there is an M code to request high gear, and another M code to request low gear. If the machine is running, it slows right down, and joggles the spindle back and forth as it changes gear, but then leaves it stopped - you have to issue another M3 or M4 to get going again.

    :sheep::sheep::sheep:
     
Advertisements