Friday, 7 August 2020

4th axis - finally completed

Finally all assembled and all machine screws fitted. No cockups or fettling required.

36mm through bore:


Fixing slots spaced to suit the table of The Shiz


Chuck at top front of box, to minimise intrusion into the machine space




4th axis - done.

TFFT. Now I guess I'll have to mount it on the machine and try it out.

Wednesday, 5 August 2020

Finally put the lid on this 4th axis thing - and Centroid probe app issue

Bloody finally, the last piece of the assembly is close to getting made - and whole thing close to completion.

Found another piece of 10mm loominum plate, this one 6061. Manually milled it down to size in the machine, then set up the CAM in Fusion. 

First set up the workpiece WCS origin:


And off we go.


All that remains now is to finish slapping all the screws in and actually do some 4th axis machining with it...

Slight problem with the new Probe App for Centroid:
Swissi's new probe app doesn't work quite as expected on my machine. 

After probing the Z coord with the native workpiece probing function, I thought I'd check out Swissi's equivalent function. It looked OK previously but here it was giving a 34mm offset. Lo and behold, that's the same as the offset saved in the tool length offset table. WTF - as Swissi pointed out, that value should be set to zero.


The problem is that some stupid idiot used the probe to set the tool length offset for Tool 10 (Renishaw probe). That needs to be set to zero so that the other offsets are relative to it. Anyone can see that - apart from The Stupid Fat Bloke obviously. 


Well that's cleared up at least. It means I have to either remeasure the tool lengths or manually adjust them all. I'll just remeasure them all, as I often do that anyway out of paranoia.

Saturday, 25 July 2020

Final parameter settings for the Yaskawa Sigma II servo drive

Servo working again!
Phew. Finally got the servo drive working again. In the end, I merely had to replace the burnt out resistors in the step and direction optos. I previously desoldered the buggered 75ALS174 line driver device. As I don't anticipate any need to use the encoder feedback outputs from the drive back to the Acorn, I left the device position unpopulated on the PCB. There is no means of monitoring whether it's there, so the drive works fine without it. All is well now unless you remove the housing and see the abortionate bodge I left behind. Best not to do that.

So, having finally repaired the trail of destruction left by The Stupid Fat bloke's ham fisted attempts at connecting up the servo drive to the Acorn controller, I can now get to the bottom of the myriad parameters that need to be set up for correct operation. Some of these reside in the servo amp itself and others within the Acorn, which are best configured using the Acorn Wizard. 

Parameter settings:
I have to take account of a few factors:

  • The reduction ratio due to the timing belt drive, with 34t driver and 60t driven pulleys.
  • The harmonic drive is a nominal 50:1 - but in the arrangement I've chosen, the effective ratio is actually 51:1. That's the sort of trap you could easily fall foul of. 
  • It's possible to set the number of steps per rev within the servo drive, also taking account of both the belt and harmonic drive. The manual is cryptic in places - nothing as powerful as the Chinglish I encountered in the Newker "manual" but still lacking explanation or examples to clarify your understanding. Some experimentation is required, unfortunately.
As noted above, the effective ratio for my setup is actually 51:1.




So the overall reduction due to the belt and harmonic drive is 
                n = (34/60) x (1/51) = 17/1560

There's a box in the wizard where you can enter these values:


This how it's supposed to work:


Using the calculation in the table above, using the 17:1530 ratio at play here, I get 

  • Pn203 = 36000 
  • Pn202 = 5898240 
If I divide those values by 90 I end up with the final values I used:

  • Pn203 = 4000
  • Pn202 = 65535

With effectively 4 pulses per clock cycle, you can see how the a "1000 PPR" pulse frequency from the Acorn would work with this.

Good to have a sanity / cross check giving results that make sense.

The next "reference unit" screen caused me some confusion. I played with this a while and finally left it as shown. Somehow, the reference unit couldn't be reduced much below 0.001 degrees(!) from its initial 0.0001 degree setting. There's not mention of why this would be but it must be a result of having a 16 bit encoder. The error message when you enter a wrong value (0.1 degrees, sir?) is one of those particularly unhelpful "computer says no" ones that leave you none the wiser.




This one puzzled me too.




I seem to have told it that I want 1000 PPR here. However, it looks to me as if it's talking about the encoder output from the drive (to the external system controller), for which I have no use - nor in fact any line driver to generate the signal in the first place! Most of these drives are able to generate a virtual encoder signal based on the motor encoder so that the external system controller can close the loop. The resolution of that output can be different to the native resolution of the 16 bit encoder within the motor - ie 65535 PPR.

As ever, you can only assume the guy(s) who wrote this knew what they meant....

So here are the final parameter values, as reported by the parameter editor in the SigmaWin+ software:




Finally, the resolution setting in the Acorn wizard matches the 1000 PPR value set up by the Yaskawa servo wizard.


Feed rate limitation:
Note that the "max pulse frequency" value set by the Acorn wizard limits the maximum feed rates. Obviously if you have a very high resolution (PPR) set up in the servo drive, you will find that the maximum achievable feed rate is going to be slow. I previously reduced the frequency from the original value of 400kHz to the lowest setting of 100kHz so I could drive the Chinesium (Leadshine clone) stepper drive without missing (all) pulses. The wizard does some basic calculations to prevent you setting feed rates that can't be achieved. These appear to be little more than a very simple division of the max frequency by the resolution, which is fair enough.

None of the 4 servo drives have any obvious limitation that prevents running them on the maximum setting of 400kHz, so I've reverted to that value. This allows reasonably fast feed rates, making best use of the available 3000rpm from the motor. No self respecting Youtube Warrior would be seen dead using anything other than blistering feedrates obviously.

