![Sollae Systems PES-2403 Скачать руководство пользователя страница 24](http://html1.mh-extra.com/html/sollae-systems/pes-2403/pes-2403_user-manual_1316208024.webp)
PES-2403 User Manual > How to use > Settings the Initial Position > Stop manually
2017-07-28
Sollae Systems
page 24 of 26
Stop manually
A command stop can be used to manually stop the stepper motor operation when the limit switch is
closed.
At this time, a command eio get is used to detect the input of the limit switch.
an example of stopping a motor manually
<?php
include_once "/lib/sd_spc.php";
spc_reset();
spc_sync_baud(460800);
$sid = 1;
$state = 0;
spc_request_dev($sid, "eio set 0 mode input");
spc_request_dev($sid, "set vref stop 2");
spc_request_dev($sid, "set vref drive 8");
spc_request_dev($sid, "set mode full");
spc_request_dev($sid, "goto 40000 400 1000");
while(1)
{
$state = (int)spc_request_dev($sid, "eio get 0 input");
if($state == 0)
break;
usleep(1);
}
spc_request_dev($sid, "stop");
?>