Sunday 9 April 2017

Servos fixed. Excitement builds....FIRST MOVES!

Nothing really to look at but I simply replaced the tail end on the Z axis and it works now. connected up the diagnostics s/w via the USB and the Z axis works fine. My testing with the bench power supply seems to have correctly identified the motor phasing, although there must have been some luck involved too.

I haven't attempted to "optimise" the PID settings yet. I could spend hours or days or weeks on it but for now there doesn't seem to be a great gap between where it is and what is likely to be optimal. There's a lot of rubbish talked about how it's done, like it's some form of black magic. I recall attending a training course in digital control theory at Cleveland Poly years ago (1981?) and despite several other training courses / lectures etc and development time in the lab, I'm still not massively competent or confident. But I'll get it there in the end.

Sooooo - I reckon it must be time to unearth the controller and start to gradually connect it up. It should actually be pretty quick to get the step and direction signals plumbed up to the drives and get the axes jogging. Hopefully before the afternoon is out.

I notice the step and direction outputs are differential, yet the servo drives are single-ended. I assume I can just leave the complementary outputs (eg DIR-, STEP-) floating. I'll dig out the scope and have a look at the outputs before I connect anything up, assuming they will generate some form of output without loads of other connections required.

Indeed, looking with the scope, the step / dir outputs work without the need for any other changes or connections. Jogging the axes generates pulses. And it's only necessary to connect the Step+ and Dir+ outputs.

Before firing up the combined machine and controller, I did a few things:
  • Connected the grounds of the machine and the controller with a dedicated 18AWG wire. 
  • Bridged the 12V servo supply for the control circuits.
  • Set up the axis config parameters for 1000 PPR (for the encoder) and 5mm / rev (for the leadscrews). I haven't checked it yet with a DTI but it seemed sensible to get the values in the right ballpark.
  • Set "soft" home limits for the 3 axes, along with soft limits for the travel. Together these limit the movement of the axes from the initial position.
And....Bob's your auntie - it jogs nicely! Initially just the X axis but wiring in the other axes is a simple matter of fitting a few more crimps and connecting them into the terminal block. This is the first movement of the machine with the new controller. Cool.

Jogging the table shows that the soft limits inhibit the table movement, preventing further motion in that direction but allow you to jog back the other way, rather as you'd hope. 


This is only the very start. Next - start to implement limit switches, feed rates, e-stop circuit etc. Lots of stuff to connect up, configure, test, optimise etc.

I have a manual MPG pendant awaiting relase from customs in Heathrow now that I have paid £16 VAT. At least it isn't those robbing bastards at DHL who take the opportunity to help themselves to an additional £14 in "admin fees" for doing next to sod all. I hope to see that in the next day or two. Should make jogging a bit easier.

No comments:

Post a Comment

Final assembly and test of the spindle nose adaptor - RESULT!!

After the recent distraction caused by the 3D scanner, resurrecting the 3D printer and buggering about with the throttle bodies for my Honda...