Elmo HARSFEN0602, HARmonica software manual 179, Example Double homing corrects backlash offsets

Models: HARmonica HARSFEN0602

1 220
Download 220 pages 51.63 Kb
Page 181
Image 181

HARSFEN0602Elmo

T

function [int status]=WaitArrive(int TimeOut) /*

Wait until MS=0, or until too much time elapses */

int StartTime ; status = -1; StartTime = TM; while (MS)

if ( tdif(handle) >= TimeOut) return ; end

end

status = 1 ; return

function [int status]=WaitHome(int TimeOut) /*

Wait until HM=0, or until too much time elapses */

int StartTime ; status = -1; StartTime = TM; while (HM)

if ( tdif(handle) >= TimeOut) return ; end

end

status = 1 ; return

##ErrorOut

/* Error handler – just exit*/ return

179

13.5.5.1Example: Double homing corrects backlash offsets

This example demonstrates homing on the home switch without using the index.

In many gear systems, the index signal cannot be used for homing. The reason may be:

Motor or gear repairs should not require the tuning of the index position or the Amplifier.

Backlash and gear compliance prevent accurate mapping of the motor position to the load.

In order to prevent compliance and timing errors, the position of the home switch is captured two times, with alternating movement directions.

The two captured results are averaged to cancel the error sources. Suppose that in the middle of the home switch we should have PX=10000.

Then the homing formula is PX=PX+10000-0.5·(PX at right home edge + PX at left home edge)

The user program routine that does that is listed below. The routine uses the helper functions of the previous example.

Page 181
Image 181
Elmo HARSFEN0602, HARmonica software manual 179, Example Double homing corrects backlash offsets