Author Topic: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)  (Read 151979 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 #525 on: October 28, 2018, 03:04:28 PM »
Using the (new to me) PLC ladder testing approach is both swift in some ways, and mighty frustrating in others. Although I reckon that I have the majority of the logic 'nodes' (ie inputs outputs and flags) named so that I can find my way around, inevitably I end up in a bit of logic where I've not yet been able to plant signposts  :scratch: I reckon I've still 102 out of 490 nodes to name and identify the purpose of

Today I found out that one of the pressure switches that monitors chuck clamping was permanently 'made' - entirely by following the ladder logic, but the frustrating thing is that either they have been wired wrongly, or the circuit diagram is wrong. They are pretty well impossible to get at and determine which is which - certainly can't at the moment as still in Sunday Best  :palm: - a job for tomorrow slackening a hydraulic fitting and see if  clamp or unclamp covers me in oil !

Hopefully I can pull it out and re-work it as I very much doubt that they are a shelf item any more - have a picture.

I'm also attaching the latest .pdf  version of the annotated PLC program for those of you that can't get to sleep at night  :lol:
Andrew Mawson
East Sussex

Offline WeldingRod

  • Sr. Member
  • ****
  • Posts: 400
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #526 on: October 28, 2018, 05:05:06 PM »
Ugh.  I hate pressure switches!  Just a time bomb ticking off till failure.

Sent from my SAMSUNG-SM-G891A using Tapatalk


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 #527 on: October 31, 2018, 08:21:31 AM »
Taken a bit of time off to sort out some tooling cabinets for the Beaver TC-20 lathe - Versatool ones like I used for the Traub - details here:

https://madmodder.net/index.php/topic,8741.msg152687.html#msg152687

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 #528 on: November 01, 2018, 08:09:31 AM »
Major break through today in the hunt for the M19  Oriented Spindle Stop problem that has been eluding me for ages.

In desperation I have typed into the 'Machine Data' for the controller the values of parameters for Spindle Data from the TC-10 back up that I obtained, where they differ from mine. And guess what, the servo loop IS closed, and the spindle rotates to approximately the programmed position but then oscillates around that position never completing the command. Parameters changed are:

#4010 Drift Compensation (Spindle) was 2 now 6
#4270 Cut Off Speed M19 Gear 1 was 5 now 10
#4350 Gain for M19 Gear 1 was 2000 now 7000
#4430 Positional Limit for M19 was 2 now 1
#4500 Set Reciprocation Speed was 100 now 0

So I conclude that the spindle positioning servo loop parameters need tuning. I have tweaked all these values up and down a bit  but not yet found any one that stops the hunting.

Bear in mind that the other lathe is different. It only has one gear whereas mine has two, so parameter #4350 for instance where the servo gain is very different (7000 as opposed to 2000), in fact mine was originally 7000 for Gear 2. Also my main spindle motor is significantly bigger than the TC-10 one.

Need to research servo tuning, but what amazes me is that with my original values there was no apparent servo action on the spindle at all - very odd.

But this IS another major step forwards  :clap:
Andrew Mawson
East Sussex

Offline seadog

  • Full Member
  • ***
  • Posts: 223
  • Country: gb
  • NE London
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #529 on: November 01, 2018, 11:28:08 AM »
The gain would be the obvious choice to prevent hunting. I can just about recall this was fairly critical when I was playing with feedback on RF frequency synthesizers.

Perhaps the drift compensation is damping. (Then again, perhaps it isn't)

Well done!

Offline WeldingRod

  • Sr. Member
  • ****
  • Posts: 400
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #530 on: November 01, 2018, 03:54:22 PM »
Ooooh!  Tool (cabinet) lust!  Love the swing out shelves!  My Hardinge does that for collets.  I _might_ have made my own custom "board" out of Aluminum...

Sent from my SAMSUNG-SM-G891A using Tapatalk


Offline cnc-it

  • Jr. Member
  • **
  • Posts: 40
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #531 on: November 02, 2018, 12:16:33 AM »
Also on the Mentor drive there are pots for tuning..I used them for setting the rpm after I had my motor re built..worth a try?

Offline PekkaNF

  • Hero Member
  • *****
  • Posts: 2523
  • Country: fi
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #532 on: November 02, 2018, 03:26:54 AM »
Also on the Mentor drive there are pots for tuning..I used them for setting the rpm after I had my motor re built..worth a try?

So does that drive has cascade contoller:
1) Inner loop for curren or torque i.e. motor "native" possibly analog control loop
2) Outer loop in PLC for position control

