Esp_Get_Error_String(Char *Errorstring, Int *Error, Int *Servotick) - Newport ESP6000 User Manual

Motion controller/driver
Table of Contents

Advertisement

esp_get_error_string Report Error String
Synopsis:
Arguments:
Library Location:
Description:
Returns:
Usage Example:
See Also:
Section 5 — Programming
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
#include "esp6000.h"
int esp_get_error_string(char *ErrorStr, long *ErrorNum, long *ServoTick)
char ErrorStrg
string containing error message
long ErrorNum
error number
long ServoTick
servo cycle timestamp with 409µsec. resolution
\esp6000.dll
esp_get_error_string() API function call reports ESP6000 error messages complete
with error string, error number, and timestamp. The ESP6000 queues error messages in
a 10-word FIFO buffer. The timestamp enables users to know the exact time of error
posting.
ESP6000 uses a 10-word FIFO buffer to queue error messages.
ESPOK, ESPERROR
Hint:
Check for errors after critical command sequences.
#include "esp6000.h"
main()
{
long error, ServoTick;
double position;
char String[100];
if (!esp_init_system()) exit(-1);
esp_enable_motor(2);
esp_move_absolute(2,-3.0);
while (!esp_move_done(2));
/* prime the loop */
esp_get_error_string(String, &error, &ServoTick);
if(error == 0) return(0);
else printf("Error: %s \r\n", String);
while(error > 0)
{
esp_get_error_string(String, &error, &TickCount);
printf("Error: %s \r\n", String);
}
}
esp_get_error_num()
NOTE
/* enable motor */
/* move stage */
/* wait for move done */
5-107

Advertisement

Table of Contents
loading

This manual is also suitable for:

Unidrive6000

Table of Contents