I'm looking into using Teknic SDSK servo motors with MachineKit. The SDSK 
models accept step and direction pulses like a stepper motor, so using 
hal_pru_generic's stepgen is straight forward. The major issue I see is 
attempting to use Teknic's precision homing routines, as it doesn't fit 
into MachineKit's limit switch routines. I'd really like to use their 
homing routine because it is accurate to less than 1/10,000 of an inch in 
my setup, which could be difficult to achieve using my own limit switch 
setup. It seems to me that in order to do so would require either a custom 
homing routine implemented in C++ (so a custom build of MachineKit). Any 
thoughts on this would be appreciated!

The Teknic motors have 3 control pins and 1 feedback pin:

Control Pins:
Enable - Used to enable/disable the motor and plays a part in initiating 
the precision homing (see below).
Step - Same as for a stepper motor
Direction - Same as for a stepper motor

Feedback - They refer to this as the HLFB (high level feedback) pin. Can be 
set to a number of different options, but the relevant one for homing would 
be ASG (all systems go) Position, which is high when the motor is in the 
commanded position, low while moving.

The precision homing sequence is initiated as follows:

1) Put the motor into homing mode by toggling the enable pin on (if it's 
already on, then turn it off, then back on).
2) Command the motor with step and direction to move the joint to a hard 
stop.
3) The motor will detect the hard stop and stop accepting step pulses until 
it is commanded to go the opposite direction.
4) After the hard stop is detected the motor will back off to a precise 
location a configured number of internal encoder counts away.
5) After a configured number of milliseconds (default is 10), the HLFB pin 
asserts indicating that homing is complete.

The hard stop detection and precision homing is fantastic. After the first 
homing sequence, the motor will return to a very precise location as long 
as the hard stop stays within ~2mm. I can physically put a shim (less than 
2mm thick) in front of the hard stop and it still goes to a precise 
location that properly ignores the shim (so wearing on the hard stop over 
time doesn't affect the precision of the homing sequence).

So, does anyone have recommendations for how to perform this sequence 
properly in MachineKit? Preferably, I'd avoid needing a custom build of 
MachineKit, but if it's required to make homing a simple click of a button 
then I'll have to go that route.

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/machinekit/6b01a405-251f-4633-af72-abbcd6c78ab0%40googlegroups.com.

Reply via email to