5-64
esp_set_master_initial_position
Set Master Initial Position
esp_get_master_initial_position
Report Master Initial Position
Synopsis:
#include “esp6000.h”
int esp_set_master_initial_position(long master, double position)
int esp_get_master_ initial_position(long master, double position)
Arguments:
long slave
master axis number from 1-8
double position
master initial position (in user units)
Library Location:
\esp6000.dll
Description:
esp_set_master_initial_position() sets master initial position. This API function call
enables the user to define the master axis’ initial position thereby eliminating the initial
‘jump’ that may occur in the slave axis as it begins slaving.
esp_get_master_initial_position() reports the present master initial position setting.
NOTE:
The controller defaults to normal (non-master/slave) mode after system reset.
Returns:
ESPOK, ESPERROR
Hint:
Usage Example:
#include “esp6000.h”
main()
{
if (!esp_init_system()) exit(-1);
/* assignment axis-2 (slave) to axis-1(master) */
esp_set_master_slave(1,2);
/* assign master/slave ratio */
esp_set_master_slave_ratio(2,-0.5);
/* set slave to track master position (encoder) */
esp_set_traj_mode(2, SLAVEP);
/* set master initial position */
esp_set_master_initial_position(1, 0.0);
/* set slave initial position */
esp_set_slave_initial_position(2, 0.0);
•
•
•
}
See Also:
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com