Example – ADLINK AMP-208C User Manual

Page 93

Advertising
background image

Motion Control Theory

79

AMP-204C / AMP-208C

• Example:

18h (24)

PRA_HOME_EZA

EZ alignment enable

19h (25)

PRA_HOME_VO

Homing velocity away from ORG signal

1Bh (27)

PRA_HOME_POS

Position command setup after homing completion

Param. No.

Define symbol

Description

#include

"APS168.h"

#include

"APS_define.h"

#include

"ErrorCodeDef.h"

void

home_move_example()

{

//This example shows how home move operates

I32 axis_id =

0

;

I32 return_code;

I32 msts;

// 1. Select home mode and config home parameters

APS_set_axis_param( axis_id, PRA_HOME_MODE,

0

);

//Set home mode

APS_set_axis_param( axis_id, PRA_HOME_DIR,

1

);

//Set home direction

APS_set_axis_param( axis_id, PRA_HOME_CURVE,

0

);

//

Set acceleration pattern (T-curve)

APS_set_axis_param( axis_id, PRA_HOME_ACC,

1000000

);

// Set homing acceleration rate

APS_set_axis_param( axis_id, PRA_HOME_VM,

100000

);

// Set homing maximum velocity.

APS_set_axis_param( axis_id, PRA_HOME_VO,

50000

);

// Set homing

APS_set_axis_param( axis_id, PRA_HOME_EZA,

0

);

// Set homing

APS_set_axis_param( axis_id, PRA_HOME_SHIFT,

0

);

// Set homing

APS_set_axis_param( axis_id, PRA_HOME_POS,

0

);

// Set homing

Advertising
This manual is related to the following products: