Motor

Here are the functions that access the motor parameters or move motors.

calibrate()
Calibrates stepping motors. The function implicitly uses protect. Example:

$ret = calibrate( name => "mot1",    
                  unit => 1.234,
                  nolog => 1,           # optional, def.: 0
                  noconfirm => 1,       # optional, def.: 0
                  keeping_limits => 0); # optional, def.: 1

cancel_all_moves(), alias cam()
$ret=cam();

check_motor_registers(), alias cmr()
See section 6.14.1.

check_motors_moving, alias cmm()
$ret=cmm();

check_move(), alias cm()
$ret=cm( "mot11");

convert_to_relative_steps, alias ctrs
$steps=ctrs( "mot11", 5.);

get_motor_ramp_steps, alias gmrs
$steps=gmrs( "mot11");

get_motor_protection
Returns 1, if the motor is protected.
$steps=get_motor_protection( "mot11");

get_motor_ramp_units, alias gmru
$steps=gmru( "mot11");

get_motor_step_register_controller, alias gmsrc
$steps=gmsrc( "mot11");

get_motor_step_register_internal, alias gmsri
$steps=gmsri( "mot11");

get_move_time, alias gmt
$steps = gmsrc( "mot11", $pos_delta);

get_motor_unit_position, alias gmup $pos = gmup( "mot12");

move()
move( mot1 => 0, mot2 => 100);
move( mot1 => 100, relative => 1);
move( mot1 => 0.1, relative => 1, backlash => 0);
move( mot1 => 1, steps => 1);
move( energy => 8980);
amove() see section 4.4

Oms58()
$ret = oms58( "mot1", "ac1000"); acceleration [1,1000000000]
$ret = oms58( "mot1", "id"); set done
$ret = oms58( "mot1", "ic"); clear done and error
$ret = oms58( "mot1", "fl"); flush queue
$ret = oms58( "mot1", "gd"); clear done and go
$ret = oms58( "mot1", "go"); initiate prev. prog. move
$ret = oms58( "mot1", "kl"); kill, stop all, flush queues
$ret = oms58( "mot1", "lp5000"); load position
$ret = oms58( "mot1", "ma5000 go"); move absolute
$ret = oms58( "mot1", "mr5000 go"); move relative
$ret = oms58( "mot1", "rs"); power-on reset
$ret = oms58( "mot1", "sa"); stop all, flush queue
$ret = oms58( "mot1", "vb20"); base rate [1,vl[
$ret = oms58( "mot1", "vl10000"); slew rate [1,1000000]
$ret = oms58( "mot1", "mp wt1 ax ma1000 go");
Sets the direction bit positive and waits 1 millisecond before the move is started (mp, mm)

$ret = oms58( "mot1", "qa"); query axis
$ret = oms58( "mot1"); read the result
$ret = oms58_qa( "mot1"); query axis, debugging tool
$ret = oms58( "mot1", "ra"); query axis and reset done
$ret = oms58( "mot1"); read the result
$ret = oms58( "mot1", "rp"); request position
$ret = oms58( "mot1"); read the result
$ret = oms58( "mot1", "rq"); request queue
$ret = oms58( "mot1"); read the result
$ret = oms58( "mot1", "wy"); who are you
$ret = oms58( "mot1"); read the result

Query axis response: 1. char: P/M - moving in positive/negative direction, 2. char: D - done (ID, II or IN command has been executed, set to N by this command or IC command), N - no ID executed yet, 3. char: L - axis in overtravel, char 1 tells the direction, set to N when limit switch is not active. N - not in overtravel, 4. char: H - home switch active, N - home switch not active.

reset_motor_step_position, alias rmsp
$ret = rmsp( "mot11", 0);

reset_motor_step_register, alias rmsr
set_motor_step_register_controller, alias smsrc
set_motor_step_register_internal, alias smsri
These functions are equivalent. $ret = rmsr( "mot11", 0);

search_motor()
$ret = search_motor( "mot11");

set_min_move_time, get_~, alias smmt(), gmmt()

set_motor_acceleration, get_~, alias sma, gma
$ret = sma( "mot11", 300000);
$ret = gma( "mot11");

set_motor_base, get_~, alias smb, gmb
$ret = smb( "mot11", 20);
$ret = gmb( "mot11");

set_motor_conversion, get_~, alias smc, gmc
$ret = smc( "mot1", 20000);
$ret = gmc( "mot1");

set_motor_settle_time, get_~, alias smst, gmst

set_motor_slew, get_~, alias sms, gms
$ret = sms( "mot1", 200000);

set_motor_slew_min, get_~, alias smsi, gmsi
$ret = smsi( "mot1", 200000);

set_motor_slew_max, get_~, alias smsa, gmsa
$ret = smsa( "mot1", 200000);

get_motor_limits_status
$ret = get_motor_limits_status( "mot1");
0 - no limit switches hit, 1 - cw, 2 - ccw, 3 - both. CW is at the maximum step position (at the max. unit position, if conv. greater than 0).

set_motor_step_backlash, get_~, alias smsb, gmsb

get_motor_accu_limit_min, ~_max, alias gmali, gmala

set_motor_step_limit_max, get_~, alias smsla, gmsla

set_motor_step_limit_min, get_~, alias smsli, gmsli

set_motor_unit_backlash, get_~, alias smub, gmub
$ret = smub( "mot11", 0.1);
$ret = gmob( "mot11");

set_motor_unit_limit_max, get_~, alias smula, gmula
$ret = smula( "mot1", 200);

set_motor_unit_limit_min, get_~, alias smuli, gmuli
$ret = smuli( "mot1", 100);

setup_absolute_step_move, alias sasm

setup_absolute_unit_move, alias saum

setup_relative_step_move, alias srsm

setup_relative_unit_move, alias srum

slit()
$ret = slit( "s1", "cx");
$ret = slit( "s1", "cx", $new_pos);
$ret = slit( "s1", "cy");
$ret = slit( "s1", "dx");
$ret = slit( "s1", "dy");
$ret = slit( "s1", "left");
$ret = slit( "s1", "right");
$ret = slit( "s1", "top");
$ret = slit( "s1", "bottom");
The slit system s1 can be treated by the slit function, if the following symbols are defined s1_left, s1_right, s1_top, s1_bottom.

slit_calibrate()
slit_calibrate( "s1", "cx", $new_value);

start_all_moves(), alias strtam

stop_all_moves(), alias stpam

start_move(), stop_move(), complete_move()
VME only, these functions havn't been tested yet. See section 10.7 for an example program.



Subsections