Section 5 — Programming
5-19
esp_set_softlimit_config
Set Software Limit Configuration Register
esp_get_softlimit_config
Report Software Limit Configuration Register
Synopsis:
#include “esp6000.h”
int esp_set_softlimit_config(long axis, long config)
int esp_get_softlimit_config(long axis, long *config)
Arguments:
long axis
axis number from 1 to 6
long config
configuration register
Library Location:
\esp6000.dll
Description:
esp_set_softlimit_config() is used to configure the software travel limit checking and
event handling for the specified axis.
esp_get_softlimit_config() reports present register setting.
BIT#
VALUE
DEFINITION
0
0
disable software travel limit error checking
0
1
enable software travel limit error checking
1
0
do not disable motor on software travel limit event
1
1
disable motor on software travel limit event
2
0
do not abort motion on software travel limit event
2
1
abort motion on software travel limit event
3
0
reserved
3
1
reserved
4
0
reserved
4
1
reserved
5
0
reserved
5
1
reserved
6
0
reserved
6
1
reserved
7
0
reserved
7
1
reserved
•
•
•
31
0
reserved
31
1
reserved
Returns:
ESPOK, ESPERROR
Hint:
Usage Example:
#include “esp6000.h”
main()
{
if (!esp_init_system())
{
printf(“ESP6000 Not Initialized! \r\n”);
exit(-1);
}
/* Abort Motion & Flag Error On Software Limit */
esp_set_softlimit_config(1,0x0d);
}
See Also:
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com