5-62
esp_set_master_slave Assign Master/Slave Axes
esp_get_master_slave Report Master/Slave Axes Assignment
Synopsis:
#include “esp6000.h”
int esp_set_master_slave(long master, long slave)
int esp_get_master_slave(long *master, long slave)
Arguments:
long master
master axis number from 1-8 (Note: axes 7 and 8 refer to auxiliary counters)
long slave
slave axis number from 1-6
Library Location:
\esp6000.dll
Description:
esp_set_master_slave() assigns master/slave relationship between axes.
esp_get_master_slave() reports the present master assignment to the specified (pos-
sible) slave axis.
NOTE
The slave’s trajectory mode must be set to SLAVEP (slave to master encoder
position) or SLAVET (slave to master trajectory) in order for master/slave mode
to take effect.
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