Author Topic: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)  (Read 151793 times)

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8966
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #550 on: November 05, 2018, 05:59:59 AM »
Well it's even simpler than Pete's 999 . . .

There is a parameter (#170) which is a one bit flag to say if the level one security code has been set. '1' = set but mine is '0' which means that only one code has been set.

However although putting the code '149' in parameter #97 for level 2 security enables the mode button that theoretically lets me change 'bit' parameters, and lights it's active light up, in practise I can't change the state of parameter #167 'ramp enable' from it's present '0' to the required '1'   :bang:

Presumably it's hard wired or linked somewhere to prevent it. . . . oh joy the complications of life  :scratch:
Andrew Mawson
East Sussex

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8966
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #551 on: November 05, 2018, 02:40:42 PM »
So a bit of intensive parameter investigation today - I put together a document with the best description of each (apparently) involved parameter concerning the Spindle Orientation and M19 that I could find in the various description that I have. 

Having done this it became obvious parameter #4010 wasn't really concerned - it is an offset to make sure forward and reverse speeds are the same, and a bit of experimental tweaking showed that actually it needed to be set to '0' - had been '2' and almost certainly has no influence on the oscillating issue.

Then I concentrated on parameter #4270 'Cut off speed for M19' - apparently the spindle is slowed down to this speed, and travels towards the set point until 'captured' by the servo action. Well it had been '5' in the parameters that I had been given, but the spindle never starts to move at all if set so low - 9 or 10 was the lowest at which  I could set it and get the spindle to rotate towards the set point, so a bit of experimentation was needed.

Forgetting all about the M19 and simply issuing an M03 S10 command (M03 = rotate clockwise, S10 is the speed in RPM) gets the spindle slowly turning at 10 rpm and the input to the mentor is about 90 milli-volts. Issuing an M03 S5 the spindle won't turn, but the Mentor has an input of 41 milli-volts.

So I still think that the issue here is that for some reason the Mentor isn't responding to small inputs. Now the Mentor has an input range of -9.9 to +9.9 volts and it's internal A to D converter  has a maximum count of 1023, making it's least increment 9.7 x2 / 1023 or 19.1 mV if I understand their description so would expect movement at 41 mV

Conclusion - well I don't have one, but I have learnt a bit more, but equally obviously there is more to learn  :coffee:
Andrew Mawson
East Sussex

Offline mc

  • Full Member
  • ***
  • Posts: 108
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #552 on: November 05, 2018, 06:21:34 PM »
Sounds like there's a deadband set in the Mentor.

I'm assuming you can view the AD value on the Mentor some how going by that bit text?

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8966
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #553 on: November 06, 2018, 11:28:58 AM »
I awoke to the realisation that although I thought that I'd eliminated the Measuring Card by substitution, that was BEFORE I'd cured the M20 fault, so M19 wouldn't have worked anyway  :bang:

So first job, swap the cards again. At first I though that it was much improved, but measurements showed that the card had slightly different characteristics but the fault (oscillation when set to the correct gain) was still present.

I then set up the 'battery box' to drive the Mentor having added a passive 10:1 voltage divider  to it to get low enough values with enough sweep on the pot. Essentially all it did was reproduce my findings driving it from the Measuring Card, although it did show a small offset with speed differing by a bit between forwards and reverse.

Then I decided to increase the field current in the Mawdsley DC spindle drive motor. I had set the field coil driver to 3 amps using my Fluke clamp meter - (this won't necessarily give an accurate reading due to the waveform of the current but relative readings should be OK). The motor isn't marked up with Field Current on the plate, just a voltage rating of 170. I'd chosen 3 amps to be conservative as the field coil driver was running very hot, but I've put a fan on it since then.

Again there seemed to be a marginal improvement, nothing stunning. Eventually I tweaked the gain and the 'target window' setting to give a working state just so I could seeing it positioning, and wrote a little diddy program stepping round in 45 degree increments. As the target window is now quite wide the positioning won't be particularly accurate, but it is 'sort of' working, but needs a lot of refining.

Have a video:

Andrew Mawson
East Sussex

Offline russ57

  • Sr. Member
  • ****
  • Posts: 278
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #554 on: November 06, 2018, 11:44:33 PM »
Those bangs are clamping and releasing?

Russ


Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8966
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #555 on: November 07, 2018, 02:37:06 AM »
Yes that is the spindle brake being energized and released. As soon as the servo system has locked onto set point it puts the brake on and it is released by the next M20 command or a specific M32 unlock command.
« Last Edit: November 07, 2018, 03:29:42 AM by awemawson »
Andrew Mawson
East Sussex

Online RussellT

  • Hero Member
  • *****
  • Posts: 520
  • Country: gb
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #556 on: November 07, 2018, 07:20:34 AM »
Once again I'm impressed by your persistence.  :bow:

I was catching up with all of this thread yesterday and at the end I was wondering how accurate this positioning could be.  The inertia of the chuck/spindle workpiece must make it very difficult to stop it in an exact position by controlling the drive.  Is it meant to be accurate enough to use the rotating tooling?  Does the drive have a braking effect like a stepper motor?  Surely it should apply the brake as it gets to the right position rather than wait for it to overshoot?

Russell
Common sense is unfortunately not as common as its name suggests.

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8966
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #557 on: November 07, 2018, 10:36:48 AM »
Russell,

If you look at post #541 on the previous page there is a diagram showing it's 'homing in' method - I'm not overly convinced that it's doing it though. Ideally the servo system should be tuned to just stop at set point.  Once it has arrived in 'the zone' set by the positioning tolerance it applies the spindle brake and then will be fine for using the rotary tooling. Problem that I have at the moment is that I've had to set this tolerance to 20 1/11ths of a degree so nearly 2 degrees for it to work. The parameters that I got and were theoretically the original ones set it at 2/11ths of a degree so more tolerable.

My oscilloscope is playing up at the moment in the triggering department, but I have a replacement arriving hopefully Monday, and hope to be able to see the set point output of the measuring card as a dying or damped oscillation going forwards and reverse onto the spot. If you look at the video it does look as though this may be happening, certainly on some of the iterations.

For the record, yesterday I re-installed the original Measuring Card. Yes they have slightly different offsets which are levelled out with parameter #4010, but other than that I don't think that the card is the fault hence returning the original.
Andrew Mawson
East Sussex

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8966
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #558 on: November 07, 2018, 11:34:55 AM »
An interesting (but possibly irrelevant) bit of maths entered my head this afternoon:

A/ I know that the PLC needs the spindle 'on target' for 300 milliseconds to accept it's in position.

B/ The slowest I can reliably drive the spindle is 10 RPM or 10/60 revs per second

C/ At 1/6 RPS 300 milliseconds represents 1/6 x 0.3 = 1/20 of a rev for the 'target  window' or 360/20 = 18 degrees

D/ My window is set to 20/11 = 1.8 degrees in the original parameters or a factor of 10 greater than the above

So the control embedded into the measuring card MUST anticipate the target point and leave the spindle to coast into the 'zone' possibly with minor corrections if it is going to over or undershoot, but it CANNOT simply steam into the zone and be there long enough for the 300 mSec that the PLC demands

. . . or maybe I'm missing something  :scratch:
Andrew Mawson
East Sussex

Offline PekkaNF

  • Hero Member
  • *****
  • Posts: 2523
  • Country: fi
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #559 on: November 07, 2018, 01:35:48 PM »
From which OB that control loop is called? Normally only HMI and secondary functions are on the normal loop and tight controllers are put to 20 ms or such loop.

Online RussellT

  • Hero Member
  • *****
  • Posts: 520
  • Country: gb
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #560 on: November 07, 2018, 01:54:24 PM »
Hi Andrew

Thanks for the explanation.

That bit of maths is more or less what I was wondering about.  I've also been back and looked at the diagram on post 541.

The diagram makes it clear it's supposed to overshoot - that makes sense as the inertia will change with the size of the workpiece.

The diagram only shows two iterations but presumably it will do as many as it takes or hunt if it can't stop in the zone - depending on the variable tv which is probably explained on one of the other images I skipped when reading the whole thread at one go.

I'm confident you'll  work it out


Russell


Common sense is unfortunately not as common as its name suggests.

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8966
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #561 on: November 07, 2018, 06:06:09 PM »
The delay 'tv' is timer T1 in segment 69 of the program, which is triggered by 'on target' and is the 300 mSec period during which  'on target' has to be asserted.
Andrew Mawson
East Sussex

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8966
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #562 on: November 07, 2018, 06:10:10 PM »
From which OB that control loop is called? Normally only HMI and secondary functions are on the normal loop and tight controllers are put to 20 ms or such loop.

Pekka,

The actual control loop seems to be implemented in hard ware on the Measuring Card as far as I can tell but the boundaries between hardware and software are a bit fuzzy to me at the moment. I have no technical information on the Measuring card other than what I can infer by looking at it  :scratch:
Andrew Mawson
East Sussex

Online RussellT

  • Hero Member
  • *****
  • Posts: 520
  • Country: gb
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #563 on: November 08, 2018, 05:01:34 PM »
Hi Andrew
 
On reflection I think that the angle measuring is working fine but it needs to go slower, or accelerate more slowly from the overshoot, it seems to me that it's the momentum of the system that's the problem.

Russell
Common sense is unfortunately not as common as its name suggests.

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8966
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #564 on: November 08, 2018, 05:08:43 PM »
Russell, yes I agree. The parameters that I managed to get from the lathe user had the approach speed (cut off speed) at 5 rpm but as I'm sure that you are aware from reading my posts I cannot get it turning reliably lower than 8 or 10 rpm.

When I can 'scope the Mentor analog drive voltage triggered from the Drive Enable signal it should let me see if any actual control is being exercised at the few milliseconds of arriving at set point - I'm not convinced that it is!
« Last Edit: November 09, 2018, 02:09:08 AM by awemawson »
Andrew Mawson
East Sussex

Online RussellT

  • Hero Member
  • *****
  • Posts: 520
  • Country: gb
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #565 on: November 09, 2018, 05:58:54 AM »
Hi Andrew

Interesting.  I would expect doubling the approach speed to reduce the accuracy by a factor of 4 rather than the 10 I think you found in practice.

I am still wondering why it won't run as slowly and I am curious about the field coil current/voltage.  I'm not clear why you can't measure the voltage - if a maximum voltage is specified then surely a method of setting up should be specified too.

Russell
Common sense is unfortunately not as common as its name suggests.

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8966
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #566 on: November 09, 2018, 07:34:50 AM »
Russell it is feasible to measure the voltage, but it means temporarily removing the cooling fan that I fitted to save the thyristor cooking. I may well add some remote terminals to make the job easier and safer as it's easy to get a nasty shock when probing (ask me how I know!)

On the positive side my Tektronix 2465A arrived this morning to replace my ancient Tektronix 453 that I have been using for decades - it's a very good 'scope but the triggering isn't stable. Probably only a capacitor needs changing, but I wanted a faster one anyway.

Hope to get time over the week end to chase the servo problem, but people keep wanting me to mend things. Ironically I got a desperate email from the bloke I originally got the Traub CNC Lathe from. His Colchester Tornado 300 with Fanuc OT controller has developed a spindle drive fault and can I have a look please !!!! Poor chap has a production back log developing so I'll probably spend some time with him in the next couple of days.
« Last Edit: November 09, 2018, 12:11:16 PM by awemawson »
Andrew Mawson
East Sussex

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8966
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #567 on: November 09, 2018, 12:28:47 PM »
Well I modified the fan mounting plate to allow me to get at the field coil connections while tweaking the field current pot. Taking it all the way up to maximum only got me 165 volts, plate rating is 170. I shudder to think what the current was.

Then I tried the M19 issue and slow running etc. Characteristics WERE slightly different, but the minimum speed for instance was still 9-10 RPM.

Then I issued an M03 S1000 (spindle clockwise 1000 rpm - it started accelerating, the lights dimmed, and gave me a KTK Mentor Spindle Drive fault  :bang:

So I wound the pot back to approximately where it had been, crossed my fingers and tried again - phew - back as before.

I do wonder if possibly there is something wrong with the motor field coils, as people in the know commented that they thought that the 23 ohms I'm measuring is rather low.

It is an enormous lump of iron to remove so I hope I don't have to go there ! It looks like this one on eBay but although the power rating is the same, the excitation and running voltages are different
Andrew Mawson
East Sussex

Online RussellT

  • Hero Member
  • *****
  • Posts: 520
  • Country: gb
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #568 on: November 09, 2018, 05:57:03 PM »
That's interesting, but not especially helpful - except that all information helps.  I'm sorry if I diverted you up a blind alley.

I'll be interested to see what you discover with the scope although I'm still thinking that getting the minimum speed down is going to be crucial.

Russell
Common sense is unfortunately not as common as its name suggests.

Offline cnc-it

  • Jr. Member
  • **
  • Posts: 40
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #569 on: November 10, 2018, 04:39:05 AM »
I might have missed it in the thread but have you checked the belt tension motor to spindle..presuming it's a toothed belt..might be some back lash there when you change direction or maybe the belt needs replacing if it's been stood a long time?

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8966
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #570 on: November 10, 2018, 06:23:43 AM »
Good thought but there is no sign of belt slippage or squeals. It's a very wide multi-groove affair.

Got the 'scope on the analogue speed signal to the Mentor, triggered from the Servo Enable signal, and was horrified how much noise is superimposed on the base DC voltage. Not sure at this point if it is being picked up on the leads I'm using or if it is genuinely on the signal but I need to bottom it out. A 1uF capacitor across the scope terminals got it down to a level where I could see the signal but I'm still interpreting what I'm seeing.

Certainly it's looking vaguely like the diagram that I posted from the manual, but I still have work to do to see it properly.

Meanwhile if anyone wants my old Tektronix 453 I'm putting it up for grabs on the cork board, basically free, but make a donation to Eric to help with forum running costs:

https://madmodder.net/index.php/topic,12761.new.html#new
Andrew Mawson
East Sussex

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8966
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #571 on: November 13, 2018, 05:20:18 AM »
Well the usual running round in circles and chasing my tail has produced results.

Firstly I wired up a break out box to allow me safely to connect to the Servo Enable and Analogue signals for the DC Spindle servo system. As the X & Z axis signals and also those I wanted to hook into were all on the same 25 pin 'sub D type' the break out board was necessary to stop the X & Z servos slamming all over the place as I probed.

This allowed me to 'scope the signals and observe that servo action ceases at close to but not at set point - why ? Also the signal to noise ratio was pretty dire - for the small error signals down at the small increments involved ( about 45 mV) the noise was of the same magnitude. Some but not all this noise was being picked up on the twisted pair wires I was using and had a 165 uSec periodicy.

Then I turned my attention to the issue of the drive to the field coils. Plate on the motor says it wants 170 volts but I've never managed to achieve that without other problems ensuing. One big issue was not being able to measure current and voltage simultaneously and also have the fan mounted on the FXM-3 supply.

So I've added a DIN rail and brought the field coil connection out and via it, it such a way that they are both accessible  and also there is a loop that I can get my clamp ammeter round. As an aside it has been suggested that the clamp ammeter, although being a true RMS one, won't show a correct current due to the chopped thyristor nature of the current wave form. Well I've disproved this, as it EXACTLY corresponds to my AVO 8 Mk 6 when both are measuring at the same time.

This also allowed me to see the 'field weakening' characteristics of the FXM-3 - to achieve high speeds the field current is drastically reduced over about 1500 rpm

So with the field set to 5.8 amps and resulting in 160.5 volts the motor characteristics were definitely different, but still it would not turn at the desired 5 RPM. Incidentally, this is 5 RPM at the spindle, the motor at this spindle speed in low gear needs to turn at about 22.5 rpm due to the 3.2:1 gear box, and belt ratios.

. . .why, oh why oh why ? A question that has had me racking my brain for months.
« Last Edit: November 13, 2018, 04:17:25 PM by awemawson »
Andrew Mawson
East Sussex

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8966
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #572 on: November 13, 2018, 05:34:29 AM »
So I decided to read the Mentor-1 DC spindle drive manual from end to end leaving no commas and full stops unmolested  :bugeye:

. . . and guess what - I found that there was a parameter (#161) to 'Enable Standstill Logic' which if the speed is very low, backs off the thyristor firing angle all the way to prevent creep. BUT there was also a parameter (#162) that if #161 was set allowed creep speeds for shaft orientation well I never.

So quickly setting this parameter to '1' guess what - M19 works   :ddb: :ddb: :ddb: :ddb:

Now it's not all plain sailing, as, although there is a method of saving the new parameter values to EEPROM, try as I may it isn't working, and the parameter reverts to it's old value on a power down / up cycle.

...BUT M19 IS WORKING  :clap: :clap:

In the video the program is stepping round in 20 degree segments and I've set the positional accuracy to 2/11 ths of a degree as per the original parameters that I obtained


Andrew Mawson
East Sussex

Online RussellT

  • Hero Member
  • *****
  • Posts: 520
  • Country: gb
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #573 on: November 13, 2018, 05:42:14 AM »
I knew you'd find it! :nrocks: :nrocks: :nrocks:
Common sense is unfortunately not as common as its name suggests.

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8966
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #574 on: November 13, 2018, 07:58:38 AM »
And now the new parameters are saved  :ddb:

Turns out BOTH security codes need entering despite the flag saying one of them hasn't been set  :scratch: Anyway, they are saved, AND I narrowed the location down to its finest setting of 1/11 th degree and sure enough it servo / homes in on it with the accuracy asked for.

Just need to find out how PK is doing 'down under' with that probe - he's gone ominously quiet for a few weeks, I hope he's OK.
Andrew Mawson
East Sussex