Cascade controller are pretty sensitive that way. When I had to tune somewhat similar system, we did it shis way:
1) Make sure that inner loop HW stop works with limitswitces or such (would be drag to crash it)
2) Remove PLC control loop totally from inner loop, we used programmed step respose generator for inner loop SP.
3) Use step response to tune inner loop as tight as possile, but make sure that it has enough stability to live with wear, changing load etc.
4) After inner loop step response is good , connect inner loop to outer loop and adjust outer loop.

Gain ratio is critical, inner loop should be least 10x faster or controllers start fighting. If cascaded controller outer loop is too tight to inner controller it will cause bad behavour.

Now, if the outer loop gain has to be too high for confort (it will try to ocilate in certain ocasions) there are few paramaters to play with like dead band (When position is "good enough" and correction would send the controller to hunt near SP) and derivate type parameter (how small error you want the controller to react).

We also used "Forward" controller type: Depending the difference on measured value and setpoint, the controller would lock the outer loop AND shoot the inner loop with precalculated (massive) step to jerk the system "close" and when "nearly there" would release the outer loop controller that would do it's job gently to control exact position. This needes the system to be modelled or tables of mass and transfer distance - like you change the moving mass and then your step response to moving distace had to be different.

Hope I did not confuse anything further. We did not made machine tools, but machines that sometimes had a lot in common with machine tools. I.E. linear rails, torque/speed/position control loops with electro hydraulics or electrical servos.

Pekka

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 #533 on: November 02, 2018, 04:02:37 AM »
Thanks chaps for the suggestions.

The control loop seems to be pretty well confined to the inner workings of the Siemens 6FX1121-4BA01 'measuring card', which takes in the spindle encoder and produces the -10-0-+10 for the Mentor drive.  and parameter settings don't exactly conform to what I would expect for a 'three term control' . If I set the gain such that it gets close to set point but then stops not at set point, and manually turn the chuck from side to side, there is a wide 'dead band' either side of set point with no significant servo action, and I have to go through the set point very slowly for the measuring card to notice the set point position and confirm 'in position' to the 820T controller.

I've set myself two tasks today. Firstly to order up some 15 pin SUB-D plugs and sockets to make an interceptor cable for the encoder to check all it's bits are toggling (task complete !). Secondly to remove the analogue input to the Mentor spindle drive, and run it from a battery box to check it doesn't have any offset or deadband of it's own - (I have a little drive box somewhere made up when I built the 4th axis for the Partsmaster)

Meanwhile I've made up an Excel spreadsheet of the 17 parameters that I 'think' are involved so that I can keep track of what I've changed - I've been printing out a copy after each 'session' and time and data stamping it !

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 #534 on: November 02, 2018, 07:59:42 AM »
Monitoring the analogue drive to the Mentor DC Spindle Drive when being driven by the controller it seems believable, about 3.5 volts at 1000 rpm and 9.99 at 3500. 3500 is maximum speed so sensible that that is 10 volts ie full range. I've not tried yet driving it from my little servo battery box  as a last minute booking for the holidays cottages threw us into a bit of a panic  :bugeye: I have however managed to find the little box and check that it's batteries are still alive.

Before 'the phone call' I did however have another play adjusting the M19 parameters and have found a setting that achieves 'lock' in that it arrives at set point. By adjusting the gain and seeing if the spindle under shoots or over shoots I was able to arrive at a compromise setting, but it is rather 'soft' and I think it is drifting as things warm up (not surprising). The gain setting is dramatically lower than my original parameters (170 as opposed to 2000) so I'm sure something is adrift elsewhere.

One handy feature is that I can send it to a particular angle, then using the PLC inbuilt monitoring facility find what angle it has actually achieved to let me know if undershoot or over shoot.

Complications this week end due to friends staying so little will probably be done, but it does provide another set of muscles to turn those cupboard over even if he is a septuagenarian like me  :lol:
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 #535 on: November 02, 2018, 09:45:11 AM »
Line #19 "Set resiprocation speed"? Is it explained aqnywhere? Is it overshooting speed? What will happen if you set same than approach speed? I would test that 40/50/60 values (If set speed is 50) and see if overshoot characteristics change. I guess if you set it zero, it goes only one way and either stops inside the error or overshoots and stays there.

