![Sollae Systems PES-2403 User Manual Download Page 19](http://html1.mh-extra.com/html/sollae-systems/pes-2403/pes-2403_user-manual_1316208019.webp)
PES-2403 User Manual > How to use > Controlling by move
2017-07-28
Sollae Systems
page 19 of 26
Controlling by move
A command move is for controlling a stepper motor based on the current position of the motor.
This method is only available when the motor is stopped.
"move [sign](step) [speed] [accel] [decel]"
※ Caution: there is no space between [sign] and (step)
Descriptions of the arguments are as follows:
argument
description
mandatory/optional
sign
direction, "+"(forward) or "-"(reverse)
optional(default: "+")
step
the number of steps to move
mandatory
speed
speed(unit: pps)
optional
accel
acceleration(unit: pps/s)
optional
decel
deceleration(unit: pps/s)
optional
The argument step is based on the current position of the motor.
If the decel(deceleration) is omitted, it is automatically set to the same value of the acceleration.
an example of using move
<?php
include_once "/lib/sd_spc.php";
spc_reset();
spc_sync_baud(460800);
$sid = 1;
spc_request_dev($sid, "set mode full");
spc_request_dev($sid, "set vref stop 2");
spc_request_dev($sid, "set vref drive 8");
spc_request_dev($sid, "set rsnc 120 250");
spc_request_dev($sid, "move 800 400 800 0");
while((int)spc_request_dev($sid, "get state"))
usleep(1);
sleep(1);
spc_request_dev($sid, "move -800 400 0 800");
while((int)spc_request_dev($sid, "get state"))
usleep(1);
?>
※ This command can be used only when the stepper motor is stopped. So, as in the example above,
always program the move command to run after the motor is stopped.