© 2013 spiiplus training class homing. © 2013 homing homing is a very important aspect for almost...
TRANSCRIPT
© 2013
SPiiPlus Training Class
Homing
© 2013
Homing
Homing is a very important aspect for almost any motion system. With a wide variety of mechanical systems, each with it’s own constraints, there can be many different methods to home the system.
o Home at current positiono Home to hard stopo Home to limit switcho Home to home switcho Home to indexo Home to hard stop and indexo Home to limit switch and indexo Home to home switch and index
© 2013
Homing
Because of all the different ways that homing can happen, ACSPL+ does not have a dedicated home command. Instead, a few lines of ACSPL+ code can be written to give the desired behavior.
Important Commands and Variables:
ENABLE IST
JOG IND
PTP FAULT
SET FPOS
TILL FDEF
© 2013
Home at Current Position
Homing at the current position is the simplest way to home. o A stage can be moved manually or automatically to a desired positiono When at the position, it is set to zeroo Method has poor repeatability and requires human intervention
Load
Home
© 2013
Home at Current Position
ACSPL+ Code:
SET FPOS(axis) = 0
SET command is required because FPOS cannot simply be written to like any other variables.
© 2013
Home to Hard Stop
Homing to a hard stop is a simple way to home when a machine doesn’t have a limit sensor or home switch.
o Care needs to be taken so that the load and hard stop are not damaged in the homing process.
o Home position is typically offset slightly from the hard stop to make sure load does not contact hard stop in normal operation
o Method has poor repeatability
Load
Home
Home Offset
© 2013
Home to Hard Stop
Process:1. Enable motor (ENABLE)2. Reduce motor current saturations to prevent overcurrenting motor or
damaging load or hard stop (XCURI, XCURV)3. Turn off default response to critical position error so homing program
can detect hard stop collision (FDEF)4. Jog slowly towards negative or position hard stop (JOG)5. Detect critical position error indicating hard stop (TILL, FAULT)6. Set home position as current position + offset and move to home
position (SET FPOS)7. Reset motor current saturations and default response to critical
position error
© 2013
Home to Hard Stop
ACSPL+ Code:! 1. Enable motorENABLE (axis)! 2. Reduce motor current saturationsXCURI(axis) = 5XCURV(axis) = 5! 3. Turn off default CPE responseFDEF(axis).#CPE = 0! 4. Jog towards negative hard stopJOG/v (axis), -home_velocity! 5. Detect CPE faultTILL ( FAULT(axis).#CPE = 1 )! 6. Set home position as current + offset and move to homeSET FPOS(axis) = 0 - home_offsetPTP/ev (axis), 0, home_velocity! 7. Reset motor current saturations and CPE responseXCURI(axis) = 50XCURV(axis) = 100FDEF(axis).#CPE = 1
© 2013
Home to Limit Switch
Homing to a limit switch is a simple and safe way to home.o Limit switches are put near the negative and positive travel limits.o Home position is typically offset from the limit sensor o Method has mediocre repeatability because limit switch is detected in
software
Load
Home
Home Offset
Limit
© 2013
Home to Limit Switch
Process:1. Enable motor (ENABLE)2. Turn off default response to negative or positive limit switch so
homing program can detect limit switch trigger (FDEF)3. Jog towards negative or position limit (JOG)4. Detect limit switch (TILL, FAULT)5. Jog slowly in opposite direction and detect when limit is off (JOG,
TILL, FAULT)6. Set home position as current position + offset and move to home
position (SET FPOS)7. Reset default response to limit switch
© 2013
Home to Limit Switch
ACSPL+ Code:! 1. Enable motorENABLE (axis)! 2. Turn off default negative limit switch responseFDEF(axis).#LL = 0! 3. Jog towards negative limitJOG/v (axis), -home_velocity! 4. Detect left limit faultTILL ( FAULT(axis).#LL = 1 )! 5. Jog slowly in opposite direction and detect when limit is offJOG/v (axis), home_velocity * 0.1TILL ( FAULT(axis).#LL = 0 )! 6. Set home position as current + offset and move to homeSET FPOS(axis) = 0 - home_offsetPTP/ev (axis), 0, home_velocity! 7. Reset left limit default responseFDEF(axis).#LL = 1
© 2013
Home to Home Switch
Homing to a home switch is a simple and safe way to home.o A typical home switch will have low polarity on one side of travel and
high polarity on the other sideo Homing is done by finding the home switch transition.o Method has mediocre repeatability because home switch is detected
in software
Load
Home
Home Switch State
© 2013
Home to Home Switch
Process:1. Enable motor (ENABLE)2. Jog in negative or position direction, dependent on current state of
home switch (JOG, IN)3. Detect home switch transition (TILL, IN)4. Move slightly offset from home switch transition in negative or
positive direction (PTP)5. Approach home switch slowly to detect home switch transition and
set as home position (JOG, TILL, IN)6. Move to home position (PTP)
© 2013
Home to Home Switch
ACSPL+ Code:! 1. Enable motorENABLE (axis)! 2. Jog in negative or positive direction dependent on home switchIF ( IN(0).(home_switch) = 0 )
JOG/v (axis), -home_velocity! 3. Detect home switch transitionTILL ( IN(0).(home_switch) ) = 1
ELSEJOG/v (axis), home_velocity! 3. Detect home switch transitionTILL ( IN(0).(home_switch) ) = 0
END! 4. Move off home switch in negative directionPTP/rve (axis), -home_offset, home_velocity! 5. Approach home switch slowly and set as home positionJOG/v (axis), home_velocity * 0.1TILL ( IN(0).(home_switch) ) = 1SET FPOS(axis) = 0! 6. Move to homePTP/e (axis), 0
© 2013
Home to Index
Home to index is a very repeatable way of homing a rotary motor.
o Typical rotary encoder has one index mark per revolutiono Home to index is usually done only on rotary motors with no travel
limitso Method has excellent repeatability because index is latched in
hardware
MotorIndex
© 2013
Home to Index
Process:1. Enable motor (ENABLE)2. Reset index latch (IST)3. Jog in negative or position direction (JOG)4. Detect index (TILL, IST)5. Set home position as index position with optional offset (SET FPOS,
IND)6. Move to home position (PTP)
© 2013
Home to Index
ACSPL+ Code:! 1. Enable motorENABLE (axis)! 2. Reset index latch by togglingIST(axis).#IND = 1IST(axis).#IND = 0! 3. Jog in negative directionJOG/v (axis), -home_velocity! 4. Detect indexTILL ( IST(axis).#IND = 1 )! 5. Set home position with optional offsetSET FPOS(axis) = FPOS(axis) - ( IND(axis) - home_offset )! 6. Move to home positionPTP/e (axis), 0
© 2013
Home to Hard Stop and Index
Home to hard stop and index is a very repeatable way to home a linear motor that doesn’t have a limit sensor or home switch
o Typical linear encoder has one index marko For best repeatability the index mark should always be found from the
same directiono Care needs to be taken so that the load and hard stop are not
damaged in the homing process.
Load
Index
© 2013
Home to Hard Stop and Index
Process:1. Enable motor (ENABLE)2. Reduce motor current saturations to prevent overcurrenting motor or
damaging load or hard stop (XCURI, XCURV)3. Turn off default response to critical position error so homing program can
detect hard stop collision (FDEF)4. Jog slowly towards negative or position hard stop (JOG)5. Detect critical position error indicating hard stop (TILL, FAULT)6. Jog in opposite direction, reset index flag, and detect index (JOG, IST)7. Set home position as index position with optional offset (SET FPOS, IND)8. Reset motor current saturations and default response to critical position
error
© 2013
Home to Hard Stop and Index
ACSPL+ Code:! 1. Enable motorENABLE (axis)! 2. Reduce motor current saturationsXCURI(axis) = 5XCURV(axis) = 5! 3. Turn off default CPE responseFDEF(axis).#CPE = 0! 4. Jog towards negative hard stopJOG/v (axis), -home_velocity! 5. Detect CPE faultTILL ( FAULT(axis).#CPE = 1 )! 6. Jog in opposite direction, reset index flag, and detect indexJOG/v (axis), home_velocityIST(axis).#IND = 1IST(axis).#IND = 0TILL ( IST(axis).#IND = 1 )! 7. Set home position with optional offsetSET FPOS(axis) = FPOS(axis) - ( IND(axis) - home_offset )PTP/ev (axis), 0, home_velocity! 8. Reset motor current saturations and CPE responseXCURI(axis) = 50XCURV(axis) = 100FDEF(axis).#CPE = 1
© 2013
Home to Limit Switch and Index
Home to limit switch and index is a very repeatable and safe way to home a linear motor
o Typical linear encoder has one index marko For best repeatability the index mark should always be found from the
same direction
Load
Index
Limit
© 2013
Home to Limit Switch and Index
Process:1. Enable motor (ENABLE)2. Turn off default response to negative or positive limit switch so
homing program can detect limit switch trigger (FDEF)3. Jog towards negative or position limit (JOG)4. Detect limit switch (TILL, FAULT)5. Jog in opposite direction, reset index flag, and detect index (JOG,
IST)6. Set home position as index position with optional offset (SET FPOS,
IND)7. Reset default response to limit switch
© 2013
ACSPL+ Programming Example: 1
Write a program to home to a limit switch and index.
Load
Index
Limit
© 2013
Home to Home Switch and Index
Homing to a home switch and index is a simple, safe and very repeatable way to home.
o Homing is done by first finding the home switch transition, and then finding the index.
o For best repeatability the index mark should always be found from the same direction
Load
Home
Home Switch State
Index
© 2013
Home to Home Switch and Index
Process:1. Enable motor (ENABLE)2. Jog in negative or position direction, dependent on current state of
home switch (JOG, IN)3. Detect home switch transition (TILL, IN)4. Jog in direction of index, reset index flag, and detect index (JOG,
IST)5. Set home position as index position with optional offset (SET FPOS,
IND)6. Move to home position (PTP)
© 2013
ACSPL+ Programming Example: 2
Write a program to home to a home switch and index.
Load
Home
Home Switch State
Index
© 2013
ACSPL+ Programming Example: 3
A robust homing program should have the ability to recover if any physical sensor fails (limit switch, home switch, index).
Expand example 1 (home to limit switch and index) to be robust to these failures.