Homing example (fe and fi method) – Yaskawa SMC–4000 User Manual

Page 353

Advertising
background image

343

SMC–4000 User Manual

Homing Example (FE and FI method)

This example demonstrates how to home servos with a home sensor in the middle of a slide where it is
possible for the servo to be on either side of the home sensor at power-up. If the servo is already past the
sensor, it will hit a limit switch first, and the #LIMSWI special label subroutine will reverse the

CN

(Configure Limit Switches)

command and turn the servo around. The #BACKUP subroutine is used to

make the servo come back to the home input and go a small distance past it, so the #HOMING routine
can always hit the same side of the home sensor.

Ideally, the home sensor is a photo device. If there is a white and black strip along the slide, the photo eye
will see either light or dark, and the value of _HMX will be “1” or “0”. Under this design, the FEX
command can automatically determine the direction to find the transition point of the black and white
strip. You need not account for the limit switch or the #BACKUP routine in that case

Instruction

Interpretation

#TEST

SPX=10000

ACX=1000000

DCX=1000000

CN,1

TRUE=1

FALSE=0

HOMING=FALSE

SHX; WT 2000

#HOMING

MG “Attempting to find
home” {N}

MG “(normal direction)”

FLX

BLX

HOMING=TRUE

JGX=8192;
FEX;BGX;AMX

HOMING=FALSE

JG*=500; FIX; BGX;
MCX

(MCX because the controller will automatically define the position
as zero when the index is found)

MG “Homed O.K!” EN

#BACKUP

MG “Going back to the
{N}

MG “home input..”

CN,-1

Advertising