That it?
So I seem to have finally got the 4th axis working with the correct scaling, making sensible use of the available performance. 

Acid test of the parameter values is running the axis over a large number of full revolutions (10 is good) to check that there is no creep of the zero position. This confirms the values work as intended.

One final step - let's try the autotuning function. That will have to wait for the moment....

Thursday, 23 July 2020

Blogger - revenge of the retard interns??

I don't know what sort of retards they are employing at Blogger these days but the "new look" interface was a disaster, loading your pictures in reverse chronological order for no good reason. The only way round it I could see was to order your pics in reverse within the pictures browser before selecting them, which is a royal and unnecessary ballache. An even simpler fix is stay with the "original" interface.

But no, the in-house retard interns seem to have got to that too. So if you stupidly paste a graphic into a page draft, it will get picked up by your mouse, no matter what you do - like when you are simply moving the mouse across a picture, like it or not. And you can't put the graphic down or deselect it. Where ever you move the mouse, the graphic follows you like a lost puppy, screwing up your text and pics as it goes.

It's always been a bit buggy to say the least but they seem keen to make it almost unusable. Left or centre justification of selected text never seems to work first time round and it can take a few goes to get photos etc correctly justified.

Now as I type this, each paragraph indents as I pass the mouse over it. What the **** are these arseholes playing at? Did they just **** it up and then go home? Do they ever test their own work?

And then we have the "saved but not saved" issue, where it claims to have saved your changes but you discover all the changes in your last session have f***ed off into the ether without any indication or means of recovery. That really doesn't impress either.

Rant over - for the time being.

Buggered line driver

What???
Dear god. I got the 4th axis working fine with the Centroid Acorn controller a week ago, cock-a-hoop, then got up the next day to sort out the electronic gearing ratios etc - and found I just couldn't control it any more. Damn thing was not talking to me using the control interface on the Servopack, - at all. I was still able to jog the machine using the front panel buttons. WTF?? What had gone wrong?

It's a really good thing I'd taken great care to connect up the wires to the interface connector, otherwise I might have ended up sticking power supply volts back up an output for instance. And sure enough, that's exactly what seems to have happened. Some stupid git had connected the 24V supply to pin 48 instead of pin 47. Easy mistake to make - but pin 48 is one of the "encoder output" outputs. This is an RS485 line driver, so seems unlikely to have enjoyed getting 24V up its ass.

I find that as I get older, this sort of thing happens more often. I guess the wheels are coming off slowly.

Have to admit, there was a bit of a hot pong, which I was tempted to put down to the 13 or so years this thing was sitting on the shelf, gathering dust. But given that the thing stopped working, that indifference was mistaken.

So what went wrong? Time to take the thing apart and see what damage I've done. Can I fix it?

Inside the Yaskawa Sigma II Servopack:




The front cover simply unclips:


And the internal PCBAs come apart easily once you remove 4 screws:


Pretty much what you'd expect. This is the power assembly. There's a separate PSU for the control circuit and a passive rectifier for the motor drive circuit (no PFC front end on a small converter like this).


There's a power module between the PCB and the heatsink.


The other PCBA contains all the IO and the digital stuff.


There's a couple of processors here. Looks as if they are Yaskawa branded. Whether they are fundamentally a Hitachi or similar processor I don't know. I expect one of these is an FPGA or similar and the other will be a microcontroller to handle all the controls, IO, comms etc.


What did you do to the line driver?
There's a fine array of optos on each side of the board. But wait, there's the differential line driver with a nasty hole in it in the middle of the pic. And some nasty, overheated resistors next to the connector on the right of the pic. All is not well but this may explain why it refuses to talk any more.


Without specialist reflow tools (which I don't have), removing a 20 pin DIP package can be tricky. I have a pair of very fine cutters that allow me to cut the pins individually. Then I can desolder each pin afterwards, one at a time.


Apart from the marks from the magic smoke, nothing seems to be damaged beyond the IC itself. The connections to the from connector are direct, so the path of destruction may be reasonably limited, you never know. Fingers crossed...


And here's a closer look at the scorched resistors next to the connector. Given the circuit arrangement, this damage looks as if it's caused by a different mechanism. Could I seriously have shafted two sets of circuits here?


What happened with the resistors??
Here's your mistake, fatty. You saw this diagram and confused the step / direction inputs with the other digital inputs. The current requirements and series resistors are quite different!!

But it's an easy mistake to make, looking at the diagram on page 6-10. Observe the resistor values at the top of the page, where the step and direction signals come in. I spy 150 ohms. Running them from 24V won't end well:

And as you can see from the "open collector output" table, there's actually a 12V protected output (1k in series) available - if I'd used this, none of this shit would have happened. Fux sake.



Naturally, my optos have a 75R resistor in series, not a 150R. And if you misread the diagram as I did, you might even think there's a 3.3k series resistor.

All I needed to do was drive the optos from the current limited open collector supplies PL1, PL2 & PL3 or fit a series resistors for use with 12V or 24V. I'll have to check to see if I've managed to bugger the optos next. For use with my own supply, 24V, I'd want around around 2.2k external series resistor to get the recommended 7 - 15mA in the opto or if using 12V, I'd want 1k.

Deep dive:
Let's have a look at some of the components at play here. After all, I may be required to replace some of them...

Datasheet for the SN75174 line driver







Choose £10 for one or £4.50 for two.





High speed opto for STP, DIR etc:
https://datasheetspdf.com/pdf-file/1089909/CEL/PS9114/1




http://www.cel.com/pdf/datasheets/ps2705.pdf





http://www.cel.com/pdf/datasheets/ps2702.pdf


4th axis - finally completed

Finally all assembled and all machine screws fitted. No cockups or fettling required. 36mm through bore: Fixing slots spaced to suit ...