The reason I though it has cascade controller is that in that era they often did and this comment
Also on the Mentor drive there are pots for tuning..I used them for setting the rpm after I had my motor re built..worth a try?

Other reason for pots are discrete error signals from analog system. Is there a feedback loop from the motor (position or current) in the Mentor drive?

Pekka

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 #536 on: November 02, 2018, 11:55:18 AM »
Pekka, the reciprocation speed is used for lathes like this one with gear boxes, to let the gears 'rock in' as you change gear.

It is, you are quite correct, a 'loop within a loop' as the Mentor is handling current through the armature to achieve a set speed looking at the tacho, and the 'Measuring Card' is controlling  the analogue signal to the Mentor to achieve in this case a set position, but normally a set speed.

Hot off the press when the system has failed to achieve position and is in it's 'deadband' I can measure a signal in terms of a few tens of millivolts supplied to the Mentor to turn, and if I rotate the chuck by hand to the other side of the set point, the polarity of the signal reverses. So I conclude that the measuring cards KNOWS it's not where it should be, but the Mentor doesn't respond to such small signals. Now I assume (dangerous) that were the gain set higher, the 'error voltage' would also be higher, so the next job is to wire a DVM back from the Mentor to the console so I can see the effect of changing parameters in real time.

 . . oh what fun  :ddb:
« Last Edit: November 13, 2018, 05:30:29 PM by awemawson »
Andrew Mawson
East Sussex

Offline cnc-it

  • Jr. Member
  • **
  • Posts: 40
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #537 on: November 02, 2018, 12:24:02 PM »
So Andrew does the spindle have a brake to keep it from moving when milling and drilling etc ..and could you mill a large square thread for example by rotating the spindle and feeding the turret in the z axis..?

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 #538 on: November 02, 2018, 12:57:22 PM »
The M20 'preparatory function' for the M19 takes the brake off if it was on, and asserts 'Spindle Enable' and 'Servo Enable' . Once the M19 function gets to target it applies the brake, and removes 'Servo Enable'

Yes the possibilities are endless once this facility is functioning faultlessly. I still need to modify the drive arrangement for the power tooling to actually be able to use it, but things are getting closer  :ddb:
Andrew Mawson
East Sussex

Offline cnc-it

  • Jr. Member
  • **
  • Posts: 40
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #539 on: November 02, 2018, 02:38:50 PM »
Yes when you think of the possibilities especially with the tail stock for holding long parts  :jaw: 

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 #540 on: November 04, 2018, 05:06:01 AM »
I have wired my Fluke DVM to the analogue drive signal from the 'measuring circuit' to the Mentor DC drive, and sure enough as the gain is increased the magnitude of the position error signal increases and the 'dead band' decreases, but if the gain is set high enough for the spindle to be positioned crisply then the system oscillates. Backing off the gain so that the oscillations  cease but we are not at set point, I can manually rotate the chuck through set point and if going slowly enough the system will 'lock on'

Doing a bit more investigation, and armed with the recently obtained PLC program I can see a bit more of what is happening. A signal (I 114 bit 4) from the NC control, presumably derived from the 'measuring card' is provided to the PLC, where it triggers a 300 Milli-Second  timer (T1) . If the 'in position' signal is still asserted when T1 expires the PLC acknowledges the end of the M19 cycle and applies the spindle brake.

As the servo system is in fact oscillating wildly either side of set point, and never 'on set point' for 300 mSec it carries on ad infinitum. Juggling all the various parameters previously detailed has failed to find a compromise setting. For all the world it is as though there is no damping on the system. I have also examined the acceleration parameters in the Mentor drive, and more than doubled the accelerate and decelerate ramp times with no effect on the symptoms.

I've shot a video to illustrate the point - note that as the updating of the PLC is 'sampled' the camera misses many of the brief bit changes for I 114.4

Also attached are screen shots of the relevant  bits of the PLC program

« Last Edit: November 04, 2018, 05:38:13 AM 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 #541 on: November 04, 2018, 05:17:38 AM »
Now looking at the manual for the 810T (mine is an 820T but running the same GA2 program) there are flow charts for how the servo system is controlled and how M19 is implemented, but none of it so far has triggered that 'lightbulb moment' for me to say what's wrong here!

