Teach Position with SFD feedback - PLCopen Motion
For KAS applications:
- using the PLCopen Motion engine
- with a total travel range of 1 revolution
- that use a SFD single turn absolute position feedback device.
this note outlines how to teach a desired position to a specific physical position then have the offset applied on each project startup
Step 1: Read the absolute position from the drive. Note with SFD or resolver feedback the feedback value will be - 1/2 UU/rev to + 1/2 UU/rev. (UU= UserUnits). Example if UU = 360 the range will be -180 to +180

Step 2: Teach the Position. Below, the parameter b_SetupMotorPosition and MC_SetPos function block are used to determine the PostionOffset between the present Absolute Position and the desired Teach Position. This code is only executed once (bSetupMotorPostion = 1) to define a new offset (not on every powerup).

The Position Offset and Teach Position are saved through PxMM power cycling

Step 3: On each powerup apply this offset by calculating the present offset and using MC_SetPos to redefine the starting position

The attached code has the following controls in the Control Panel for helping to understand the operation

Home >
Knowledge Base >
FAQs >
Downloads >