Encoder Wiring and Granity Settings

So after following the phenomenal advice and tips I’ve been given here, I think i could be close to having a working setup! I’ve wired it all up but can’t get the motor to respond correctly with the test options in Granity. Which means I’ve either got an issue with how its wired, or with the way I’ve configured the software.

Motor: Mige130ST-AM100110
Encoder: ZKD-86-1000BM
IoniCube 1x w/ Ioni Pro
STM32F407 Disco

The encoder (ZKD-86-1000BM) had this data sheet provided with the wiring colours and functions:

I wasn’t to sure how to connect it up to the X4 db15 connector as required, because the pin names aren’t all the same but I did what i thought made sense:
Here’s what i did:

Which leads me to my first question is this wired correctly?
If the wiring is correct then I’d assume my problem is in the Granity configuration.

If anyone can offer any help to any of these problem would be over the moon with appreciation!

Make it easy for yourself - use A+/-, B+/- and Z+/-, the Z differentials = C differentials in our use-case. Then 0V, +5V and shield. That will be enough for fully functional SC1. No other signals needed.

Great, that makes sense. It’s all wired now, so i tried to test it with the ‘Test Stimulus Generation’ in Granity but it had no affect on the motor. Here are the settings:

Fault Limits

Hoping I’ve missed something obvious!
Any help appreciated thanks!

Well, you have an incremental encoder, yet you have selected SinCos in the configuration tool? So you may want to change that to Incremental Quadrature selection instead of SinCos…

I’ve now selected “Quadrature Encoder 1” but still the same issue, the response is inconsistent and often unresponsive when spinning the wheel:

Any ideas appreciated.

In Granity Testing tab, the position feedback value should increase in sync in a logical way when you spin the wheel.

and also, in granity if you increase the torque setpoint to some value like 1000 or 1500, there should be torque generated and the torque should be smooth. Is it smooth?

The torque doesn’t seem to be smooth, its quite bouncy, I imagine the ‘position feedback’ value should increase when turns the wheel one direction and decrease when turning the other.

How ever when i spin the wheel clockwise or anti the ‘position feedback’ value remains in the negatives. I can get it to increase in the negatives but cant get it to go positive.

Then there is still a fault in your wiring.

Yes, Mika is spot-on, the encoder should go positive from zero in one direction, negative in the other. Even if you completely disconnect the power Phases on the servo, position feedback should still increment /decrement.

It is quite easy to get the pin orientation incorrect on the 15-pin d-sub, this is what I am sure your problem is….please see attached picture, note the comment just above the image of the drive-side connector below -

Tried rewiring it with several different combinations, eventually found the correct pin combination. Seems to be working thanks for the help!