Assuming this machine was working when the back ups I'm using were taken then it's very odd that a parameter would need to be changed as they should be as they were previously, and one parameter (4270 Cut Off Speed for Gear 1) is set to it's original value of 5 the M19 system won't move at all ! Logically I would assume that some hardware has failed / drifted what ever but the bits involved as far as I can tell have been exchanged and then returned to no alteration in symptoms.
Andrew Mawson
East Sussex

Offline mc

  • Full Member
  • ***
  • Posts: 108
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #542 on: November 04, 2018, 06:37:15 AM »
It's like either the PLC is needing to apply a bit damping to the output, or the Mentor drive is applying too much damping/not responding quick enough.

If the PLC settings seem plausible and you're sure they're valid, what about the settings in the Mentor drive?

Offline cnc-it

  • Jr. Member
  • **
  • Posts: 40
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #543 on: November 04, 2018, 06:55:19 AM »
I had this problem on a Fanuc DC servo which was oscillating at stand still..it turned out to be a faulty servo drive top board (control card).. Encoder faults usually cause alarms and the motor to run away so can't see it being that.

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 #544 on: November 04, 2018, 07:03:20 AM »
Morry, the Mentor 'ramp' settings for accelerate and decelerate seem to be the only ones relevant. Yesterday I had gone from a setting of 20 to a setting of 50 (not sure of the units) with no effect. Now this morning I took the ramp settings up to their maximum value of 255 but again with no apparent change. (I was surprised not to to see a difference when just starting and stopping the spindle with an M03 / M05 though)

I can't be absolutely sure that the gen that I have on the mentor is correct for this model (although I think it is) but it shows a 'bit read/write' parameter #167 'Ramp Enable' - but so far I've not found the way to change 'bits' !

On the positive side, the issue I was having with the pressure switch for clutch open / closed a few days ago seems to be solved by tweaking the pre-set for PS/5 on the closed side. Previously it wasn't changing state so would say both 'open' and 'closed' at the same time when actually open but now it does  :thumbup:
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 #545 on: November 04, 2018, 07:06:01 AM »
I had this problem on a Fanuc DC servo which was oscillating at stand still..it turned out to be a faulty servo drive top board (control card).. Encoder faults usually cause alarms and the motor to run away so can't see it being that.

No I don't think it's the encoder either, now that the PLC is actually getting the 'on set point' signal and I can monitor spindle rotatio in 0.1 degree graduations via the PLC 'Diagnose' function
Andrew Mawson
East Sussex

Offline mc

  • Full Member
  • ***
  • Posts: 108
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #546 on: November 04, 2018, 07:38:25 AM »
I would of thought the Mentor would have more than ramp settings.
It could be it's running in a torque mode, in which case ramp settings are not likely to have much effect, as torque mode should bypass most of the speed control settings.

I'm guessing you've not got the proper manual for the drive?

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 #547 on: November 04, 2018, 09:42:39 AM »
Well a bit more aggressive Googling has found me the correct 'Mentor 1' manual - a 'good thing'  - All 24 m Bytes of it.   :ddb:

https://www.kollmorgen.com/sites/default/files/public_downloads/Mentor%20M3000%20manual.pdf

(Mine is the 6M4Q30MTD at 26.5 kW)

Although I've been adjusting the ramp times, it seems that ramps are not enabled on my drive, and the enable bit is protected  by security codes though the ramp values are not

The bad news is that there seems to be a two level security code set to protect certain settings. Level 2 code is 149 - got that one, but the level 1 code is user settable and I have absolutely no idea what it is - only a 3 digit number  :bang:
Andrew Mawson
East Sussex

Offline Pete.

  • Hero Member
  • *****
  • Posts: 1075
  • Country: gb
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #548 on: November 04, 2018, 09:56:45 AM »
I bet it's 999.

Offline russ57

  • Sr. Member
  • ****
  • Posts: 278
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #549 on: November 05, 2018, 05:30:47 AM »
Or 000, 111,222,333 etc.

Then 123, 234, etc.

That's 20
Only 980 to go after that!


(a recent presentation I was at plotted bank card pins to a heat map. The 'hot' lines were centred around repeated digits and then 1-12 against 1-30, ie birthdays.)



Russ