EasyManua.ls Logo

Standa 8SMC5-USB - Page 269

Standa 8SMC5-USB
345 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
new_axis generic functions
log
msleep
wait_for_stop
get_next_serial
libximc functions
get_feedback_settings
get_home_settings
get_move_settings
get_engine_settings
get_entype_settings
...
<120+ functions total>
XiLab functions
Green colored blocks denote functions which create objects,
yellow-colored blocks correspond to libximc functions,
the rest of the functions are colored blue.
new_filenew_calibration
file functions
open
close
size
seek
resize
remove
read
write
axis functions
wait_for_stop
libximc functions
get_feedback_settings
get_home_settings
get_move_settings
get_engine_settings
get_entype_settings
...
<120+ functions total>
log(string text [, int loglevel]) – save text to the XILab log
msleep(int ms) - delay script execution
new_axis(int serial_number) - create new axis object
new_file(string filename) - create new file object
new_calibration(int A, int Microstep) - create calibration structure to pass to calibrated functions
get_next_serial(int serial) - get next serial out of an ordered list of opened controller serials
command_wait_for_stop(int refresh_period) - wait until controller stops moving
and all libximc library functions (see Programming guide)
Also, all constant values from the communication protocol are defined and can be used in scripts. Usage example.
XILab log
Logging is done by calling log(string text [, int loglevel] ) function.
This function adds the text line to the XILab log. If the second loglevel parameter is passed the message receives the appropriate
logging level and is displayed in corresponding color.
Loglevel Type
1 Error
2 Warning
3 Info
Example:
var x = 5;
log("x = " + x);
Function usage example
Note: It is not recommended to invoke functions that interact with XILab user interface (i.e. logging function) with a frequency of more
than once in 20 ms.
Script execution delay
Script is paused by calling the msleep(int ms) function, which suspends script execution for ms milliseconds.
Example:
msleep(200);
Function usage example.
New axis object creation
XILab multi-axis interface provides the ability to manage controllers via scripts. The difference from the single-axis case is that you
should specify the controller which receives the command. An "axis" object is introduced to abstract this concept. It has methods which
match the libximc library function names. Controllers are identified by their serial numbers.
Example:
var x = new_axis(123);
x.command_move(50);
Page 269 / 345
Page 269 / 345